-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
[jaxrs-spec] Add builders to models #4916
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.3.0-SNAPSHOT | ||
| 4.3.0-SNAPSHOT |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ | |
| import org.openapitools.model.ModelApiResponse; | ||
| import org.openapitools.model.OuterComposite; | ||
| import org.openapitools.model.User; | ||
| import org.openapitools.model.XmlItem; | ||
|
|
||
| import javax.ws.rs.*; | ||
| import javax.ws.rs.core.Response; | ||
|
|
@@ -26,6 +27,14 @@ | |
| @Api(description = "the fake API") | ||
| public interface FakeApi { | ||
|
|
||
| @POST | ||
| @Path("/create_xml_item") | ||
| @Consumes({ "application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16" }) | ||
| @ApiOperation(value = "creates an XmlItem", notes = "this route creates an XmlItem", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) | ||
| Response createXmlItem(@Valid XmlItem xmlItem); | ||
|
|
||
| @POST | ||
| @Path("/outer/boolean") | ||
| @Produces({ "*/*" }) | ||
|
|
@@ -40,7 +49,7 @@ public interface FakeApi { | |
| @ApiOperation(value = "", notes = "Test serialization of object with outer number type", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) }) | ||
| Response fakeOuterCompositeSerialize(@Valid OuterComposite outerComposite); | ||
| Response fakeOuterCompositeSerialize(@Valid OuterComposite body); | ||
|
|
||
| @POST | ||
| @Path("/outer/number") | ||
|
|
@@ -64,23 +73,23 @@ public interface FakeApi { | |
| @ApiOperation(value = "", notes = "For this test, the body for this request much reference a schema named `File`.", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "Success", response = Void.class) }) | ||
| Response testBodyWithFileSchema(@Valid FileSchemaTestClass fileSchemaTestClass); | ||
| Response testBodyWithFileSchema(@Valid FileSchemaTestClass body); | ||
|
|
||
| @PUT | ||
| @Path("/body-with-query-params") | ||
| @Consumes({ "application/json" }) | ||
| @ApiOperation(value = "", notes = "", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "Success", response = Void.class) }) | ||
| Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid User user); | ||
| Response testBodyWithQueryParams(@QueryParam("query") @NotNull String query,@Valid User body); | ||
|
||
|
|
||
| @PATCH | ||
| @Consumes({ "application/json" }) | ||
| @Produces({ "application/json" }) | ||
| @ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) | ||
| Response testClientModel(@Valid Client client); | ||
| Response testClientModel(@Valid Client body); | ||
|
|
||
| @POST | ||
| @Consumes({ "application/x-www-form-urlencoded" }) | ||
|
|
@@ -98,15 +107,21 @@ public interface FakeApi { | |
| @ApiResponses(value = { | ||
| @ApiResponse(code = 400, message = "Invalid request", response = Void.class), | ||
| @ApiResponse(code = 404, message = "Not found", response = Void.class) }) | ||
| Response testEnumParameters(@HeaderParam("enum_header_string_array") @DefaultValue("new ArrayList<String>()") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @DefaultValue("new ArrayList<String>()") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); | ||
| Response testEnumParameters(@HeaderParam("enum_header_string_array") @DefaultValue("new ArrayList<String>()") @ApiParam("Header parameter enum test (string array)") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") @DefaultValue("-efg") @ApiParam("Header parameter enum test (string)") String enumHeaderString,@QueryParam("enum_query_string_array") @ApiParam("Query parameter enum test (string array)") List<String> enumQueryStringArray,@QueryParam("enum_query_string") @DefaultValue("-efg") @ApiParam("Query parameter enum test (string)") String enumQueryString,@QueryParam("enum_query_integer") @ApiParam("Query parameter enum test (double)") Integer enumQueryInteger,@QueryParam("enum_query_double") @ApiParam("Query parameter enum test (double)") Double enumQueryDouble,@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString); | ||
|
|
||
| @DELETE | ||
| @ApiOperation(value = "Fake endpoint to test group parameters (optional)", notes = "Fake endpoint to test group parameters (optional)", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 400, message = "Someting wrong", response = Void.class) }) | ||
| Response testGroupParameters(@QueryParam("required_string_group") @NotNull @ApiParam("Required String in group parameters") Integer requiredStringGroup,@HeaderParam("required_boolean_group") @NotNull @ApiParam("Required Boolean in group parameters") Boolean requiredBooleanGroup,@QueryParam("required_int64_group") @NotNull @ApiParam("Required Integer in group parameters") Long requiredInt64Group,@QueryParam("string_group") @ApiParam("String in group parameters") Integer stringGroup,@HeaderParam("boolean_group") @ApiParam("Boolean in group parameters") Boolean booleanGroup,@QueryParam("int64_group") @ApiParam("Integer in group parameters") Long int64Group); | ||
|
|
||
| @POST | ||
| @Path("/inline-additionalProperties") | ||
| @Consumes({ "application/json" }) | ||
| @ApiOperation(value = "test inline additionalProperties", notes = "", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) | ||
| Response testInlineAdditionalProperties(@Valid Map<String, String> requestBody); | ||
| Response testInlineAdditionalProperties(@Valid Map<String, String> param); | ||
|
|
||
| @GET | ||
| @Path("/jsonFormData") | ||
|
|
@@ -116,6 +131,13 @@ public interface FakeApi { | |
| @ApiResponse(code = 200, message = "successful operation", response = Void.class) }) | ||
| Response testJsonFormData(@FormParam(value = "param") String param,@FormParam(value = "param2") String param2); | ||
|
|
||
| @PUT | ||
| @Path("/test-query-paramters") | ||
| @ApiOperation(value = "", notes = "To test the collection format in query parameters", tags={ "fake", }) | ||
| @ApiResponses(value = { | ||
| @ApiResponse(code = 200, message = "Success", response = Void.class) }) | ||
| Response testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List<String> pipe,@QueryParam("ioutil") @NotNull List<String> ioutil,@QueryParam("http") @NotNull List<String> http,@QueryParam("url") @NotNull List<String> url,@QueryParam("context") @NotNull List<String> context); | ||
|
|
||
| @POST | ||
| @Path("/{petId}/uploadImageWithRequiredFile") | ||
| @Consumes({ "multipart/form-data" }) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.