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

Improve support @constraint:String {} annotation mapping to OpenAPI Spec #1546

Merged

Conversation

SachinAkash01
Copy link
Member

@SachinAkash01 SachinAkash01 commented Sep 25, 2023

  • Add support for mapping Ballerina String constraints to the OpenAPI specification.
  • Modify the unit tests to ensure the accuracy & reliability of @constraint:String {} mapping to OpenAPI spec.
  • This ensures that String constraints in Ballerina are accurately reflected in OpenAPI spec.

Resolves: #4813
See also: #4788

… Spec

- Add support for mapping Ballerina String constraints to the OpenAPI specification.
- Modify the unit tests to ensure the accuracy & reliability of `@constraint:String {}` mapping to OpenAPI spec.
- This ensures that String constraints in Ballerina are accurately reflected in OpenAPI spec.

Resolves: [#4813](ballerina-platform/ballerina-library#4813)
See also: [#4788](ballerina-platform/ballerina-library#4788)
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (27259f2) 79.92% compared to head (858fd56) 79.98%.
Report is 40 commits behind head on constraint_support.

Additional details and impacted files
@@                   Coverage Diff                    @@
##             constraint_support    #1546      +/-   ##
========================================================
+ Coverage                 79.92%   79.98%   +0.06%     
- Complexity                 1825     1841      +16     
========================================================
  Files                       125      125              
  Lines                     10265    10301      +36     
  Branches                   1698     1699       +1     
========================================================
+ Hits                       8204     8239      +35     
- Misses                     1469     1475       +6     
+ Partials                    592      587       -5     
Files Coverage Δ
...java/io/ballerina/openapi/converter/Constants.java 73.86% <ø> (ø)
...enapi/converter/diagnostic/DiagnosticMessages.java 100.00% <100.00%> (ø)
...penapi/converter/service/ConstraintAnnotation.java 100.00% <100.00%> (ø)
...napi/converter/service/OpenAPIComponentMapper.java 89.69% <90.43%> (+0.22%) ⬆️

... and 1 file with indirect coverage changes

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

…api/NegativeConstraintTests.java

Co-authored-by: Ayesh Almeida <77491511+ayeshLK@users.noreply.github.com>
SachinAkash01 and others added 2 commits October 17, 2023 23:02
…/arrayRec.bal

Co-authored-by: Sumudu Nissanka <lnash94@users.noreply.github.com>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ayeshLK ayeshLK merged commit b4c4c6a into ballerina-platform:constraint_support Oct 18, 2023
5 checks passed
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.

6 participants