-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: stops reprocessing parameters extracted from nested BeanParam
- Loading branch information
1 parent
25debf5
commit 86c64de
Showing
5 changed files
with
115 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
modules/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/FormParamBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package io.swagger.v3.jaxrs2.resources.model; | ||
|
||
import javax.ws.rs.BeanParam; | ||
import javax.ws.rs.FormParam; | ||
|
||
public class FormParamBean { | ||
|
||
@FormParam(value = "param1") | ||
private String param1; | ||
|
||
@FormParam(value = "param2") | ||
private String param2; | ||
|
||
@BeanParam | ||
private NestedBeanParam nestedParams; | ||
|
||
public String getParam1() { | ||
return param1; | ||
} | ||
|
||
public void setParam1(String param1) { | ||
this.param1 = param1; | ||
} | ||
|
||
public String getParam2() { | ||
return param2; | ||
} | ||
|
||
public void setParam2(String param2) { | ||
this.param2 = param2; | ||
} | ||
|
||
public NestedBeanParam getNestedParams() { | ||
return nestedParams; | ||
} | ||
|
||
public void setNestedParams(final NestedBeanParam nestedParams) { | ||
this.nestedParams = nestedParams; | ||
} | ||
|
||
private static class NestedBeanParam { | ||
@FormParam(value = "param3") | ||
private String param3; | ||
public String getParam3() { | ||
return param3; | ||
} | ||
|
||
public void setParam3(String param3) { | ||
this.param3 = param3; | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...es/swagger-jaxrs2/src/test/java/io/swagger/v3/jaxrs2/resources/model/NestedBeanParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.swagger.v3.jaxrs2.resources.model; | ||
|
||
import javax.ws.rs.BeanParam; | ||
import javax.ws.rs.DefaultValue; | ||
import javax.ws.rs.QueryParam; | ||
|
||
public class NestedBeanParam { | ||
|
||
@BeanParam | ||
private NestedClass nestedParams; | ||
|
||
public NestedClass getNestedParams() { | ||
return nestedParams; | ||
} | ||
|
||
public void setNestedParams(final NestedClass nestedParams) { | ||
this.nestedParams = nestedParams; | ||
} | ||
|
||
public class NestedClass { | ||
@QueryParam(value = "queryParam") | ||
@DefaultValue("10") | ||
private Integer queryParam = 10; | ||
public Integer getQueryParam() { | ||
return queryParam; | ||
} | ||
|
||
public void setQueryParam(final Integer queryParam) { | ||
this.queryParam = queryParam; | ||
} | ||
} | ||
} |