You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a spring boot 3.2 project for my microservice and am using the springdoc dependency to ultimately generate an OAS document for consumption by AWS API Gateway (AGW). This service is using a REST API configuration but through VPC Link so I need to ensure that the 'x-amazon-apigateway-integration' extensions are defined in my OAS doc else when I import/re-import into AGW, I have to manually add the VPC links as they get wiped out (not fun)
I have defined properties in my application.yml file as follows:
I use property placeholders at the class level which picks up some of the values above which works fine - my title, version, description etc. all get evaluated
However, when I try and put in property placeholders at the method level within the @operation annotation inside the class, I get the literal string returned.
Code with annotations:
@Operation(
summary = "Get Test",
description = "Get Test",
extensions = { @Extension(
name = "${api.extensions.name}",
properties = {
@ExtensionProperty(name = "type", value = "${api.extensions.properties.type}"),
@ExtensionProperty(name = "connectionId", value = "${api.extensions.properties.connectionId}"),
@ExtensionProperty(name = "httpMethod", value = "GET"),
@ExtensionProperty(
name = "uri",
value = "${api.extensions.properties.uri}/testcontroller/getTest"),
@ExtensionProperty(name = "passthroughBehavior", value = "${api.extensions.properties.passthroughBehavior}"),
@ExtensionProperty(name = "connectionType", value = "${api.extensions.properties.connectionType}") }) })
@GetMapping(value = "/getTest")
@ResponseBody
public ResponseEntity<StandardApiResponse<GenericResponse>> getTest(
@RequestParam(required = false) String testParam) throws Exception {
}
When I generate the OAS 3.x doc, I get literal strings:
Tried using @value spring boot annotations to resolve the properties but couldn't put variables within the springdoc annotations. Tried single brackets/double etc....
Is this a bug? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
I have a spring boot 3.2 project for my microservice and am using the springdoc dependency to ultimately generate an OAS document for consumption by AWS API Gateway (AGW). This service is using a REST API configuration but through VPC Link so I need to ensure that the 'x-amazon-apigateway-integration' extensions are defined in my OAS doc else when I import/re-import into AGW, I have to manually add the VPC links as they get wiped out (not fun)
I have defined properties in my application.yml file as follows:
I use property placeholders at the class level which picks up some of the values above which works fine - my title, version, description etc. all get evaluated
Result in OAS 3.x doc evaluates correctly:
However, when I try and put in property placeholders at the method level within the @operation annotation inside the class, I get the literal string returned.
Code with annotations:
When I generate the OAS 3.x doc, I get literal strings:
I've tried researching many avenues but all to no avail.
Here are my main relevant dependencies:
Tried using @value spring boot annotations to resolve the properties but couldn't put variables within the springdoc annotations. Tried single brackets/double etc....
Is this a bug? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: