Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specialties #118

Merged
merged 6 commits into from
Mar 23, 2024
Merged

Add specialties #118

merged 6 commits into from
Mar 23, 2024

Conversation

jamalsoueidan
Copy link
Owner

@jamalsoueidan jamalsoueidan commented Mar 22, 2024

User description

add specialties to filter list, and return specialties endpoint


Type

enhancement, tests


Description

  • Added a new endpoint usersSpecialties for fetching user specialties along with the total count.
  • Implemented UserControllerSpecialties and UserServiceSpecialties to handle the specialties logic.
  • Enhanced UserServiceList to support filtering by specialties and include total count in the response.
  • Added Jest configuration for setup files and debug configuration for VSCode.
  • Updated OpenAPI documentation to include the new usersSpecialties endpoint.

Changes walkthrough

Relevant files
Enhancement
user.function.ts
Add User Specialties Endpoint Registration                             

src/functions/user.function.ts

  • Added UserControllerSpecialties to the user functions.
  • Registered a new endpoint usersSpecialties for fetching user
    specialties.
  • +8/-0     
    specialties.ts
    Implement User Specialties Controller                                       

    src/functions/user/controllers/user/specialties.ts

  • Created UserControllerSpecialties for handling specialties requests.
  • Defined request and response types for specialties endpoint.
  • +23/-0   
    specialties.ts
    Add User Service for Specialties                                                 

    src/functions/user/services/user/specialties.ts

  • Implemented UserServiceSpecialties function to fetch specialties.
  • Aggregates and counts specialties based on profession.
  • +26/-0   
    list.ts
    Enhance User List Service with Specialties Filtering         

    src/functions/user/services/user/list.ts

  • Added specialties query parameter handling in UserServiceList.
  • Included total count in the response.
  • +55/-0   
    Tests
    start-end-date.spec.ts
    Mock Date in Availability Tests                                                   

    src/library/availability/start-end-date.spec.ts

    • Mocked Date in tests to ensure consistent test results.
    +16/-13 
    Configuration changes
    jest.config.js
    Configure Jest Setup Files                                                             

    jest.config.js

    • Added setupFiles configuration to Jest for environment setup.
    +1/-0     
    launch.json
    Add Debug Configuration for Jest Tests in VSCode                 

    .vscode/launch.json

    • Added Jest Tests debug configuration for VSCode.
    +15/-1   
    Documentation
    openapi.yaml
    Document Users Specialties Endpoint in OpenAPI                     

    openapi/openapi.yaml

  • Added OpenAPI documentation for the new usersSpecialties endpoint.
  • +4/-0     

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @jamalsoueidan jamalsoueidan self-assigned this Mar 22, 2024
    @jamalsoueidan
    Copy link
    Owner Author

    @jamalsoueidan jamalsoueidan merged commit a6bfb15 into main Mar 23, 2024
    2 checks passed
    @jamalsoueidan jamalsoueidan deleted the add-specialties branch March 23, 2024 00:52
    @jamalsoueidan
    Copy link
    Owner Author

    /describe

    @github-actions github-actions bot added enhancement New feature or request tests labels Mar 30, 2024
    Copy link

    PR Description updated to latest commit (843cd5f)

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    enhancement New feature or request tests
    Projects
    Status: Done
    Development

    Successfully merging this pull request may close these issues.

    1 participant