forked from loafle/openapi-generator-original
[kotlin-client][jvm-spring-*] Fix runtime error in endpoints of type Unit (#17664)
* Fixed invalid extraction of response body in kotlin-client jvm-spring-* * Generated echo-api for kotlin-jvm-spring-3-restclient * Specific echo-api for Kotlin without allOf/anyOf * Specific echo-api for Kotlin without allOf/anyOf * Generated all samples * Added kotlin-jvm-spring-3-restclient sample to workflow * Fixed syntax problem
This commit is contained in:
parent
189bf7d6c5
commit
227c8602f7
1
.github/workflows/samples-kotlin-client.yaml
vendored
1
.github/workflows/samples-kotlin-client.yaml
vendored
@ -65,6 +65,7 @@ jobs:
|
|||||||
- samples/client/petstore/kotlin-jvm-spring-2-webclient
|
- samples/client/petstore/kotlin-jvm-spring-2-webclient
|
||||||
- samples/client/petstore/kotlin-jvm-spring-3-webclient
|
- samples/client/petstore/kotlin-jvm-spring-3-webclient
|
||||||
- samples/client/petstore/kotlin-jvm-spring-3-restclient
|
- samples/client/petstore/kotlin-jvm-spring-3-restclient
|
||||||
|
- samples/client/echo_api/kotlin-jvm-spring-3-restclient
|
||||||
- samples/client/petstore/kotlin-spring-cloud
|
- samples/client/petstore/kotlin-spring-cloud
|
||||||
- samples/client/petstore/kotlin-name-parameter-mappings
|
- samples/client/petstore/kotlin-name-parameter-mappings
|
||||||
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
|
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
|
||||||
|
9
bin/configs/kotlin-jvm-spring-3-restclient-echo-api.yaml
Normal file
9
bin/configs/kotlin-jvm-spring-3-restclient-echo-api.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
generatorName: kotlin
|
||||||
|
outputDir: samples/client/echo_api/kotlin-jvm-spring-3-restclient
|
||||||
|
library: jvm-spring-restclient
|
||||||
|
inputSpec: modules/openapi-generator/src/test/resources/3_0/kotlin/echo_api.yaml
|
||||||
|
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
|
||||||
|
additionalProperties:
|
||||||
|
enumUnknownDefaultCase: true
|
||||||
|
serializationLibrary: jackson
|
||||||
|
useSpringBoot3: true
|
@ -67,8 +67,10 @@ import {{packageName}}.infrastructure.*
|
|||||||
@Deprecated(message = "This operation is deprecated.")
|
@Deprecated(message = "This operation is deprecated.")
|
||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} {
|
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): {{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}} {
|
||||||
return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
val result = {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
||||||
.body!!
|
{{#returnType}}
|
||||||
|
return result.body!!
|
||||||
|
{{/returnType}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
|
@ -72,7 +72,7 @@ import {{packageName}}.infrastructure.*
|
|||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
|
fun {{operationId}}({{#allParams}}{{{paramName}}}: {{#isEnum}}{{#isContainer}}kotlin.collections.List<{{enumName}}{{operationIdCamelCase}}>{{/isContainer}}{{^isContainer}}{{enumName}}{{operationIdCamelCase}}{{/isContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{^required}}?{{#defaultValue}} = {{^isNumber}}{{#isEnum}}{{enumName}}{{operationIdCamelCase}}.{{enumDefaultValue}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/isNumber}}{{#isNumber}}{{{defaultValue}}}.toDouble(){{/isNumber}}{{/defaultValue}}{{^defaultValue}} = null{{/defaultValue}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}): Mono<{{#returnType}}{{{returnType}}}{{#nullableReturnType}}?{{/nullableReturnType}}{{/returnType}}{{^returnType}}Unit{{/returnType}}> {
|
||||||
return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
return {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}} = {{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
|
||||||
.map { it.body }
|
.map { {{#returnType}}it.body{{/returnType}}{{^returnType}}Unit{{/returnType}} }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
@ -0,0 +1,812 @@
|
|||||||
|
#
|
||||||
|
# Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
openapi: 3.0.3
|
||||||
|
info:
|
||||||
|
title: Echo Server API
|
||||||
|
description: Echo Server API
|
||||||
|
contact:
|
||||||
|
email: team@openapitools.org
|
||||||
|
license:
|
||||||
|
name: Apache 2.0
|
||||||
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
version: 0.1.0
|
||||||
|
servers:
|
||||||
|
- url: http://localhost:3000/
|
||||||
|
paths:
|
||||||
|
# Path usually starts with parameter type such as path, query, header, form
|
||||||
|
# For body/form parameters, path starts with "/echo" so the the echo server
|
||||||
|
# will response with the same body in the HTTP request.
|
||||||
|
#
|
||||||
|
# path parameter tests
|
||||||
|
/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- path
|
||||||
|
summary: Test path parameter(s)
|
||||||
|
description: Test path parameter(s)
|
||||||
|
operationId: tests/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: path_string
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: path_integer
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- in: path
|
||||||
|
name: enum_nonref_string_path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
- unclassified
|
||||||
|
- in: path
|
||||||
|
name: enum_ref_string_path
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# form parameter tests
|
||||||
|
/form/integer/boolean/string:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- form
|
||||||
|
summary: Test form parameter(s)
|
||||||
|
description: Test form parameter(s)
|
||||||
|
operationId: test/form/integer/boolean/string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/x-www-form-urlencoded:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
integer_form:
|
||||||
|
type: integer
|
||||||
|
boolean_form:
|
||||||
|
type: boolean
|
||||||
|
string_form:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# form parameter tests for oneOf schema
|
||||||
|
/form/oneof:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- form
|
||||||
|
summary: Test form parameter(s) for oneOf schema
|
||||||
|
description: Test form parameter(s) for oneOf schema
|
||||||
|
operationId: test/form/oneof
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/x-www-form-urlencoded:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
oneOf:
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
form1:
|
||||||
|
type: string
|
||||||
|
form2:
|
||||||
|
type: integer
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
form3:
|
||||||
|
type: string
|
||||||
|
form4:
|
||||||
|
type: boolean
|
||||||
|
- $ref: '#/components/schemas/Tag'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# header parameter tests
|
||||||
|
/header/integer/boolean/string/enums:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- header
|
||||||
|
summary: Test header parameter(s)
|
||||||
|
description: Test header parameter(s)
|
||||||
|
operationId: test/header/integer/boolean/string/enums
|
||||||
|
parameters:
|
||||||
|
- in: header
|
||||||
|
name: integer_header
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- in: header
|
||||||
|
name: boolean_header
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
- in: header
|
||||||
|
name: string_header
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: header
|
||||||
|
name: enum_nonref_string_header
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
- unclassified
|
||||||
|
- in: header
|
||||||
|
name: enum_ref_string_header
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# query parameter tests
|
||||||
|
/query/enum_ref_string:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/enum_ref_string
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: enum_nonref_string_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
- unclassified
|
||||||
|
- in: query
|
||||||
|
name: enum_ref_string_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/query/datetime/date/string:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/query/datetime/date/string
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: datetime_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
- in: query
|
||||||
|
name: date_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
- in: query
|
||||||
|
name: string_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/query/integer/boolean/string:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/query/integer/boolean/string
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: integer_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
- in: query
|
||||||
|
name: boolean_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
- in: query
|
||||||
|
name: string_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/query/style_form/explode_true/array_string:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/query/style_form/explode_true/array_string
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: query_object
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
values:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/query/style_form/explode_true/object:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/query/style_form/explode_true/object
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: query_object
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Pet'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# The following lines are disabled due to missing support for allOf. Enable when support is added.
|
||||||
|
# /query/style_form/explode_true/object/allOf:
|
||||||
|
# get:
|
||||||
|
# tags:
|
||||||
|
# - query
|
||||||
|
# summary: Test query parameter(s)
|
||||||
|
# description: Test query parameter(s)
|
||||||
|
# operationId: test/query/style_form/explode_true/object/allOf
|
||||||
|
# parameters:
|
||||||
|
# - in: query
|
||||||
|
# name: query_object
|
||||||
|
# style: form #default
|
||||||
|
# explode: true #default
|
||||||
|
# schema:
|
||||||
|
# $ref: '#/components/schemas/DataQuery'
|
||||||
|
# responses:
|
||||||
|
# '200':
|
||||||
|
# description: Successful operation
|
||||||
|
# content:
|
||||||
|
# text/plain:
|
||||||
|
# schema:
|
||||||
|
# type: string
|
||||||
|
/query/style_deepObject/explode_true/object:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/query/style_deepObject/explode_true/object
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: query_object
|
||||||
|
style: deepObject
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Pet'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# The following lines are disabled due to missing support for allOf. Enable when support is added.
|
||||||
|
# /query/style_deepObject/explode_true/object/allOf:
|
||||||
|
# get:
|
||||||
|
# tags:
|
||||||
|
# - query
|
||||||
|
# summary: Test query parameter(s)
|
||||||
|
# description: Test query parameter(s)
|
||||||
|
# operationId: test/query/style_deepObject/explode_true/object/allOf
|
||||||
|
# parameters:
|
||||||
|
# - in: query
|
||||||
|
# name: query_object
|
||||||
|
# style: deepObject
|
||||||
|
# explode: true #default
|
||||||
|
# schema:
|
||||||
|
# allOf:
|
||||||
|
# - $ref: '#/components/schemas/Bird'
|
||||||
|
# - $ref: '#/components/schemas/Category'
|
||||||
|
# responses:
|
||||||
|
# '200':
|
||||||
|
# description: Successful operation
|
||||||
|
# content:
|
||||||
|
# text/plain:
|
||||||
|
# schema:
|
||||||
|
# type: string
|
||||||
|
# body parameter tests
|
||||||
|
/body/application/octetstream/binary:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test body parameter(s)
|
||||||
|
description: Test body parameter(s)
|
||||||
|
operationId: test/body/application/octetstream/binary
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/octet-stream:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/echo/body/Pet:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test body parameter(s)
|
||||||
|
description: Test body parameter(s)
|
||||||
|
operationId: test/echo/body/Pet
|
||||||
|
requestBody:
|
||||||
|
$ref: '#/components/requestBodies/Pet'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Pet'
|
||||||
|
# The following lines are disabled due to missing support for allOf. Enable when support is added.
|
||||||
|
# /echo/body/allOf/Pet:
|
||||||
|
# post:
|
||||||
|
# tags:
|
||||||
|
# - body
|
||||||
|
# summary: Test body parameter(s)
|
||||||
|
# description: Test body parameter(s)
|
||||||
|
# operationId: test/echo/body/allOf/Pet
|
||||||
|
# requestBody:
|
||||||
|
# $ref: '#/components/requestBodies/AllOfPet'
|
||||||
|
# responses:
|
||||||
|
# '200':
|
||||||
|
# description: Successful operation
|
||||||
|
# content:
|
||||||
|
# application/json:
|
||||||
|
# schema:
|
||||||
|
# $ref: '#/components/schemas/Pet'
|
||||||
|
/echo/body/Pet/response_string:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test empty response body
|
||||||
|
description: Test empty response body
|
||||||
|
operationId: test/echo/body/Pet/response_string
|
||||||
|
requestBody:
|
||||||
|
$ref: '#/components/requestBodies/Pet'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/echo/body/Tag/response_string:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test empty json (request body)
|
||||||
|
description: Test empty json (request body)
|
||||||
|
operationId: test/echo/body/Tag/response_string
|
||||||
|
requestBody:
|
||||||
|
$ref: '#/components/requestBodies/Tag'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/echo/body/FreeFormObject/response_string:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test free form object
|
||||||
|
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':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
/binary/gif:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test binary (gif) response body
|
||||||
|
description: Test binary (gif) response body
|
||||||
|
operationId: test/binary/gif
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
image/gif:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
# Single binary in multipart mime test
|
||||||
|
/body/application/octetstream/single_binary:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test single binary in multipart mime
|
||||||
|
description: Test single binary in multipart mime
|
||||||
|
operationId: test/body/multipart/formdata/single_binary
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
multipart/form-data:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
my-file:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# Array of binary in multipart mime tests
|
||||||
|
/body/application/octetstream/array_of_binary:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- body
|
||||||
|
summary: Test array of binary in multipart mime
|
||||||
|
description: Test array of binary in multipart mime
|
||||||
|
operationId: test/body/multipart/formdata/array_of_binary
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
multipart/form-data:
|
||||||
|
schema:
|
||||||
|
required:
|
||||||
|
- files
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
files:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: binary
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# To test http basic auth
|
||||||
|
/auth/http/basic:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- auth
|
||||||
|
security:
|
||||||
|
- http_auth: []
|
||||||
|
summary: To test HTTP basic authentication
|
||||||
|
description: To test HTTP basic authentication
|
||||||
|
operationId: test/auth/http/basic
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
# To test http bearer auth
|
||||||
|
/auth/http/bearer:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- auth
|
||||||
|
security:
|
||||||
|
- http_bearer_auth: []
|
||||||
|
summary: To test HTTP bearer authentication
|
||||||
|
description: To test HTTP bearer authentication
|
||||||
|
operationId: test/auth/http/bearer
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
components:
|
||||||
|
securitySchemes:
|
||||||
|
http_auth:
|
||||||
|
type: http
|
||||||
|
scheme: basic
|
||||||
|
http_bearer_auth:
|
||||||
|
type: http
|
||||||
|
scheme: bearer
|
||||||
|
requestBodies:
|
||||||
|
Pet:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/Pet'
|
||||||
|
description: Pet object that needs to be added to the store
|
||||||
|
# The following lines are disabled due to missing support for allOf. Enable when support is added.
|
||||||
|
# AllOfPet:
|
||||||
|
# content:
|
||||||
|
# application/json:
|
||||||
|
# schema:
|
||||||
|
# allOf:
|
||||||
|
# - $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:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Dogs
|
||||||
|
xml:
|
||||||
|
name: category
|
||||||
|
Tag:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: tag
|
||||||
|
Pet:
|
||||||
|
required:
|
||||||
|
- name
|
||||||
|
- photoUrls
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
example: 10
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: doggie
|
||||||
|
category:
|
||||||
|
$ref: '#/components/schemas/Category'
|
||||||
|
photoUrls:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
xml:
|
||||||
|
name: photoUrl
|
||||||
|
tags:
|
||||||
|
type: array
|
||||||
|
xml:
|
||||||
|
wrapped: true
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/Tag'
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
description: pet status in the store
|
||||||
|
enum:
|
||||||
|
- available
|
||||||
|
- pending
|
||||||
|
- sold
|
||||||
|
xml:
|
||||||
|
name: pet
|
||||||
|
StringEnumRef:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
- unclassified
|
||||||
|
DefaultValue:
|
||||||
|
type: object
|
||||||
|
description: to test the default value of properties
|
||||||
|
properties:
|
||||||
|
array_string_enum_ref_default:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
# The following lines are disabled due to bug in default values for enums. Enable when bug is fixed.
|
||||||
|
# default:
|
||||||
|
# - success
|
||||||
|
# - failure
|
||||||
|
array_string_enum_default:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- success
|
||||||
|
- failure
|
||||||
|
- unclassified
|
||||||
|
# The following lines are disabled due to bug in default values for enums. Enable when bug is fixed.
|
||||||
|
# default:
|
||||||
|
# - success
|
||||||
|
# - failure
|
||||||
|
array_string_default:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
default:
|
||||||
|
- failure
|
||||||
|
- skipped
|
||||||
|
array_integer_default:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: integer
|
||||||
|
default:
|
||||||
|
- 1
|
||||||
|
- 3
|
||||||
|
array_string:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
array_string_nullable:
|
||||||
|
nullable: true
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
array_string_extension_nullable:
|
||||||
|
x-nullable: true
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
string_nullable:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
Bird:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
type: string
|
||||||
|
color:
|
||||||
|
type: string
|
||||||
|
Query:
|
||||||
|
type: object
|
||||||
|
x-parent: true
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
description: Query
|
||||||
|
format: int64
|
||||||
|
outcomes:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- SUCCESS
|
||||||
|
- FAILURE
|
||||||
|
- SKIPPED
|
||||||
|
# The following lines are disabled due to bug in default values for enums. Enable when bug is fixed.
|
||||||
|
# default:
|
||||||
|
# - SUCCESS
|
||||||
|
# - FAILURE
|
||||||
|
# The following lines are disabled due to missing support for allOf. Enable when support is added.
|
||||||
|
# DataQuery:
|
||||||
|
# allOf:
|
||||||
|
# - type: object
|
||||||
|
# properties:
|
||||||
|
# suffix:
|
||||||
|
# type: string
|
||||||
|
# description: test suffix
|
||||||
|
# text:
|
||||||
|
# type: string
|
||||||
|
# description: Some text containing white spaces
|
||||||
|
# example: "Some text"
|
||||||
|
# date:
|
||||||
|
# type: string
|
||||||
|
# format: date-time
|
||||||
|
# description: A date
|
||||||
|
# - $ref: '#/components/schemas/Query'
|
||||||
|
NumberPropertiesOnly:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
number:
|
||||||
|
type: number
|
||||||
|
float:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
double:
|
||||||
|
type: number
|
||||||
|
format: double
|
||||||
|
minimum: 0.8
|
||||||
|
maximum: 50.2
|
@ -0,0 +1,23 @@
|
|||||||
|
# OpenAPI Generator Ignore
|
||||||
|
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||||
|
|
||||||
|
# Use this file to prevent files from being overwritten by the generator.
|
||||||
|
# The patterns follow closely to .gitignore or .dockerignore.
|
||||||
|
|
||||||
|
# As an example, the C# client generator defines ApiClient.cs.
|
||||||
|
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||||
|
#ApiClient.cs
|
||||||
|
|
||||||
|
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||||
|
#foo/*/qux
|
||||||
|
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
|
#foo/**/qux
|
||||||
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
|
# You can also negate patterns with an exclamation (!).
|
||||||
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
#docs/*.md
|
||||||
|
# Then explicitly reverse the ignore rule for a single file:
|
||||||
|
#!docs/README.md
|
@ -0,0 +1,43 @@
|
|||||||
|
README.md
|
||||||
|
build.gradle
|
||||||
|
docs/AuthApi.md
|
||||||
|
docs/Bird.md
|
||||||
|
docs/BodyApi.md
|
||||||
|
docs/Category.md
|
||||||
|
docs/DefaultValue.md
|
||||||
|
docs/FormApi.md
|
||||||
|
docs/HeaderApi.md
|
||||||
|
docs/NumberPropertiesOnly.md
|
||||||
|
docs/PathApi.md
|
||||||
|
docs/Pet.md
|
||||||
|
docs/Query.md
|
||||||
|
docs/QueryApi.md
|
||||||
|
docs/StringEnumRef.md
|
||||||
|
docs/Tag.md
|
||||||
|
docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
|
||||||
|
gradle/wrapper/gradle-wrapper.jar
|
||||||
|
gradle/wrapper/gradle-wrapper.properties
|
||||||
|
gradlew
|
||||||
|
gradlew.bat
|
||||||
|
settings.gradle
|
||||||
|
src/main/kotlin/org/openapitools/client/apis/AuthApi.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/apis/BodyApi.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/apis/FormApi.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/apis/HeaderApi.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/apis/PathApi.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/apis/QueryApi.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/Bird.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/Category.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/DefaultValue.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/NumberPropertiesOnly.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/Pet.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/Query.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/StringEnumRef.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/Tag.kt
|
||||||
|
src/main/kotlin/org/openapitools/client/models/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.kt
|
@ -0,0 +1 @@
|
|||||||
|
7.3.0-SNAPSHOT
|
102
samples/client/echo_api/kotlin-jvm-spring-3-restclient/README.md
Normal file
102
samples/client/echo_api/kotlin-jvm-spring-3-restclient/README.md
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
# org.openapitools.client - Kotlin client library for Echo Server API
|
||||||
|
|
||||||
|
Echo Server API
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate an API client.
|
||||||
|
|
||||||
|
- API version: 0.1.0
|
||||||
|
- Package version:
|
||||||
|
- Build package: org.openapitools.codegen.languages.KotlinClientCodegen
|
||||||
|
|
||||||
|
## Requires
|
||||||
|
|
||||||
|
* Kotlin 1.7.21
|
||||||
|
* Gradle 7.5
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
First, create the gradle wrapper script:
|
||||||
|
|
||||||
|
```
|
||||||
|
gradle wrapper
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, run:
|
||||||
|
|
||||||
|
```
|
||||||
|
./gradlew check assemble
|
||||||
|
```
|
||||||
|
|
||||||
|
This runs all tests and packages the library.
|
||||||
|
|
||||||
|
## Features/Implementation Notes
|
||||||
|
|
||||||
|
* Supports JSON inputs/outputs, File inputs, and Form inputs.
|
||||||
|
* Supports collection formats for query parameters: csv, tsv, ssv, pipes.
|
||||||
|
* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions.
|
||||||
|
* Implementation of ApiClient is intended to reduce method counts, specifically to benefit Android targets.
|
||||||
|
|
||||||
|
<a id="documentation-for-api-endpoints"></a>
|
||||||
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Class | Method | HTTP request | Description
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*AuthApi* | [**testAuthHttpBasic**](docs/AuthApi.md#testauthhttpbasic) | **POST** /auth/http/basic | To test HTTP basic authentication
|
||||||
|
*AuthApi* | [**testAuthHttpBearer**](docs/AuthApi.md#testauthhttpbearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication
|
||||||
|
*BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body
|
||||||
|
*BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s)
|
||||||
|
*BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime
|
||||||
|
*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testbodymultipartformdatasinglebinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime
|
||||||
|
*BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object
|
||||||
|
*BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s)
|
||||||
|
*BodyApi* | [**testEchoBodyPetResponseString**](docs/BodyApi.md#testechobodypetresponsestring) | **POST** /echo/body/Pet/response_string | Test empty response body
|
||||||
|
*BodyApi* | [**testEchoBodyTagResponseString**](docs/BodyApi.md#testechobodytagresponsestring) | **POST** /echo/body/Tag/response_string | Test empty json (request body)
|
||||||
|
*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testformintegerbooleanstring) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
||||||
|
*FormApi* | [**testFormOneof**](docs/FormApi.md#testformoneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema
|
||||||
|
*HeaderApi* | [**testHeaderIntegerBooleanStringEnums**](docs/HeaderApi.md#testheaderintegerbooleanstringenums) | **GET** /header/integer/boolean/string/enums | Test header parameter(s)
|
||||||
|
*PathApi* | [**testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**](docs/PathApi.md#testspathstringpathstringintegerpathintegerenumnonrefstringpathenumrefstringpath) | **GET** /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path} | Test path parameter(s)
|
||||||
|
*QueryApi* | [**testEnumRefString**](docs/QueryApi.md#testenumrefstring) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
|
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testquerydatetimedatestring) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
|
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testqueryintegerbooleanstring) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
|
*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testquerystyledeepobjectexplodetrueobject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||||
|
*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testquerystyleformexplodetruearraystring) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||||
|
*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testquerystyleformexplodetrueobject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||||
|
|
||||||
|
|
||||||
|
<a id="documentation-for-models"></a>
|
||||||
|
## Documentation for Models
|
||||||
|
|
||||||
|
- [org.openapitools.client.models.Bird](docs/Bird.md)
|
||||||
|
- [org.openapitools.client.models.Category](docs/Category.md)
|
||||||
|
- [org.openapitools.client.models.DefaultValue](docs/DefaultValue.md)
|
||||||
|
- [org.openapitools.client.models.NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
|
||||||
|
- [org.openapitools.client.models.Pet](docs/Pet.md)
|
||||||
|
- [org.openapitools.client.models.Query](docs/Query.md)
|
||||||
|
- [org.openapitools.client.models.StringEnumRef](docs/StringEnumRef.md)
|
||||||
|
- [org.openapitools.client.models.Tag](docs/Tag.md)
|
||||||
|
- [org.openapitools.client.models.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md)
|
||||||
|
|
||||||
|
|
||||||
|
<a id="documentation-for-authorization"></a>
|
||||||
|
## Documentation for Authorization
|
||||||
|
|
||||||
|
|
||||||
|
Authentication schemes defined for the API:
|
||||||
|
<a id="http_auth"></a>
|
||||||
|
### http_auth
|
||||||
|
|
||||||
|
- **Type**: HTTP basic authentication
|
||||||
|
|
||||||
|
<a id="http_bearer_auth"></a>
|
||||||
|
### http_bearer_auth
|
||||||
|
|
||||||
|
- **Type**: HTTP Bearer Token authentication
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
team@openapitools.org
|
@ -0,0 +1,68 @@
|
|||||||
|
group 'org.openapitools'
|
||||||
|
version '1.0.0'
|
||||||
|
|
||||||
|
wrapper {
|
||||||
|
gradleVersion = '7.5'
|
||||||
|
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildscript {
|
||||||
|
ext.kotlin_version = '1.8.10'
|
||||||
|
ext.spring_boot_version = "3.2.0"
|
||||||
|
ext.spotless_version = "6.13.0"
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url "https://repo1.maven.org/maven2" }
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
classpath "com.diffplug.spotless:spotless-plugin-gradle:$spotless_version"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'kotlin'
|
||||||
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'com.diffplug.spotless'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven { url "https://repo1.maven.org/maven2" }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use spotless plugin to automatically format code, remove unused import, etc
|
||||||
|
// To apply changes directly to the file, run `gradlew spotlessApply`
|
||||||
|
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
|
||||||
|
spotless {
|
||||||
|
// comment out below to run spotless as part of the `check` task
|
||||||
|
enforceCheck false
|
||||||
|
|
||||||
|
format 'misc', {
|
||||||
|
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
|
||||||
|
target '.gitignore'
|
||||||
|
|
||||||
|
// define the steps to apply to those files
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
indentWithSpaces() // Takes an integer argument if you don't like 4
|
||||||
|
endWithNewline()
|
||||||
|
}
|
||||||
|
kotlin {
|
||||||
|
ktfmt()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain {
|
||||||
|
languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
|
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
||||||
|
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.14.3"
|
||||||
|
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.3"
|
||||||
|
implementation "org.springframework.boot:spring-boot-starter-web:$spring_boot_version"
|
||||||
|
testImplementation "io.kotlintest:kotlintest-runner-junit5:3.4.2"
|
||||||
|
}
|
@ -0,0 +1,101 @@
|
|||||||
|
# AuthApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testAuthHttpBasic**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication
|
||||||
|
[**testAuthHttpBearer**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication
|
||||||
|
|
||||||
|
|
||||||
|
<a id="testAuthHttpBasic"></a>
|
||||||
|
# **testAuthHttpBasic**
|
||||||
|
> kotlin.String testAuthHttpBasic()
|
||||||
|
|
||||||
|
To test HTTP basic authentication
|
||||||
|
|
||||||
|
To test HTTP basic authentication
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = AuthApi()
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testAuthHttpBasic()
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling AuthApi#testAuthHttpBasic")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling AuthApi#testAuthHttpBasic")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
|
||||||
|
Configure http_auth:
|
||||||
|
ApiClient.username = ""
|
||||||
|
ApiClient.password = ""
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testAuthHttpBearer"></a>
|
||||||
|
# **testAuthHttpBearer**
|
||||||
|
> kotlin.String testAuthHttpBearer()
|
||||||
|
|
||||||
|
To test HTTP bearer authentication
|
||||||
|
|
||||||
|
To test HTTP bearer authentication
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = AuthApi()
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testAuthHttpBearer()
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling AuthApi#testAuthHttpBearer")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling AuthApi#testAuthHttpBearer")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
|
||||||
|
Configure http_bearer_auth:
|
||||||
|
ApiClient.accessToken = ""
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Bird
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**propertySize** | **kotlin.String** | | [optional]
|
||||||
|
**color** | **kotlin.String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,388 @@
|
|||||||
|
# BodyApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testBinaryGif**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body
|
||||||
|
[**testBodyApplicationOctetstreamBinary**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s)
|
||||||
|
[**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime
|
||||||
|
[**testBodyMultipartFormdataSingleBinary**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime
|
||||||
|
[**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object
|
||||||
|
[**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s)
|
||||||
|
[**testEchoBodyPetResponseString**](BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body
|
||||||
|
[**testEchoBodyTagResponseString**](BodyApi.md#testEchoBodyTagResponseString) | **POST** /echo/body/Tag/response_string | Test empty json (request body)
|
||||||
|
|
||||||
|
|
||||||
|
<a id="testBinaryGif"></a>
|
||||||
|
# **testBinaryGif**
|
||||||
|
> java.io.File testBinaryGif()
|
||||||
|
|
||||||
|
Test binary (gif) response body
|
||||||
|
|
||||||
|
Test binary (gif) response body
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
try {
|
||||||
|
val result : java.io.File = apiInstance.testBinaryGif()
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testBinaryGif")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testBinaryGif")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**java.io.File**](java.io.File.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: image/gif
|
||||||
|
|
||||||
|
<a id="testBodyApplicationOctetstreamBinary"></a>
|
||||||
|
# **testBodyApplicationOctetstreamBinary**
|
||||||
|
> kotlin.String testBodyApplicationOctetstreamBinary(body)
|
||||||
|
|
||||||
|
Test body parameter(s)
|
||||||
|
|
||||||
|
Test body parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val body : java.io.File = BINARY_DATA_HERE // java.io.File |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testBodyApplicationOctetstreamBinary(body)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testBodyApplicationOctetstreamBinary")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testBodyApplicationOctetstreamBinary")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **java.io.File**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/octet-stream
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testBodyMultipartFormdataArrayOfBinary"></a>
|
||||||
|
# **testBodyMultipartFormdataArrayOfBinary**
|
||||||
|
> kotlin.String testBodyMultipartFormdataArrayOfBinary(files)
|
||||||
|
|
||||||
|
Test array of binary in multipart mime
|
||||||
|
|
||||||
|
Test array of binary in multipart mime
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val files : kotlin.collections.List<java.io.File> = /path/to/file.txt // kotlin.collections.List<java.io.File> |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testBodyMultipartFormdataArrayOfBinary(files)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testBodyMultipartFormdataArrayOfBinary")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testBodyMultipartFormdataArrayOfBinary")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**files** | **kotlin.collections.List<java.io.File>**| |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testBodyMultipartFormdataSingleBinary"></a>
|
||||||
|
# **testBodyMultipartFormdataSingleBinary**
|
||||||
|
> kotlin.String testBodyMultipartFormdataSingleBinary(myFile)
|
||||||
|
|
||||||
|
Test single binary in multipart mime
|
||||||
|
|
||||||
|
Test single binary in multipart mime
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val myFile : java.io.File = BINARY_DATA_HERE // java.io.File |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testBodyMultipartFormdataSingleBinary(myFile)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testBodyMultipartFormdataSingleBinary")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testBodyMultipartFormdataSingleBinary")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**myFile** | **java.io.File**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testEchoBodyFreeFormObjectResponseString"></a>
|
||||||
|
# **testEchoBodyFreeFormObjectResponseString**
|
||||||
|
> kotlin.String testEchoBodyFreeFormObjectResponseString(body)
|
||||||
|
|
||||||
|
Test free form object
|
||||||
|
|
||||||
|
Test free form object
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val body : kotlin.Any = Object // kotlin.Any | Free form object
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testEchoBodyFreeFormObjectResponseString(body)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testEchoBodyFreeFormObjectResponseString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testEchoBodyFreeFormObjectResponseString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**body** | **kotlin.Any**| Free form object | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testEchoBodyPet"></a>
|
||||||
|
# **testEchoBodyPet**
|
||||||
|
> Pet testEchoBodyPet(pet)
|
||||||
|
|
||||||
|
Test body parameter(s)
|
||||||
|
|
||||||
|
Test body parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||||
|
try {
|
||||||
|
val result : Pet = apiInstance.testEchoBodyPet(pet)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testEchoBodyPet")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testEchoBodyPet")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**Pet**](Pet.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
<a id="testEchoBodyPetResponseString"></a>
|
||||||
|
# **testEchoBodyPetResponseString**
|
||||||
|
> kotlin.String testEchoBodyPetResponseString(pet)
|
||||||
|
|
||||||
|
Test empty response body
|
||||||
|
|
||||||
|
Test empty response body
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val pet : Pet = // Pet | Pet object that needs to be added to the store
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testEchoBodyPetResponseString(pet)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testEchoBodyPetResponseString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testEchoBodyPetResponseString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testEchoBodyTagResponseString"></a>
|
||||||
|
# **testEchoBodyTagResponseString**
|
||||||
|
> kotlin.String testEchoBodyTagResponseString(tag)
|
||||||
|
|
||||||
|
Test empty json (request body)
|
||||||
|
|
||||||
|
Test empty json (request body)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = BodyApi()
|
||||||
|
val tag : Tag = // Tag | Tag object
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testEchoBodyTagResponseString(tag)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling BodyApi#testEchoBodyTagResponseString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling BodyApi#testEchoBodyTagResponseString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**tag** | [**Tag**](Tag.md)| Tag object | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Category
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **kotlin.Long** | | [optional]
|
||||||
|
**name** | **kotlin.String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# DataQuery
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**suffix** | **kotlin.String** | test suffix | [optional]
|
||||||
|
**text** | **kotlin.String** | Some text containing white spaces | [optional]
|
||||||
|
**date** | [**java.time.OffsetDateTime**](java.time.OffsetDateTime.md) | A date | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
# DefaultValue
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**arrayStringEnumRefDefault** | [**kotlin.collections.List<StringEnumRef>**](StringEnumRef.md) | | [optional]
|
||||||
|
**arrayStringEnumDefault** | [**inline**](#kotlin.collections.List<ArrayStringEnumDefault>) | | [optional]
|
||||||
|
**arrayStringDefault** | **kotlin.collections.List<kotlin.String>** | | [optional]
|
||||||
|
**arrayIntegerDefault** | **kotlin.collections.List<kotlin.Int>** | | [optional]
|
||||||
|
**arrayString** | **kotlin.collections.List<kotlin.String>** | | [optional]
|
||||||
|
**arrayStringNullable** | **kotlin.collections.List<kotlin.String>** | | [optional]
|
||||||
|
**arrayStringExtensionNullable** | **kotlin.collections.List<kotlin.String>** | | [optional]
|
||||||
|
**stringNullable** | **kotlin.String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a id="kotlin.collections.List<ArrayStringEnumDefault>"></a>
|
||||||
|
## Enum: array_string_enum_default
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
arrayStringEnumDefault | success, failure, unclassified
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
|||||||
|
# FormApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testFormIntegerBooleanString**](FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
||||||
|
[**testFormOneof**](FormApi.md#testFormOneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema
|
||||||
|
|
||||||
|
|
||||||
|
<a id="testFormIntegerBooleanString"></a>
|
||||||
|
# **testFormIntegerBooleanString**
|
||||||
|
> kotlin.String testFormIntegerBooleanString(integerForm, booleanForm, stringForm)
|
||||||
|
|
||||||
|
Test form parameter(s)
|
||||||
|
|
||||||
|
Test form parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = FormApi()
|
||||||
|
val integerForm : kotlin.Int = 56 // kotlin.Int |
|
||||||
|
val booleanForm : kotlin.Boolean = true // kotlin.Boolean |
|
||||||
|
val stringForm : kotlin.String = stringForm_example // kotlin.String |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testFormIntegerBooleanString(integerForm, booleanForm, stringForm)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling FormApi#testFormIntegerBooleanString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling FormApi#testFormIntegerBooleanString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**integerForm** | **kotlin.Int**| | [optional]
|
||||||
|
**booleanForm** | **kotlin.Boolean**| | [optional]
|
||||||
|
**stringForm** | **kotlin.String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testFormOneof"></a>
|
||||||
|
# **testFormOneof**
|
||||||
|
> kotlin.String testFormOneof(form1, form2, form3, form4, id, name)
|
||||||
|
|
||||||
|
Test form parameter(s) for oneOf schema
|
||||||
|
|
||||||
|
Test form parameter(s) for oneOf schema
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = FormApi()
|
||||||
|
val form1 : kotlin.String = form1_example // kotlin.String |
|
||||||
|
val form2 : kotlin.Int = 56 // kotlin.Int |
|
||||||
|
val form3 : kotlin.String = form3_example // kotlin.String |
|
||||||
|
val form4 : kotlin.Boolean = true // kotlin.Boolean |
|
||||||
|
val id : kotlin.Long = 789 // kotlin.Long |
|
||||||
|
val name : kotlin.String = name_example // kotlin.String |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testFormOneof(form1, form2, form3, form4, id, name)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling FormApi#testFormOneof")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling FormApi#testFormOneof")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**form1** | **kotlin.String**| | [optional]
|
||||||
|
**form2** | **kotlin.Int**| | [optional]
|
||||||
|
**form3** | **kotlin.String**| | [optional]
|
||||||
|
**form4** | **kotlin.Boolean**| | [optional]
|
||||||
|
**id** | **kotlin.Long**| | [optional]
|
||||||
|
**name** | **kotlin.String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
@ -0,0 +1,64 @@
|
|||||||
|
# HeaderApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testHeaderIntegerBooleanStringEnums**](HeaderApi.md#testHeaderIntegerBooleanStringEnums) | **GET** /header/integer/boolean/string/enums | Test header parameter(s)
|
||||||
|
|
||||||
|
|
||||||
|
<a id="testHeaderIntegerBooleanStringEnums"></a>
|
||||||
|
# **testHeaderIntegerBooleanStringEnums**
|
||||||
|
> kotlin.String testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader)
|
||||||
|
|
||||||
|
Test header parameter(s)
|
||||||
|
|
||||||
|
Test header parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = HeaderApi()
|
||||||
|
val integerHeader : kotlin.Int = 56 // kotlin.Int |
|
||||||
|
val booleanHeader : kotlin.Boolean = true // kotlin.Boolean |
|
||||||
|
val stringHeader : kotlin.String = stringHeader_example // kotlin.String |
|
||||||
|
val enumNonrefStringHeader : kotlin.String = enumNonrefStringHeader_example // kotlin.String |
|
||||||
|
val enumRefStringHeader : StringEnumRef = // StringEnumRef |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling HeaderApi#testHeaderIntegerBooleanStringEnums")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling HeaderApi#testHeaderIntegerBooleanStringEnums")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**integerHeader** | **kotlin.Int**| | [optional]
|
||||||
|
**booleanHeader** | **kotlin.Boolean**| | [optional]
|
||||||
|
**stringHeader** | **kotlin.String**| | [optional]
|
||||||
|
**enumNonrefStringHeader** | **kotlin.String**| | [optional] [enum: success, failure, unclassified]
|
||||||
|
**enumRefStringHeader** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
# NumberPropertiesOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**number** | [**java.math.BigDecimal**](java.math.BigDecimal.md) | | [optional]
|
||||||
|
**float** | **kotlin.Float** | | [optional]
|
||||||
|
**double** | **kotlin.Double** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
|||||||
|
# PathApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**](PathApi.md#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath) | **GET** /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path} | Test path parameter(s)
|
||||||
|
|
||||||
|
|
||||||
|
<a id="testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"></a>
|
||||||
|
# **testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**
|
||||||
|
> kotlin.String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath)
|
||||||
|
|
||||||
|
Test path parameter(s)
|
||||||
|
|
||||||
|
Test path parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = PathApi()
|
||||||
|
val pathString : kotlin.String = pathString_example // kotlin.String |
|
||||||
|
val pathInteger : kotlin.Int = 56 // kotlin.Int |
|
||||||
|
val enumNonrefStringPath : kotlin.String = enumNonrefStringPath_example // kotlin.String |
|
||||||
|
val enumRefStringPath : StringEnumRef = // StringEnumRef |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling PathApi#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling PathApi#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**pathString** | **kotlin.String**| |
|
||||||
|
**pathInteger** | **kotlin.Int**| |
|
||||||
|
**enumNonrefStringPath** | **kotlin.String**| | [enum: success, failure, unclassified]
|
||||||
|
**enumRefStringPath** | [**StringEnumRef**](.md)| | [enum: success, failure, unclassified]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
# Pet
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **kotlin.String** | |
|
||||||
|
**photoUrls** | **kotlin.collections.List<kotlin.String>** | |
|
||||||
|
**id** | **kotlin.Long** | | [optional]
|
||||||
|
**category** | [**Category**](Category.md) | | [optional]
|
||||||
|
**tags** | [**kotlin.collections.List<Tag>**](Tag.md) | | [optional]
|
||||||
|
**status** | [**inline**](#Status) | pet status in the store | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a id="Status"></a>
|
||||||
|
## Enum: status
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
status | available, pending, sold
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
# Query
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **kotlin.Long** | Query | [optional]
|
||||||
|
**outcomes** | [**inline**](#kotlin.collections.List<Outcomes>) | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
<a id="kotlin.collections.List<Outcomes>"></a>
|
||||||
|
## Enum: outcomes
|
||||||
|
Name | Value
|
||||||
|
---- | -----
|
||||||
|
outcomes | SUCCESS, FAILURE, SKIPPED
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,306 @@
|
|||||||
|
# QueryApi
|
||||||
|
|
||||||
|
All URIs are relative to *http://localhost:3000*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
|
[**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
|
[**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
|
[**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||||
|
[**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
|
||||||
|
[**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
|
||||||
|
|
||||||
|
|
||||||
|
<a id="testEnumRefString"></a>
|
||||||
|
# **testEnumRefString**
|
||||||
|
> kotlin.String testEnumRefString(enumNonrefStringQuery, enumRefStringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = QueryApi()
|
||||||
|
val enumNonrefStringQuery : kotlin.String = enumNonrefStringQuery_example // kotlin.String |
|
||||||
|
val enumRefStringQuery : StringEnumRef = // StringEnumRef |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling QueryApi#testEnumRefString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling QueryApi#testEnumRefString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**enumNonrefStringQuery** | **kotlin.String**| | [optional] [enum: success, failure, unclassified]
|
||||||
|
**enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testQueryDatetimeDateString"></a>
|
||||||
|
# **testQueryDatetimeDateString**
|
||||||
|
> kotlin.String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = QueryApi()
|
||||||
|
val datetimeQuery : java.time.OffsetDateTime = 2013-10-20T19:20:30+01:00 // java.time.OffsetDateTime |
|
||||||
|
val dateQuery : java.time.LocalDate = 2013-10-20 // java.time.LocalDate |
|
||||||
|
val stringQuery : kotlin.String = stringQuery_example // kotlin.String |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling QueryApi#testQueryDatetimeDateString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling QueryApi#testQueryDatetimeDateString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**datetimeQuery** | **java.time.OffsetDateTime**| | [optional]
|
||||||
|
**dateQuery** | **java.time.LocalDate**| | [optional]
|
||||||
|
**stringQuery** | **kotlin.String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testQueryIntegerBooleanString"></a>
|
||||||
|
# **testQueryIntegerBooleanString**
|
||||||
|
> kotlin.String testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = QueryApi()
|
||||||
|
val integerQuery : kotlin.Int = 56 // kotlin.Int |
|
||||||
|
val booleanQuery : kotlin.Boolean = true // kotlin.Boolean |
|
||||||
|
val stringQuery : kotlin.String = stringQuery_example // kotlin.String |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling QueryApi#testQueryIntegerBooleanString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling QueryApi#testQueryIntegerBooleanString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**integerQuery** | **kotlin.Int**| | [optional]
|
||||||
|
**booleanQuery** | **kotlin.Boolean**| | [optional]
|
||||||
|
**stringQuery** | **kotlin.String**| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testQueryStyleDeepObjectExplodeTrueObject"></a>
|
||||||
|
# **testQueryStyleDeepObjectExplodeTrueObject**
|
||||||
|
> kotlin.String testQueryStyleDeepObjectExplodeTrueObject(queryObject)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = QueryApi()
|
||||||
|
val queryObject : Pet = // Pet |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testQueryStyleDeepObjectExplodeTrueObject(queryObject)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling QueryApi#testQueryStyleDeepObjectExplodeTrueObject")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling QueryApi#testQueryStyleDeepObjectExplodeTrueObject")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**queryObject** | [**Pet**](.md)| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testQueryStyleFormExplodeTrueArrayString"></a>
|
||||||
|
# **testQueryStyleFormExplodeTrueArrayString**
|
||||||
|
> kotlin.String testQueryStyleFormExplodeTrueArrayString(queryObject)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = QueryApi()
|
||||||
|
val queryObject : TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling QueryApi#testQueryStyleFormExplodeTrueArrayString")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling QueryApi#testQueryStyleFormExplodeTrueArrayString")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](.md)| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
<a id="testQueryStyleFormExplodeTrueObject"></a>
|
||||||
|
# **testQueryStyleFormExplodeTrueObject**
|
||||||
|
> kotlin.String testQueryStyleFormExplodeTrueObject(queryObject)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```kotlin
|
||||||
|
// Import classes:
|
||||||
|
//import org.openapitools.client.infrastructure.*
|
||||||
|
//import org.openapitools.client.models.*
|
||||||
|
|
||||||
|
val apiInstance = QueryApi()
|
||||||
|
val queryObject : Pet = // Pet |
|
||||||
|
try {
|
||||||
|
val result : kotlin.String = apiInstance.testQueryStyleFormExplodeTrueObject(queryObject)
|
||||||
|
println(result)
|
||||||
|
} catch (e: ClientException) {
|
||||||
|
println("4xx response calling QueryApi#testQueryStyleFormExplodeTrueObject")
|
||||||
|
e.printStackTrace()
|
||||||
|
} catch (e: ServerException) {
|
||||||
|
println("5xx response calling QueryApi#testQueryStyleFormExplodeTrueObject")
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**queryObject** | [**Pet**](.md)| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**kotlin.String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
@ -0,0 +1,16 @@
|
|||||||
|
|
||||||
|
# StringEnumRef
|
||||||
|
|
||||||
|
## Enum
|
||||||
|
|
||||||
|
|
||||||
|
* `success` (value: `"success"`)
|
||||||
|
|
||||||
|
* `failure` (value: `"failure"`)
|
||||||
|
|
||||||
|
* `unclassified` (value: `"unclassified"`)
|
||||||
|
|
||||||
|
* `unknownDefaultOpenApi` (value: `"unknown_default_open_api"`)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
# Tag
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | **kotlin.Long** | | [optional]
|
||||||
|
**name** | **kotlin.String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
# TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**propertySize** | **kotlin.String** | | [optional]
|
||||||
|
**color** | **kotlin.String** | | [optional]
|
||||||
|
**id** | **kotlin.Long** | | [optional]
|
||||||
|
**name** | **kotlin.String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
# TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**propertyValues** | **kotlin.collections.List<kotlin.String>** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
BIN
samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
@ -0,0 +1,6 @@
|
|||||||
|
distributionBase=GRADLE_USER_HOME
|
||||||
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
|
||||||
|
networkTimeout=10000
|
||||||
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
zipStorePath=wrapper/dists
|
245
samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew
vendored
Normal file
245
samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew
vendored
Normal file
@ -0,0 +1,245 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Copyright © 2015-2021 the original authors.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
|
# Resolve links: $0 may be a link
|
||||||
|
app_path=$0
|
||||||
|
|
||||||
|
# Need this for daisy-chained symlinks.
|
||||||
|
while
|
||||||
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
|
[ -h "$app_path" ]
|
||||||
|
do
|
||||||
|
ls=$( ls -ld "$app_path" )
|
||||||
|
link=${ls#*' -> '}
|
||||||
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# This is normally unused
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
APP_BASE_NAME=${0##*/}
|
||||||
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
|
|
||||||
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
|
MAX_FD=maximum
|
||||||
|
|
||||||
|
warn () {
|
||||||
|
echo "$*"
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
die () {
|
||||||
|
echo
|
||||||
|
echo "$*"
|
||||||
|
echo
|
||||||
|
exit 1
|
||||||
|
} >&2
|
||||||
|
|
||||||
|
# OS specific support (must be 'true' or 'false').
|
||||||
|
cygwin=false
|
||||||
|
msys=false
|
||||||
|
darwin=false
|
||||||
|
nonstop=false
|
||||||
|
case "$( uname )" in #(
|
||||||
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
|
Darwin* ) darwin=true ;; #(
|
||||||
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
|
NONSTOP* ) nonstop=true ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
# Determine the Java command to use to start the JVM.
|
||||||
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
|
else
|
||||||
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
|
fi
|
||||||
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
JAVACMD=java
|
||||||
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
location of your Java installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Increase the maximum file descriptors if we can.
|
||||||
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
|
case $MAX_FD in #(
|
||||||
|
max*)
|
||||||
|
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
|
warn "Could not query maximum file descriptor limit"
|
||||||
|
esac
|
||||||
|
case $MAX_FD in #(
|
||||||
|
'' | soft) :;; #(
|
||||||
|
*)
|
||||||
|
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||||
|
# shellcheck disable=SC3045
|
||||||
|
ulimit -n "$MAX_FD" ||
|
||||||
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
|
# * args from the command line
|
||||||
|
# * the main class name
|
||||||
|
# * -classpath
|
||||||
|
# * -D...appname settings
|
||||||
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
|
exec "$JAVACMD" "$@"
|
92
samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew.bat
vendored
Normal file
92
samples/client/echo_api/kotlin-jvm-spring-3-restclient/gradlew.bat
vendored
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
@rem
|
||||||
|
@rem Copyright 2015 the original author or authors.
|
||||||
|
@rem
|
||||||
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@rem you may not use this file except in compliance with the License.
|
||||||
|
@rem You may obtain a copy of the License at
|
||||||
|
@rem
|
||||||
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
@rem
|
||||||
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
@rem See the License for the specific language governing permissions and
|
||||||
|
@rem limitations under the License.
|
||||||
|
@rem
|
||||||
|
|
||||||
|
@if "%DEBUG%"=="" @echo off
|
||||||
|
@rem ##########################################################################
|
||||||
|
@rem
|
||||||
|
@rem Gradle startup script for Windows
|
||||||
|
@rem
|
||||||
|
@rem ##########################################################################
|
||||||
|
|
||||||
|
@rem Set local scope for the variables with windows NT shell
|
||||||
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
|
set DIRNAME=%~dp0
|
||||||
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
|
@rem This is normally unused
|
||||||
|
set APP_BASE_NAME=%~n0
|
||||||
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
|
@rem Find java.exe
|
||||||
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
|
set JAVA_EXE=java.exe
|
||||||
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:findJavaFromJavaHome
|
||||||
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
|
echo.
|
||||||
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
echo location of your Java installation.
|
||||||
|
|
||||||
|
goto fail
|
||||||
|
|
||||||
|
:execute
|
||||||
|
@rem Setup the command line
|
||||||
|
|
||||||
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
|
@rem Execute Gradle
|
||||||
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
|
:end
|
||||||
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
|
:fail
|
||||||
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
|
rem the _cmd.exe /c_ return code!
|
||||||
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
|
:mainEnd
|
||||||
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
|
:omega
|
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
rootProject.name = 'kotlin-client'
|
@ -0,0 +1,108 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.web.client.RestClientResponseException
|
||||||
|
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.infrastructure.*
|
||||||
|
|
||||||
|
class AuthApi(client: RestClient) : ApiClient(client) {
|
||||||
|
|
||||||
|
constructor(baseUrl: String) : this(RestClient.builder()
|
||||||
|
.baseUrl(baseUrl)
|
||||||
|
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testAuthHttpBasic(): kotlin.String {
|
||||||
|
val result = testAuthHttpBasicWithHttpInfo()
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testAuthHttpBasicWithHttpInfo(): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testAuthHttpBasicRequestConfig()
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testAuthHttpBasicRequestConfig() : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/auth/http/basic",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = true,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testAuthHttpBearer(): kotlin.String {
|
||||||
|
val result = testAuthHttpBearerWithHttpInfo()
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testAuthHttpBearerWithHttpInfo(): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testAuthHttpBearerRequestConfig()
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testAuthHttpBearerRequestConfig() : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/auth/http/bearer",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = true,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,327 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.web.client.RestClientResponseException
|
||||||
|
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.models.Pet
|
||||||
|
import org.openapitools.client.models.Tag
|
||||||
|
import org.openapitools.client.infrastructure.*
|
||||||
|
|
||||||
|
class BodyApi(client: RestClient) : ApiClient(client) {
|
||||||
|
|
||||||
|
constructor(baseUrl: String) : this(RestClient.builder()
|
||||||
|
.baseUrl(baseUrl)
|
||||||
|
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBinaryGif(): java.io.File {
|
||||||
|
val result = testBinaryGifWithHttpInfo()
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBinaryGifWithHttpInfo(): ResponseEntity<java.io.File> {
|
||||||
|
val localVariableConfig = testBinaryGifRequestConfig()
|
||||||
|
return request<Unit, java.io.File>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testBinaryGifRequestConfig() : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "image/gif"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/binary/gif",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBodyApplicationOctetstreamBinary(body: java.io.File? = null): kotlin.String {
|
||||||
|
val result = testBodyApplicationOctetstreamBinaryWithHttpInfo(body = body)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBodyApplicationOctetstreamBinaryWithHttpInfo(body: java.io.File? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testBodyApplicationOctetstreamBinaryRequestConfig(body = body)
|
||||||
|
return request<java.io.File, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testBodyApplicationOctetstreamBinaryRequestConfig(body: java.io.File? = null) : RequestConfig<java.io.File> {
|
||||||
|
val localVariableBody = body
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Content-Type"] = "application/octet-stream"
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/body/application/octetstream/binary",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBodyMultipartFormdataArrayOfBinary(files: kotlin.collections.List<java.io.File>): kotlin.String {
|
||||||
|
val result = testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files = files)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files: kotlin.collections.List<java.io.File>): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testBodyMultipartFormdataArrayOfBinaryRequestConfig(files = files)
|
||||||
|
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testBodyMultipartFormdataArrayOfBinaryRequestConfig(files: kotlin.collections.List<java.io.File>) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||||
|
val localVariableBody = mapOf(
|
||||||
|
"files" to PartConfig(body = files, headers = mutableMapOf()),)
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "multipart/form-data")
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/body/application/octetstream/array_of_binary",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBodyMultipartFormdataSingleBinary(myFile: java.io.File? = null): kotlin.String {
|
||||||
|
val result = testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile = myFile)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile: java.io.File? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testBodyMultipartFormdataSingleBinaryRequestConfig(myFile = myFile)
|
||||||
|
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testBodyMultipartFormdataSingleBinaryRequestConfig(myFile: java.io.File? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||||
|
val localVariableBody = mapOf(
|
||||||
|
"my-file" to PartConfig(body = myFile, headers = mutableMapOf()),)
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "multipart/form-data")
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/body/application/octetstream/single_binary",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyFreeFormObjectResponseString(body: kotlin.Any? = null): kotlin.String {
|
||||||
|
val result = testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body = body)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body: kotlin.Any? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testEchoBodyFreeFormObjectResponseStringRequestConfig(body = body)
|
||||||
|
return request<kotlin.Any, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testEchoBodyFreeFormObjectResponseStringRequestConfig(body: kotlin.Any? = null) : RequestConfig<kotlin.Any> {
|
||||||
|
val localVariableBody = body
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Content-Type"] = "application/json"
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/echo/body/FreeFormObject/response_string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyPet(pet: Pet? = null): Pet {
|
||||||
|
val result = testEchoBodyPetWithHttpInfo(pet = pet)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyPetWithHttpInfo(pet: Pet? = null): ResponseEntity<Pet> {
|
||||||
|
val localVariableConfig = testEchoBodyPetRequestConfig(pet = pet)
|
||||||
|
return request<Pet, Pet>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testEchoBodyPetRequestConfig(pet: Pet? = null) : RequestConfig<Pet> {
|
||||||
|
val localVariableBody = pet
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Content-Type"] = "application/json"
|
||||||
|
localVariableHeaders["Accept"] = "application/json"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/echo/body/Pet",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyPetResponseString(pet: Pet? = null): kotlin.String {
|
||||||
|
val result = testEchoBodyPetResponseStringWithHttpInfo(pet = pet)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyPetResponseStringWithHttpInfo(pet: Pet? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testEchoBodyPetResponseStringRequestConfig(pet = pet)
|
||||||
|
return request<Pet, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testEchoBodyPetResponseStringRequestConfig(pet: Pet? = null) : RequestConfig<Pet> {
|
||||||
|
val localVariableBody = pet
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Content-Type"] = "application/json"
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/echo/body/Pet/response_string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyTagResponseString(tag: Tag? = null): kotlin.String {
|
||||||
|
val result = testEchoBodyTagResponseStringWithHttpInfo(tag = tag)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEchoBodyTagResponseStringWithHttpInfo(tag: Tag? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testEchoBodyTagResponseStringRequestConfig(tag = tag)
|
||||||
|
return request<Tag, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testEchoBodyTagResponseStringRequestConfig(tag: Tag? = null) : RequestConfig<Tag> {
|
||||||
|
val localVariableBody = tag
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Content-Type"] = "application/json"
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/echo/body/Tag/response_string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,117 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.web.client.RestClientResponseException
|
||||||
|
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.infrastructure.*
|
||||||
|
|
||||||
|
class FormApi(client: RestClient) : ApiClient(client) {
|
||||||
|
|
||||||
|
constructor(baseUrl: String) : this(RestClient.builder()
|
||||||
|
.baseUrl(baseUrl)
|
||||||
|
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testFormIntegerBooleanString(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null): kotlin.String {
|
||||||
|
val result = testFormIntegerBooleanStringWithHttpInfo(integerForm = integerForm, booleanForm = booleanForm, stringForm = stringForm)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testFormIntegerBooleanStringWithHttpInfo(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testFormIntegerBooleanStringRequestConfig(integerForm = integerForm, booleanForm = booleanForm, stringForm = stringForm)
|
||||||
|
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testFormIntegerBooleanStringRequestConfig(integerForm: kotlin.Int? = null, booleanForm: kotlin.Boolean? = null, stringForm: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||||
|
val localVariableBody = mapOf(
|
||||||
|
"integer_form" to PartConfig(body = integerForm, headers = mutableMapOf()),
|
||||||
|
"boolean_form" to PartConfig(body = booleanForm, headers = mutableMapOf()),
|
||||||
|
"string_form" to PartConfig(body = stringForm, headers = mutableMapOf()),)
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded")
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/form/integer/boolean/string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testFormOneof(form1: kotlin.String? = null, form2: kotlin.Int? = null, form3: kotlin.String? = null, form4: kotlin.Boolean? = null, id: kotlin.Long? = null, name: kotlin.String? = null): kotlin.String {
|
||||||
|
val result = testFormOneofWithHttpInfo(form1 = form1, form2 = form2, form3 = form3, form4 = form4, id = id, name = name)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testFormOneofWithHttpInfo(form1: kotlin.String? = null, form2: kotlin.Int? = null, form3: kotlin.String? = null, form4: kotlin.Boolean? = null, id: kotlin.Long? = null, name: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testFormOneofRequestConfig(form1 = form1, form2 = form2, form3 = form3, form4 = form4, id = id, name = name)
|
||||||
|
return request<Map<String, PartConfig<*>>, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testFormOneofRequestConfig(form1: kotlin.String? = null, form2: kotlin.Int? = null, form3: kotlin.String? = null, form4: kotlin.Boolean? = null, id: kotlin.Long? = null, name: kotlin.String? = null) : RequestConfig<Map<String, PartConfig<*>>> {
|
||||||
|
val localVariableBody = mapOf(
|
||||||
|
"form1" to PartConfig(body = form1, headers = mutableMapOf()),
|
||||||
|
"form2" to PartConfig(body = form2, headers = mutableMapOf()),
|
||||||
|
"form3" to PartConfig(body = form3, headers = mutableMapOf()),
|
||||||
|
"form4" to PartConfig(body = form4, headers = mutableMapOf()),
|
||||||
|
"id" to PartConfig(body = id, headers = mutableMapOf()),
|
||||||
|
"name" to PartConfig(body = name, headers = mutableMapOf()),)
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf("Content-Type" to "application/x-www-form-urlencoded")
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.POST,
|
||||||
|
path = "/form/oneof",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.web.client.RestClientResponseException
|
||||||
|
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.models.StringEnumRef
|
||||||
|
import org.openapitools.client.infrastructure.*
|
||||||
|
|
||||||
|
class HeaderApi(client: RestClient) : ApiClient(client) {
|
||||||
|
|
||||||
|
constructor(baseUrl: String) : this(RestClient.builder()
|
||||||
|
.baseUrl(baseUrl)
|
||||||
|
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum for parameter enumNonrefStringHeader
|
||||||
|
*/
|
||||||
|
enum class EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums(val value: kotlin.String) {
|
||||||
|
@JsonProperty(value = "success") success("success"),
|
||||||
|
@JsonProperty(value = "failure") failure("failure"),
|
||||||
|
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testHeaderIntegerBooleanStringEnums(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null): kotlin.String {
|
||||||
|
val result = testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader = integerHeader, booleanHeader = booleanHeader, stringHeader = stringHeader, enumNonrefStringHeader = enumNonrefStringHeader, enumRefStringHeader = enumRefStringHeader)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testHeaderIntegerBooleanStringEnumsRequestConfig(integerHeader = integerHeader, booleanHeader = booleanHeader, stringHeader = stringHeader, enumNonrefStringHeader = enumNonrefStringHeader, enumRefStringHeader = enumRefStringHeader)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testHeaderIntegerBooleanStringEnumsRequestConfig(integerHeader: kotlin.Int? = null, booleanHeader: kotlin.Boolean? = null, stringHeader: kotlin.String? = null, enumNonrefStringHeader: EnumNonrefStringHeaderTestHeaderIntegerBooleanStringEnums? = null, enumRefStringHeader: StringEnumRef? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
integerHeader?.apply { localVariableHeaders["integer_header"] = this.toString() }
|
||||||
|
booleanHeader?.apply { localVariableHeaders["boolean_header"] = this.toString() }
|
||||||
|
stringHeader?.apply { localVariableHeaders["string_header"] = this.toString() }
|
||||||
|
enumNonrefStringHeader?.apply { localVariableHeaders["enum_nonref_string_header"] = this.toString() }
|
||||||
|
enumRefStringHeader?.apply { localVariableHeaders["enum_ref_string_header"] = this.toString() }
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/header/integer/boolean/string/enums",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.web.client.RestClientResponseException
|
||||||
|
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.models.StringEnumRef
|
||||||
|
import org.openapitools.client.infrastructure.*
|
||||||
|
|
||||||
|
class PathApi(client: RestClient) : ApiClient(client) {
|
||||||
|
|
||||||
|
constructor(baseUrl: String) : this(RestClient.builder()
|
||||||
|
.baseUrl(baseUrl)
|
||||||
|
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum for parameter enumNonrefStringPath
|
||||||
|
*/
|
||||||
|
enum class EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(val value: kotlin.String) {
|
||||||
|
@JsonProperty(value = "success") success("success"),
|
||||||
|
@JsonProperty(value = "failure") failure("failure"),
|
||||||
|
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef): kotlin.String {
|
||||||
|
val result = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString = pathString, pathInteger = pathInteger, enumNonrefStringPath = enumNonrefStringPath, enumRefStringPath = enumRefStringPath)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestConfig(pathString = pathString, pathInteger = pathInteger, enumNonrefStringPath = enumNonrefStringPath, enumRefStringPath = enumRefStringPath)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequestConfig(pathString: kotlin.String, pathInteger: kotlin.Int, enumNonrefStringPath: EnumNonrefStringPathTestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, enumRefStringPath: StringEnumRef) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
"path_string" to pathString,
|
||||||
|
"path_integer" to pathInteger,
|
||||||
|
"enum_nonref_string_path" to enumNonrefStringPath.value,
|
||||||
|
"enum_ref_string_path" to enumRefStringPath,
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,305 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.apis
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.web.client.RestClientResponseException
|
||||||
|
|
||||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
|
||||||
|
|
||||||
|
import org.openapitools.client.models.Pet
|
||||||
|
import org.openapitools.client.models.StringEnumRef
|
||||||
|
import org.openapitools.client.models.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
|
||||||
|
import org.openapitools.client.infrastructure.*
|
||||||
|
|
||||||
|
class QueryApi(client: RestClient) : ApiClient(client) {
|
||||||
|
|
||||||
|
constructor(baseUrl: String) : this(RestClient.builder()
|
||||||
|
.baseUrl(baseUrl)
|
||||||
|
.messageConverters { it.add(MappingJackson2HttpMessageConverter()) }
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum for parameter enumNonrefStringQuery
|
||||||
|
*/
|
||||||
|
enum class EnumNonrefStringQueryTestEnumRefString(val value: kotlin.String) {
|
||||||
|
@JsonProperty(value = "success") success("success"),
|
||||||
|
@JsonProperty(value = "failure") failure("failure"),
|
||||||
|
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEnumRefString(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null): kotlin.String {
|
||||||
|
val result = testEnumRefStringWithHttpInfo(enumNonrefStringQuery = enumNonrefStringQuery, enumRefStringQuery = enumRefStringQuery)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testEnumRefStringWithHttpInfo(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testEnumRefStringRequestConfig(enumNonrefStringQuery = enumNonrefStringQuery, enumRefStringQuery = enumRefStringQuery)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testEnumRefStringRequestConfig(enumNonrefStringQuery: EnumNonrefStringQueryTestEnumRefString? = null, enumRefStringQuery: StringEnumRef? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
.apply {
|
||||||
|
if (enumNonrefStringQuery != null) {
|
||||||
|
put("enum_nonref_string_query", listOf(enumNonrefStringQuery.toString()))
|
||||||
|
}
|
||||||
|
if (enumRefStringQuery != null) {
|
||||||
|
put("enum_ref_string_query", listOf(enumRefStringQuery.toString()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/query/enum_ref_string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryDatetimeDateString(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null): kotlin.String {
|
||||||
|
val result = testQueryDatetimeDateStringWithHttpInfo(datetimeQuery = datetimeQuery, dateQuery = dateQuery, stringQuery = stringQuery)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryDatetimeDateStringWithHttpInfo(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testQueryDatetimeDateStringRequestConfig(datetimeQuery = datetimeQuery, dateQuery = dateQuery, stringQuery = stringQuery)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testQueryDatetimeDateStringRequestConfig(datetimeQuery: java.time.OffsetDateTime? = null, dateQuery: java.time.LocalDate? = null, stringQuery: kotlin.String? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
.apply {
|
||||||
|
if (datetimeQuery != null) {
|
||||||
|
put("datetime_query", listOf(parseDateToQueryString(datetimeQuery)))
|
||||||
|
}
|
||||||
|
if (dateQuery != null) {
|
||||||
|
put("date_query", listOf(parseDateToQueryString(dateQuery)))
|
||||||
|
}
|
||||||
|
if (stringQuery != null) {
|
||||||
|
put("string_query", listOf(stringQuery.toString()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/query/datetime/date/string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryIntegerBooleanString(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null): kotlin.String {
|
||||||
|
val result = testQueryIntegerBooleanStringWithHttpInfo(integerQuery = integerQuery, booleanQuery = booleanQuery, stringQuery = stringQuery)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryIntegerBooleanStringWithHttpInfo(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testQueryIntegerBooleanStringRequestConfig(integerQuery = integerQuery, booleanQuery = booleanQuery, stringQuery = stringQuery)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testQueryIntegerBooleanStringRequestConfig(integerQuery: kotlin.Int? = null, booleanQuery: kotlin.Boolean? = null, stringQuery: kotlin.String? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
.apply {
|
||||||
|
if (integerQuery != null) {
|
||||||
|
put("integer_query", listOf(integerQuery.toString()))
|
||||||
|
}
|
||||||
|
if (booleanQuery != null) {
|
||||||
|
put("boolean_query", listOf(booleanQuery.toString()))
|
||||||
|
}
|
||||||
|
if (stringQuery != null) {
|
||||||
|
put("string_query", listOf(stringQuery.toString()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/query/integer/boolean/string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryStyleDeepObjectExplodeTrueObject(queryObject: Pet? = null): kotlin.String {
|
||||||
|
val result = testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject = queryObject)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject: Pet? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testQueryStyleDeepObjectExplodeTrueObjectRequestConfig(queryObject = queryObject)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testQueryStyleDeepObjectExplodeTrueObjectRequestConfig(queryObject: Pet? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
.apply {
|
||||||
|
if (queryObject != null) {
|
||||||
|
put("query_object", listOf(queryObject.toString()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/query/style_deepObject/explode_true/object",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryStyleFormExplodeTrueArrayString(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null): kotlin.String {
|
||||||
|
val result = testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject = queryObject)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testQueryStyleFormExplodeTrueArrayStringRequestConfig(queryObject = queryObject)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testQueryStyleFormExplodeTrueArrayStringRequestConfig(queryObject: TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
.apply {
|
||||||
|
if (queryObject != null) {
|
||||||
|
put("query_object", listOf(queryObject.toString()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/query/style_form/explode_true/array_string",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryStyleFormExplodeTrueObject(queryObject: Pet? = null): kotlin.String {
|
||||||
|
val result = testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject = queryObject)
|
||||||
|
return result.body!!
|
||||||
|
}
|
||||||
|
|
||||||
|
@Throws(RestClientResponseException::class)
|
||||||
|
fun testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject: Pet? = null): ResponseEntity<kotlin.String> {
|
||||||
|
val localVariableConfig = testQueryStyleFormExplodeTrueObjectRequestConfig(queryObject = queryObject)
|
||||||
|
return request<Unit, kotlin.String>(
|
||||||
|
localVariableConfig
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testQueryStyleFormExplodeTrueObjectRequestConfig(queryObject: Pet? = null) : RequestConfig<Unit> {
|
||||||
|
val localVariableBody = null
|
||||||
|
val localVariableQuery = mutableMapOf<kotlin.String, kotlin.collections.List<kotlin.String>>()
|
||||||
|
.apply {
|
||||||
|
if (queryObject != null) {
|
||||||
|
put("query_object", listOf(queryObject.toString()))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
val localVariableHeaders: MutableMap<String, String> = mutableMapOf()
|
||||||
|
localVariableHeaders["Accept"] = "text/plain"
|
||||||
|
|
||||||
|
val params = mutableMapOf<String, Any>(
|
||||||
|
)
|
||||||
|
|
||||||
|
return RequestConfig(
|
||||||
|
method = RequestMethod.GET,
|
||||||
|
path = "/query/style_form/explode_true/object",
|
||||||
|
params = params,
|
||||||
|
query = localVariableQuery,
|
||||||
|
headers = localVariableHeaders,
|
||||||
|
requiresAuthentication = false,
|
||||||
|
body = localVariableBody
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
package org.openapitools.client.infrastructure
|
||||||
|
|
||||||
|
typealias MultiValueMap = MutableMap<String,List<String>>
|
||||||
|
|
||||||
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
|
"csv" -> ","
|
||||||
|
"tsv" -> "\t"
|
||||||
|
"pipe" -> "|"
|
||||||
|
"space" -> " "
|
||||||
|
else -> ""
|
||||||
|
}
|
||||||
|
|
||||||
|
val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" }
|
||||||
|
|
||||||
|
fun <T : Any?> toMultiValue(items: Array<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter)
|
||||||
|
= toMultiValue(items.asIterable(), collectionFormat, map)
|
||||||
|
|
||||||
|
fun <T : Any?> toMultiValue(items: Iterable<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List<String> {
|
||||||
|
return when(collectionFormat) {
|
||||||
|
"multi" -> items.map(map)
|
||||||
|
else -> listOf(items.joinToString(separator = collectionDelimiter(collectionFormat), transform = map))
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package org.openapitools.client.infrastructure;
|
||||||
|
|
||||||
|
import org.springframework.core.ParameterizedTypeReference
|
||||||
|
import org.springframework.http.HttpHeaders
|
||||||
|
import org.springframework.http.HttpMethod
|
||||||
|
import org.springframework.http.MediaType
|
||||||
|
import org.springframework.web.client.RestClient
|
||||||
|
import org.springframework.http.ResponseEntity
|
||||||
|
import org.springframework.util.LinkedMultiValueMap
|
||||||
|
|
||||||
|
open class ApiClient(protected val client: RestClient) {
|
||||||
|
|
||||||
|
protected inline fun <reified I : Any, reified T: Any?> request(requestConfig: RequestConfig<I>): ResponseEntity<T> {
|
||||||
|
return prepare(defaults(requestConfig))
|
||||||
|
.retrieve()
|
||||||
|
.toEntity(object : ParameterizedTypeReference<T>() {})
|
||||||
|
}
|
||||||
|
|
||||||
|
protected fun <I : Any> prepare(requestConfig: RequestConfig<I>) =
|
||||||
|
client.method(requestConfig)
|
||||||
|
.uri(requestConfig)
|
||||||
|
.headers(requestConfig)
|
||||||
|
.nullableBody(requestConfig)
|
||||||
|
|
||||||
|
protected fun <I> defaults(requestConfig: RequestConfig<I>) =
|
||||||
|
requestConfig.apply {
|
||||||
|
if (body != null && headers[HttpHeaders.CONTENT_TYPE].isNullOrEmpty()) {
|
||||||
|
headers[HttpHeaders.CONTENT_TYPE] = MediaType.APPLICATION_JSON_VALUE
|
||||||
|
}
|
||||||
|
if (headers[HttpHeaders.ACCEPT].isNullOrEmpty()) {
|
||||||
|
headers[HttpHeaders.ACCEPT] = MediaType.APPLICATION_JSON_VALUE
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun <I> RestClient.method(requestConfig: RequestConfig<I>)=
|
||||||
|
method(HttpMethod.valueOf(requestConfig.method.name))
|
||||||
|
|
||||||
|
private fun <I> RestClient.RequestBodyUriSpec.uri(requestConfig: RequestConfig<I>) =
|
||||||
|
uri { builder ->
|
||||||
|
builder
|
||||||
|
.path(requestConfig.path)
|
||||||
|
.queryParams(LinkedMultiValueMap(requestConfig.query))
|
||||||
|
.build(requestConfig.params)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun <I> RestClient.RequestBodySpec.headers(requestConfig: RequestConfig<I>) =
|
||||||
|
apply { requestConfig.headers.forEach { (name, value) -> header(name, value) } }
|
||||||
|
|
||||||
|
private fun <I : Any> RestClient.RequestBodySpec.nullableBody(requestConfig: RequestConfig<I>) =
|
||||||
|
apply { if (requestConfig.body != null) body(requestConfig.body) }
|
||||||
|
}
|
||||||
|
|
||||||
|
inline fun <reified T: Any> parseDateToQueryString(value : T): String {
|
||||||
|
/*
|
||||||
|
.replace("\"", "") converts the json object string to an actual string for the query parameter.
|
||||||
|
The moshi or gson adapter allows a more generic solution instead of trying to use a native
|
||||||
|
formatter. It also easily allows to provide a simple way to define a custom date format pattern
|
||||||
|
inside a gson/moshi adapter.
|
||||||
|
*/
|
||||||
|
return Serializer.jacksonObjectMapper.writeValueAsString(value).replace("\"", "")
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package org.openapitools.client.infrastructure
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines a config object for a given part of a multi-part request.
|
||||||
|
* NOTE: Headers is a Map<String,String> because rfc2616 defines
|
||||||
|
* multi-valued headers as csv-only.
|
||||||
|
*/
|
||||||
|
data class PartConfig<T>(
|
||||||
|
val headers: MutableMap<String, String> = mutableMapOf(),
|
||||||
|
val body: T? = null
|
||||||
|
)
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.openapitools.client.infrastructure
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Defines a config object for a given request.
|
||||||
|
* NOTE: This object doesn't include 'body' because it
|
||||||
|
* allows for caching of the constructed object
|
||||||
|
* for many request definitions.
|
||||||
|
* NOTE: Headers is a Map<String,String> because rfc2616 defines
|
||||||
|
* multi-valued headers as csv-only.
|
||||||
|
*/
|
||||||
|
data class RequestConfig<T>(
|
||||||
|
val method: RequestMethod,
|
||||||
|
val path: String,
|
||||||
|
val headers: MutableMap<String, String> = mutableMapOf(),
|
||||||
|
val params: MutableMap<String, Any> = mutableMapOf(),
|
||||||
|
val query: MutableMap<String, List<String>> = mutableMapOf(),
|
||||||
|
val requiresAuthentication: Boolean,
|
||||||
|
val body: T? = null
|
||||||
|
)
|
@ -0,0 +1,8 @@
|
|||||||
|
package org.openapitools.client.infrastructure
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides enumerated HTTP verbs
|
||||||
|
*/
|
||||||
|
enum class RequestMethod {
|
||||||
|
GET, DELETE, HEAD, OPTIONS, PATCH, POST, PUT
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package org.openapitools.client.infrastructure
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude
|
||||||
|
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||||
|
|
||||||
|
object Serializer {
|
||||||
|
@JvmStatic
|
||||||
|
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||||
|
.findAndRegisterModules()
|
||||||
|
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||||
|
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||||
|
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param propertySize
|
||||||
|
* @param color
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class Bird (
|
||||||
|
|
||||||
|
@field:JsonProperty("size")
|
||||||
|
val propertySize: kotlin.String? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("color")
|
||||||
|
val color: kotlin.String? = null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param name
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class Category (
|
||||||
|
|
||||||
|
@field:JsonProperty("id")
|
||||||
|
val id: kotlin.Long? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("name")
|
||||||
|
val name: kotlin.String? = null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,77 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
import org.openapitools.client.models.StringEnumRef
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
* to test the default value of properties
|
||||||
|
*
|
||||||
|
* @param arrayStringEnumRefDefault
|
||||||
|
* @param arrayStringEnumDefault
|
||||||
|
* @param arrayStringDefault
|
||||||
|
* @param arrayIntegerDefault
|
||||||
|
* @param arrayString
|
||||||
|
* @param arrayStringNullable
|
||||||
|
* @param arrayStringExtensionNullable
|
||||||
|
* @param stringNullable
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class DefaultValue (
|
||||||
|
|
||||||
|
@field:JsonProperty("array_string_enum_ref_default")
|
||||||
|
val arrayStringEnumRefDefault: kotlin.collections.List<StringEnumRef>? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("array_string_enum_default")
|
||||||
|
val arrayStringEnumDefault: kotlin.collections.List<DefaultValue.ArrayStringEnumDefault>? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("array_string_default")
|
||||||
|
val arrayStringDefault: kotlin.collections.List<kotlin.String>? = arrayListOf("failure","skipped"),
|
||||||
|
|
||||||
|
@field:JsonProperty("array_integer_default")
|
||||||
|
val arrayIntegerDefault: kotlin.collections.List<kotlin.Int>? = arrayListOf(1,3),
|
||||||
|
|
||||||
|
@field:JsonProperty("array_string")
|
||||||
|
val arrayString: kotlin.collections.List<kotlin.String>? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("array_string_nullable")
|
||||||
|
val arrayStringNullable: kotlin.collections.List<kotlin.String>? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("array_string_extension_nullable")
|
||||||
|
val arrayStringExtensionNullable: kotlin.collections.List<kotlin.String>? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("string_nullable")
|
||||||
|
val stringNullable: kotlin.String? = null
|
||||||
|
|
||||||
|
) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Values: success,failure,unclassified,unknownDefaultOpenApi
|
||||||
|
*/
|
||||||
|
enum class ArrayStringEnumDefault(val value: kotlin.String) {
|
||||||
|
@JsonProperty(value = "success") success("success"),
|
||||||
|
@JsonProperty(value = "failure") failure("failure"),
|
||||||
|
@JsonProperty(value = "unclassified") unclassified("unclassified"),
|
||||||
|
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param number
|
||||||
|
* @param float
|
||||||
|
* @param double
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class NumberPropertiesOnly (
|
||||||
|
|
||||||
|
@field:JsonProperty("number")
|
||||||
|
val number: java.math.BigDecimal? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("float")
|
||||||
|
val float: kotlin.Float? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("double")
|
||||||
|
val double: kotlin.Double? = null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,71 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
import org.openapitools.client.models.Category
|
||||||
|
import org.openapitools.client.models.Tag
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param photoUrls
|
||||||
|
* @param id
|
||||||
|
* @param category
|
||||||
|
* @param tags
|
||||||
|
* @param status pet status in the store
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class Pet (
|
||||||
|
|
||||||
|
@field:JsonProperty("name")
|
||||||
|
val name: kotlin.String,
|
||||||
|
|
||||||
|
@field:JsonProperty("photoUrls")
|
||||||
|
val photoUrls: kotlin.collections.List<kotlin.String>,
|
||||||
|
|
||||||
|
@field:JsonProperty("id")
|
||||||
|
val id: kotlin.Long? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("category")
|
||||||
|
val category: Category? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("tags")
|
||||||
|
val tags: kotlin.collections.List<Tag>? = null,
|
||||||
|
|
||||||
|
/* pet status in the store */
|
||||||
|
@field:JsonProperty("status")
|
||||||
|
val status: Pet.Status? = null
|
||||||
|
|
||||||
|
) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pet status in the store
|
||||||
|
*
|
||||||
|
* Values: available,pending,sold,unknownDefaultOpenApi
|
||||||
|
*/
|
||||||
|
enum class Status(val value: kotlin.String) {
|
||||||
|
@JsonProperty(value = "available") available("available"),
|
||||||
|
@JsonProperty(value = "pending") pending("pending"),
|
||||||
|
@JsonProperty(value = "sold") sold("sold"),
|
||||||
|
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param id Query
|
||||||
|
* @param outcomes
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class Query (
|
||||||
|
|
||||||
|
/* Query */
|
||||||
|
@field:JsonProperty("id")
|
||||||
|
val id: kotlin.Long? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("outcomes")
|
||||||
|
val outcomes: kotlin.collections.List<Query.Outcomes>? = null
|
||||||
|
|
||||||
|
) {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Values: sUCCESS,fAILURE,sKIPPED,unknownDefaultOpenApi
|
||||||
|
*/
|
||||||
|
enum class Outcomes(val value: kotlin.String) {
|
||||||
|
@JsonProperty(value = "SUCCESS") sUCCESS("SUCCESS"),
|
||||||
|
@JsonProperty(value = "FAILURE") fAILURE("FAILURE"),
|
||||||
|
@JsonProperty(value = "SKIPPED") sKIPPED("SKIPPED"),
|
||||||
|
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,67 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Values: success,failure,unclassified,unknownDefaultOpenApi
|
||||||
|
*/
|
||||||
|
|
||||||
|
enum class StringEnumRef(val value: kotlin.String) {
|
||||||
|
|
||||||
|
@JsonProperty(value = "success")
|
||||||
|
success("success"),
|
||||||
|
|
||||||
|
@JsonProperty(value = "failure")
|
||||||
|
failure("failure"),
|
||||||
|
|
||||||
|
@JsonProperty(value = "unclassified")
|
||||||
|
unclassified("unclassified"),
|
||||||
|
|
||||||
|
@JsonProperty(value = "unknown_default_open_api")
|
||||||
|
unknownDefaultOpenApi("unknown_default_open_api");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Override [toString()] to avoid using the enum variable name as the value, and instead use
|
||||||
|
* the actual value defined in the API spec file.
|
||||||
|
*
|
||||||
|
* This solves a problem when the variable name and its value are different, and ensures that
|
||||||
|
* the client sends the correct enum values to the server always.
|
||||||
|
*/
|
||||||
|
override fun toString(): kotlin.String = value
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
/**
|
||||||
|
* Converts the provided [data] to a [String] on success, null otherwise.
|
||||||
|
*/
|
||||||
|
fun encode(data: kotlin.Any?): kotlin.String? = if (data is StringEnumRef) "$data" else null
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a valid [StringEnumRef] for [data], null otherwise.
|
||||||
|
*/
|
||||||
|
fun decode(data: kotlin.Any?): StringEnumRef? = data?.let {
|
||||||
|
val normalizedData = "$it".lowercase()
|
||||||
|
values().firstOrNull { value ->
|
||||||
|
it == value || normalizedData == "$value".lowercase()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,39 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @param name
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class Tag (
|
||||||
|
|
||||||
|
@field:JsonProperty("id")
|
||||||
|
val id: kotlin.Long? = null,
|
||||||
|
|
||||||
|
@field:JsonProperty("name")
|
||||||
|
val name: kotlin.String? = null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,35 @@
|
|||||||
|
/**
|
||||||
|
*
|
||||||
|
* Please note:
|
||||||
|
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||||
|
* Do not edit this file manually.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
@file:Suppress(
|
||||||
|
"ArrayInDataClass",
|
||||||
|
"EnumEntryName",
|
||||||
|
"RemoveRedundantQualifierName",
|
||||||
|
"UnusedImport"
|
||||||
|
)
|
||||||
|
|
||||||
|
package org.openapitools.client.models
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param propertyValues
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
data class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter (
|
||||||
|
|
||||||
|
@field:JsonProperty("values")
|
||||||
|
val propertyValues: kotlin.collections.List<kotlin.String>? = null
|
||||||
|
|
||||||
|
)
|
||||||
|
|
@ -82,7 +82,7 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<Unit> {
|
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<Unit> {
|
||||||
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -279,7 +279,7 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<Unit> {
|
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<Unit> {
|
||||||
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
@ -44,7 +44,7 @@ class StoreApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun deleteOrder(orderId: kotlin.String): Mono<Unit> {
|
fun deleteOrder(orderId: kotlin.String): Mono<Unit> {
|
||||||
return deleteOrderWithHttpInfo(orderId = orderId)
|
return deleteOrderWithHttpInfo(orderId = orderId)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
@ -44,7 +44,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun createUser(user: User): Mono<Unit> {
|
fun createUser(user: User): Mono<Unit> {
|
||||||
return createUserWithHttpInfo(user = user)
|
return createUserWithHttpInfo(user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -79,7 +79,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
||||||
return createUsersWithArrayInputWithHttpInfo(user = user)
|
return createUsersWithArrayInputWithHttpInfo(user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -114,7 +114,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun createUsersWithListInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
fun createUsersWithListInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
||||||
return createUsersWithListInputWithHttpInfo(user = user)
|
return createUsersWithListInputWithHttpInfo(user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -149,7 +149,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun deleteUser(username: kotlin.String): Mono<Unit> {
|
fun deleteUser(username: kotlin.String): Mono<Unit> {
|
||||||
return deleteUserWithHttpInfo(username = username)
|
return deleteUserWithHttpInfo(username = username)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -259,7 +259,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun logoutUser(): Mono<Unit> {
|
fun logoutUser(): Mono<Unit> {
|
||||||
return logoutUserWithHttpInfo()
|
return logoutUserWithHttpInfo()
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -293,7 +293,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun updateUser(username: kotlin.String, user: User): Mono<Unit> {
|
fun updateUser(username: kotlin.String, user: User): Mono<Unit> {
|
||||||
return updateUserWithHttpInfo(username = username, user = user)
|
return updateUserWithHttpInfo(username = username, user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
@ -40,8 +40,8 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun addPet(pet: Pet): Pet {
|
fun addPet(pet: Pet): Pet {
|
||||||
return addPetWithHttpInfo(pet = pet)
|
val result = addPetWithHttpInfo(pet = pet)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -77,8 +77,7 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Unit {
|
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Unit {
|
||||||
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
val result = deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -122,8 +121,8 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun findPetsByStatus(status: kotlin.collections.List<StatusFindPetsByStatus>): kotlin.collections.List<Pet> {
|
fun findPetsByStatus(status: kotlin.collections.List<StatusFindPetsByStatus>): kotlin.collections.List<Pet> {
|
||||||
return findPetsByStatusWithHttpInfo(status = status)
|
val result = findPetsByStatusWithHttpInfo(status = status)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -161,8 +160,8 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@Deprecated(message = "This operation is deprecated.")
|
@Deprecated(message = "This operation is deprecated.")
|
||||||
fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): kotlin.collections.List<Pet> {
|
fun findPetsByTags(tags: kotlin.collections.List<kotlin.String>): kotlin.collections.List<Pet> {
|
||||||
return findPetsByTagsWithHttpInfo(tags = tags)
|
val result = findPetsByTagsWithHttpInfo(tags = tags)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -201,8 +200,8 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun getPetById(petId: kotlin.Long): Pet {
|
fun getPetById(petId: kotlin.Long): Pet {
|
||||||
return getPetByIdWithHttpInfo(petId = petId)
|
val result = getPetByIdWithHttpInfo(petId = petId)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -237,8 +236,8 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun updatePet(pet: Pet): Pet {
|
fun updatePet(pet: Pet): Pet {
|
||||||
return updatePetWithHttpInfo(pet = pet)
|
val result = updatePetWithHttpInfo(pet = pet)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -274,8 +273,7 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Unit {
|
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Unit {
|
||||||
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
val result = updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -311,8 +309,8 @@ class PetApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): ModelApiResponse {
|
fun uploadFile(petId: kotlin.Long, additionalMetadata: kotlin.String? = null, file: java.io.File? = null): ModelApiResponse {
|
||||||
return uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
val result = uploadFileWithHttpInfo(petId = petId, additionalMetadata = additionalMetadata, file = file)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
|
@ -39,8 +39,7 @@ class StoreApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun deleteOrder(orderId: kotlin.String): Unit {
|
fun deleteOrder(orderId: kotlin.String): Unit {
|
||||||
return deleteOrderWithHttpInfo(orderId = orderId)
|
val result = deleteOrderWithHttpInfo(orderId = orderId)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -74,8 +73,8 @@ class StoreApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun getInventory(): kotlin.collections.Map<kotlin.String, kotlin.Int> {
|
fun getInventory(): kotlin.collections.Map<kotlin.String, kotlin.Int> {
|
||||||
return getInventoryWithHttpInfo()
|
val result = getInventoryWithHttpInfo()
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -109,8 +108,8 @@ class StoreApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun getOrderById(orderId: kotlin.Long): Order {
|
fun getOrderById(orderId: kotlin.Long): Order {
|
||||||
return getOrderByIdWithHttpInfo(orderId = orderId)
|
val result = getOrderByIdWithHttpInfo(orderId = orderId)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -145,8 +144,8 @@ class StoreApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun placeOrder(order: Order): Order {
|
fun placeOrder(order: Order): Order {
|
||||||
return placeOrderWithHttpInfo(order = order)
|
val result = placeOrderWithHttpInfo(order = order)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
|
@ -39,8 +39,7 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun createUser(user: User): Unit {
|
fun createUser(user: User): Unit {
|
||||||
return createUserWithHttpInfo(user = user)
|
val result = createUserWithHttpInfo(user = user)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -74,8 +73,7 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Unit {
|
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Unit {
|
||||||
return createUsersWithArrayInputWithHttpInfo(user = user)
|
val result = createUsersWithArrayInputWithHttpInfo(user = user)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -109,8 +107,7 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun createUsersWithListInput(user: kotlin.collections.List<User>): Unit {
|
fun createUsersWithListInput(user: kotlin.collections.List<User>): Unit {
|
||||||
return createUsersWithListInputWithHttpInfo(user = user)
|
val result = createUsersWithListInputWithHttpInfo(user = user)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -144,8 +141,7 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun deleteUser(username: kotlin.String): Unit {
|
fun deleteUser(username: kotlin.String): Unit {
|
||||||
return deleteUserWithHttpInfo(username = username)
|
val result = deleteUserWithHttpInfo(username = username)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -179,8 +175,8 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun getUserByName(username: kotlin.String): User {
|
fun getUserByName(username: kotlin.String): User {
|
||||||
return getUserByNameWithHttpInfo(username = username)
|
val result = getUserByNameWithHttpInfo(username = username)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -215,8 +211,8 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String {
|
fun loginUser(username: kotlin.String, password: kotlin.String): kotlin.String {
|
||||||
return loginUserWithHttpInfo(username = username, password = password)
|
val result = loginUserWithHttpInfo(username = username, password = password)
|
||||||
.body!!
|
return result.body!!
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -254,8 +250,7 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun logoutUser(): Unit {
|
fun logoutUser(): Unit {
|
||||||
return logoutUserWithHttpInfo()
|
val result = logoutUserWithHttpInfo()
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
@ -288,8 +283,7 @@ class UserApi(client: RestClient) : ApiClient(client) {
|
|||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
fun updateUser(username: kotlin.String, user: User): Unit {
|
fun updateUser(username: kotlin.String, user: User): Unit {
|
||||||
return updateUserWithHttpInfo(username = username, user = user)
|
val result = updateUserWithHttpInfo(username = username, user = user)
|
||||||
.body!!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(RestClientResponseException::class)
|
@Throws(RestClientResponseException::class)
|
||||||
|
@ -82,7 +82,7 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<Unit> {
|
fun deletePet(petId: kotlin.Long, apiKey: kotlin.String? = null): Mono<Unit> {
|
||||||
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
return deletePetWithHttpInfo(petId = petId, apiKey = apiKey)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -279,7 +279,7 @@ class PetApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<Unit> {
|
fun updatePetWithForm(petId: kotlin.Long, name: kotlin.String? = null, status: kotlin.String? = null): Mono<Unit> {
|
||||||
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
return updatePetWithFormWithHttpInfo(petId = petId, name = name, status = status)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
@ -44,7 +44,7 @@ class StoreApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun deleteOrder(orderId: kotlin.String): Mono<Unit> {
|
fun deleteOrder(orderId: kotlin.String): Mono<Unit> {
|
||||||
return deleteOrderWithHttpInfo(orderId = orderId)
|
return deleteOrderWithHttpInfo(orderId = orderId)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
@ -44,7 +44,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun createUser(user: User): Mono<Unit> {
|
fun createUser(user: User): Mono<Unit> {
|
||||||
return createUserWithHttpInfo(user = user)
|
return createUserWithHttpInfo(user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -79,7 +79,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
fun createUsersWithArrayInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
||||||
return createUsersWithArrayInputWithHttpInfo(user = user)
|
return createUsersWithArrayInputWithHttpInfo(user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -114,7 +114,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun createUsersWithListInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
fun createUsersWithListInput(user: kotlin.collections.List<User>): Mono<Unit> {
|
||||||
return createUsersWithListInputWithHttpInfo(user = user)
|
return createUsersWithListInputWithHttpInfo(user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -149,7 +149,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun deleteUser(username: kotlin.String): Mono<Unit> {
|
fun deleteUser(username: kotlin.String): Mono<Unit> {
|
||||||
return deleteUserWithHttpInfo(username = username)
|
return deleteUserWithHttpInfo(username = username)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -259,7 +259,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun logoutUser(): Mono<Unit> {
|
fun logoutUser(): Mono<Unit> {
|
||||||
return logoutUserWithHttpInfo()
|
return logoutUserWithHttpInfo()
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
@ -293,7 +293,7 @@ class UserApi(client: WebClient) : ApiClient(client) {
|
|||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
fun updateUser(username: kotlin.String, user: User): Mono<Unit> {
|
fun updateUser(username: kotlin.String, user: User): Mono<Unit> {
|
||||||
return updateUserWithHttpInfo(username = username, user = user)
|
return updateUserWithHttpInfo(username = username, user = user)
|
||||||
.map { it.body }
|
.map { Unit }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(WebClientResponseException::class)
|
@Throws(WebClientResponseException::class)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user