Closed
Description
Having a file in /src/main/resources/static/swagger/example.json
. Placed inside /static
because spring can expose those to the web.
It should be possible to reference the file relative to the application itself. Eg as follows:
@Operation(responses = @ApiResponse(content = @Content(examples = @ExampleObject(externalValue = "swagger/example.json")))
But even if I can access the resource via locahost:8080/swagger/example.json
, when adding the url to @ExampleObject
it is still not resolved:
@Operation(responses = @ApiResponse(content = @Content(examples = @ExampleObject(externalValue = "locahost:8080/swagger/example.json")))