Open
Description
Currently the resolution of properties does not work with extensions. Springdoc-openapi version is 2.8.9.
Here is my example:
@OpenAPIDefinition( info = @Info( title = "OpenAPI Demo", version = "${git.build.version}", extensions = @Extension(properties = @ExtensionProperty(name = "x-created-ts", value = "${git.build.time}")) )) @RequestMapping @RestController class HelloController { @Operation(summary = "Test") @GetMapping(path = "/hello") public ResponseEntity<String> sayHello() { return ResponseEntity.ok("Hello"); } }
In the resulting api defintion the property git.build.version
is replaced but the property git.build.time
is not.
{ "openapi": "3.1.0", "info": { "title": "OpenAPI Demo", "version": "0.0.1-SNAPSHOT", "x-created-ts": "${git.build.time}" }, "servers": [ { "url": "http://localhost:8080", "description": "Generated server url" } ], "paths": { "/hello": { "get": { "tags": [ "hello-controller" ], "summary": "Test", "operationId": "sayHello", "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string" } } } } } } } }, "components": { } }
I have created a demo-project for this issue: https://github.com/chhorz/springdoc-extension-properties
Metadata
Metadata
Assignees
Labels
No labels