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: Add REST API endpoints for setting up Access forms #291

Merged
merged 30 commits into from
Apr 23, 2024

Conversation

RadovanTomik
Copy link
Collaborator

@RadovanTomik RadovanTomik commented Apr 18, 2024

Negotiator pull request:

Description:

Adds REST API endpoints for setting up Access forms. Test it using swagger.

Checklist:

Make sure you tick all the boxes bellow if they are true or do not apply:

  • I have performed a self review of my code
  • My code follows Google Java Code style
  • I have made my code as simple as possible
  • I have added unit tests and the code coverage has not decreased
  • I have updated the documentation in all relevant places

Copy link

codecov bot commented Apr 18, 2024

Codecov Report

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

Project coverage is 79.67%. Comparing base (89ac01d) to head (645991b).
Report is 8 commits behind head on master.

Files Patch % Lines
...egotiator/dto/access_form/AccessFormCreateDTO.java 80.00% 1 Missing ⚠️
...ric/negotiator/dto/access_form/ElementLinkDTO.java 85.71% 1 Missing ⚠️
...ric/negotiator/dto/access_form/SectionLinkDTO.java 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #291      +/-   ##
============================================
+ Coverage     78.45%   79.67%   +1.21%     
- Complexity      973     1012      +39     
============================================
  Files           133      136       +3     
  Lines          2892     3036     +144     
  Branches        163      165       +2     
============================================
+ Hits           2269     2419     +150     
+ Misses          522      516       -6     
  Partials        101      101              
Flag Coverage Δ
unit 79.67% <98.05%> (+1.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@RadovanTomik RadovanTomik self-assigned this Apr 18, 2024
@RadovanTomik RadovanTomik linked an issue Apr 18, 2024 that may be closed by this pull request
@RadovanTomik RadovanTomik marked this pull request as ready for review April 19, 2024 08:33
RadovanTomik and others added 23 commits April 23, 2024 11:19
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Copy link
Contributor

@svituz svituz left a comment

Choose a reason for hiding this comment

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

Apart from the minimal comments, it may be useful to have a functionality to insert elements and sections in a specific position, otherwise, if you want to change the form by adding one element or one section, you will need to restart from the beginning.

@NoArgsConstructor
@Builder
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class FormCreateDTO {
Copy link
Contributor

Choose a reason for hiding this comment

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

AccessFormCreateDTO?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

renamed

@@ -35,6 +38,7 @@
public class AccessFormTests {

private static final String ENDPOINT = "/v3/access-criteria";
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be unused now

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
@RadovanTomik
Copy link
Collaborator Author

yes, you can do it using src/main/java/eu/bbmri_eric/negotiator/dto/access_form/SectionLinkDTO.java and src/main/java/eu/bbmri_eric/negotiator/dto/access_form/ElementLinkDTO.java. They have an attribute element and section order which sets the position

@svituz
Copy link
Contributor

svituz commented Apr 23, 2024

Is it implemented in the controller?

@RadovanTomik
Copy link
Collaborator Author

yes, the DTOs are passed for the link operation.

Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
Signed-off-by: RadovanTomik <radovan.tomasik@bbmri-eric.eu>
@RadovanTomik RadovanTomik merged commit 064725b into master Apr 23, 2024
16 checks passed
@RadovanTomik RadovanTomik deleted the feat/forms_link_api branch April 23, 2024 15:33
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.

[FEATURE] REST API endpoints for AccessForm management
2 participants