8000 Question: how to use @ApiParam annotation on a parameter defined in an interface? · Issue #1670 · springfox/springfox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Question: how to use @ApiParam annotation on a parameter defined in an interface? #1670
Closed
@taxone

Description

@taxone

Hi,
I'm using SpringFox 2.6.1.
I defined an interface as follows:

Api(value = "executablesByEvent", description = "the executablesByEvent API")
@RestController
public interface ExecutablesByEventApi {

    @ApiOperation(value = "eseguibili associati ad un evento", notes = "Recupera gli esegubili associati all'evento passato come parametro ", response = Executable.class, responseContainer = "List", tags={ "decrypt", })
    @ApiResponses(value = { 
        @ApiResponse(code = 200, message = "gli eseguibili recuperati associati all'evento passato come parametro", response = Executable.class) })
    @RequestMapping(value = "/executablesByEvent",
        produces = { "application/json" }, 
        method = RequestMethod.GET)
    public ResponseEntity<Resources<Executable>> executablesByEvent(
        @ApiParam(value = "URL dell'entitiy associata all'evento per il quale recuperare gli eseguibili associati. ", required = true,name = "event") @RequestParam(value = "event", required = true) String event,
        HttpServletRequest request,
        Principal principal);

}

This interface is implemented by a Spring annotated with "@controller".
All of the Swagger annotations are properly processed and visible by Swagger UI; the Rest endpoint operates correctly when it is called by a client.
The only exception is the @ApiParam annotation, in fact it seems that it's ignored. If I try to use the @ApiParam annotation in the method of the concrete class implementing the interface then the annotation is processed properly.
Is it a bug or is there something wrong in my code?
Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0