8000 Example property on operations does not work · Issue #2767 · springfox/springfox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Example property on operations does not work #2767
Closed
@dilipkrish

Description

@dilipkrish
< 6402 div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@ApiResponses(value = { @ApiResponse(code = 404, message = "Not Found", examples = @Example( value = { @ExampleProperty( mediaType = "Example json", value = "{\"invalidField\": \"address\"}"), @ExampleProperty( mediaType = "Example string", value = "The first name was invalid")}), response = Response.class)})">
@ApiResponses(value = {
        @ApiResponse(code = 404, message = "Not Found",
                examples = @Example(
                        value = {
                                @ExampleProperty(
                                        mediaType = "Example json",
                                        value = "{\"invalidField\": \"address\"}"),
                                @ExampleProperty(
                                        mediaType = "Example string",
                                        value = "The first name was invalid")}),
response = Response.class)})

and the fields in Response class are annotated with @ApiModelProperty(required = true, example = "Timeout exceeded") then the example is also rendered. It's kind of a workaround, but also not an option in my case, because I need to use class provided by library and I can't annotate it.

Originally posted by @tgielbutowicz in #2352 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0