diff --git a/ballerina-to-openapi/src/main/java/io/ballerina/openapi/service/mapper/Constants.java b/ballerina-to-openapi/src/main/java/io/ballerina/openapi/service/mapper/Constants.java index ff13e0ddd..ecea70098 100644 --- a/ballerina-to-openapi/src/main/java/io/ballerina/openapi/service/mapper/Constants.java +++ b/ballerina-to-openapi/src/main/java/io/ballerina/openapi/service/mapper/Constants.java @@ -327,7 +327,7 @@ public String toString() { public static final String SLASH = "/"; public static final String HYPHEN = "-"; public static final String CONTRACT = "contract"; - public static final String VERSION = "'version"; + public static final String VERSION = "version"; public static final String TITLE = "title"; public static final String OPENAPI_ANNOTATION = "openapi:ServiceInfo"; diff --git a/module-ballerina-openapi/annotation.bal b/module-ballerina-openapi/annotation.bal index bc425e057..11f2c449d 100644 --- a/module-ballerina-openapi/annotation.bal +++ b/module-ballerina-openapi/annotation.bal @@ -33,7 +33,7 @@ public type ServiceInformation record {| boolean failOnErrors = true; boolean embed = false; string title?; - string 'version?; + string version?; |}; // # Client configurations code. diff --git a/openapi-integration-tests/src/test/resources/ballerina_sources/project_1/service.bal b/openapi-integration-tests/src/test/resources/ballerina_sources/project_1/service.bal index 34b936283..a9fda2535 100644 --- a/openapi-integration-tests/src/test/resources/ballerina_sources/project_1/service.bal +++ b/openapi-integration-tests/src/test/resources/ballerina_sources/project_1/service.bal @@ -2,7 +2,7 @@ import ballerina/http; import ballerina/openapi; @openapi:ServiceInfo { - 'version: "2.0.0", + version: "2.0.0", title: "Mock Yaml" } service / on new http:Listener(9090) { diff --git a/openapi-integration-tests/src/test/resources/ballerina_sources/project_2/service.bal b/openapi-integration-tests/src/test/resources/ballerina_sources/project_2/service.bal index c1944bee2..1725aa18a 100644 --- a/openapi-integration-tests/src/test/resources/ballerina_sources/project_2/service.bal +++ b/openapi-integration-tests/src/test/resources/ballerina_sources/project_2/service.bal @@ -3,7 +3,7 @@ import ballerina/openapi; @openapi:ServiceInfo { contract: "hello_openapi.yaml", - 'version: "3.0.0" + version: "3.0.0" } service /greeting on new http:Listener(9090) { resource function get greeting() returns string { diff --git a/openapi-integration-tests/src/test/resources/ballerina_sources/project_5/service.bal b/openapi-integration-tests/src/test/resources/ballerina_sources/project_5/service.bal index 9d6c62cd4..88b0a31cd 100644 --- a/openapi-integration-tests/src/test/resources/ballerina_sources/project_5/service.bal +++ b/openapi-integration-tests/src/test/resources/ballerina_sources/project_5/service.bal @@ -3,7 +3,7 @@ import ballerina/openapi; @openapi:ServiceInfo { contract: "hello_openapi.yaml", - 'version: "" + version: "" } service /blankVersion on new http:Listener(9090) { resource function get greeting() returns string { diff --git a/openapi-integration-tests/src/test/resources/ballerina_sources/project_6/service.bal b/openapi-integration-tests/src/test/resources/ballerina_sources/project_6/service.bal index 60fb144ca..be23321b7 100644 --- a/openapi-integration-tests/src/test/resources/ballerina_sources/project_6/service.bal +++ b/openapi-integration-tests/src/test/resources/ballerina_sources/project_6/service.bal @@ -2,7 +2,7 @@ import ballerina/http; import ballerina/openapi; @openapi:ServiceInfo { - 'version: "", + version: "", title: "" } service /bothBlank on new http:Listener(9090) { diff --git a/openapi-integration-tests/src/test/resources/ballerina_sources/project_8/service.bal b/openapi-integration-tests/src/test/resources/ballerina_sources/project_8/service.bal index 1a95f04c1..f4fd340cb 100644 --- a/openapi-integration-tests/src/test/resources/ballerina_sources/project_8/service.bal +++ b/openapi-integration-tests/src/test/resources/ballerina_sources/project_8/service.bal @@ -3,7 +3,7 @@ import ballerina/openapi; @openapi:ServiceInfo { contract: "hello_openapi.yaml", - 'version: "", + version: "", title: "" } service /mTitle01 on new http:Listener(9090) { diff --git a/openapi-integration-tests/src/test/resources/ballerina_sources/project_9/service.bal b/openapi-integration-tests/src/test/resources/ballerina_sources/project_9/service.bal index 38b1e87d7..79569c1c8 100644 --- a/openapi-integration-tests/src/test/resources/ballerina_sources/project_9/service.bal +++ b/openapi-integration-tests/src/test/resources/ballerina_sources/project_9/service.bal @@ -2,7 +2,7 @@ import ballerina/http; import ballerina/openapi; @openapi:ServiceInfo { - 'version: "4.0.0" + version: "4.0.0" } service /versionBase on new http:Listener(9090) { resource function get title() returns string { diff --git a/openapi-integration-tests/src/test/resources/build/project_2/service.bal b/openapi-integration-tests/src/test/resources/build/project_2/service.bal index c1944bee2..1725aa18a 100644 --- a/openapi-integration-tests/src/test/resources/build/project_2/service.bal +++ b/openapi-integration-tests/src/test/resources/build/project_2/service.bal @@ -3,7 +3,7 @@ import ballerina/openapi; @openapi:ServiceInfo { contract: "hello_openapi.yaml", - 'version: "3.0.0" + version: "3.0.0" } service /greeting on new http:Listener(9090) { resource function get greeting() returns string { diff --git a/openapi-integration-tests/src/test/resources/build/project_3/service.bal b/openapi-integration-tests/src/test/resources/build/project_3/service.bal index 61c124c92..bc8f0720c 100644 --- a/openapi-integration-tests/src/test/resources/build/project_3/service.bal +++ b/openapi-integration-tests/src/test/resources/build/project_3/service.bal @@ -4,7 +4,7 @@ import ballerina/graphql; @openapi:ServiceInfo { contract: "hello_openapi.yaml", - 'version: "3.0.0" + version: "3.0.0" } service /greeting on new http:Listener(9090) { resource function get greeting() returns string {