mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-11 02:12:45 +00:00
Add test cases to cover different collection formats (#3640)
* add test cases to cover different collection format * add space params to retrofit 1.x * add space params to retrofit 2.x * rename url to localVarUrl * fix exception in haskell servant
This commit is contained in:
@@ -191,6 +191,16 @@ public interface FakeApi {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "", nickname = "testQueryParameterCollectionFormat", notes = "To test the collection format in query parameters", tags={ "fake", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "Success") })
|
||||
@RequestMapping(value = "/fake/test-query-paramters",
|
||||
method = RequestMethod.PUT)
|
||||
default Mono<ResponseEntity<Void>> testQueryParameterCollectionFormat(@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "pipe", required = true) List<String> pipe,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "ioutil", required = true) List<String> ioutil,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "http", required = true) List<String> http,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "url", required = true) List<String> url,@NotNull @ApiParam(value = "", required = true) @Valid @RequestParam(value = "context", required = true) List<String> context, ServerWebExchange exchange) {
|
||||
return getDelegate().testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, exchange);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "uploads an image (required)", nickname = "uploadFileWithRequiredFile", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
|
||||
@@ -218,6 +218,21 @@ public interface FakeApiDelegate {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see FakeApi#testQueryParameterCollectionFormat
|
||||
*/
|
||||
default Mono<ResponseEntity<Void>> testQueryParameterCollectionFormat(List<String> pipe,
|
||||
List<String> ioutil,
|
||||
List<String> http,
|
||||
List<String> url,
|
||||
List<String> context,
|
||||
ServerWebExchange exchange) {
|
||||
Mono<Void> result = Mono.empty();
|
||||
exchange.getResponse().setStatusCode(HttpStatus.NOT_IMPLEMENTED);
|
||||
return result.then(Mono.empty());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see FakeApi#uploadFileWithRequiredFile
|
||||
*/
|
||||
|
||||
@@ -1228,6 +1228,62 @@ paths:
|
||||
x-accepts: application/json
|
||||
x-tags:
|
||||
- tag: fake
|
||||
/fake/test-query-paramters:
|
||||
put:
|
||||
description: To test the collection format in query parameters
|
||||
operationId: testQueryParameterCollectionFormat
|
||||
parameters:
|
||||
- explode: false
|
||||
in: query
|
||||
name: pipe
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
style: form
|
||||
- in: query
|
||||
name: ioutil
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- in: query
|
||||
name: http
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
style: spaceDelimited
|
||||
- explode: false
|
||||
in: query
|
||||
name: url
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
style: form
|
||||
- explode: true
|
||||
in: query
|
||||
name: context
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
style: form
|
||||
responses:
|
||||
200:
|
||||
content: {}
|
||||
description: Success
|
||||
tags:
|
||||
- fake
|
||||
x-accepts: application/json
|
||||
x-tags:
|
||||
- tag: fake
|
||||
/fake/{petId}/uploadImageWithRequiredFile:
|
||||
post:
|
||||
operationId: uploadFileWithRequiredFile
|
||||
|
||||
Reference in New Issue
Block a user