mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
[Java][Spring] fix param docs (#14426)
This commit is contained in:
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
{{/swagger2AnnotationLibrary}}
|
||||
{{#swagger1AnnotationLibrary}}
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{{#swagger2AnnotationLibrary}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}}
|
||||
{{#swagger2AnnotationLibrary}}@Parameter(name = "{{{baseName}}}", description = "{{{description}}}"{{#required}}, required = true{{/required}}{{#isPathParam}}, in = ParameterIn.PATH{{/isPathParam}}{{#isQueryParam}}, in = ParameterIn.QUERY{{/isQueryParam}}{{#isCookieParam}}, in = ParameterIn.COOKIE{{/isCookieParam}}{{#isHeaderParam}}, in = ParameterIn.HEADER{{/isHeaderParam}}){{/swagger2AnnotationLibrary}}{{#swagger1AnnotationLibrary}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{.}}}"{{/defaultValue}}){{/swagger1AnnotationLibrary}}
|
||||
@@ -611,6 +611,42 @@ public class SpringCodegenTest {
|
||||
.containsWithNameAndAttributes("RequestPart", ImmutableMap.of("value", "\"marker\"", "required", "false"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldAddParameterWithInHeaderWhenImplicitHeadersIsTrue_issue14418() throws IOException {
|
||||
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
|
||||
OpenAPI openAPI = new OpenAPIParser()
|
||||
.readLocation("src/test/resources/bugs/issue_14418.yaml", null, new ParseOptions()).getOpenAPI();
|
||||
SpringCodegen codegen = new SpringCodegen();
|
||||
codegen.setLibrary(SPRING_BOOT);
|
||||
codegen.setOutputDir(output.getAbsolutePath());
|
||||
codegen.additionalProperties().put(SpringCodegen.INTERFACE_ONLY, "true");
|
||||
codegen.additionalProperties().put(SpringCodegen.USE_BEANVALIDATION, "true");
|
||||
codegen.additionalProperties().put(SpringCodegen.PERFORM_BEANVALIDATION, "true");
|
||||
codegen.additionalProperties().put(CodegenConstants.MODEL_PACKAGE, "xyz.model");
|
||||
codegen.additionalProperties().put(CodegenConstants.API_PACKAGE, "xyz.controller");
|
||||
codegen.additionalProperties().put(SpringCodegen.IMPLICIT_HEADERS, "true");
|
||||
|
||||
ClientOptInput input = new ClientOptInput()
|
||||
.openAPI(openAPI)
|
||||
.config(codegen);
|
||||
|
||||
DefaultGenerator generator = new DefaultGenerator();
|
||||
Map<String, File> files = generator.opts(input).generate().stream()
|
||||
.collect(Collectors.toMap(File::getName, Function.identity()));
|
||||
|
||||
JavaFileAssert.assertThat(files.get("TestApi.java"))
|
||||
.isInterface()
|
||||
.hasImports("io.swagger.v3.oas.annotations.enums.ParameterIn")
|
||||
.assertMethod("test")
|
||||
.assertMethodAnnotations()
|
||||
.containsWithNameAndAttributes("Parameters", ImmutableMap.of(
|
||||
"value", "{ @Parameter(name = \"testHeader\", description = \"Test header\", required = true, in = ParameterIn.HEADER) }"
|
||||
// in = ParameterIn.HEADER is missing?!
|
||||
));
|
||||
}
|
||||
|
||||
// Helper function, intended to reduce boilerplate
|
||||
private Map<String, File> generateFiles(SpringCodegen codegen, String filePath) throws IOException {
|
||||
final File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: test
|
||||
version: 1.0.0
|
||||
paths:
|
||||
/test:
|
||||
get:
|
||||
summary: test
|
||||
operationId: test
|
||||
parameters:
|
||||
- name: testHeader
|
||||
in: header
|
||||
description: 'Test header'
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: '523028ac-2e0e-41ab-b6f7-38c1efdbac45'
|
||||
tags:
|
||||
- test
|
||||
responses:
|
||||
200:
|
||||
description: ok
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -97,8 +98,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
|
||||
|
||||
@@ -132,7 +133,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
);
|
||||
|
||||
|
||||
@@ -168,7 +169,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
);
|
||||
|
||||
|
||||
@@ -204,7 +205,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
);
|
||||
|
||||
|
||||
@@ -277,7 +278,7 @@ 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) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
);
|
||||
@@ -313,7 +314,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -60,7 +61,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -151,7 +152,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -184,7 +185,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -216,8 +217,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
|
||||
|
||||
@@ -276,7 +277,7 @@ public interface UserApi {
|
||||
consumes = "application/json"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user
|
||||
);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -88,8 +89,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Void>> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<List<Pet>>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
);
|
||||
|
||||
|
||||
@@ -159,7 +160,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<List<Pet>>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
);
|
||||
|
||||
|
||||
@@ -195,7 +196,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Pet>> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
);
|
||||
|
||||
|
||||
@@ -255,7 +256,7 @@ public interface PetApi {
|
||||
consumes = "application/x-www-form-urlencoded"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Void>> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
);
|
||||
@@ -289,7 +290,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<ModelApiResponse>> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -61,7 +62,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Void>> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -124,7 +125,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Order>> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -133,7 +134,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Void>> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -164,7 +165,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<User>> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -194,8 +195,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<String>> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
|
||||
|
||||
@@ -245,7 +246,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
CompletableFuture<ResponseEntity<Void>> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -58,10 +59,10 @@ public interface DefaultApi {
|
||||
value = "/thingy/{date}"
|
||||
)
|
||||
ResponseEntity<Void> get(
|
||||
@Parameter(name = "date", description = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true) @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@NotNull @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true) @RequestHeader(value = "X-Order-Date", required = true, defaultValue = "1974-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate,
|
||||
@Parameter(name = "loginDate", description = "A date cookie parameter") @CookieValue(name = "loginDate", required = false, defaultValue = "1975-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate
|
||||
@Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@NotNull @Parameter(name = "dateTime", description = "A date-time query parameter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "dateTime", required = true, defaultValue = "1973-12-19T03:39:57-08:00") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime dateTime,
|
||||
@NotNull @Parameter(name = "X-Order-Date", description = "A date header parameter", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "X-Order-Date", required = true, defaultValue = "1974-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate xOrderDate,
|
||||
@Parameter(name = "loginDate", description = "A date cookie parameter", in = ParameterIn.COOKIE) @CookieValue(name = "loginDate", required = false, defaultValue = "1975-01-01") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate loginDate
|
||||
);
|
||||
|
||||
|
||||
@@ -86,7 +87,7 @@ public interface DefaultApi {
|
||||
consumes = "application/x-www-form-urlencoded"
|
||||
)
|
||||
ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "date", description = "A date path parameter", required = true) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@Parameter(name = "date", description = "A date path parameter", required = true, in = ParameterIn.PATH) @PathVariable("date") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) LocalDate date,
|
||||
@Parameter(name = "visitDate", description = "Updated last visit timestamp") @Valid @RequestParam(value = "visitDate", required = false) @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) OffsetDateTime visitDate
|
||||
);
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -25,6 +25,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -224,7 +225,7 @@ public interface FakeApi {
|
||||
consumes = "application/json"
|
||||
)
|
||||
ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
@@ -346,12 +347,12 @@ 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)") @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, defaultValue = "-efg") 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_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
);
|
||||
@@ -383,12 +384,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
);
|
||||
|
||||
|
||||
@@ -466,11 +467,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -92,8 +93,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
|
||||
|
||||
@@ -127,7 +128,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
);
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
);
|
||||
|
||||
|
||||
@@ -199,7 +200,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
);
|
||||
|
||||
|
||||
@@ -261,7 +262,7 @@ 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) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
);
|
||||
@@ -295,7 +296,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
@@ -329,7 +330,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -60,7 +61,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) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -132,7 +133,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -193,8 +194,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
|
||||
|
||||
@@ -244,7 +245,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -89,8 +90,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
|
||||
|
||||
@@ -124,7 +125,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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,
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status,
|
||||
@ParameterObject final Pageable pageable
|
||||
);
|
||||
|
||||
@@ -161,7 +162,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags,
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags,
|
||||
@ParameterObject final Pageable pageable
|
||||
);
|
||||
|
||||
@@ -198,7 +199,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
);
|
||||
|
||||
|
||||
@@ -258,7 +259,7 @@ 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) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
);
|
||||
@@ -292,7 +293,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -60,7 +61,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -132,7 +133,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -193,8 +194,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
|
||||
|
||||
@@ -266,7 +267,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -97,8 +98,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
);
|
||||
|
||||
|
||||
@@ -132,7 +133,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
);
|
||||
|
||||
|
||||
@@ -168,7 +169,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
);
|
||||
|
||||
|
||||
@@ -204,7 +205,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
);
|
||||
|
||||
|
||||
@@ -277,7 +278,7 @@ 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) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
);
|
||||
@@ -313,7 +314,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -60,7 +61,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
);
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
);
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -151,7 +152,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -184,7 +185,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
);
|
||||
|
||||
|
||||
@@ -216,8 +217,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
);
|
||||
|
||||
|
||||
@@ -276,7 +277,7 @@ public interface UserApi {
|
||||
consumes = "application/json"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user
|
||||
);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -87,8 +88,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -122,7 +123,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -158,7 +159,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -194,7 +195,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -254,7 +255,7 @@ 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) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) throws Exception;
|
||||
@@ -288,7 +289,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) throws Exception;
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -60,7 +61,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -123,7 +124,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
) throws Exception;
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -132,7 +133,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -193,8 +194,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -244,7 +245,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -94,8 +95,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -132,7 +133,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -185,7 +186,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -238,7 +239,7 @@ public interface PetApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -318,7 +319,7 @@ public interface PetApi {
|
||||
consumes = "application/x-www-form-urlencoded"
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -355,7 +356,7 @@ public interface PetApi {
|
||||
consumes = "multipart/form-data"
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -133,7 +134,7 @@ public interface StoreApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -145,7 +146,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -179,7 +180,7 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -226,8 +227,8 @@ public interface UserApi {
|
||||
produces = "application/json"
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -283,7 +284,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -118,8 +119,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -156,7 +157,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -209,7 +210,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -262,7 +263,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -369,7 +370,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -408,7 +409,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -133,7 +134,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -164,7 +165,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -200,7 +201,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -249,8 +250,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -315,7 +316,7 @@ public interface UserApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -118,8 +119,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -156,7 +157,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -209,7 +210,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -262,7 +263,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -369,7 +370,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -408,7 +409,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -133,7 +134,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -164,7 +165,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -200,7 +201,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -249,8 +250,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -315,7 +316,7 @@ public interface UserApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -256,7 +257,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -396,12 +397,12 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> testEnumParameters(
|
||||
@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, defaultValue = "-efg") 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_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
) {
|
||||
@@ -436,12 +437,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
default ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -528,11 +529,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -567,7 +568,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -99,8 +100,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -137,7 +138,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -190,7 +191,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -243,7 +244,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -325,7 +326,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -362,7 +363,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -133,7 +134,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -145,7 +146,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -179,7 +180,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -226,8 +227,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -283,7 +284,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -237,7 +238,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return getDelegate().testBodyWithQueryParams(query, body);
|
||||
@@ -365,12 +366,12 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> testEnumParameters(
|
||||
@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, defaultValue = "-efg") 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_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
) {
|
||||
@@ -404,12 +405,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
default ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
) {
|
||||
return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
@@ -493,11 +494,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) {
|
||||
return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
}
|
||||
@@ -531,7 +532,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -94,8 +95,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return getDelegate().deletePet(petId, apiKey);
|
||||
}
|
||||
@@ -131,7 +132,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
return getDelegate().findPetsByStatus(status);
|
||||
}
|
||||
@@ -169,7 +170,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) {
|
||||
return getDelegate().findPetsByTags(tags);
|
||||
}
|
||||
@@ -207,7 +208,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
return getDelegate().getPetById(petId);
|
||||
}
|
||||
@@ -273,7 +274,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -309,7 +310,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -60,7 +61,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
) {
|
||||
return getDelegate().deleteOrder(orderId);
|
||||
}
|
||||
@@ -127,7 +128,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
) {
|
||||
return getDelegate().getOrderById(orderId);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -138,7 +139,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return getDelegate().deleteUser(username);
|
||||
}
|
||||
@@ -171,7 +172,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return getDelegate().getUserByName(username);
|
||||
}
|
||||
@@ -203,8 +204,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return getDelegate().loginUser(username, password);
|
||||
}
|
||||
@@ -258,7 +259,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return getDelegate().updateUser(username, body);
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -256,7 +257,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -389,8 +390,8 @@ public interface FakeApi {
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)"),
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)")
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER),
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER)
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.GET,
|
||||
@@ -398,10 +399,10 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> testEnumParameters(
|
||||
@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_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
) {
|
||||
@@ -430,18 +431,18 @@ public interface FakeApi {
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
@Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true),
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters")
|
||||
@Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER),
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER)
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/fake"
|
||||
)
|
||||
default ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@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 = "int64_group", description = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -528,11 +529,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -567,7 +568,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -94,14 +95,14 @@ public interface PetApi {
|
||||
}
|
||||
)
|
||||
@Parameters({
|
||||
@Parameter(name = "api_key", description = "")
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER)
|
||||
})
|
||||
@RequestMapping(
|
||||
method = RequestMethod.DELETE,
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -138,7 +139,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -191,7 +192,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -244,7 +245,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -326,7 +327,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -363,7 +364,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -133,7 +134,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -145,7 +146,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -179,7 +180,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -226,8 +227,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -283,7 +284,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -247,7 +248,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody Mono<User> body,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
@@ -378,12 +379,12 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testEnumParameters(
|
||||
@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, defaultValue = "-efg") 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_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
@@ -418,12 +419,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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,
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, exchange);
|
||||
@@ -510,11 +511,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> testQueryParameterCollectionFormat(
|
||||
@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,
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange);
|
||||
@@ -549,7 +550,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default Mono<ResponseEntity<ModelApiResponse>> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "requiredFile", description = "file to upload", required = true) @RequestPart(value = "requiredFile", required = true) Flux<Part> requiredFile,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -99,8 +100,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> deletePet(
|
||||
@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,
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().deletePet(petId, apiKey, exchange);
|
||||
@@ -137,7 +138,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Flux<Pet>>> findPetsByStatus(
|
||||
@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,
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().findPetsByStatus(status, exchange);
|
||||
@@ -176,7 +177,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Flux<Pet>>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags,
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().findPetsByTags(tags, exchange);
|
||||
@@ -215,7 +216,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Pet>> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().getPetById(petId, exchange);
|
||||
@@ -283,7 +284,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
@@ -320,7 +321,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default Mono<ResponseEntity<ModelApiResponse>> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) Flux<Part> file,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId,
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().deleteOrder(orderId, exchange);
|
||||
@@ -132,7 +133,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<Order>> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId,
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().getOrderById(orderId, exchange);
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -145,7 +146,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().deleteUser(username, exchange);
|
||||
@@ -179,7 +180,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<User>> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().getUserByName(username, exchange);
|
||||
@@ -212,8 +213,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default Mono<ResponseEntity<String>> loginUser(
|
||||
@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,
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
return getDelegate().loginUser(username, password, exchange);
|
||||
@@ -268,7 +269,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default Mono<ResponseEntity<Void>> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody Mono<User> body,
|
||||
@Parameter(hidden = true) final ServerWebExchange exchange
|
||||
) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -256,7 +257,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -396,12 +397,12 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> testEnumParameters(
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)") @RequestHeader(value = "enum_header_string_array", required = false) Optional<List<String>> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)") @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional<String> enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)") @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional<List<String>> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)") @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional<String> enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_integer", required = false) Optional<Integer> enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)") @Valid @RequestParam(value = "enum_query_double", required = false) Optional<Double> enumQueryDouble,
|
||||
@Parameter(name = "enum_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) Optional<List<String>> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") Optional<String> enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) Optional<List<String>> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") Optional<String> enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Optional<Integer> enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Optional<Double> enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
) {
|
||||
@@ -436,12 +437,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
default ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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) Optional<Integer> stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters") @RequestHeader(value = "boolean_group", required = false) Optional<Boolean> booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters") @Valid @RequestParam(value = "int64_group", required = false) Optional<Long> int64Group
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Optional<Integer> stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Optional<Boolean> booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Optional<Long> int64Group
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -528,11 +529,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -567,7 +568,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -99,8 +100,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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) Optional<String> apiKey
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) Optional<String> apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -137,7 +138,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -190,7 +191,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -243,7 +244,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -325,7 +326,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -362,7 +363,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -64,7 +65,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -133,7 +134,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -145,7 +146,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -179,7 +180,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -226,8 +227,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -283,7 +284,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -119,8 +120,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -157,7 +158,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -210,7 +211,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) List<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -263,7 +264,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -370,7 +371,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -409,7 +410,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -65,7 +66,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{orderId}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true) @PathVariable("orderId") String orderId
|
||||
@Parameter(name = "orderId", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("orderId") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -134,7 +135,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true) @PathVariable("orderId") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "orderId", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("orderId") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -165,7 +166,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -201,7 +202,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -250,8 +251,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @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
|
||||
@NotNull @Pattern(regexp = "^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$") @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -316,7 +317,7 @@ public interface UserApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "User", description = "Updated user object", required = true) @Valid @RequestBody User user
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -225,7 +226,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) throws Exception;
|
||||
|
||||
@@ -347,12 +348,12 @@ 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)") @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, defaultValue = "-efg") 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_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
) throws Exception;
|
||||
@@ -384,12 +385,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -467,11 +468,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -503,7 +504,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) throws Exception;
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -92,8 +93,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -127,7 +128,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) @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, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -163,7 +164,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -199,7 +200,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -261,7 +262,7 @@ 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) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) throws Exception;
|
||||
@@ -295,7 +296,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) throws Exception;
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -60,7 +61,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) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -123,7 +124,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) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
) throws Exception;
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
@@ -132,7 +133,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -163,7 +164,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) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -193,8 +194,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -244,7 +245,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) throws Exception;
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.virtualan.annotation.ApiVirtual;
|
||||
import io.virtualan.annotation.VirtualService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
@@ -26,6 +26,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.virtualan.annotation.ApiVirtual;
|
||||
import io.virtualan.annotation.VirtualService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -266,7 +267,7 @@ public interface FakeApi {
|
||||
consumes = { "application/json" }
|
||||
)
|
||||
default ResponseEntity<Void> testBodyWithQueryParams(
|
||||
@NotNull @Parameter(name = "query", description = "", required = true) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query,
|
||||
@Parameter(name = "body", description = "", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
@@ -409,12 +410,12 @@ public interface FakeApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> testEnumParameters(
|
||||
@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, defaultValue = "-efg") 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_header_string_array", description = "Header parameter enum test (string array)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string_array", required = false) List<String> enumHeaderStringArray,
|
||||
@Parameter(name = "enum_header_string", description = "Header parameter enum test (string)", in = ParameterIn.HEADER) @RequestHeader(value = "enum_header_string", required = false, defaultValue = "-efg") String enumHeaderString,
|
||||
@Parameter(name = "enum_query_string_array", description = "Query parameter enum test (string array)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string_array", required = false) List<String> enumQueryStringArray,
|
||||
@Parameter(name = "enum_query_string", description = "Query parameter enum test (string)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_string", required = false, defaultValue = "-efg") String enumQueryString,
|
||||
@Parameter(name = "enum_query_integer", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_integer", required = false) Integer enumQueryInteger,
|
||||
@Parameter(name = "enum_query_double", description = "Query parameter enum test (double)", in = ParameterIn.QUERY) @Valid @RequestParam(value = "enum_query_double", required = false) Double enumQueryDouble,
|
||||
@Parameter(name = "enum_form_string_array", description = "Form parameter enum test (string array)") @Valid @RequestParam(value = "enum_form_string_array", required = false) List<String> enumFormStringArray,
|
||||
@Parameter(name = "enum_form_string", description = "Form parameter enum test (string)") @Valid @RequestParam(value = "enum_form_string", required = false) String enumFormString
|
||||
) {
|
||||
@@ -450,12 +451,12 @@ public interface FakeApi {
|
||||
value = "/fake"
|
||||
)
|
||||
default ResponseEntity<Void> testGroupParameters(
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @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
|
||||
@NotNull @Parameter(name = "required_string_group", description = "Required String in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_string_group", required = true) Integer requiredStringGroup,
|
||||
@NotNull @Parameter(name = "required_boolean_group", description = "Required Boolean in group parameters", required = true, in = ParameterIn.HEADER) @RequestHeader(value = "required_boolean_group", required = true) Boolean requiredBooleanGroup,
|
||||
@NotNull @Parameter(name = "required_int64_group", description = "Required Integer in group parameters", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "required_int64_group", required = true) Long requiredInt64Group,
|
||||
@Parameter(name = "string_group", description = "String in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "string_group", required = false) Integer stringGroup,
|
||||
@Parameter(name = "boolean_group", description = "Boolean in group parameters", in = ParameterIn.HEADER) @RequestHeader(value = "boolean_group", required = false) Boolean booleanGroup,
|
||||
@Parameter(name = "int64_group", description = "Integer in group parameters", in = ParameterIn.QUERY) @Valid @RequestParam(value = "int64_group", required = false) Long int64Group
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -545,11 +546,11 @@ public interface FakeApi {
|
||||
value = "/fake/test-query-parameters"
|
||||
)
|
||||
default ResponseEntity<Void> testQueryParameterCollectionFormat(
|
||||
@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
|
||||
@NotNull @Parameter(name = "pipe", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,
|
||||
@NotNull @Parameter(name = "ioutil", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,
|
||||
@NotNull @Parameter(name = "http", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "http", required = true) List<String> http,
|
||||
@NotNull @Parameter(name = "url", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "url", required = true) List<String> url,
|
||||
@NotNull @Parameter(name = "context", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "context", required = true) List<String> context
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -585,7 +586,7 @@ public interface FakeApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFileWithRequiredFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @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 @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata
|
||||
) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.virtualan.annotation.ApiVirtual;
|
||||
import io.virtualan.annotation.VirtualService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.virtualan.annotation.ApiVirtual;
|
||||
import io.virtualan.annotation.VirtualService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -104,8 +105,8 @@ public interface PetApi {
|
||||
value = "/pet/{petId}"
|
||||
)
|
||||
default ResponseEntity<Void> deletePet(
|
||||
@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
|
||||
@Parameter(name = "petId", description = "Pet id to delete", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "api_key", description = "", in = ParameterIn.HEADER) @RequestHeader(value = "api_key", required = false) String apiKey
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -143,7 +144,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<List<Pet>> findPetsByStatus(
|
||||
@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
|
||||
@NotNull @Parameter(name = "status", description = "Status values that need to be considered for filter", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "status", required = true) List<String> status
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -197,7 +198,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Set<Pet>> findPetsByTags(
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
@NotNull @Parameter(name = "tags", description = "Tags to filter by", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "tags", required = true) Set<String> tags
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -251,7 +252,7 @@ public interface PetApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Pet> getPetById(
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true) @PathVariable("petId") Long petId
|
||||
@Parameter(name = "petId", description = "ID of pet to return", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -335,7 +336,7 @@ public interface PetApi {
|
||||
consumes = { "application/x-www-form-urlencoded" }
|
||||
)
|
||||
default ResponseEntity<Void> updatePetWithForm(
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet that needs to be updated", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "name", description = "Updated name of the pet") @Valid @RequestParam(value = "name", required = false) String name,
|
||||
@Parameter(name = "status", description = "Updated status of the pet") @Valid @RequestParam(value = "status", required = false) String status
|
||||
) {
|
||||
@@ -373,7 +374,7 @@ public interface PetApi {
|
||||
consumes = { "multipart/form-data" }
|
||||
)
|
||||
default ResponseEntity<ModelApiResponse> uploadFile(
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "petId", description = "ID of pet to update", required = true, in = ParameterIn.PATH) @PathVariable("petId") Long petId,
|
||||
@Parameter(name = "additionalMetadata", description = "Additional data to pass to server") @Valid @RequestParam(value = "additionalMetadata", required = false) String additionalMetadata,
|
||||
@Parameter(name = "file", description = "file to upload") @RequestPart(value = "file", required = false) MultipartFile file
|
||||
) {
|
||||
|
||||
@@ -17,6 +17,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.virtualan.annotation.ApiVirtual;
|
||||
import io.virtualan.annotation.VirtualService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -68,7 +69,7 @@ public interface StoreApi {
|
||||
value = "/store/order/{order_id}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteOrder(
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true) @PathVariable("order_id") String orderId
|
||||
@Parameter(name = "order_id", description = "ID of the order that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("order_id") String orderId
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -139,7 +140,7 @@ public interface StoreApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<Order> getOrderById(
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true) @PathVariable("order_id") Long orderId
|
||||
@Min(1L) @Max(5L) @Parameter(name = "order_id", description = "ID of pet that needs to be fetched", required = true, in = ParameterIn.PATH) @PathVariable("order_id") Long orderId
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
|
||||
@@ -18,6 +18,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.virtualan.annotation.ApiVirtual;
|
||||
import io.virtualan.annotation.VirtualService;
|
||||
import org.springframework.http.HttpStatus;
|
||||
@@ -152,7 +153,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> deleteUser(
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -187,7 +188,7 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<User> getUserByName(
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true) @PathVariable("username") String username
|
||||
@Parameter(name = "username", description = "The name that needs to be fetched. Use user1 for testing.", required = true, in = ParameterIn.PATH) @PathVariable("username") String username
|
||||
) {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
@@ -235,8 +236,8 @@ public interface UserApi {
|
||||
produces = { "application/xml", "application/json" }
|
||||
)
|
||||
default ResponseEntity<String> loginUser(
|
||||
@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
|
||||
@NotNull @Parameter(name = "username", description = "The user name for login", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "username", required = true) String username,
|
||||
@NotNull @Parameter(name = "password", description = "The password for login in clear text", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "password", required = true) String password
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
@@ -294,7 +295,7 @@ public interface UserApi {
|
||||
value = "/user/{username}"
|
||||
)
|
||||
default ResponseEntity<Void> updateUser(
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true) @PathVariable("username") String username,
|
||||
@Parameter(name = "username", description = "name that need to be deleted", required = true, in = ParameterIn.PATH) @PathVariable("username") String username,
|
||||
@Parameter(name = "body", description = "Updated user object", required = true) @Valid @RequestBody User body
|
||||
) {
|
||||
return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
|
||||
|
||||
Reference in New Issue
Block a user