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 dataModelName parameter to GetModelMetadata endpoint #12826

Merged
merged 37 commits into from
May 28, 2024

Conversation

ErlingHauan
Copy link
Contributor

@ErlingHauan ErlingHauan commented May 21, 2024

Description

Currently, the GetModelMetadata endpoint infers which data model to return based on the layoutSet parameter. Now that we will support multiple data models per layout set, we have to be more specific when requesting the data model. Therefore, the optional dataModelName parameter has been added in this PR.

If there is no dataModelName parameter specified in the request, then we are still returning the data model based on the layoutSet parameter, ensuring backwards compatibility.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • Not relevant

@github-actions github-actions bot added solution/studio/designer Issues related to the Altinn Studio Designer solution. quality/testing Tests that are missing, needs to be created or could be improved. labels May 21, 2024
@ErlingHauan ErlingHauan linked an issue May 21, 2024 that may be closed by this pull request
@github-actions github-actions bot added the area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. label May 21, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.66%. Comparing base (3f01240) to head (71bf2c4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12826   +/-   ##
=======================================
  Coverage   90.65%   90.66%           
=======================================
  Files        1361     1361           
  Lines       19426    19426           
  Branches     2371     2371           
=======================================
+ Hits        17611    17612    +1     
+ Misses       1553     1552    -1     
  Partials      262      262           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ErlingHauan ErlingHauan marked this pull request as ready for review May 22, 2024 11:13
@ErlingHauan ErlingHauan removed area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. quality/testing Tests that are missing, needs to be created or could be improved. labels May 23, 2024
Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

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

Nice work!
I have tested and everything still works as before 🌟
However, I got a few comments that will imply in all the similar scenarios. Nothing bug, but mostly for having consistent code 🤗

@github-actions github-actions bot added area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. quality/testing Tests that are missing, needs to be created or could be improved. labels May 24, 2024
Copy link
Contributor

@standeren standeren left a comment

Choose a reason for hiding this comment

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

Great work 🥳

@ErlingHauan ErlingHauan merged commit 612d784 into main May 28, 2024
17 checks passed
@ErlingHauan ErlingHauan deleted the 12741-update-endpoint-fetching-datamodel branch May 28, 2024 11:44
Jondyr pushed a commit that referenced this pull request Jun 10, 2024
* Make route 'model-metadata' take optional parameter dataModelName

* Add tests for dataModelName param

* Update path in paths.js

* Refactor arrange part of tests into a separate method

* Add 'undefined' value for dataModelName where it is used in frontend code

* Modify GetModelName method and delete unused code

* Add fallback to ApplicationMetadata in GetModelName

* Move layoutSetsMocks into a new file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-editor Area: Related to the designer tool for assembling app UI in Altinn Studio. quality/testing Tests that are missing, needs to be created or could be improved. solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update endpoint fetching data model
3 participants