Skip to content

Fastapi/demographicinference#54

Merged
CDevmina merged 21 commits intoDevelopmentfrom
fastapi/demographicinference
Apr 27, 2025
Merged

Fastapi/demographicinference#54
CDevmina merged 21 commits intoDevelopmentfrom
fastapi/demographicinference

Conversation

@CDevmina
Copy link
Owner

This pull request introduces significant updates to the handling of user demographic data and privacy settings in the API service. The changes include restructuring the OpenAPI schema, enhancing the database schema, and updating the relevant service logic to support new user-provided and inferred demographic fields, while removing outdated verification flags.

Schema Updates

  • OpenAPI Schema Enhancements:

    • Added new PrivacySettings and DemographicData components to modularize and clarify user data structures. These include fields like allowInference and user-provided demographic attributes such as hasKids, relationshipStatus, employmentStatus, and educationLevel. [1] [2] [3]
    • Removed redundant fields directly under components and replaced them with references to the new components. [1] [2]
  • Database Schema Updates:

    • Incremented schema version to 3.0.0.
    • Updated userSchema to include new user-provided fields (hasKids, relationshipStatus, etc.) and removed verification flags for inferred fields. Clarified descriptions for existing fields.

Service Logic Changes

  • User Registration:

    • Updated registerUser in AuthenticationService.js to initialize new demographic fields and set default values for allowInference. [1] [2]
  • User Profile Updates:

    • Enhanced updateUserProfile in UserProfileService.js to handle updates to new user-provided demographic fields while clearing inferred values when user-provided data is updated. Removed logic for verification flags. [1] [2]
    • Added support for updating allowInference in privacy settings.

These changes improve modularity, clarity, and flexibility in handling user demographic and privacy data, aligning the API with modern data management practices.

CDevmina added 21 commits April 26, 2025 16:02
…ry selection and improved demographic handling
…ents and streamline cache invalidation process
@CDevmina CDevmina added the enhancement New feature or request label Apr 27, 2025
@CDevmina CDevmina self-assigned this Apr 27, 2025
@CDevmina CDevmina merged commit 5a4101a into Development Apr 27, 2025
3 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant