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

SO-6082: nested member create request errors #1276

Merged
merged 5 commits into from
Apr 8, 2024

Conversation

cmark
Copy link
Member

@cmark cmark commented Apr 8, 2024

Performing a concept create request with the following body throws moduleId is missing HTTP 400 Bad Request error, how ever concept moduleId should get propagated down to the nested create request.

{
  moduleId: <a-module-id>
  members: [
    {
      active: true,
      refsetId: '733073007',
      owlExpression: 'SubClassOf(:<pre-generated-concept-id> :900000000000443000)'
    }
  ],
  ...
}

Additionally:

  • improved the error message when refsetId field is missing
  • deferred UUID generation to a later stage to speed up ID duplication check and request validation

...in refset member create requests

ModuleId field can get its value from parent component requests.

Rename incorrect `referenceSetId` field to the execpted `refsetId`
field.
Remove UUID pre-generation to ensure that we only generate the UUID when
actually creating the refset member.
@cmark cmark added the bug label Apr 8, 2024
@cmark cmark self-assigned this Apr 8, 2024
Copy link
Member

@nagyo nagyo 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

@apeteri apeteri left a comment

Choose a reason for hiding this comment

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

👍 with three small notes.

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

Attention: Patch coverage is 70.73171% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 48.22%. Comparing base (3566465) to head (c632fa2).
Report is 1 commits behind head on 9.x.

❗ Current head c632fa2 differs from pull request most recent head 624f1de. Consider uploading reports for the commit 624f1de to get more accurate results

Files Patch % Lines
...tastore/request/SnomedMemberOfFieldFixRequest.java 0.00% 13 Missing ⚠️
...datastore/index/entry/SnomedComponentDocument.java 66.66% 2 Missing ⚠️
...store/index/entry/SnomedDescriptionIndexEntry.java 50.00% 2 Missing ⚠️
...e/request/SnomedComponentSearchRequestBuilder.java 50.00% 2 Missing ⚠️
...wl/snomed/core/ecl/SnomedEclEvaluationRequest.java 83.33% 0 Missing and 1 partial ⚠️
...snowowl/snomed/core/store/SnomedMemberBuilder.java 80.00% 0 Missing and 1 partial ⚠️
...request/SnomedDescriptionCreateRequestBuilder.java 50.00% 1 Missing ⚠️
...tore/request/SnomedRefSetMemberCreateDelegate.java 75.00% 1 Missing ⚠️
...store/request/SnomedRefSetMemberCreateRequest.java 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                9.x    #1276   +/-   ##
=========================================
  Coverage     48.21%   48.22%           
- Complexity    13923    13930    +7     
=========================================
  Files          1946     1946           
  Lines         95122    95126    +4     
  Branches      10985    10985           
=========================================
+ Hits          45860    45870   +10     
+ Misses        46269    46268    -1     
+ Partials       2993     2988    -5     

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

Copy link
Contributor

@AAAlinaaa AAAlinaaa left a comment

Choose a reason for hiding this comment

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

🍏

...builder as well

Add comments to request fields to explain why there is no validation
present for them at field level.
@cmark cmark merged commit 5109a5b into 9.x Apr 8, 2024
1 of 2 checks passed
@cmark cmark deleted the issue/SO-6082-nested-member-create-request-errors branch April 8, 2024 12:53
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants