-
Notifications
You must be signed in to change notification settings - Fork 72
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(subform): Add GET and PUT endpoints for datamodel metadata #14275
Conversation
fe7279e
to
3fa946f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #14275 +/- ##
=======================================
Coverage 95.56% 95.56%
=======================================
Files 1843 1843
Lines 23886 23886
Branches 2752 2752
=======================================
Hits 22827 22827
Misses 802 802
Partials 257 257 ☔ View full report in Codecov by Sentry. |
4f97aec
to
f2e79a3
Compare
I thought this PR was about getting the verbose metadata for the actual data model, which we already have endpoints for in appDevelopmentController, but when looking closer at it I see that it is about the application metadata and not the model metadata. We should first of all adjust the naming of the methods in this PR to not be confused with the appDev But also I wonder if this is necessary? We already have endpoints for getting the appmetadatafile which is cached so I guess we do not improve performance much by getting the specific dataType from the api 🤷 Maybe it makes more sense adding a put endpoint in the |
backend/src/Designer/Services/Implementation/SchemaModelService.cs
Outdated
Show resolved
Hide resolved
Good point, i agree the naming here should be better. I think "metadata" might be a too generic word that doesn't convey enough context. I think "datatype" is used when referring to this data, what do you think about switching out "metadata" with "datatype" for the endpoint naming?
The idea here is to avoid unnecessary logic on the frontend, and at the same time make the API more adaptable (e.g. if we move to a custom or internal format in the future).
I disagree, because I think ideally the frontend and controller layer should not need to know where the storage places the information, just what the infomation is related to. And in the context of a datamodel it makes sense to me to have endpoints that alter a datamodels information in the controller for datamodels. |
Agree.
👍
👍 |
f2e79a3
to
005a02e
Compare
3203cd3
to
0e2690b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments! 👏
And should we add tests for these endpoints in the dataModelController?
backend/src/Designer/Services/Implementation/SchemaModelService.cs
Outdated
Show resolved
Hide resolved
backend/tests/Designer.Tests/Controllers/DataModelsController/PutDatamodelTests.cs
Show resolved
Hide resolved
backend/tests/Designer.Tests/Controllers/DataModelsController/GetTests.cs
Show resolved
Hide resolved
409ad95
to
3f00e04
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🫡
Co-authored-by: andreastanderen <[email protected]>
Co-authored-by: andreastanderen <[email protected]>
081c4ac
to
ebeceae
Compare
Description
Related Issue(s)
Verification
Documentation