diff --git a/ballerina/http_annotation.bal b/ballerina/http_annotation.bal index d2930b898d..29ebeb299e 100644 --- a/ballerina/http_annotation.bal +++ b/ballerina/http_annotation.bal @@ -35,7 +35,6 @@ public type HttpServiceConfig record {| ListenerAuthConfig[] auth?; string mediaTypeSubtypePrefix?; boolean treatNilableAsOptional = true; - @deprecated byte[] openApiDefinition = []; boolean validation = true; typedesc serviceType?; diff --git a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codemodifier/contract/ContractInfoModifierTask.java b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codemodifier/contract/ContractInfoModifierTask.java index 70a8d1106a..173e0caf83 100644 --- a/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codemodifier/contract/ContractInfoModifierTask.java +++ b/compiler-plugin/src/main/java/io/ballerina/stdlib/http/compiler/codemodifier/contract/ContractInfoModifierTask.java @@ -62,6 +62,7 @@ import static io.ballerina.stdlib.http.compiler.Constants.COLON; import static io.ballerina.stdlib.http.compiler.Constants.HTTP; import static io.ballerina.stdlib.http.compiler.Constants.SERVICE_CONFIG_ANNOTATION; +import static io.ballerina.stdlib.http.compiler.Constants.SERVICE_TYPE; import static io.ballerina.stdlib.http.compiler.HttpServiceValidator.getServiceContractTypeDesc; /** @@ -177,7 +178,7 @@ private ServiceDeclarationNode updateServiceConfigAnnotation(TypeDescriptorNode boolean hasServiceType = fields.stream().anyMatch(field -> { if (field.kind().equals(SyntaxKind.SPECIFIC_FIELD)) { SpecificFieldNode specificField = (SpecificFieldNode) field; - return specificField.fieldName().toString().equals("serviceType"); + return specificField.fieldName().toString().trim().equals(SERVICE_TYPE); } return false; }); diff --git a/native/src/main/java/io/ballerina/stdlib/http/api/HttpService.java b/native/src/main/java/io/ballerina/stdlib/http/api/HttpService.java index 20d29c39e6..7fbf323220 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/api/HttpService.java +++ b/native/src/main/java/io/ballerina/stdlib/http/api/HttpService.java @@ -242,8 +242,8 @@ public URITemplate getUriTemplate() throws URITempl public static HttpService buildHttpService(BObject service, String basePath) { HttpService httpService = new HttpService(service, basePath); BMap serviceConfig = getHttpServiceConfigAnnotation(service); - httpService.populateServiceConfig(serviceConfig); httpService.populateIntrospectionPayload(); + httpService.populateServiceConfig(serviceConfig); return httpService; }