Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alternate Data Type for @ApiParam annotations #557

Closed
tburch opened this issue Sep 3, 2014 · 1 comment
Closed

Support alternate Data Type for @ApiParam annotations #557

tburch opened this issue Sep 3, 2014 · 1 comment

Comments

@tburch
Copy link

tburch commented Sep 3, 2014

I have a JAX-RS resource with the following method

 public Response metadata(
            @ApiParam(value = "The path of the file, optionally prefixed with a '/'", required = true) @QueryParam("path") FilePathParam pathParam,
            @Context HttpHeaders headers,
            @Context UriInfo uriInfo,
            @Context Request request) {
    ...
}

where the FilePathParam class takes a single String argument that Jersey automatically uses to construct the FilePathParam class . It would be nice if I could indicate that the Data Type is actually String.class instead of the FilePathParam.class which is shown in the Swagger UI.

@webron
Copy link
Contributor

webron commented Sep 3, 2014

Please take a look here for custom model mapping - https://github.com/wordnik/swagger-core/wiki/overriding-models

Since this is a swagger-core issue, if the wiki doesn't help, please reopen the issue directly on swagger-core's repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants