[ 
https://issues.apache.org/jira/browse/CXF-6965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369088#comment-15369088
 ] 

J. Fiala edited comment on CXF-6965 at 7/9/16 1:37 PM:
-------------------------------------------------------

Example:
{code}
@Path("/myService") 
public class MyServiceImpl {

@Consumes({ MediaType.APPLICATION_JSON })
        @Produces({ MediaType.APPLICATION_JSON })
        @POST
          @Path("/hello")
        public void hello(@QueryParam("")MyQueryParams params) {
                
        }

}

public class MyQueryParams {
        String param1;
        String param2;
//....
}
{code}

will render in WADL (CORRECT):
{code}
<resource path="/hello">
<method name="POST">
<request>
<param name="param2" style="query" type="xs:string"/>
<param name="param1" style="query" type="xs:string"/>
</request>
{code}

and in Swagger (WRONG - nested parameters not picked up): 
{code}
"/bestand/hello": {

    "post": {
        "tags": [
            "bestand"
        ],
        "operationId": "hello",
        "consumes": [
            "application/json"
        ],
        "produces": [
            "application/json"
        ],
        "parameters": [
            {
                "name": "",
                "in": "query",
                "required": false,
                "type": "string"
            }
        ],
{code}


was (Author: jfx):
Example:
{code}
@Path("/myService") 
public class MyServiceImpl {

@Consumes({ MediaType.APPLICATION_JSON })
        @Produces({ MediaType.APPLICATION_JSON })
        @POST
          @Path("/hello")
        public void hello(@QueryParam("")MyQueryParams params) {
                
        }

}

public class MyQueryParams {
        String param1;
        String param2;
//....
}
{code}

will render in WADL (correct):
{code}
<resource path="/hello">
<method name="POST">
<request>
<param name="param2" style="query" type="xs:string"/>
<param name="param1" style="query" type="xs:string"/>
</request>
{code}

and in Swagger (nested parameters not picked up): 
{code}
"/bestand/hello": {

    "post": {
        "tags": [
            "bestand"
        ],
        "operationId": "hello",
        "consumes": [
            "application/json"
        ],
        "produces": [
            "application/json"
        ],
        "parameters": [
            {
                "name": "",
                "in": "query",
                "required": false,
                "type": "string"
            }
        ],
{code}

> CXF Swagger2Feature does not correctly support QueryParam("") and DataHandler
> -----------------------------------------------------------------------------
>
>                 Key: CXF-6965
>                 URL: https://issues.apache.org/jira/browse/CXF-6965
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 3.2.0, 3.1.8
>
>
> See 
> https://github.com/swagger-api/swagger-codegen/issues/2017#issuecomment-230426728



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to