mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
Merge remote-tracking branch 'origin/master' into 7.0.x
This commit is contained in:
@@ -99,6 +99,29 @@ paths:
|
||||
tags:
|
||||
- header
|
||||
x-accepts: text/plain
|
||||
/query/enum_ref_string:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
operationId: test/enum_ref_string
|
||||
parameters:
|
||||
- explode: true
|
||||
in: query
|
||||
name: enum_ref_string_query
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/StringEnumRef'
|
||||
style: form
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test query parameter(s)
|
||||
tags:
|
||||
- query
|
||||
x-accepts: text/plain
|
||||
/query/datetime/date/string:
|
||||
get:
|
||||
description: Test query parameter(s)
|
||||
@@ -290,6 +313,28 @@ paths:
|
||||
tags:
|
||||
- query
|
||||
x-accepts: text/plain
|
||||
/body/application/octetstream/binary:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
operationId: test/body/application/octetstream/binary
|
||||
requestBody:
|
||||
content:
|
||||
application/octet-stream:
|
||||
schema:
|
||||
format: binary
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test body parameter(s)
|
||||
tags:
|
||||
- body
|
||||
x-content-type: application/octet-stream
|
||||
x-accepts: text/plain
|
||||
/echo/body/Pet:
|
||||
post:
|
||||
description: Test body parameter(s)
|
||||
@@ -326,6 +371,46 @@ paths:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: text/plain
|
||||
/echo/body/Tag/response_string:
|
||||
post:
|
||||
description: Test empty json (request body)
|
||||
operationId: test/echo/body/Tag/response_string
|
||||
requestBody:
|
||||
$ref: '#/components/requestBodies/Tag'
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test empty json (request body)
|
||||
tags:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: text/plain
|
||||
/echo/body/FreeFormObject/response_string:
|
||||
post:
|
||||
description: Test free form object
|
||||
operationId: test/echo/body/FreeFormObject/response_string
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
description: Free form object
|
||||
responses:
|
||||
"200":
|
||||
content:
|
||||
text/plain:
|
||||
schema:
|
||||
type: string
|
||||
description: Successful operation
|
||||
summary: Test free form object
|
||||
tags:
|
||||
- body
|
||||
x-content-type: application/json
|
||||
x-accepts: text/plain
|
||||
/binary/gif:
|
||||
post:
|
||||
description: Test binary (gif) response body
|
||||
@@ -350,6 +435,12 @@ components:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Pet'
|
||||
description: Pet object that needs to be added to the store
|
||||
Tag:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Tag'
|
||||
description: Tag object
|
||||
schemas:
|
||||
Category:
|
||||
example:
|
||||
|
||||
@@ -6,6 +6,7 @@ import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.Tag;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -42,6 +43,64 @@ public interface BodyApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param body (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("POST /body/application/octetstream/binary")
|
||||
@Headers({
|
||||
"Content-Type: application/octet-stream",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testBodyApplicationOctetstreamBinary(File body);
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Similar to <code>testBodyApplicationOctetstreamBinary</code> but it also returns the http response headers .
|
||||
* Test body parameter(s)
|
||||
* @param body (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /body/application/octetstream/binary")
|
||||
@Headers({
|
||||
"Content-Type: application/octet-stream",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(File body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Test free form object
|
||||
* @param body Free form object (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("POST /echo/body/FreeFormObject/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testEchoBodyFreeFormObjectResponseString(Object body);
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Similar to <code>testEchoBodyFreeFormObjectResponseString</code> but it also returns the http response headers .
|
||||
* Test free form object
|
||||
* @param body Free form object (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /echo/body/FreeFormObject/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object body);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
@@ -99,4 +158,33 @@ public interface BodyApi extends ApiClient.Api {
|
||||
ApiResponse<String> testEchoBodyPetResponseStringWithHttpInfo(Pet pet);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Test empty json (request body)
|
||||
* @param tag Tag object (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("POST /echo/body/Tag/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testEchoBodyTagResponseString(Tag tag);
|
||||
|
||||
/**
|
||||
* Test empty json (request body)
|
||||
* Similar to <code>testEchoBodyTagResponseString</code> but it also returns the http response headers .
|
||||
* Test empty json (request body)
|
||||
* @param tag Tag object (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("POST /echo/body/Tag/response_string")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testEchoBodyTagResponseStringWithHttpInfo(Tag tag);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.openapitools.client.model.DataQuery;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.StringEnumRef;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
|
||||
@@ -21,6 +22,83 @@ import feign.*;
|
||||
public interface QueryApi extends ApiClient.Api {
|
||||
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* @param enumRefStringQuery (optional)
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testEnumRefString(@Param("enumRefStringQuery") StringEnumRef enumRefStringQuery);
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Similar to <code>testEnumRefString</code> but it also returns the http response headers .
|
||||
* Test query parameter(s)
|
||||
* @param enumRefStringQuery (optional)
|
||||
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||
*/
|
||||
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testEnumRefStringWithHttpInfo(@Param("enumRefStringQuery") StringEnumRef enumRefStringQuery);
|
||||
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* Note, this is equivalent to the other <code>testEnumRefString</code> method,
|
||||
* but with the query parameters collected into a single Map parameter. This
|
||||
* is convenient for services with optional query parameters, especially when
|
||||
* used with the {@link TestEnumRefStringQueryParams} class that allows for
|
||||
* building up this map in a fluent style.
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>enumRefStringQuery - (optional)</li>
|
||||
* </ul>
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testEnumRefString(@QueryMap(encoded=true) TestEnumRefStringQueryParams queryParams);
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
* Note, this is equivalent to the other <code>testEnumRefString</code> that receives the query parameters as a map,
|
||||
* but this one also exposes the Http response headers
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>enumRefStringQuery - (optional)</li>
|
||||
* </ul>
|
||||
* @return String
|
||||
*/
|
||||
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testEnumRefStringWithHttpInfo(@QueryMap(encoded=true) TestEnumRefStringQueryParams queryParams);
|
||||
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testEnumRefString</code> method in a fluent style.
|
||||
*/
|
||||
public static class TestEnumRefStringQueryParams extends HashMap<String, Object> {
|
||||
public TestEnumRefStringQueryParams enumRefStringQuery(final StringEnumRef value) {
|
||||
put("enum_ref_string_query", EncodingUtils.encode(value));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* Test query parameter(s)
|
||||
|
||||
Reference in New Issue
Block a user