Skip to content

Commit

Permalink
Update OpenAPI version and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lnash94 committed Jun 2, 2023
1 parent 5a8441e commit 319cca9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void openapiAnnotationExistsTest() {
.resolve("cache")
.resolve("ballerina")
.resolve("openapi")
.resolve("1.6.0")
.resolve("1.7.0")
.resolve("bir");

Path jarPath = TEST_DISTRIBUTION_PATH
Expand All @@ -61,7 +61,7 @@ public void openapiAnnotationExistsTest() {
.resolve("cache")
.resolve("ballerina")
.resolve("openapi")
.resolve("1.6.0")
.resolve("1.7.0")
.resolve("java11");

Path balaPath = TEST_DISTRIBUTION_PATH
Expand All @@ -70,7 +70,7 @@ public void openapiAnnotationExistsTest() {
.resolve("bala")
.resolve("ballerina")
.resolve("openapi")
.resolve("1.6.0")
.resolve("1.7.0")
.resolve("java11")
.resolve("platform")
.resolve("java11");
Expand All @@ -95,7 +95,7 @@ public void openapiAnnotationExistsTest() {

Assert.assertTrue(Files.exists(birPath));
Assert.assertTrue(Files.exists(balaPath));
Assert.assertTrue(Files.exists(jarPath.resolve("ballerina-openapi-1.6.0.jar")));
Assert.assertTrue(Files.exists(jarPath.resolve("ballerina-openapi-1.7.0.jar")));
Assert.assertNotNull(TestUtils.findFileOrDirectory(breLibPath, "openapi-cli-"));
Assert.assertNotNull(TestUtils.findFileOrDirectory(breLibPath, "openapi-validator-"));
Assert.assertNotNull(TestUtils.findFileOrDirectory(breLibPath, "openapi-bal-service-"));
Expand Down
3 changes: 3 additions & 0 deletions ballerina-test/src/test/resources/openapi/expected/client.bal
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

import ballerina/http;

# The Stripe REST API. Please see https://stripe.com/docs/api for more details.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// AUTO-GENERATED FILE.
// This file is auto-generated by the Ballerina OpenAPI tool.

import ballerina/http;

listener http:Listener ep0 = new (80, config = {host: "petstore.openapi.io"});
Expand All @@ -9,6 +12,6 @@ service /v1 on ep0 {
# + return - returns can be any of following types
# Pets (An paged array of pets)
# http:Response (unexpected error)
resource function get pets(int? 'limit) returns Pets|http:Response {
resource function get pets(int:Signed32? 'limit) returns Pets|http:Response {
}
}
3 changes: 3 additions & 0 deletions ballerina-test/src/test/resources/openapi/expected/types.bal
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

import ballerina/http;
import ballerina/constraint;

Expand Down
3 changes: 3 additions & 0 deletions ballerina-test/src/test/resources/openapi/expected/utils.bal
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// AUTO-GENERATED FILE. DO NOT MODIFY.
// This file is auto-generated by the Ballerina OpenAPI tool.

import ballerina/url;

type SimpleBasicType string|boolean|int|float|decimal;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ graphqlVersion=0.5.0-20230518-121300-d22805d
protocToolVersion=0.1.1-20230517-114400-1af2c22

# OpenAPI Module
openapiVersion=1.6.0-20230426-115700-1eb8448
openapiVersion=1.7.0-20230601-171700-961d1f0

# AsyncAPI Module
asyncapiVersion=0.5.0
Expand Down

0 comments on commit 319cca9

Please sign in to comment.