mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 03:36:09 +00:00
[Bug][Java/Spring] OAS3 related bugfixes and enhancements (#11526)
* Content mediatype is hardcoded in api.mustache #11511 * Generate Samples * OAS3 incorrect data type when providing a default value #11367 * Generate Samples * Fix JsonTypeName annotation handling in Java and JavaSpring * Generate Samples * getIsClassnameSanitized: use null safe equals
This commit is contained in:
@@ -42,7 +42,9 @@ public interface AnotherFakeApi {
|
||||
summary = "To test special tags",
|
||||
tags = { "$another-fake?" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class)))
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))
|
||||
})
|
||||
}
|
||||
)
|
||||
@RequestMapping(
|
||||
@@ -52,7 +54,7 @@ public interface AnotherFakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Client> call123testSpecialTags(
|
||||
@Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body
|
||||
@Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class AnotherFakeApiController implements AnotherFakeApi {
|
||||
* @see AnotherFakeApi#call123testSpecialTags
|
||||
*/
|
||||
public ResponseEntity<Client> call123testSpecialTags(
|
||||
@Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body
|
||||
@Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
||||
@@ -61,7 +61,7 @@ public interface FakeApi {
|
||||
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" }
|
||||
)
|
||||
ResponseEntity<Void> createXmlItem(
|
||||
@Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem
|
||||
@Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem
|
||||
);
|
||||
|
||||
|
||||
@@ -76,7 +76,9 @@ public interface FakeApi {
|
||||
operationId = "fakeOuterBooleanSerialize",
|
||||
tags = { "fake" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "Output boolean", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Boolean.class)))
|
||||
@ApiResponse(responseCode = "200", description = "Output boolean", content = {
|
||||
@Content(mediaType = "*/*", schema = @Schema(implementation = Boolean.class))
|
||||
})
|
||||
}
|
||||
)
|
||||
@RequestMapping(
|
||||
@@ -85,7 +87,7 @@ public interface FakeApi {
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<Boolean> fakeOuterBooleanSerialize(
|
||||
@Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body
|
||||
@Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body
|
||||
);
|
||||
|
||||
|
||||
@@ -100,7 +102,9 @@ public interface FakeApi {
|
||||
operationId = "fakeOuterCompositeSerialize",
|
||||
tags = { "fake" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "Output composite", content = @Content(mediaType = "application/json", schema = @Schema(implementation = OuterComposite.class)))
|
||||
@ApiResponse(responseCode = "200", description = "Output composite", content = {
|
||||
@Content(mediaType = "*/*", schema = @Schema(implementation = OuterComposite.class))
|
||||
})
|
||||
}
|
||||
)
|
||||
@RequestMapping(
|
||||
@@ -109,7 +113,7 @@ public interface FakeApi {
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(
|
||||
@Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body
|
||||
@Parameter(name = "body", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body
|
||||
);
|
||||
|
||||
|
||||
@@ -124,7 +128,9 @@ public interface FakeApi {
|
||||
operationId = "fakeOuterNumberSerialize",
|
||||
tags = { "fake" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "Output number", content = @Content(mediaType = "application/json", schema = @Schema(implementation = BigDecimal.class)))
|
||||
@ApiResponse(responseCode = "200", description = "Output number", content = {
|
||||
@Content(mediaType = "*/*", schema = @Schema(implementation = BigDecimal.class))
|
||||
})
|
||||
}
|
||||
)
|
||||
@RequestMapping(
|
||||
@@ -133,7 +139,7 @@ public interface FakeApi {
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<BigDecimal> fakeOuterNumberSerialize(
|
||||
@Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body
|
||||
@Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body
|
||||
);
|
||||
|
||||
|
||||
@@ -148,7 +154,9 @@ public interface FakeApi {
|
||||
operationId = "fakeOuterStringSerialize",
|
||||
tags = { "fake" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "Output string", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class)))
|
||||
@ApiResponse(responseCode = "200", description = "Output string", content = {
|
||||
@Content(mediaType = "*/*", schema = @Schema(implementation = String.class))
|
||||
})
|
||||
}
|
||||
)
|
||||
@RequestMapping(
|
||||
@@ -157,7 +165,7 @@ public interface FakeApi {
|
||||
produces = { "*/*" }
|
||||
)
|
||||
ResponseEntity<String> fakeOuterStringSerialize(
|
||||
@Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body
|
||||
@Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body
|
||||
);
|
||||
|
||||
|
||||
@@ -181,7 +189,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testBodyWithFileSchema(
|
||||
@Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody FileSchemaTestClass body
|
||||
);
|
||||
|
||||
|
||||
@@ -205,8 +213,8 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
|
||||
@@ -222,7 +230,9 @@ public interface FakeApi {
|
||||
summary = "To test \"client\" model",
|
||||
tags = { "fake" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class)))
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))
|
||||
})
|
||||
}
|
||||
)
|
||||
@RequestMapping(
|
||||
@@ -232,7 +242,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Client> testClientModel(
|
||||
@Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body
|
||||
@Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
|
||||
);
|
||||
|
||||
|
||||
@@ -275,20 +285,20 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> testEndpointParameters(
|
||||
@Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number,
|
||||
@Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double,
|
||||
@Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
|
||||
@Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,
|
||||
@Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer,
|
||||
@Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32,
|
||||
@Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64,
|
||||
@Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float,
|
||||
@Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string,
|
||||
@Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary,
|
||||
@Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password,
|
||||
@Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback
|
||||
@Parameter(name = "number", description = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,
|
||||
@Parameter(name = "double", description = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,
|
||||
@Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
|
||||
@Parameter(name = "byte", description = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,
|
||||
@Parameter(name = "integer", description = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,
|
||||
@Parameter(name = "int32", description = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,
|
||||
@Parameter(name = "int64", description = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,
|
||||
@Parameter(name = "float", description = "None") @Valid @RequestPart(value = "float", required = false) Float _float,
|
||||
@Parameter(name = "string", description = "None") @Valid @RequestPart(value = "string", required = false) String string,
|
||||
@Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary,
|
||||
@Parameter(name = "date", description = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@Parameter(name = "dateTime", description = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@Parameter(name = "password", description = "None") @Valid @RequestPart(value = "password", required = false) String password,
|
||||
@Parameter(name = "callback", description = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback
|
||||
);
|
||||
|
||||
|
||||
@@ -322,14 +332,14 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> testEnumParameters(
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString
|
||||
);
|
||||
|
||||
|
||||
@@ -358,12 +368,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
);
|
||||
|
||||
|
||||
@@ -387,7 +397,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testInlineAdditionalProperties(
|
||||
@Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map<String, String> param
|
||||
@Parameter(name = "param", description = "request body", required = true) @Valid @RequestBody Map<String, String> param
|
||||
);
|
||||
|
||||
|
||||
@@ -412,8 +422,8 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> testJsonFormData(
|
||||
@Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param,
|
||||
@Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2
|
||||
@Parameter(name = "param", description = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,
|
||||
@Parameter(name = "param2", description = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2
|
||||
);
|
||||
|
||||
|
||||
@@ -440,11 +450,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
);
|
||||
|
||||
|
||||
@@ -461,7 +471,9 @@ public interface FakeApi {
|
||||
summary = "uploads an image (required)",
|
||||
tags = { "pet" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class)))
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))
|
||||
})
|
||||
},
|
||||
security = {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
@@ -474,9 +486,9 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#createXmlItem
|
||||
*/
|
||||
public ResponseEntity<Void> createXmlItem(
|
||||
@Parameter(name = "XmlItem", description = "XmlItem Body", required = true, schema = @Schema(description = "")) @Valid @RequestBody XmlItem xmlItem
|
||||
@Parameter(name = "XmlItem", description = "XmlItem Body", required = true) @Valid @RequestBody XmlItem xmlItem
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#fakeOuterBooleanSerialize
|
||||
*/
|
||||
public ResponseEntity<Boolean> fakeOuterBooleanSerialize(
|
||||
@Parameter(name = "body", description = "Input boolean as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) Boolean body
|
||||
@Parameter(name = "body", description = "Input boolean as post body") @Valid @RequestBody(required = false) Boolean body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -91,7 +91,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#fakeOuterCompositeSerialize
|
||||
*/
|
||||
public ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(
|
||||
@Parameter(name = "body", description = "Input composite as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) OuterComposite body
|
||||
@Parameter(name = "body", description = "Input composite as post body") @Valid @RequestBody(required = false) OuterComposite body
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("*/*"))) {
|
||||
@@ -113,7 +113,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#fakeOuterNumberSerialize
|
||||
*/
|
||||
public ResponseEntity<BigDecimal> fakeOuterNumberSerialize(
|
||||
@Parameter(name = "body", description = "Input number as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) BigDecimal body
|
||||
@Parameter(name = "body", description = "Input number as post body") @Valid @RequestBody(required = false) BigDecimal body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -128,7 +128,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#fakeOuterStringSerialize
|
||||
*/
|
||||
public ResponseEntity<String> fakeOuterStringSerialize(
|
||||
@Parameter(name = "body", description = "Input string as post body", schema = @Schema(description = "")) @Valid @RequestBody(required = false) String body
|
||||
@Parameter(name = "body", description = "Input string as post body") @Valid @RequestBody(required = false) String body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -143,7 +143,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testBodyWithFileSchema
|
||||
*/
|
||||
public ResponseEntity<Void> testBodyWithFileSchema(
|
||||
@Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody FileSchemaTestClass body
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody FileSchemaTestClass body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -158,8 +158,8 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testBodyWithQueryParams
|
||||
*/
|
||||
public ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -174,7 +174,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testClientModel
|
||||
*/
|
||||
public ResponseEntity<Client> testClientModel(
|
||||
@Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body
|
||||
@Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
@@ -210,20 +210,20 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testEndpointParameters
|
||||
*/
|
||||
public ResponseEntity<Void> testEndpointParameters(
|
||||
@Parameter(name = "number", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "number", required = true) BigDecimal number,
|
||||
@Parameter(name = "double", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "double", required = true) Double _double,
|
||||
@Parameter(name = "pattern_without_delimiter", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
|
||||
@Parameter(name = "byte", description = "None", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,
|
||||
@Parameter(name = "integer", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "integer", required = false) Integer integer,
|
||||
@Parameter(name = "int32", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int32", required = false) Integer int32,
|
||||
@Parameter(name = "int64", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "int64", required = false) Long int64,
|
||||
@Parameter(name = "float", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "float", required = false) Float _float,
|
||||
@Parameter(name = "string", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "string", required = false) String string,
|
||||
@Parameter(name = "binary", description = "None", schema = @Schema(description = "")) @RequestPart(value = "binary", required = false) MultipartFile binary,
|
||||
@Parameter(name = "date", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@Parameter(name = "dateTime", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@Parameter(name = "password", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "password", required = false) String password,
|
||||
@Parameter(name = "callback", description = "None", schema = @Schema(description = "")) @Valid @RequestPart(value = "callback", required = false) String paramCallback
|
||||
@Parameter(name = "number", description = "None", required = true) @Valid @RequestPart(value = "number", required = true) BigDecimal number,
|
||||
@Parameter(name = "double", description = "None", required = true) @Valid @RequestPart(value = "double", required = true) Double _double,
|
||||
@Parameter(name = "pattern_without_delimiter", description = "None", required = true) @Valid @RequestPart(value = "pattern_without_delimiter", required = true) String patternWithoutDelimiter,
|
||||
@Parameter(name = "byte", description = "None", required = true) @Valid @RequestPart(value = "byte", required = true) byte[] _byte,
|
||||
@Parameter(name = "integer", description = "None") @Valid @RequestPart(value = "integer", required = false) Integer integer,
|
||||
@Parameter(name = "int32", description = "None") @Valid @RequestPart(value = "int32", required = false) Integer int32,
|
||||
@Parameter(name = "int64", description = "None") @Valid @RequestPart(value = "int64", required = false) Long int64,
|
||||
@Parameter(name = "float", description = "None") @Valid @RequestPart(value = "float", required = false) Float _float,
|
||||
@Parameter(name = "string", description = "None") @Valid @RequestPart(value = "string", required = false) String string,
|
||||
@Parameter(name = "binary", description = "None") @RequestPart(value = "binary", required = false) MultipartFile binary,
|
||||
@Parameter(name = "date", description = "None") @Valid @RequestPart(value = "date", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@Parameter(name = "dateTime", description = "None") @Valid @RequestPart(value = "dateTime", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@Parameter(name = "password", description = "None") @Valid @RequestPart(value = "password", required = false) String password,
|
||||
@Parameter(name = "callback", description = "None") @Valid @RequestPart(value = "callback", required = false) String paramCallback
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -246,14 +246,14 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testEnumParameters
|
||||
*/
|
||||
public ResponseEntity<Void> testEnumParameters(
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1", "-2" })) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", schema = @Schema(description = "", allowableValues = { "1.1", "-1.2" })) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)", schema = @Schema(description = "", allowableValues = { ">", "$" })) @Valid @RequestPart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)", schema = @Schema(description = "", allowableValues = { "_abc", "-efg", "(xyz)" }, defaultValue = "-efg")) @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false) String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestPart(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestPart(value = "enum_form_string", required = false) String enumFormString
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -273,12 +273,12 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testGroupParameters
|
||||
*/
|
||||
public ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, schema = @Schema(description = "")) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", schema = @Schema(description = "")) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", schema = @Schema(description = "")) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters") @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -292,7 +292,7 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testInlineAdditionalProperties
|
||||
*/
|
||||
public ResponseEntity<Void> testInlineAdditionalProperties(
|
||||
@Parameter(name = "param", description = "request body", required = true, schema = @Schema(description = "")) @Valid @RequestBody Map<String, String> param
|
||||
@Parameter(name = "param", description = "request body", required = true) @Valid @RequestBody Map<String, String> param
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -307,8 +307,8 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testJsonFormData
|
||||
*/
|
||||
public ResponseEntity<Void> testJsonFormData(
|
||||
@Parameter(name = "param", description = "field1", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param", required = true) String param,
|
||||
@Parameter(name = "param2", description = "field2", required = true, schema = @Schema(description = "")) @Valid @RequestPart(value = "param2", required = true) String param2
|
||||
@Parameter(name = "param", description = "field1", required = true) @Valid @RequestPart(value = "param", required = true) String param,
|
||||
@Parameter(name = "param2", description = "field2", required = true) @Valid @RequestPart(value = "param2", required = true) String param2
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -327,11 +327,11 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#testQueryParameterCollectionFormat
|
||||
*/
|
||||
public ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -347,9 +347,9 @@ public class FakeApiController implements FakeApi {
|
||||
* @see FakeApi#uploadFileWithRequiredFile
|
||||
*/
|
||||
public ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "requiredFile", description = "file to upload", required = true, schema = @Schema(description = "")) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) MultipartFile requiredFile,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
||||
@@ -42,7 +42,9 @@ public interface FakeClassnameTestApi {
|
||||
summary = "To test class name in snake case",
|
||||
tags = { "fake_classname_tags 123#$%^" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Client.class)))
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Client.class))
|
||||
})
|
||||
},
|
||||
security = {
|
||||
@SecurityRequirement(name = "api_key_query")
|
||||
@@ -55,7 +57,7 @@ public interface FakeClassnameTestApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Client> testClassname(
|
||||
@Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body
|
||||
@Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class FakeClassnameTestApiController implements FakeClassnameTestApi {
|
||||
* @see FakeClassnameTestApi#testClassname
|
||||
*/
|
||||
public ResponseEntity<Client> testClassname(
|
||||
@Parameter(name = "body", description = "client model", required = true, schema = @Schema(description = "")) @Valid @RequestBody Client body
|
||||
@Parameter(name = "body", description = "client model", required = true) @Valid @RequestBody Client body
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public interface PetApi {
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
ResponseEntity<Void> addPet(
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
|
||||
);
|
||||
|
||||
|
||||
@@ -86,8 +86,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "") @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
|
||||
|
||||
@@ -104,7 +104,10 @@ public interface PetApi {
|
||||
summary = "Finds Pets by status",
|
||||
tags = { "pet" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid status value")
|
||||
},
|
||||
security = {
|
||||
@@ -117,7 +120,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
);
|
||||
|
||||
|
||||
@@ -135,7 +138,10 @@ public interface PetApi {
|
||||
summary = "Finds Pets by tags",
|
||||
tags = { "pet" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid tag value")
|
||||
},
|
||||
security = {
|
||||
@@ -148,7 +154,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
);
|
||||
|
||||
|
||||
@@ -166,7 +172,10 @@ public interface PetApi {
|
||||
summary = "Find pet by ID",
|
||||
tags = { "pet" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = Pet.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Pet.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
|
||||
@ApiResponse(responseCode = "404", description = "Pet not found")
|
||||
},
|
||||
@@ -180,7 +189,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
);
|
||||
|
||||
|
||||
@@ -213,7 +222,7 @@ public interface PetApi {
|
||||
consumes = { "application/json", "application/xml" }
|
||||
)
|
||||
ResponseEntity<Void> updatePet(
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
|
||||
);
|
||||
|
||||
|
||||
@@ -242,9 +251,9 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status
|
||||
);
|
||||
|
||||
|
||||
@@ -261,7 +270,9 @@ public interface PetApi {
|
||||
summary = "uploads an image",
|
||||
tags = { "pet" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class)))
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = ModelApiResponse.class))
|
||||
})
|
||||
},
|
||||
security = {
|
||||
@SecurityRequirement(name = "petstore_auth", scopes={ "write:pets", "read:pets" })
|
||||
@@ -274,9 +285,9 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#addPet
|
||||
*/
|
||||
public ResponseEntity<Void> addPet(
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -69,8 +69,8 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#deletePet
|
||||
*/
|
||||
public ResponseEntity<Void> deletePet(
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", schema = @Schema(description = "")) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "") @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#findPetsByStatus
|
||||
*/
|
||||
public ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, schema = @Schema(description = "", allowableValues = { "available", "pending", "sold" })) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
@@ -115,7 +115,7 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#findPetsByTags
|
||||
*/
|
||||
public ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
@@ -144,7 +144,7 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#getPetById
|
||||
*/
|
||||
public ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
@@ -173,7 +173,7 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#updatePet
|
||||
*/
|
||||
public ResponseEntity<Void> updatePet(
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true, schema = @Schema(description = "")) @Valid @RequestBody Pet body
|
||||
@Parameter(name = "body", description = "Pet object that needs to be added to the store", required = true) @Valid @RequestBody Pet body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -189,9 +189,9 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#updatePetWithForm
|
||||
*/
|
||||
public ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet", schema = @Schema(description = "")) @Valid @RequestPart(value = "status", required = false) String status
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestPart(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestPart(value = "status", required = false) String status
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -207,9 +207,9 @@ public class PetApiController implements PetApi {
|
||||
* @see PetApi#uploadFile
|
||||
*/
|
||||
public ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, schema = @Schema(description = "")) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server", schema = @Schema(description = "")) @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload", schema = @Schema(description = "")) @RequestPart(value = "file", required = false) MultipartFile file
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestPart(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
||||
@@ -53,7 +53,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -68,7 +68,9 @@ public interface StoreApi {
|
||||
summary = "Returns pet inventories by status",
|
||||
tags = { "store" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)))
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Map.class))
|
||||
})
|
||||
},
|
||||
security = {
|
||||
@SecurityRequirement(name = "api_key")
|
||||
@@ -98,7 +100,10 @@ public interface StoreApi {
|
||||
summary = "Find purchase order by ID",
|
||||
tags = { "store" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid ID supplied"),
|
||||
@ApiResponse(responseCode = "404", description = "Order not found")
|
||||
}
|
||||
@@ -109,7 +114,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -125,7 +130,10 @@ public interface StoreApi {
|
||||
summary = "Place an order for a pet",
|
||||
tags = { "store" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = Order.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = Order.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid Order")
|
||||
}
|
||||
)
|
||||
@@ -135,7 +143,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Order> placeOrder(
|
||||
@Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body
|
||||
@Parameter(name = "body", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class StoreApiController implements StoreApi {
|
||||
* @see StoreApi#deleteOrder
|
||||
*/
|
||||
public ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -84,7 +84,7 @@ public class StoreApiController implements StoreApi {
|
||||
* @see StoreApi#getOrderById
|
||||
*/
|
||||
public ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, schema = @Schema(description = "")) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
@@ -111,7 +111,7 @@ public class StoreApiController implements StoreApi {
|
||||
* @see StoreApi#placeOrder
|
||||
*/
|
||||
public ResponseEntity<Order> placeOrder(
|
||||
@Parameter(name = "body", description = "order placed for purchasing the pet", required = true, schema = @Schema(description = "")) @Valid @RequestBody Order body
|
||||
@Parameter(name = "body", description = "order placed for purchasing the pet", required = true) @Valid @RequestBody Order body
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface UserApi {
|
||||
value = "/user"
|
||||
)
|
||||
ResponseEntity<Void> createUser(
|
||||
@Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body
|
||||
@Parameter(name = "body", description = "Created user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public interface UserApi {
|
||||
value = "/user/createWithArray"
|
||||
)
|
||||
ResponseEntity<Void> createUsersWithArrayInput(
|
||||
@Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List<User> body
|
||||
@Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<User> body
|
||||
);
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ public interface UserApi {
|
||||
value = "/user/createWithList"
|
||||
)
|
||||
ResponseEntity<Void> createUsersWithListInput(
|
||||
@Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List<User> body
|
||||
@Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<User> body
|
||||
);
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -141,7 +141,10 @@ public interface UserApi {
|
||||
summary = "Get user by user name",
|
||||
tags = { "user" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = User.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = User.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = User.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid username supplied"),
|
||||
@ApiResponse(responseCode = "404", description = "User not found")
|
||||
}
|
||||
@@ -152,7 +155,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -169,7 +172,10 @@ public interface UserApi {
|
||||
summary = "Logs user into the system",
|
||||
tags = { "user" },
|
||||
responses = {
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = @Content(mediaType = "application/json", schema = @Schema(implementation = String.class))),
|
||||
@ApiResponse(responseCode = "200", description = "successful operation", content = {
|
||||
@Content(mediaType = "application/xml", schema = @Schema(implementation = String.class)),
|
||||
@Content(mediaType = "application/json", schema = @Schema(implementation = String.class))
|
||||
}),
|
||||
@ApiResponse(responseCode = "400", description = "Invalid username/password supplied")
|
||||
}
|
||||
)
|
||||
@@ -179,8 +185,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
|
||||
|
||||
@@ -229,8 +235,8 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#createUser
|
||||
*/
|
||||
public ResponseEntity<Void> createUser(
|
||||
@Parameter(name = "body", description = "Created user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body
|
||||
@Parameter(name = "body", description = "Created user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -67,7 +67,7 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#createUsersWithArrayInput
|
||||
*/
|
||||
public ResponseEntity<Void> createUsersWithArrayInput(
|
||||
@Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List<User> body
|
||||
@Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<User> body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -81,7 +81,7 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#createUsersWithListInput
|
||||
*/
|
||||
public ResponseEntity<Void> createUsersWithListInput(
|
||||
@Parameter(name = "body", description = "List of user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody List<User> body
|
||||
@Parameter(name = "body", description = "List of user object", required = true) @Valid @RequestBody List<User> body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -97,7 +97,7 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#deleteUser
|
||||
*/
|
||||
public ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -113,7 +113,7 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#getUserByName
|
||||
*/
|
||||
public ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, schema = @Schema(description = "")) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
) {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
@@ -141,8 +141,8 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#loginUser
|
||||
*/
|
||||
public ResponseEntity<String> loginUser(
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, schema = @Schema(description = "")) @Valid @RequestParam(value = "password", required = true) String password
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -172,8 +172,8 @@ public class UserApiController implements UserApi {
|
||||
* @see UserApi#updateUser
|
||||
*/
|
||||
public ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, schema = @Schema(description = "")) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true, schema = @Schema(description = "")) @Valid @RequestBody User body
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
@@ -17,6 +18,7 @@ import javax.annotation.Generated;
|
||||
* BigCatAllOf
|
||||
*/
|
||||
|
||||
@JsonTypeName("BigCat_allOf")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class BigCatAllOf {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -16,6 +17,7 @@ import javax.annotation.Generated;
|
||||
* CatAllOf
|
||||
*/
|
||||
|
||||
@JsonTypeName("Cat_allOf")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class CatAllOf {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -16,6 +17,7 @@ import javax.annotation.Generated;
|
||||
* DogAllOf
|
||||
*/
|
||||
|
||||
@JsonTypeName("Dog_allOf")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class DogAllOf {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.openapitools.model.OuterEnum;
|
||||
import javax.validation.Valid;
|
||||
@@ -18,6 +19,7 @@ import javax.annotation.Generated;
|
||||
* EnumTest
|
||||
*/
|
||||
|
||||
@JsonTypeName("Enum_Test")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class EnumTest {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.UUID;
|
||||
@@ -22,6 +23,7 @@ import javax.annotation.Generated;
|
||||
* FormatTest
|
||||
*/
|
||||
|
||||
@JsonTypeName("format_test")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class FormatTest {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -16,6 +17,7 @@ import javax.annotation.Generated;
|
||||
* HasOnlyReadOnly
|
||||
*/
|
||||
|
||||
@JsonTypeName("hasOnlyReadOnly")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class HasOnlyReadOnly {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -17,6 +18,7 @@ import javax.annotation.Generated;
|
||||
*/
|
||||
|
||||
@Schema(name = "200_response", description = "Model for testing model name starting with number")
|
||||
@JsonTypeName("200_response")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class Model200Response {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -16,6 +17,7 @@ import javax.annotation.Generated;
|
||||
* ModelApiResponse
|
||||
*/
|
||||
|
||||
@JsonTypeName("ApiResponse")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class ModelApiResponse {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -16,6 +17,7 @@ import javax.annotation.Generated;
|
||||
* ModelList
|
||||
*/
|
||||
|
||||
@JsonTypeName("List")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class ModelList {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -17,6 +18,7 @@ import javax.annotation.Generated;
|
||||
*/
|
||||
|
||||
@Schema(name = "Return", description = "Model for testing reserved words")
|
||||
@JsonTypeName("Return")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class ModelReturn {
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.net.URI;
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
@@ -16,6 +17,7 @@ import javax.annotation.Generated;
|
||||
* SpecialModelName
|
||||
*/
|
||||
|
||||
@JsonTypeName("$special[model.name]")
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen")
|
||||
public class SpecialModelName {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user