Skip to content

Support relative path in @ExampleObject #17

Closed
@membersound

Description

@membersound

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")))

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions