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

Sync master with constraint support #1562

Merged
merged 108 commits into from
Oct 24, 2023

Conversation

lnash94
Copy link
Member

@lnash94 lnash94 commented Oct 24, 2023

Purpose

Related pr #1558

lnash94 and others added 30 commits July 25, 2022 09:06
…i-tools into constraint_b_o

# Conflicts:
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/diagnostic/DiagnosticMessages.java
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
#	openapi-cli/src/test/resources/testng.xml
* Add support for mapping Ballerina constraints (Int, Float, Number) to the OpenAPI specification.
* Add unit tests to ensure the accuracy & reliability of @constraint mapping to OpenAPI spec.
* This ensures that Int, Float & Number constraints in Ballerina are accurately reflected in OpenAPI spec.

Resolves: #4796
See also: #4788
* Add support for mapping Ballerina constraints (Int, Float, Number) to the OpenAPI specification.
* Add unit tests to ensure the accuracy & reliability of @constraint mapping to OpenAPI spec.
* This ensures that Int, Float & Number constraints in Ballerina are accurately reflected in OpenAPI spec.

Resolves: #4796
See also: #4788
…en/constraint/decimalMax.yaml

Co-authored-by: Ayesh Almeida <[email protected]>
…/openapi-tools into constraint_support

# Conflicts:
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
#	openapi-cli/src/test/resources/ballerina-to-openapi/constraint/decimalMax.bal
#	openapi-cli/src/test/resources/ballerina-to-openapi/constraint/decimalMin.bal
#	openapi-cli/src/test/resources/ballerina-to-openapi/constraint/floatMax.bal
#	openapi-cli/src/test/resources/ballerina-to-openapi/constraint/floatMin.bal
#	openapi-cli/src/test/resources/ballerina-to-openapi/constraint/integerMax.bal
#	openapi-cli/src/test/resources/ballerina-to-openapi/constraint/integerMin.bal
#	openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/decimalMax.yaml
#	openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/decimalMin.yaml
#	openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/floatMax.yaml
#	openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/floatMin.yaml
#	openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/integerMax.yaml
#	openapi-cli/src/test/resources/ballerina-to-openapi/expected_gen/constraint/integerMin.yaml
…er/service/OpenAPIComponentMapper.java

Co-authored-by: Dilan Sachintha Nayanajith <[email protected]>
SachinAkash01 and others added 21 commits October 17, 2023 12:18
…api/NegativeConstraintTests.java

Co-authored-by: Ayesh Almeida <[email protected]>
…i-tools into constraint_support

# Conflicts:
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIRequestBodyMapper.java
…tform/openapi-tools into constraint_s

# Conflicts:
#	openapi-bal-service/src/main/java/io/ballerina/openapi/converter/service/OpenAPIComponentMapper.java
…int_s

[constraint_support] Add negative tests for constraint support
@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 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

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

Comparison is base (48e6cde) 79.69% compared to head (4ecc318) 80.10%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1562      +/-   ##
============================================
+ Coverage     79.69%   80.10%   +0.40%     
- Complexity     1778     1854      +76     
============================================
  Files           124      125       +1     
  Lines         10096    10323     +227     
  Branches       1675     1704      +29     
============================================
+ Hits           8046     8269     +223     
  Misses         1464     1464              
- Partials        586      590       +4     
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%> (ø)
...openapi/converter/service/ModuleMemberVisitor.java 100.00% <100.00%> (+11.11%) ⬆️
...enapi/converter/service/OpenAPIEndpointMapper.java 72.66% <ø> (ø)
...openapi/converter/service/OpenAPIHeaderMapper.java 93.13% <100.00%> (+0.06%) ⬆️
...napi/converter/service/OpenAPIParameterMapper.java 89.18% <100.00%> (+0.09%) ⬆️
...enapi/converter/service/OpenAPIResourceMapper.java 76.64% <100.00%> (+0.90%) ⬆️
...enapi/converter/service/OpenAPIResponseMapper.java 83.71% <100.00%> (+0.02%) ⬆️
...penapi/converter/service/OpenAPIServiceMapper.java 100.00% <100.00%> (ø)
... and 5 more

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

@lnash94 lnash94 merged commit 321ac86 into ballerina-platform:master Oct 24, 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.

4 participants