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

Parameter Description not showing in swagger-ui #604

Closed
frankgibbs opened this issue Jun 25, 2014 · 3 comments
Closed

Parameter Description not showing in swagger-ui #604

frankgibbs opened this issue Jun 25, 2014 · 3 comments

Comments

@frankgibbs
Copy link

Below is my annotation, I'm under the assumption the ApiImplicitParams "value" parameter should show as parameter description in swagger-ui, but it's not. Below is a link to my swagger-ui and integration method.

@ApiOperation(httpMethod = "POST", 
            value = "Resource to authenticate a User", 
            response = ResponseState.class, nickname="Authenticate")
        @ApiImplicitParams({
                @ApiImplicitParam(name = "cmd", value = "Command Name", defaultValue="Authenticate",required = true, dataType = "string", paramType = "form"),
                @ApiImplicitParam(name = "email", value = "User's email", required = true, dataType = "string", paramType = "form"),
                @ApiImplicitParam(name = "password", value = "User's password", required = true, dataType = "string", paramType = "form"),
                })

http://api.nestkit.com/api/api-ui/#!/core/Authenticate

I'm using the following java servlet integration method

        <!-- maven dependency -->
    <dependency>
        <groupId>com.wordnik</groupId>
        <artifactId>swagger-servlet_2.10</artifactId>
        <version>1.3.6</version>
    </dependency>

<!-- swagger servlet reader -->
<servlet>
    <servlet-name>DefaultServletReaderConfig</servlet-name>
    <servlet-class>com.wordnik.swagger.servlet.config.DefaultServletReaderConfig</servlet-class>
    <load-on-startup>2</load-on-startup>
<init-param>
        <param-name>swagger.resource.package</param-name>
        <param-value>com.noracdev</param-value>
</init-param>
<init-param>
        <param-name>swagger.api.basepath</param-name>
        <param-value>http://api.nestkit.com</param-value>
</init-param>
<init-param>
        <param-name>api.version</param-name>
        <param-value>4.0</param-value>
</init-param>
ApiDeclarationServlet com.wordnik.swagger.servlet.listing.ApiDeclarationServlet ApiDeclarationServlet /api-docs/*
@fehguy
Copy link
Contributor

fehguy commented Jun 26, 2014

hi @frankgibbs, you've found a bug. It looks like the description isn't being set when scanning the annotations:

https://github.com/wordnik/swagger-core/blob/master/modules/swagger-servlet/src/main/scala/com/wordnik/swagger/servlet/config/ServletReader.scala#L54

I'll look at getting this fixed in a snapshot shortly.

@frankgibbs
Copy link
Author

much appreciated

@fehguy
Copy link
Contributor

fehguy commented Jul 13, 2014

will be in 1.3.7

@fehguy fehguy closed this as completed Jul 13, 2014
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