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

feat(new-primary-school): Update key-options and api name #17809

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

veronikasif
Copy link
Member

@veronikasif veronikasif commented Feb 4, 2025

[TS-971] Update key-options and api name

What

Specify what you're trying to achieve

Why

Specify why you need to achieve this

Screenshots / Gifs

Attach Screenshots / Gifs to help reviewers understand the scope of the pull request

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Formatting passes locally with my changes
  • I have rebased against main before asking for a review

Summary by CodeRabbit

  • New Features

    • Enhanced primary school application forms with refined options for food allergies, intolerances, and free school meals, offering clearer, more accurate selection choices.
    • Introduced new registration endpoints and improved data models in the API, enhancing functionality and usability.
  • Chores

    • Standardized internal API endpoint naming across all environments for improved consistency.
  • Documentation

    • Updated public API documentation with new registration endpoints and refined data models, providing clearer integration details.

@veronikasif veronikasif requested review from a team as code owners February 4, 2025 12:26
Copy link
Contributor

coderabbitai bot commented Feb 4, 2025

Walkthrough

This pull request updates the API endpoint naming across several configuration and source code files. The value of XROAD_MMS_FRIGG_PATH has been changed from a service-oriented identifier ("frigg-form-service") to an API-oriented identifier ("frigg-form-api") in various YAML configuration files for dev, staging, and prod environments. Similar updates appear in the Frigg client configuration and service files, as well as in associated application form components and OpenAPI definitions where option types and identifiers have been adjusted.

Changes

File(s) Change Summary
charts/islandis-services/api/values.dev.yaml, .../values.prod.yaml, .../values.staging.yaml Updated XROAD_MMS_FRIGG_PATH from '.../frigg-form-service' to '.../frigg-form-api'.
charts/islandis-services/application-system-api/values.dev.yaml, .../values.prod.yaml, .../values.staging.yaml Updated XROAD_MMS_FRIGG_PATH from '.../frigg-form-service' to '.../frigg-form-api'.
charts/islandis/values.dev.yaml, .../values.prod.yaml, .../values.staging.yaml Changed XROAD_MMS_FRIGG_PATH to reflect the API naming; staging file updates apply to multiple service sections.
infra/src/dsl/xroad.ts Modified Frigg configuration strings for dev, staging, and prod, updating from "frigg-form-service" to "frigg-form-api".
libs/clients/mms/frigg/project.json, .../friggClient.config.ts, .../friggClient.service.ts Adjusted Frigg client: Updated the curl command and default service path from "frigg-form-service" to "frigg-form-api"; modified method call to include an empty object argument.
libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx,
libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx,
libs/application/templates/new-primary-school/src/fields/Review/review-groups/FreeSchoolMeal.tsx,
libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/allergiesAndIntolerancesSubSection.ts,
libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/freeSchoolMealSubSection.ts,
libs/application/templates/new-primary-school/src/lib/constants.ts
Updated test ID prefixes (from "relative" to "contact") in form field components; revised hook parameters and options type values (e.g. from INTOLERANCE to FOOD_ALLERGY_AND_INTOLERANCE and from ALLERGY to SCHOOL_MEAL); modified enum casing and added new enum values.
libs/clients/mms/frigg/src/clientConfig.json Enhanced the OpenAPI spec: added summaries, new endpoints (GET /registrations/{orgId} and GET /registrations/{id}/{orgId}), updated schema properties (e.g. renaming status to state), and introduced new models.

Sequence Diagram(s)

sequenceDiagram
    participant C as Client
    participant FS as FriggClientService
    participant XR as X-Road Service/API

    C->>FS: Call getAllSchoolsByMunicipality()
    FS->>XR: Request data using updated xRoadServicePath ("frigg-form-api")
    XR-->>FS: Return organization list
    FS-->>C: Return organization list
Loading

Possibly related PRs

  • chore(xroad): update xroad paths for MMS PRO #15282: The changes in the main PR, which involve updating the XROAD_MMS_FRIGG_PATH variable in various configuration files, are related to the changes in the retrieved PR that also update paths for XROAD services, specifically modifying the service identifiers and paths in the same context of API endpoint naming conventions.
  • fix(secondary school): Last minute fixes after testing with MMS #17702: The changes in the main PR, which involve updating the XROAD_MMS_FRIGG_PATH variable in multiple configuration files to reflect a shift from a service to an API context, are related to the modifications in the retrieved PR that also involve changes to the handling of application paths and identifiers, specifically the renaming of service references in the context of the Frigg configuration.
  • fix(application-system): Adding/removing contentful messages #17460: The changes in the main PR, which involve updating the XROAD_MMS_FRIGG_PATH variable across multiple configuration files, are related to the changes in the retrieved PR that also involve modifications to the XROAD_MMS_FRIGG_PATH variable in the context of the Frigg configuration, indicating a consistent update in naming conventions across different files.

Suggested labels

automerge, deploy-feature

Tip

🌐 Web search-backed reviews and chat
  • We have enabled web search-based reviews and chat for all users. This feature allows CodeRabbit to access the latest documentation and information on the web.
  • You can disable this feature by setting web_search: false in the knowledge_base settings.
  • Please share any feedback in the Discord discussion.

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a232ede and 6bd02d1.

📒 Files selected for processing (1)
  • libs/application/templates/new-primary-school/src/lib/messages.ts (10 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
libs/application/templates/new-primary-school/src/lib/messages.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
🔇 Additional comments (5)
libs/application/templates/new-primary-school/src/lib/messages.ts (5)

258-260: Improved clarity in pronoun-related messages.

The updates to pronoun-related messages enhance clarity and inclusivity:

  • Changed "Persónufornafn" to "Valið persónufornafn"
  • Updated description from "Pronoun" to "Preferred personal pronoun"

Also applies to: 264-264


551-552: Enhanced language environment descriptions.

The updates to language-related messages improve clarity and accuracy:

  • More precise wording for language environment descriptions
  • Better explanation of language preferences and usage
  • Clearer instructions for language selection

Also applies to: 558-559, 568-569, 578-579, 583-584, 590-591


909-911: Simplified school information title.

The message has been simplified from "Information about selected/new school" to "Information about school", making it more generic and reusable.


972-972: Fixed typo in draft description.

Corrected "You have create a draft application" to "You have created a draft application".


114-130: Consistent update of message IDs from 'dess.nps' to 'nps'.

The prefix change in message IDs from 'dess.nps.application' to 'nps.application' improves consistency. However, ensure this change is coordinated across all consuming components.

Run this script to verify the message ID usage across the codebase:

✅ Verification successful

Consistent Message ID Updates Verified
The search did not reveal any lingering references to the old prefix “dess.nps.application”, indicating that the update to “nps.application” is applied consistently across the codebase. Please ensure that all consuming components have been coordinated to accommodate this update.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining 'dess.nps.application' references
rg "dess\.nps\.application" --type ts

Length of output: 39


Script:

#!/bin/bash
# Re-search the entire repository for any lingering references to 'dess.nps.application'
rg "dess\.nps\.application"

Length of output: 29

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

nx-cloud bot commented Feb 4, 2025

View your CI Pipeline Execution ↗ for commit 6bd02d1.

Command Status Duration Result
nx run-many --projects application-system-api -... ✅ Succeeded 7m 51s View ↗
nx run-many --projects api,api-domains-applicat... ✅ Succeeded 1s View ↗
nx run-many --target=build --projects=api --par... ✅ Succeeded 1m 11s View ↗
nx run-many --target=build --projects=applicati... ✅ Succeeded 53s View ↗
nx run-many --projects application-system-form,... ✅ Succeeded 2s View ↗
nx run-many --projects clients-mms-frigg --targ... ✅ Succeeded <1s View ↗
nx run-many --target=codegen/frontend-client --... ✅ Succeeded 12s View ↗
nx run-many --target=build --projects=applicati... ✅ Succeeded 2s View ↗
Additional runs (2) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-02-04 21:10:45 UTC

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
libs/clients/mms/frigg/src/clientConfig.json (1)

430-432: Schema Update: FormSubmitSuccessModel
The property formerly known as "status" is now renamed to "state", and the required fields have been updated accordingly. This change should be reflected in any front-end or integration logic that relies on this schema.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ba97e5 and a232ede.

📒 Files selected for processing (20)
  • charts/islandis-services/api/values.dev.yaml (1 hunks)
  • charts/islandis-services/api/values.prod.yaml (1 hunks)
  • charts/islandis-services/api/values.staging.yaml (1 hunks)
  • charts/islandis-services/application-system-api/values.dev.yaml (1 hunks)
  • charts/islandis-services/application-system-api/values.prod.yaml (1 hunks)
  • charts/islandis-services/application-system-api/values.staging.yaml (1 hunks)
  • charts/islandis/values.dev.yaml (2 hunks)
  • charts/islandis/values.prod.yaml (2 hunks)
  • charts/islandis/values.staging.yaml (2 hunks)
  • infra/src/dsl/xroad.ts (1 hunks)
  • libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx (3 hunks)
  • libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx (1 hunks)
  • libs/application/templates/new-primary-school/src/fields/Review/review-groups/FreeSchoolMeal.tsx (1 hunks)
  • libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/allergiesAndIntolerancesSubSection.ts (2 hunks)
  • libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/freeSchoolMealSubSection.ts (1 hunks)
  • libs/application/templates/new-primary-school/src/lib/constants.ts (1 hunks)
  • libs/clients/mms/frigg/project.json (1 hunks)
  • libs/clients/mms/frigg/src/clientConfig.json (11 hunks)
  • libs/clients/mms/frigg/src/lib/friggClient.config.ts (1 hunks)
  • libs/clients/mms/frigg/src/lib/friggClient.service.ts (1 hunks)
✅ Files skipped from review due to trivial changes (6)
  • charts/islandis-services/api/values.prod.yaml
  • infra/src/dsl/xroad.ts
  • charts/islandis-services/api/values.staging.yaml
  • charts/islandis/values.prod.yaml
  • charts/islandis/values.dev.yaml
  • charts/islandis/values.staging.yaml
🧰 Additional context used
📓 Path-based instructions (10)
libs/application/templates/new-primary-school/src/fields/Review/review-groups/FreeSchoolMeal.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/clients/mms/frigg/src/lib/friggClient.service.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/freeSchoolMealSubSection.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/clients/mms/frigg/src/lib/friggClient.config.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/clients/mms/frigg/src/clientConfig.json (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/clients/mms/frigg/project.json (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/application/templates/new-primary-school/src/lib/constants.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/allergiesAndIntolerancesSubSection.ts (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx (1)

Pattern libs/**/*: "Confirm that the code adheres to the following:

  • Reusability of components and hooks across different NextJS apps.
  • TypeScript usage for defining props and exporting types.
  • Effective tree-shaking and bundling practices."
📓 Learnings (1)
libs/application/templates/new-primary-school/src/lib/constants.ts (2)
Learnt from: veronikasif
PR: island-is/island.is#16304
File: libs/application/templates/new-primary-school/src/lib/constants.ts:29-31
Timestamp: 2024-11-12T15:15:11.835Z
Learning: In `libs/application/templates/new-primary-school/src/lib/constants.ts`, the enum string values in `ReasonForApplicationOptions` may match server-provided values, even if they appear to have typos. Avoid flagging these as typos.
Learnt from: veronikasif
PR: island-is/island.is#16304
File: libs/application/templates/new-primary-school/src/lib/dataSchema.ts:103-103
Timestamp: 2024-11-12T15:15:20.157Z
Learning: In `libs/application/templates/new-primary-school/src/lib/dataSchema.ts`, when comparing the `reason` field in `reasonForApplication`, which comes from the server as a string, avoid comparing it directly to `ReasonForApplicationOptions` enum values, as the enum may not include all server-provided values.
🔇 Additional comments (35)
libs/application/templates/new-primary-school/src/lib/constants.ts (2)

36-41: LGTM! Improved naming clarity.

The changes to the OptionsType enum improve clarity and specificity:

  • Renamed INTOLERANCE to FOOD_ALLERGY_AND_INTOLERANCE for better context
  • Added new options for school types and meals

30-30: Verify the impact of enum value change.

The casing change in SIBLINGS_IN_SAME_SCHOOL value from 'SiblingsInSameSchool' to 'siblingsInSameSchool' could be a breaking change if the value is used in API calls or database queries.

✅ Verification successful

Verification Complete: No Impact Observed

  • The search for "SiblingsInSameSchool" confirms that the updated enum value 'siblingsInSameSchool' is only defined in libs/application/templates/new-primary-school/src/lib/constants.ts and is not referenced anywhere else as the old literal.
  • There are no immediate indications that API calls or database queries rely on the former casing.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for usages of the old enum value
rg -i "SiblingsInSameSchool" -A 5

Length of output: 560

libs/application/templates/new-primary-school/src/fields/Review/review-groups/FreeSchoolMeal.tsx (1)

37-37: LGTM! Improved semantic accuracy.

Changed from ALLERGY to SCHOOL_MEAL which better represents the context of the options being fetched.

libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/freeSchoolMealSubSection.ts (1)

75-75: LGTM! Consistent with component changes.

Changed from ALLERGY to SCHOOL_MEAL to maintain consistency with the FreeSchoolMeal component and improve semantic accuracy.

libs/application/templates/new-primary-school/src/fields/Review/review-groups/AllergiesAndIntolerances.tsx (1)

44-44: LGTM! Improved naming clarity.

Changed from INTOLERANCE to FOOD_ALLERGY_AND_INTOLERANCE which better describes the type of data being fetched.

libs/application/templates/new-primary-school/src/forms/NewPrimarySchoolForm/differentNeedsSection/allergiesAndIntolerancesSubSection.ts (3)

62-62: LGTM! The updated option type better reflects the field's purpose.

The change from INTOLERANCE to FOOD_ALLERGY_AND_INTOLERANCE improves clarity by accurately representing both food allergies and intolerances in a single field.


91-91: LGTM! The option type correctly represents non-food allergies.

Keeping OptionsType.ALLERGY for this field maintains a clear distinction between food-related and other types of allergies.


1-206: Great implementation following best practices!

The code demonstrates:

  • Strong TypeScript usage with proper type imports
  • Modular and reusable form building components
  • Effective conditional rendering for form fields
libs/clients/mms/frigg/src/clientConfig.json (19)

28-29: Security and Tag Declaration for /forms Endpoint
The addition of the "security": [{ "bearer": [] }] and "tags": ["Frigg"] properties ensures that calls to the /forms endpoint are secured and properly categorized. Please verify that the bearer security scheme is correctly defined in the components and that downstream consumers expect these tags.


35-49: Enhancements for /forms/types Endpoint
The modifications include updating the "operationId" to "getFormTypes", and the addition of "security", "summary", and "tags" properties. These changes improve API documentation and security consistency. Ensure that consumers of this API are updated regarding the new operation identifier and description.


55-55: Operation Identifier Update for /key-options
The "operationId" is updated to "getAllKeyOptions". This helps in uniquely identifying this operation in API tooling and client generation.


78-78: Added Summary for /key-options Endpoint
Including the "summary": "Get all key options." property enhances the self-documentation of the API. This addition aligns with similar endpoints for better consistency.


85-85: Operation Identifier Update for /key-options/types
The "operationId" is now set to "getKeyOptionsTypes", ensuring unique identification for this endpoint. Verify that any client or server code referencing the old identifier is updated.


97-97: Added Summary for /key-options/types Endpoint
By adding "summary": "Get list of types of key options", the endpoint is now better documented, offering a clear description for API consumers.


112-146: Detailed Query Parameters for /schools Endpoint
The update to the /schools GET endpoint now includes an operation identifier and a comprehensive set of query parameters (sort, orderBy, limit, offset) with detailed descriptions and schema definitions. This facilitates greater flexibility in data retrieval and pagination. Please ensure that these descriptions meet your API’s internationalization and validation requirements.


158-167: Enhanced Response for /schools Endpoint
The responses section now includes a "default" response with headers (specifically "x-total-count") to indicate the total number of records available. Verify that the header and its schema conform to your API specifications and that backend implementations return the expected header values.


169-170: Summary and Tag Addition for /schools Endpoint
The addition of "summary": "Get all schools." and "tags": ["Frigg"] boosts endpoint documentation and helps in categorizing the endpoint correctly.


176-176: Security and Descriptive Enhancements for /students/{nationalId} Endpoint
Updates include ensuring the "operationId" is set to "getUserBySourcedId", and adding both the "security": [{ "bearer": [] }] and "summary": "Get user by nationalId" properties along with the "tags" declaration. These adjustments improve API clarity and enforce security.

Also applies to: 195-197


200-269: New Endpoint: /registrations/{orgId}
A new endpoint is introduced for retrieving registration data by organization ID. It includes detailed descriptions, query parameters for sorting/pagination, security settings, and a reference to the RegistrationModel in its response schema. Ensure that the naming conventions and parameter descriptions align with the overall API design and that your backend supports these parameters appropriately.


271-304: New Endpoint: /registrations/{id}/{orgId}
This endpoint provides registration details filtered by both a unique ID and an organization ID. The clear parameter definitions and associated response schema (RegistrationDetailModel) enhance the API’s expressiveness. Verify that the nested parameter structure is intuitive for API consumers.


487-492: Schema Update: AddressModel
The AddressModel now uses "address" and "postCode" instead of the previous names. Additionally, the "required" array has been updated to reflect these changes. Please ensure that all client code referencing these fields is updated to match the new property names.


582-584: Type Inconsistency in AgentModel
The "phone" and "email" properties in the AgentModel are now defined with type "object", which contrasts with similar schemas (such as AgentDto where "email" is a string). Please double-check if these types are intentionally set to "object" (perhaps for a complex structure) or if they should remain as simple strings for consistency.


645-672: New Schema: RegistrationModel
A comprehensive schema for RegistrationModel has been added, including properties such as "id", "nameOfChild", "nationalId", and others with corresponding references to MembershipOrganizationModel. Ensure that these required fields adequately capture the registration data needed by the client and backend services.


674-715: New Schema: ReviewActionModel
The addition of the ReviewActionModel enriches the API with a detailed structure for review actions. The use of enumerated values for "action" and "status" helps in enforcing valid state transitions. Confirm that the enumerations align with the business requirements.


716-740: New Schema: ReviewModel
This schema defines the structure for a review, including an array of actions and timestamps for creation and update. Verify that the "displayStatus" and "state" values are consistent with the client’s presentation logic and that the required fields are comprehensive for the review process.


741-749: New Schema: LanguageModel
The LanguageModel schema is now available to capture language-related details, requiring "nativeLanguage", "noIcelandic", and "otherLanguages". Ensure that this model meets your multilingual and localization requirements.


750-788: New Schema: RegistrationDetailModel
This schema aggregates detailed information for a registration, including nested references to ReviewModel, UserModel, an array of AgentModel, and LanguageModel. This comprehensive structure is key for endpoints that deliver full registration details. Please verify that all nested references resolve correctly and that the schema fully covers the necessary data for downstream processing.

libs/clients/mms/frigg/src/lib/friggClient.config.ts (1)

16-16: LGTM! API path update is consistent.

The update from 'frigg-form-service' to 'frigg-form-api' aligns with the broader API naming convention changes.

libs/clients/mms/frigg/src/lib/friggClient.service.ts (1)

29-29: Verify the necessity of empty object parameter.

The addition of an empty object parameter to getAllSchoolsByMunicipality call might indicate an API requirement change. Please confirm if this is intentional and required by the updated API.

✅ Verification successful

Empty Object Parameter Is Intentional and Required

  • The service method in friggClient.service.ts calls the API as this.friggApiWithAuth(user).getAllSchoolsByMunicipality({}), which adds the required empty object parameter.
  • The GraphQL resolver in frigg.resolver.ts calls the service method without supplying this parameter, indicating that the empty object is intentionally injected in the service layer to meet the updated API's expected signature.
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other usages of getAllSchoolsByMunicipality to verify consistency
ast-grep --pattern 'getAllSchoolsByMunicipality($$$)'

Length of output: 55


Script:

#!/bin/bash
# Search for the definition/signature of getAllSchoolsByMunicipality in TypeScript files
rg --type ts -n "getAllSchoolsByMunicipality\s*\(" .

Length of output: 464

libs/application/templates/new-primary-school/src/fields/ContactsTableRepeater/index.tsx (1)

55-55: LGTM! Improved semantic meaning in test identifiers.

The update from 'relative-' to 'contact-' in dataTestId values better reflects the component's purpose and improves test readability.

Also applies to: 64-64, 73-73, 81-81

libs/clients/mms/frigg/project.json (1)

25-25: Verify OpenAPI endpoint accessibility.

The update to use 'frigg-form-api' in the OpenAPI document URL is consistent with the API naming changes. However, please verify the endpoint accessibility.

Consider adding error handling.

Consider adding error handling and retries to the curl command for better reliability.

-          "curl -H \"X-Road-Client: IS-DEV/GOV/10000/island-is-client\" http://localhost:8081/r1/IS-DEV/GOV/10066/MMS-Protected/getOpenAPI?serviceCode=frigg-form-api > src/clientConfig.json",
+          "curl --retry 3 --retry-delay 2 --fail -H \"X-Road-Client: IS-DEV/GOV/10000/island-is-client\" http://localhost:8081/r1/IS-DEV/GOV/10066/MMS-Protected/getOpenAPI?serviceCode=frigg-form-api > src/clientConfig.json || (echo 'Failed to fetch OpenAPI document' && exit 1)",
charts/islandis-services/application-system-api/values.dev.yaml (1)

106-106: Development Environment – Updated API Endpoint Naming
The XROAD_MMS_FRIGG_PATH variable has been correctly updated to use the new API-oriented identifier frigg-form-api instead of the legacy service-oriented name. This change aligns with the overall architectural update and maintains consistency across all environment configurations.

charts/islandis-services/application-system-api/values.prod.yaml (1)

106-106: Production Environment – Frigg API Endpoint Update
The production configuration now reflects the revised endpoint by updating XROAD_MMS_FRIGG_PATH to frigg-form-api. This adjustment ensures consistency with the new API naming convention across all environments.

charts/islandis-services/application-system-api/values.staging.yaml (1)

106-106: Staging Environment – Consistent API Endpoint Naming
The updated value for XROAD_MMS_FRIGG_PATH in staging now uses frigg-form-api instead of the old service name. Please verify that any dependent systems and references have been updated accordingly for full consistency.

charts/islandis-services/api/values.dev.yaml (1)

123-123: API Service Configuration – Frigg Endpoint Revision
The API configuration now updates the XROAD_MMS_FRIGG_PATH variable to use frigg-form-api, aligning with the changes in other configuration files. Ensure that all downstream service calls referencing this variable are updated to prevent mismatches.

Copy link
Member

@birkirkristmunds birkirkristmunds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@pro-ingvar pro-ingvar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@veronikasif veronikasif added this pull request to the merge queue Feb 5, 2025
Merged via the queue into main with commit 5188d0e Feb 5, 2025
39 checks passed
@veronikasif veronikasif deleted the feat/nps-update-api-name branch February 5, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants