forked from loafle/openapi-generator-original
Bash skip empty query param fix (#3290)
* Bash: Update samples I'm about to make a fix to the bash generator. I'm regenerating the samples in this commit so that the change I make isn't lost amongst the noise. https://github.com/OpenAPITools/openapi-generator/pull/3290 * Bash client: Fix query params seperation Fix bug where empty query parameters weren't separated by ampersands. For example, this ```bash bash bash_keycloak/client.sh -v --oauth2-bearer "$access_token" --host "$api_host" realmUsersGet realm=demo_realm2 email=foo+bar@baz.com ``` would generate the path `/auth/admin/realms/demo_realm2/users?briefRepresentation=email=foo+bar@baz.comfirst=firstName=lastName=max=search=username=`. It now puts ampersands around them to make `/auth/admin/realms/demo_realm2/users?briefRepresentation=&email=foo+bar@baz.com&first=&firstName=&lastName=&max=&search=&username=` Instead of predicting if there is going to be a `parameter_value` ahead of time, we now put in the ampersand if there is a `parameter_value` and existing `query_request_part`. https://github.com/OpenAPITools/openapi-generator/pull/3290 * Bash: Skip query parameters with empty value I have a route with many optional query parameters. I observed that when they weren't specified, they were still included in the routes, but without a value. Running: ```bash bash bash_keycloak/client.sh -v --header "Authorization: Bearer $access_token" --host "$api_host" --dry-run realmUsersGet realm=demo_realm2 email=foo+bar@baz.com username=foo ``` Would produce the route: `http://localhost:8080/auth/admin/realms/demo_realm2/users?briefRepresentation=&email=foo+bar@baz.com&first=&firstName=&lastName=&max=search=&username=foo` After this change it produces the route: ``http://localhost:8080/auth/admin/realms/demo_realm2/users?email=foo+bar@baz.com&username=foo --- I discussed with @wing328 in the pull request about if empty values (eg `username=` should produce an empty query parameter, or if the query parameter should be removed. We decided it should remove the query parameter. https://github.com/OpenAPITools/openapi-generator/pull/3290 ---- The OpenAPI definition I was using: Using: https://github.com/ccouzens/keycloak-openapi/blob/master/keycloak/6.0.json In particular: ```json "/{realm}/users": { "get": { "summary": "Get users Returns a list of users, filtered according to query parameters", "parameters": [ { "in": "query", "name": "briefRepresentation", "schema": { "type": "boolean" }, "style": "form" }, { "in": "query", "name": "email", "schema": { "type": "string" }, "style": "form" }, { "in": "query", "name": "first", "schema": { "type": "integer", "format": "int32" }, "style": "form" }, { "in": "query", "name": "firstName", "schema": { "type": "string" }, "style": "form" }, { "in": "query", "name": "lastName", "schema": { "type": "string" }, "style": "form" }, { "in": "query", "name": "max", "description": "Maximum results size (defaults to 100)", "schema": { "type": "integer", "format": "int32" }, "style": "form" }, { "in": "query", "name": "search", "description": "A String contained in username, first or last name, or email", "schema": { "type": "string" }, "style": "form" }, { "in": "query", "name": "username", "schema": { "type": "string" }, "style": "form" } ], ```
This commit is contained in:
parent
652b14c28f
commit
6358b11516
@ -416,18 +416,16 @@ build_request_path() {
|
|||||||
|
|
||||||
local query_request_part=""
|
local query_request_part=""
|
||||||
|
|
||||||
local count=0
|
|
||||||
for qparam in "${query_params[@]}"; do
|
for qparam in "${query_params[@]}"; do
|
||||||
|
if [[ "${operation_parameters[$qparam]}" == "" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the array of parameter values
|
# Get the array of parameter values
|
||||||
local parameter_value=""
|
local parameter_value=""
|
||||||
local parameter_values
|
local parameter_values
|
||||||
mapfile -t parameter_values < <(sed -e 's/'":::"'/\n/g' <<<"${operation_parameters[$qparam]}")
|
mapfile -t parameter_values < <(sed -e 's/'":::"'/\n/g' <<<"${operation_parameters[$qparam]}")
|
||||||
|
|
||||||
if [[ -n "${parameter_values[*]}" ]]; then
|
|
||||||
if [[ $((count++)) -gt 0 ]]; then
|
|
||||||
query_request_part+="&"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
{{#hasAuthMethods}}{{#authMethods}}{{#isApiKey}}{{#isKeyInQuery}}
|
{{#hasAuthMethods}}{{#authMethods}}{{#isApiKey}}{{#isKeyInQuery}}
|
||||||
if [[ ${qparam} == "{{keyParamName}}" ]]; then
|
if [[ ${qparam} == "{{keyParamName}}" ]]; then
|
||||||
if [[ -n "${parameter_values[*]}" ]]; then
|
if [[ -n "${parameter_values[*]}" ]]; then
|
||||||
@ -508,6 +506,9 @@ build_request_path() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${parameter_value}" ]]; then
|
if [[ -n "${parameter_value}" ]]; then
|
||||||
|
if [[ -n "${query_request_part}" ]]; then
|
||||||
|
query_request_part+="&"
|
||||||
|
fi
|
||||||
query_request_part+="${parameter_value}"
|
query_request_part+="${parameter_value}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.0-SNAPSHOT
|
4.1.0-SNAPSHOT
|
@ -1,6 +1,7 @@
|
|||||||
# OpenAPI Petstore Bash client
|
# OpenAPI Petstore Bash client
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
This is a Bash client script for accessing OpenAPI Petstore service.
|
This is a Bash client script for accessing OpenAPI Petstore service.
|
||||||
|
|
||||||
The script uses cURL underneath for making all REST calls.
|
The script uses cURL underneath for making all REST calls.
|
||||||
@ -43,6 +44,7 @@ $ petstore-cli --host http://<hostname>:<port> --dry-run <operationid>
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Docker image
|
## Docker image
|
||||||
|
|
||||||
You can easily create a Docker image containing a preconfigured environment
|
You can easily create a Docker image containing a preconfigured environment
|
||||||
for using the REST Bash client including working autocompletion and short
|
for using the REST Bash client including working autocompletion and short
|
||||||
welcome message with basic instructions, using the generated Dockerfile:
|
welcome message with basic instructions, using the generated Dockerfile:
|
||||||
@ -59,6 +61,7 @@ is also available.
|
|||||||
## Shell completion
|
## Shell completion
|
||||||
|
|
||||||
### Bash
|
### Bash
|
||||||
|
|
||||||
The generated bash-completion script can be either directly loaded to the current Bash session using:
|
The generated bash-completion script can be either directly loaded to the current Bash session using:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -72,10 +75,13 @@ sudo cp petstore-cli.bash-completion /etc/bash-completion.d/petstore-cli
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### OS X
|
#### OS X
|
||||||
|
|
||||||
On OSX you might need to install bash-completion using Homebrew:
|
On OSX you might need to install bash-completion using Homebrew:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
brew install bash-completion
|
brew install bash-completion
|
||||||
```
|
```
|
||||||
|
|
||||||
and add the following to the `~/.bashrc`:
|
and add the following to the `~/.bashrc`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@ -85,8 +91,8 @@ fi
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Zsh
|
### Zsh
|
||||||
In Zsh, the generated `_petstore-cli` Zsh completion file must be copied to one of the folders under `$FPATH` variable.
|
|
||||||
|
|
||||||
|
In Zsh, the generated `_petstore-cli` Zsh completion file must be copied to one of the folders under `$FPATH` variable.
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
@ -94,11 +100,13 @@ All URIs are relative to */v2*
|
|||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
|
*AnotherFakeApi* | [**123Test@$%SpecialTags**](docs/AnotherFakeApi.md#123test@$%specialtags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
|
*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||||
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
|
||||||
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
|
||||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||||
|
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||||
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
|
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters
|
||||||
@ -106,6 +114,7 @@ Class | Method | HTTP request | Description
|
|||||||
偽のエンドポイント
|
偽のエンドポイント
|
||||||
가짜 엔드 포인트
|
가짜 엔드 포인트
|
||||||
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
|
||||||
|
*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||||
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
@ -117,6 +126,7 @@ Class | Method | HTTP request | Description
|
|||||||
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
|
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet
|
||||||
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||||
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||||
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
|
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||||
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
|
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||||
@ -133,25 +143,34 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## Documentation For Models
|
## Documentation For Models
|
||||||
|
|
||||||
- [$special[model.name]](docs/$special[model.name].md)
|
- [$special[modelName]](docs/$special[modelName].md)
|
||||||
- [200_response](docs/200_response.md)
|
- [200Response](docs/200Response.md)
|
||||||
|
- [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
|
||||||
|
- [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
|
||||||
|
- [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
|
||||||
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
|
||||||
|
- [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
|
||||||
|
- [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
|
||||||
|
- [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
|
||||||
|
- [AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
|
||||||
- [Animal](docs/Animal.md)
|
- [Animal](docs/Animal.md)
|
||||||
- [AnimalFarm](docs/AnimalFarm.md)
|
|
||||||
- [ApiResponse](docs/ApiResponse.md)
|
- [ApiResponse](docs/ApiResponse.md)
|
||||||
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
|
||||||
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
|
||||||
- [ArrayTest](docs/ArrayTest.md)
|
- [ArrayTest](docs/ArrayTest.md)
|
||||||
- [Capitalization](docs/Capitalization.md)
|
- [Capitalization](docs/Capitalization.md)
|
||||||
- [Cat](docs/Cat.md)
|
- [Cat](docs/Cat.md)
|
||||||
|
- [CatAllOf](docs/CatAllOf.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [ClassModel](docs/ClassModel.md)
|
- [ClassModel](docs/ClassModel.md)
|
||||||
- [Client](docs/Client.md)
|
- [Client](docs/Client.md)
|
||||||
- [Dog](docs/Dog.md)
|
- [Dog](docs/Dog.md)
|
||||||
|
- [DogAllOf](docs/DogAllOf.md)
|
||||||
- [EnumArrays](docs/EnumArrays.md)
|
- [EnumArrays](docs/EnumArrays.md)
|
||||||
- [EnumClass](docs/EnumClass.md)
|
- [EnumClass](docs/EnumClass.md)
|
||||||
- [Enum_Test](docs/Enum_Test.md)
|
- [EnumTest](docs/EnumTest.md)
|
||||||
- [Format_test](docs/Format_test.md)
|
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||||
|
- [FormatTest](docs/FormatTest.md)
|
||||||
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||||
- [MapTest](docs/MapTest.md)
|
- [MapTest](docs/MapTest.md)
|
||||||
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||||
@ -164,7 +183,10 @@ Class | Method | HTTP request | Description
|
|||||||
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
- [ReadOnlyFirst](docs/ReadOnlyFirst.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TypeHolderDefault](docs/TypeHolderDefault.md)
|
||||||
|
- [TypeHolderExample](docs/TypeHolderExample.md)
|
||||||
- [User](docs/User.md)
|
- [User](docs/User.md)
|
||||||
|
- [XmlItem](docs/XmlItem.md)
|
||||||
|
|
||||||
|
|
||||||
## Documentation For Authorization
|
## Documentation For Authorization
|
||||||
@ -172,12 +194,14 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## api_key
|
## api_key
|
||||||
|
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key
|
- **API key parameter name**: api_key
|
||||||
- **Location**: HTTP header
|
- **Location**: HTTP header
|
||||||
|
|
||||||
## api_key_query
|
## api_key_query
|
||||||
|
|
||||||
|
|
||||||
- **Type**: API key
|
- **Type**: API key
|
||||||
- **API key parameter name**: api_key_query
|
- **API key parameter name**: api_key_query
|
||||||
- **Location**: URL query string
|
- **Location**: URL query string
|
||||||
@ -188,6 +212,7 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## petstore_auth
|
## petstore_auth
|
||||||
|
|
||||||
|
|
||||||
- **Type**: OAuth
|
- **Type**: OAuth
|
||||||
- **Flow**: implicit
|
- **Flow**: implicit
|
||||||
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
|
||||||
|
594
samples/client/petstore/bash/_client.sh
Normal file
594
samples/client/petstore/bash/_client.sh
Normal file
@ -0,0 +1,594 @@
|
|||||||
|
#compdef
|
||||||
|
|
||||||
|
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
# !
|
||||||
|
# ! Note:
|
||||||
|
# !
|
||||||
|
# ! THIS SCRIPT HAS BEEN AUTOMATICALLY GENERATED USING
|
||||||
|
# ! openapi-generator (https://openapi-generator.tech)
|
||||||
|
# ! FROM OPENAPI SPECIFICATION IN JSON.
|
||||||
|
# !
|
||||||
|
# ! Based on: https://github.com/Valodim/zsh-curl-completion/blob/master/_curl
|
||||||
|
# !
|
||||||
|
# !
|
||||||
|
# !
|
||||||
|
# ! Installation:
|
||||||
|
# !
|
||||||
|
# ! Copy the _ file to any directory under FPATH
|
||||||
|
# ! environment variable (echo $FPATH)
|
||||||
|
# !
|
||||||
|
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
|
||||||
|
local curcontext="$curcontext" state line ret=1
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
typeset -A mime_type_abbreviations
|
||||||
|
# text/*
|
||||||
|
mime_type_abbreviations[text]="text/plain"
|
||||||
|
mime_type_abbreviations[html]="text/html"
|
||||||
|
mime_type_abbreviations[md]="text/x-markdown"
|
||||||
|
mime_type_abbreviations[csv]="text/csv"
|
||||||
|
mime_type_abbreviations[css]="text/css"
|
||||||
|
mime_type_abbreviations[rtf]="text/rtf"
|
||||||
|
# application/*
|
||||||
|
mime_type_abbreviations[json]="application/json"
|
||||||
|
mime_type_abbreviations[xml]="application/xml"
|
||||||
|
mime_type_abbreviations[yaml]="application/yaml"
|
||||||
|
mime_type_abbreviations[js]="application/javascript"
|
||||||
|
mime_type_abbreviations[bin]="application/octet-stream"
|
||||||
|
mime_type_abbreviations[rdf]="application/rdf+xml"
|
||||||
|
# image/*
|
||||||
|
mime_type_abbreviations[jpg]="image/jpeg"
|
||||||
|
mime_type_abbreviations[png]="image/png"
|
||||||
|
mime_type_abbreviations[gif]="image/gif"
|
||||||
|
mime_type_abbreviations[bmp]="image/bmp"
|
||||||
|
mime_type_abbreviations[tiff]="image/tiff"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate zsh completion string list for abbreviated mime types
|
||||||
|
#
|
||||||
|
get_mime_type_completions() {
|
||||||
|
typeset -a result
|
||||||
|
result=()
|
||||||
|
for k in "${(@k)mime_type_abbreviations}"; do
|
||||||
|
value=$mime_type_abbreviations[${k}]
|
||||||
|
#echo $value
|
||||||
|
result+=( "${k}[${value}]" )
|
||||||
|
#echo $result
|
||||||
|
done
|
||||||
|
echo "$result"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# cURL crypto engines completion function
|
||||||
|
#
|
||||||
|
_curl_crypto_engine() {
|
||||||
|
local vals
|
||||||
|
vals=( ${${(f)"$(curl --engine list)":gs/ /}[2,$]} )
|
||||||
|
_describe -t outputs 'engines' vals && return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# cURL post data completion functions=
|
||||||
|
#
|
||||||
|
_curl_post_data() {
|
||||||
|
|
||||||
|
# don't do anything further if this is raw content
|
||||||
|
compset -P '=' && _message 'raw content' && return 0
|
||||||
|
|
||||||
|
# complete filename or stdin for @ syntax
|
||||||
|
compset -P '*@' && {
|
||||||
|
local expl
|
||||||
|
_description files expl stdin
|
||||||
|
compadd "$expl[@]" - "-"
|
||||||
|
_files
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# got a name already? expecting data.
|
||||||
|
compset -P '*=' && _message 'data value' && return 0
|
||||||
|
|
||||||
|
# otherwise, name (or @ or =) should be specified
|
||||||
|
_message 'data name' && return 0
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
local arg_http arg_ftp arg_other arg_proxy arg_crypto arg_connection arg_auth arg_input arg_output
|
||||||
|
|
||||||
|
# HTTP Arguments
|
||||||
|
arg_http=(''\
|
||||||
|
{-0,--http1.0}'[force use of use http 1.0 instead of 1.1]' \
|
||||||
|
{-b,--cookie}'[pass data to http server as cookie]:data or file' \
|
||||||
|
{-c,--cookie-jar}'[specify cookie file]:file name:_files' \
|
||||||
|
{-d,--data}'[send specified data as HTTP POST data]:data:{_curl_post_data}' \
|
||||||
|
'--data-binary[post HTTP POST data without any processing]:data:{_curl_post_data}' \
|
||||||
|
'--data-urlencode[post HTTP POST data, with url encoding]:data:{_curl_post_data}' \
|
||||||
|
{-f,--fail}'[enable failfast behavior for server errors]' \
|
||||||
|
'*'{-F,--form}'[add POST form data]:name=content' \
|
||||||
|
{-G,--get}'[use HTTP GET even with data (-d, --data, --data-binary)]' \
|
||||||
|
'*'{-H,--header}'[specify an extra header]:header' \
|
||||||
|
'--ignore-content-length[ignore Content-Length header]' \
|
||||||
|
{-i,--include}'[include HTTP header in the output]' \
|
||||||
|
{-j,--junk-session-cookies}'[discard all session cookies]' \
|
||||||
|
{-e,--referer}'[send url as referer]:referer url:_urls' \
|
||||||
|
{-L,--location}'[follow Location headers on http 3XX response]' \
|
||||||
|
'--location-trusted[like --location, but allows sending of auth data to redirected hosts]' \
|
||||||
|
'--max-redirs[set maximum number of redirection followings allowed]:number' \
|
||||||
|
{-J,--remote-header-name}'[use Content-Disposition for output file name]' \
|
||||||
|
{-O,--remote-name}'[write to filename parsed from url instead of stdout]' \
|
||||||
|
'--post301[do not convert POST to GET after following 301 Location response (follow RFC 2616/10.3.2)]' \
|
||||||
|
'--post302[do not convert POST to GET after following 302 Location response (follow RFC 2616/10.3.2)]' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# FTP arguments
|
||||||
|
arg_ftp=(\
|
||||||
|
{-a,--append}'[append to target file instead of overwriting (FTP/SFTP)]' \
|
||||||
|
'--crlf[convert LF to CRLF in upload]' \
|
||||||
|
'--disable-eprt[disable use of EPRT and LPRT for active FTP transfers]' \
|
||||||
|
'--disable-epsv[disable use of EPSV for passive FTP transfers]' \
|
||||||
|
'--ftp-account[account data (FTP)]:data' \
|
||||||
|
'--ftp-alternative-to-user[command to send when USER and PASS commands fail (FTP)]:command' \
|
||||||
|
'--ftp-create-dirs[create paths remotely if it does not exist]' \
|
||||||
|
'--ftp-method[ftp method to use to reach a file (FTP)]:method:(multicwd ocwd singlecwd)' \
|
||||||
|
'--ftp-pasv[use passive mode for the data connection (FTP)]' \
|
||||||
|
'--ftp-skip-pasv-ip[do not use the ip the server suggests for PASV]' \
|
||||||
|
'--form-string[like --form, but do not parse content]:name=string' \
|
||||||
|
'--ftp-pret[send PRET before PASV]' \
|
||||||
|
'--ftp-ssl-ccc[use clear command channel (CCC) after authentication (FTP)]' \
|
||||||
|
'--ftp-ssl-ccc-mode[sets the CCC mode (FTP)]:mode:(active passive)' \
|
||||||
|
'--ftp-ssl-control[require SSL/TLS for FTP login, clear for transfer]' \
|
||||||
|
{-l,--list-only}'[list names only when listing directories (FTP)]' \
|
||||||
|
{-P,--ftp-port}'[use active mode, tell server to connect to specified address or interface (FTP]:address' \
|
||||||
|
'*'{-Q,--quote}'[send arbitrary command to the remote server before transfer (FTP/SFTP)]:command' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Other Protocol arguments
|
||||||
|
arg_other=(\
|
||||||
|
'--mail-from[specify From: address]:address' \
|
||||||
|
'--mail-rcpt[specify email recipient for SMTP, may be given multiple times]:address' \
|
||||||
|
{-t,--telnet-option}'[pass options to telnet protocol]:opt=val' \
|
||||||
|
'--tftp-blksize[set tftp BLKSIZE option]:value' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Proxy arguments
|
||||||
|
arg_proxy=(\
|
||||||
|
'--noproxy[list of hosts to connect directly to instead of through proxy]:no-proxy-list' \
|
||||||
|
{-p,--proxytunnel}'[tunnel non-http protocols through http proxy]' \
|
||||||
|
{-U,--proxy-user}'[specify the user name and password to use for proxy authentication]:user:password' \
|
||||||
|
'--proxy-anyauth[use any authentication method for proxy, default to most secure]' \
|
||||||
|
'--proxy-basic[use HTTP Basic authentication for proxy]' \
|
||||||
|
'--proxy-digest[use http digest authentication for proxy]' \
|
||||||
|
'--proxy-negotiate[enable GSS-Negotiate authentication for proxy]' \
|
||||||
|
'--proxy-ntlm[enable ntlm authentication for proxy]' \
|
||||||
|
'--proxy1.0[use http 1.0 proxy]:proxy url' \
|
||||||
|
{-x,--proxy}'[use specified proxy]:proxy url' \
|
||||||
|
'--socks5-gssapi-service[change service name for socks server]:servicename' \
|
||||||
|
'--socks5-gssapi-nec[allow unprotected exchange of protection mode negotiation]' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Crypto arguments
|
||||||
|
arg_crypto=(\
|
||||||
|
{-1,--tlsv1}'[Forces curl to use TLS version 1 when negotiating with a remote TLS server.]' \
|
||||||
|
{-2,--sslv2}'[Forces curl to use SSL version 2 when negotiating with a remote SSL server.]' \
|
||||||
|
{-3,--sslv3}'[Forces curl to use SSL version 3 when negotiating with a remote SSL server.]' \
|
||||||
|
'--ciphers[specifies which cipher to use for the ssl connection]:list of ciphers' \
|
||||||
|
'--crlfile[specify file with revoked certificates]:file' \
|
||||||
|
'--delegation[set delegation policy to use with GSS/kerberos]:delegation policy:(none policy always)' \
|
||||||
|
{-E,--cert}'[use specified client certificate]:certificate file:_files' \
|
||||||
|
'--engine[use selected OpenSSL crypto engine]:ssl crypto engine:{_curl_crypto_engine}' \
|
||||||
|
'--egd-file[set ssl entropy gathering daemon socket]:entropy socket:_files' \
|
||||||
|
'--cert-type[specify certificate type (PEM, DER, ENG)]:certificate type:(PEM DER ENG)' \
|
||||||
|
'--cacert[specify certificate file to verify the peer with]:CA certificate:_files' \
|
||||||
|
'--capath[specify a search path for certificate files]:CA certificate directory:_directories' \
|
||||||
|
'--hostpubmd5[check remote hosts public key]:md5 hash' \
|
||||||
|
{-k,--insecure}'[allow ssl to perform insecure ssl connections (ie, ignore certificate)]' \
|
||||||
|
'--key[ssl/ssh private key file name]:key file:_files' \
|
||||||
|
'--key-type[ssl/ssh private key file type]:file type:(PEM DER ENG)' \
|
||||||
|
'--pubkey[ssh public key file]:pubkey file:_files' \
|
||||||
|
'--random-file[set source of random data for ssl]:random source:_files' \
|
||||||
|
'--no-sessionid[disable caching of ssl session ids]' \
|
||||||
|
'--pass:phrase[passphrase for ssl/ssh private key]' \
|
||||||
|
'--ssl[try to use ssl/tls for connection, if available]' \
|
||||||
|
'--ssl-reqd[try to use ssl/tls for connection, fail if unavailable]' \
|
||||||
|
'--tlsauthtype[set TLS authentication type (only SRP supported!)]:authtype' \
|
||||||
|
'--tlsuser[set username for TLS authentication]:user' \
|
||||||
|
'--tlspassword[set password for TLS authentication]:password' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Connection arguments
|
||||||
|
arg_connection=(\
|
||||||
|
{-4,--ipv4}'[prefer ipv4]' \
|
||||||
|
{-6,--ipv6}'[prefer ipv6, if available]' \
|
||||||
|
{-B,--use-ascii}'[use ascii mode]' \
|
||||||
|
'--compressed[request a compressed transfer]' \
|
||||||
|
'--connect-timeout[timeout for connection phase]:seconds' \
|
||||||
|
{-I,--head}'[fetch http HEAD only (HTTP/FTP/FILE]' \
|
||||||
|
'--interface[work on a specific interface]:name' \
|
||||||
|
'--keepalive-time[set time to wait before sending keepalive probes]:seconds' \
|
||||||
|
'--limit-rate[specify maximum transfer rate]:speed' \
|
||||||
|
'--local-port[set preferred number or range of local ports to use]:num' \
|
||||||
|
{-N,--no-buffer}'[disable buffering of the output stream]' \
|
||||||
|
'--no-keepalive[disable use of keepalive messages in TCP connections]' \
|
||||||
|
'--raw[disable all http decoding and pass raw data]' \
|
||||||
|
'--resolve[provide a custom address for a specific host and port pair]:host\:port\:address' \
|
||||||
|
'--retry[specify maximum number of retries for transient errors]:num' \
|
||||||
|
'--retry-delay[specify delay between retries]:seconds' \
|
||||||
|
'--retry-max-time[maximum time to spend on retries]:seconds' \
|
||||||
|
'--tcp-nodelay[turn on TCP_NODELAY option]' \
|
||||||
|
{-y,--speed-time}'[specify time to abort after if download is slower than speed-limit]:time' \
|
||||||
|
{-Y,--speed-limit}'[specify minimum speed for --speed-time]:speed' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Authentication arguments
|
||||||
|
arg_auth=(\
|
||||||
|
'--anyauth[use any authentication method, default to most secure]' \
|
||||||
|
'--basic[use HTTP Basic authentication]' \
|
||||||
|
'--ntlm[enable ntlm authentication]' \
|
||||||
|
'--digest[use http digest authentication]' \
|
||||||
|
'--krb[use kerberos authentication]:auth:(clear safe confidential private)' \
|
||||||
|
'--negotiate[enable GSS-Negotiate authentication]' \
|
||||||
|
{-n,--netrc}'[scan ~/.netrc for login data]' \
|
||||||
|
'--netrc-optional[like --netrc, but does not make .netrc usage mandatory]' \
|
||||||
|
'--netrc-file[like --netrc, but specify file to use]:netrc file:_files' \
|
||||||
|
'--tr-encoding[request compressed transfer-encoding]' \
|
||||||
|
{-u,--user}'[specify user name and password for server authentication]:user\:password' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Input arguments
|
||||||
|
arg_input=(\
|
||||||
|
{-C,--continue-at}'[resume at offset ]:offset' \
|
||||||
|
{-g,--globoff}'[do not glob {}\[\] letters]' \
|
||||||
|
'--max-filesize[maximum filesize to download, fail for bigger files]:bytes' \
|
||||||
|
'--proto[specify allowed protocols for transfer]:protocols' \
|
||||||
|
'--proto-redir[specify allowed protocols for transfer after a redirect]:protocols' \
|
||||||
|
{-r,--range}'[set range of bytes to request (HTTP/FTP/SFTP/FILE)]:range' \
|
||||||
|
{-R,--remote-time}'[use timestamp of remote file for local file]' \
|
||||||
|
{-T,--upload-file}'[transfer file to remote url (using PUT for HTTP)]:file to upload:_files' \
|
||||||
|
'--url[specify a URL to fetch (multi)]:url:_urls' \
|
||||||
|
{-z,--time-cond}'[request downloaded file to be newer than date or given reference file]:date expression' \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Output arguments
|
||||||
|
arg_output=(\
|
||||||
|
'--create-dirs[create local directory hierarchy as needed]' \
|
||||||
|
{-D,--dump-header}'[write protocol headers to file]:dump file:_files' \
|
||||||
|
{-o,--output}'[write to specified file instead of stdout]:output file:_files' \
|
||||||
|
{--progress-bar,-\#}'[display progress as a simple progress bar]' \
|
||||||
|
{-\#,--progress-bar}'[Make curl display progress as a simple progress bar instead of the standard, more informational, meter.]' \
|
||||||
|
{-R,--remote-time}'[use timestamp of remote file for local file]' \
|
||||||
|
'--raw[disable all http decoding and pass raw data]' \
|
||||||
|
{-s,--silent}'[silent mode, do not show progress meter or error messages]' \
|
||||||
|
{-S,--show-error}'[show errors in silent mode]' \
|
||||||
|
'--stderr[redirect stderr to specified file]:output file:_files' \
|
||||||
|
'--trace[enable full trace dump of all incoming and outgoing data]:trace file:_files' \
|
||||||
|
'--trace-ascii[enable full trace dump of all incoming and outgoing data, without hex data]:trace file:_files' \
|
||||||
|
'--trace-time[prepends a time stamp to each trace or verbose line that curl displays]' \
|
||||||
|
{-v,--verbose}'[output debug info]' \
|
||||||
|
{-w,--write-out}'[specify message to output on successful operation]:format string' \
|
||||||
|
'--xattr[store some file metadata in extended file attributes]' \
|
||||||
|
{-X,--request}'[specifies request method for HTTP server]:method:(GET POST PUT DELETE HEAD OPTIONS TRACE CONNECT PATCH LINK UNLINK)' \
|
||||||
|
)
|
||||||
|
|
||||||
|
_arguments -C -s $arg_http $arg_ftp $arg_other $arg_crypto $arg_connection $arg_auth $arg_input $arg_output \
|
||||||
|
{-M,--manual}'[Print manual]' \
|
||||||
|
'*'{-K,--config}'[Use other config file to read arguments from]:config file:_files' \
|
||||||
|
'--libcurl[output libcurl code for the operation to file]:output file:_files' \
|
||||||
|
{-m,--max-time}'[Limit total time of operation]:seconds' \
|
||||||
|
{-s,--silent}'[Silent mode, do not show progress meter or error messages]' \
|
||||||
|
{-S,--show-error}'[Show errors in silent mode]' \
|
||||||
|
'--stderr[Redirect stderr to specified file]:output file:_files' \
|
||||||
|
'-q[Do not read settings from .curlrc (must be first option)]' \
|
||||||
|
{-h,--help}'[Print help and list of operations]' \
|
||||||
|
{-V,--version}'[Print service API version]' \
|
||||||
|
'--about[Print the information about service]' \
|
||||||
|
'--host[Specify the host URL]':URL:_urls \
|
||||||
|
'--dry-run[Print out the cURL command without executing it]' \
|
||||||
|
{-ac,--accept}'[Set the Accept header in the request]: :{_values "Accept mime type" $(get_mime_type_completions)}' \
|
||||||
|
{-ct,--content-type}'[Set the Content-type header in request]: :{_values "Content mime type" $(get_mime_type_completions)}' \
|
||||||
|
'1: :->ops' \
|
||||||
|
'*:: :->args' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
ops)
|
||||||
|
# Operations
|
||||||
|
_values "Operations" \
|
||||||
|
"123Test@$%SpecialTags[To test special tags]" "fooGet[]" "fakeHealthGet[Health check endpoint]" \
|
||||||
|
"fakeOuterBooleanSerialize[]" \
|
||||||
|
"fakeOuterCompositeSerialize[]" \
|
||||||
|
"fakeOuterNumberSerialize[]" \
|
||||||
|
"fakeOuterStringSerialize[]" \
|
||||||
|
"testBodyWithFileSchema[]" \
|
||||||
|
"testBodyWithQueryParams[]" \
|
||||||
|
"testClientModel[To test \"client\" model]" \
|
||||||
|
"testEndpointParameters[Fake endpoint for testing various parameters
|
||||||
|
假端點
|
||||||
|
偽のエンドポイント
|
||||||
|
가짜 엔드 포인트]" \
|
||||||
|
"testEnumParameters[To test enum parameters]" \
|
||||||
|
"testGroupParameters[Fake endpoint to test group parameters (optional)]" \
|
||||||
|
"testInlineAdditionalProperties[test inline additionalProperties]" \
|
||||||
|
"testJsonFormData[test json serialization of form data]" "testClassname[To test class name in snake case]" "addPet[Add a new pet to the store]" \
|
||||||
|
"deletePet[Deletes a pet]" \
|
||||||
|
"findPetsByStatus[Finds Pets by status]" \
|
||||||
|
"findPetsByTags[Finds Pets by tags]" \
|
||||||
|
"getPetById[Find pet by ID]" \
|
||||||
|
"updatePet[Update an existing pet]" \
|
||||||
|
"updatePetWithForm[Updates a pet in the store with form data]" \
|
||||||
|
"uploadFile[uploads an image]" \
|
||||||
|
"uploadFileWithRequiredFile[uploads an image (required)]" "deleteOrder[Delete purchase order by ID]" \
|
||||||
|
"getInventory[Returns pet inventories by status]" \
|
||||||
|
"getOrderById[Find purchase order by ID]" \
|
||||||
|
"placeOrder[Place an order for a pet]" "createUser[Create user]" \
|
||||||
|
"createUsersWithArrayInput[Creates list of users with given input array]" \
|
||||||
|
"createUsersWithListInput[Creates list of users with given input array]" \
|
||||||
|
"deleteUser[Delete user]" \
|
||||||
|
"getUserByName[Get user by user name]" \
|
||||||
|
"loginUser[Logs user into the system]" \
|
||||||
|
"logoutUser[Logs out current logged in user session]" \
|
||||||
|
"updateUser[Updated user]"
|
||||||
|
_arguments "(--help)--help[Print information about operation]"
|
||||||
|
|
||||||
|
ret=0
|
||||||
|
;;
|
||||||
|
args)
|
||||||
|
case $line[1] in
|
||||||
|
123Test@$%SpecialTags)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fooGet)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeHealthGet)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterBooleanSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterCompositeSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterNumberSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
fakeOuterStringSerialize)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testBodyWithFileSchema)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testBodyWithQueryParams)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"query=:[QUERY] "
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testClientModel)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testEndpointParameters)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testEnumParameters)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"enum_query_string_array=:[QUERY] Query parameter enum test (string array)"
|
||||||
|
"enum_query_string=:[QUERY] Query parameter enum test (string)"
|
||||||
|
"enum_query_integer=:[QUERY] Query parameter enum test (double)"
|
||||||
|
"enum_query_double=:[QUERY] Query parameter enum test (double)"
|
||||||
|
"enum_header_string_array\::[HEADER] Header parameter enum test (string array)"
|
||||||
|
"enum_header_string\::[HEADER] Header parameter enum test (string)"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testGroupParameters)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"required_string_group=:[QUERY] Required String in group parameters"
|
||||||
|
"required_int64_group=:[QUERY] Required Integer in group parameters"
|
||||||
|
"string_group=:[QUERY] String in group parameters"
|
||||||
|
"int64_group=:[QUERY] Integer in group parameters"
|
||||||
|
"required_boolean_group\::[HEADER] Required Boolean in group parameters"
|
||||||
|
"boolean_group\::[HEADER] Boolean in group parameters"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testInlineAdditionalProperties)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testJsonFormData)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testClassname)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
addPet)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
deletePet)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"petId=:[PATH] Pet id to delete"
|
||||||
|
"api_key\::[HEADER] "
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
findPetsByStatus)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"status=:[QUERY] Status values that need to be considered for filter"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
findPetsByTags)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"tags=:[QUERY] Tags to filter by"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
getPetById)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"petId=:[PATH] ID of pet to return"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
updatePet)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
updatePetWithForm)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"petId=:[PATH] ID of pet that needs to be updated"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
uploadFile)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"petId=:[PATH] ID of pet to update"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
uploadFileWithRequiredFile)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"petId=:[PATH] ID of pet to update"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
deleteOrder)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"order_id=:[PATH] ID of the order that needs to be deleted"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
getInventory)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
getOrderById)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"order_id=:[PATH] ID of pet that needs to be fetched"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
placeOrder)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
createUser)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
createUsersWithArrayInput)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
createUsersWithListInput)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
deleteUser)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"username=:[PATH] The name that needs to be deleted"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
getUserByName)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"username=:[PATH] The name that needs to be fetched. Use user1 for testing."
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
loginUser)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"username=:[QUERY] The user name for login"
|
||||||
|
"password=:[QUERY] The password for login in clear text"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
logoutUser)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
updateUser)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"username=:[PATH] name that need to be deleted"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
@ -296,10 +296,12 @@ case $state in
|
|||||||
ops)
|
ops)
|
||||||
# Operations
|
# Operations
|
||||||
_values "Operations" \
|
_values "Operations" \
|
||||||
"testSpecialTags[To test special tags]" "fakeOuterBooleanSerialize[]" \
|
"123Test@$%SpecialTags[To test special tags]" "createXmlItem[creates an XmlItem]" \
|
||||||
|
"fakeOuterBooleanSerialize[]" \
|
||||||
"fakeOuterCompositeSerialize[]" \
|
"fakeOuterCompositeSerialize[]" \
|
||||||
"fakeOuterNumberSerialize[]" \
|
"fakeOuterNumberSerialize[]" \
|
||||||
"fakeOuterStringSerialize[]" \
|
"fakeOuterStringSerialize[]" \
|
||||||
|
"testBodyWithFileSchema[]" \
|
||||||
"testBodyWithQueryParams[]" \
|
"testBodyWithQueryParams[]" \
|
||||||
"testClientModel[To test \"client\" model]" \
|
"testClientModel[To test \"client\" model]" \
|
||||||
"testEndpointParameters[Fake endpoint for testing various parameters
|
"testEndpointParameters[Fake endpoint for testing various parameters
|
||||||
@ -307,6 +309,7 @@ case $state in
|
|||||||
偽のエンドポイント
|
偽のエンドポイント
|
||||||
가짜 엔드 포인트]" \
|
가짜 엔드 포인트]" \
|
||||||
"testEnumParameters[To test enum parameters]" \
|
"testEnumParameters[To test enum parameters]" \
|
||||||
|
"testGroupParameters[Fake endpoint to test group parameters (optional)]" \
|
||||||
"testInlineAdditionalProperties[test inline additionalProperties]" \
|
"testInlineAdditionalProperties[test inline additionalProperties]" \
|
||||||
"testJsonFormData[test json serialization of form data]" "testClassname[To test class name in snake case]" "addPet[Add a new pet to the store]" \
|
"testJsonFormData[test json serialization of form data]" "testClassname[To test class name in snake case]" "addPet[Add a new pet to the store]" \
|
||||||
"deletePet[Deletes a pet]" \
|
"deletePet[Deletes a pet]" \
|
||||||
@ -315,7 +318,8 @@ case $state in
|
|||||||
"getPetById[Find pet by ID]" \
|
"getPetById[Find pet by ID]" \
|
||||||
"updatePet[Update an existing pet]" \
|
"updatePet[Update an existing pet]" \
|
||||||
"updatePetWithForm[Updates a pet in the store with form data]" \
|
"updatePetWithForm[Updates a pet in the store with form data]" \
|
||||||
"uploadFile[uploads an image]" "deleteOrder[Delete purchase order by ID]" \
|
"uploadFile[uploads an image]" \
|
||||||
|
"uploadFileWithRequiredFile[uploads an image (required)]" "deleteOrder[Delete purchase order by ID]" \
|
||||||
"getInventory[Returns pet inventories by status]" \
|
"getInventory[Returns pet inventories by status]" \
|
||||||
"getOrderById[Find purchase order by ID]" \
|
"getOrderById[Find purchase order by ID]" \
|
||||||
"placeOrder[Place an order for a pet]" "createUser[Create user]" \
|
"placeOrder[Place an order for a pet]" "createUser[Create user]" \
|
||||||
@ -332,7 +336,13 @@ case $state in
|
|||||||
;;
|
;;
|
||||||
args)
|
args)
|
||||||
case $line[1] in
|
case $line[1] in
|
||||||
testSpecialTags)
|
123Test@$%SpecialTags)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
createXmlItem)
|
||||||
local -a _op_arguments
|
local -a _op_arguments
|
||||||
_op_arguments=(
|
_op_arguments=(
|
||||||
)
|
)
|
||||||
@ -362,6 +372,12 @@ case $state in
|
|||||||
)
|
)
|
||||||
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
;;
|
;;
|
||||||
|
testBodyWithFileSchema)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
testBodyWithQueryParams)
|
testBodyWithQueryParams)
|
||||||
local -a _op_arguments
|
local -a _op_arguments
|
||||||
_op_arguments=(
|
_op_arguments=(
|
||||||
@ -390,6 +406,18 @@ case $state in
|
|||||||
"enum_query_double=:[QUERY] Query parameter enum test (double)"
|
"enum_query_double=:[QUERY] Query parameter enum test (double)"
|
||||||
"enum_header_string_array\::[HEADER] Header parameter enum test (string array)"
|
"enum_header_string_array\::[HEADER] Header parameter enum test (string array)"
|
||||||
"enum_header_string\::[HEADER] Header parameter enum test (string)"
|
"enum_header_string\::[HEADER] Header parameter enum test (string)"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
|
testGroupParameters)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"required_string_group=:[QUERY] Required String in group parameters"
|
||||||
|
"required_int64_group=:[QUERY] Required Integer in group parameters"
|
||||||
|
"string_group=:[QUERY] String in group parameters"
|
||||||
|
"int64_group=:[QUERY] Integer in group parameters"
|
||||||
|
"required_boolean_group\::[HEADER] Required Boolean in group parameters"
|
||||||
|
"boolean_group\::[HEADER] Boolean in group parameters"
|
||||||
)
|
)
|
||||||
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
;;
|
;;
|
||||||
@ -466,6 +494,13 @@ case $state in
|
|||||||
)
|
)
|
||||||
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
;;
|
;;
|
||||||
|
uploadFileWithRequiredFile)
|
||||||
|
local -a _op_arguments
|
||||||
|
_op_arguments=(
|
||||||
|
"petId=:[PATH] ID of pet to update"
|
||||||
|
)
|
||||||
|
_describe -t actions 'operations' _op_arguments -S '' && ret=0
|
||||||
|
;;
|
||||||
deleteOrder)
|
deleteOrder)
|
||||||
local -a _op_arguments
|
local -a _op_arguments
|
||||||
_op_arguments=(
|
_op_arguments=(
|
||||||
|
4003
samples/client/petstore/bash/client.sh
Normal file
4003
samples/client/petstore/bash/client.sh
Normal file
File diff suppressed because it is too large
Load Diff
326
samples/client/petstore/bash/client.sh.bash-completion
Normal file
326
samples/client/petstore/bash/client.sh.bash-completion
Normal file
@ -0,0 +1,326 @@
|
|||||||
|
# completion -*- shell-script -*-
|
||||||
|
|
||||||
|
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
# !
|
||||||
|
# ! Note:
|
||||||
|
# !
|
||||||
|
# ! THIS SCRIPT HAS BEEN AUTOMATICALLY GENERATED USING
|
||||||
|
# ! openapi-generator (https://openapi-generator.tech)
|
||||||
|
# ! FROM OPENAPI SPECIFICATION IN JSON.
|
||||||
|
# !
|
||||||
|
# !
|
||||||
|
# !
|
||||||
|
# ! System wide installation:
|
||||||
|
# !
|
||||||
|
# ! $ sudo cp .bash-completion /etc/bash-completion.d/
|
||||||
|
# !
|
||||||
|
# !
|
||||||
|
# ! User home installation (add this line to .bash_profile):
|
||||||
|
# !
|
||||||
|
# ! [ -r ~/.bash-completion ] && source ~/.bash-completion
|
||||||
|
# !
|
||||||
|
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
declare -A mime_type_abbreviations
|
||||||
|
# text/*
|
||||||
|
mime_type_abbreviations["text"]="text/plain"
|
||||||
|
mime_type_abbreviations["html"]="text/html"
|
||||||
|
mime_type_abbreviations["md"]="text/x-markdown"
|
||||||
|
mime_type_abbreviations["csv"]="text/csv"
|
||||||
|
mime_type_abbreviations["css"]="text/css"
|
||||||
|
mime_type_abbreviations["rtf"]="text/rtf"
|
||||||
|
# application/*
|
||||||
|
mime_type_abbreviations["json"]="application/json"
|
||||||
|
mime_type_abbreviations["xml"]="application/xml"
|
||||||
|
mime_type_abbreviations["yaml"]="application/yaml"
|
||||||
|
mime_type_abbreviations["js"]="application/javascript"
|
||||||
|
mime_type_abbreviations["bin"]="application/octet-stream"
|
||||||
|
mime_type_abbreviations["rdf"]="application/rdf+xml"
|
||||||
|
# image/*
|
||||||
|
mime_type_abbreviations["jpg"]="image/jpeg"
|
||||||
|
mime_type_abbreviations["png"]="image/png"
|
||||||
|
mime_type_abbreviations["gif"]="image/gif"
|
||||||
|
mime_type_abbreviations["bmp"]="image/bmp"
|
||||||
|
mime_type_abbreviations["tiff"]="image/tiff"
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if this is OSX, if so defined custom init_completion
|
||||||
|
#
|
||||||
|
if [[ `uname` =~ "Darwin" ]]; then
|
||||||
|
__osx_init_completion()
|
||||||
|
{
|
||||||
|
COMPREPLY=()
|
||||||
|
_get_comp_words_by_ref cur prev words cword
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
_()
|
||||||
|
{
|
||||||
|
local cur
|
||||||
|
local prev
|
||||||
|
local words
|
||||||
|
local cword
|
||||||
|
|
||||||
|
# The reference of currently selected REST operation
|
||||||
|
local operation=""
|
||||||
|
|
||||||
|
# The list of available operation in the REST service
|
||||||
|
# It's modelled as an associative array for efficient key lookup
|
||||||
|
declare -A operations
|
||||||
|
operations["123Test@$%SpecialTags"]=1
|
||||||
|
operations["fooGet"]=1
|
||||||
|
operations["fakeHealthGet"]=1
|
||||||
|
operations["fakeOuterBooleanSerialize"]=1
|
||||||
|
operations["fakeOuterCompositeSerialize"]=1
|
||||||
|
operations["fakeOuterNumberSerialize"]=1
|
||||||
|
operations["fakeOuterStringSerialize"]=1
|
||||||
|
operations["testBodyWithFileSchema"]=1
|
||||||
|
operations["testBodyWithQueryParams"]=1
|
||||||
|
operations["testClientModel"]=1
|
||||||
|
operations["testEndpointParameters"]=1
|
||||||
|
operations["testEnumParameters"]=1
|
||||||
|
operations["testGroupParameters"]=1
|
||||||
|
operations["testInlineAdditionalProperties"]=1
|
||||||
|
operations["testJsonFormData"]=1
|
||||||
|
operations["testClassname"]=1
|
||||||
|
operations["addPet"]=1
|
||||||
|
operations["deletePet"]=1
|
||||||
|
operations["findPetsByStatus"]=1
|
||||||
|
operations["findPetsByTags"]=1
|
||||||
|
operations["getPetById"]=1
|
||||||
|
operations["updatePet"]=1
|
||||||
|
operations["updatePetWithForm"]=1
|
||||||
|
operations["uploadFile"]=1
|
||||||
|
operations["uploadFileWithRequiredFile"]=1
|
||||||
|
operations["deleteOrder"]=1
|
||||||
|
operations["getInventory"]=1
|
||||||
|
operations["getOrderById"]=1
|
||||||
|
operations["placeOrder"]=1
|
||||||
|
operations["createUser"]=1
|
||||||
|
operations["createUsersWithArrayInput"]=1
|
||||||
|
operations["createUsersWithListInput"]=1
|
||||||
|
operations["deleteUser"]=1
|
||||||
|
operations["getUserByName"]=1
|
||||||
|
operations["loginUser"]=1
|
||||||
|
operations["logoutUser"]=1
|
||||||
|
operations["updateUser"]=1
|
||||||
|
|
||||||
|
# An associative array of operations to their parameters
|
||||||
|
# Only include path, query and header parameters
|
||||||
|
declare -A operation_parameters
|
||||||
|
operation_parameters["123Test@$%SpecialTags"]=""
|
||||||
|
operation_parameters["fooGet"]=""
|
||||||
|
operation_parameters["fakeHealthGet"]=""
|
||||||
|
operation_parameters["fakeOuterBooleanSerialize"]=""
|
||||||
|
operation_parameters["fakeOuterCompositeSerialize"]=""
|
||||||
|
operation_parameters["fakeOuterNumberSerialize"]=""
|
||||||
|
operation_parameters["fakeOuterStringSerialize"]=""
|
||||||
|
operation_parameters["testBodyWithFileSchema"]=""
|
||||||
|
operation_parameters["testBodyWithQueryParams"]="query= "
|
||||||
|
operation_parameters["testClientModel"]=""
|
||||||
|
operation_parameters["testEndpointParameters"]=""
|
||||||
|
operation_parameters["testEnumParameters"]="enum_query_string_array= enum_query_string= enum_query_integer= enum_query_double= enum_header_string_array: enum_header_string: "
|
||||||
|
operation_parameters["testGroupParameters"]="required_string_group= required_int64_group= string_group= int64_group= required_boolean_group: boolean_group: "
|
||||||
|
operation_parameters["testInlineAdditionalProperties"]=""
|
||||||
|
operation_parameters["testJsonFormData"]=""
|
||||||
|
operation_parameters["testClassname"]=""
|
||||||
|
operation_parameters["addPet"]=""
|
||||||
|
operation_parameters["deletePet"]="petId= api_key: "
|
||||||
|
operation_parameters["findPetsByStatus"]="status= "
|
||||||
|
operation_parameters["findPetsByTags"]="tags= "
|
||||||
|
operation_parameters["getPetById"]="petId= "
|
||||||
|
operation_parameters["updatePet"]=""
|
||||||
|
operation_parameters["updatePetWithForm"]="petId= "
|
||||||
|
operation_parameters["uploadFile"]="petId= "
|
||||||
|
operation_parameters["uploadFileWithRequiredFile"]="petId= "
|
||||||
|
operation_parameters["deleteOrder"]="order_id= "
|
||||||
|
operation_parameters["getInventory"]=""
|
||||||
|
operation_parameters["getOrderById"]="order_id= "
|
||||||
|
operation_parameters["placeOrder"]=""
|
||||||
|
operation_parameters["createUser"]=""
|
||||||
|
operation_parameters["createUsersWithArrayInput"]=""
|
||||||
|
operation_parameters["createUsersWithListInput"]=""
|
||||||
|
operation_parameters["deleteUser"]="username= "
|
||||||
|
operation_parameters["getUserByName"]="username= "
|
||||||
|
operation_parameters["loginUser"]="username= password= "
|
||||||
|
operation_parameters["logoutUser"]=""
|
||||||
|
operation_parameters["updateUser"]="username= "
|
||||||
|
|
||||||
|
# An associative array of possible values for enum parameters
|
||||||
|
declare -A operation_parameters_enum_values
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if this is OSX and use special __osx_init_completion function
|
||||||
|
#
|
||||||
|
if [[ `uname` =~ "Darwin" ]]; then
|
||||||
|
__osx_init_completion || return
|
||||||
|
else
|
||||||
|
_init_completion -s || return
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check if operation is already in the command line provided
|
||||||
|
for word in "${words[@]}"; do
|
||||||
|
if [[ -n $word && ${operations[$word]} ]]; then
|
||||||
|
operation="${word}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z $operation ]]; then
|
||||||
|
case $prev in
|
||||||
|
--ciphers|--connect-timeout|-C|--continue-at|-F|--form|--form-string|\
|
||||||
|
--ftp-account|--ftp-alternative-to-user|-P|--ftp-port|-H|--header|-h|\
|
||||||
|
--help|--hostpubmd5|--keepalive-time|--krb|--limit-rate|--local-port|\
|
||||||
|
--mail-from|--mail-rcpt|--max-filesize|--max-redirs|-m|--max-time|\
|
||||||
|
--pass|--proto|--proto-redir|--proxy-user|--proxy1.0|-Q|--quote|-r|\
|
||||||
|
--range|-X|--request|--retry|--retry-delay|--retry-max-time|\
|
||||||
|
--socks5-gssapi-service|-t|--telnet-option|--tftp-blksize|-z|\
|
||||||
|
--time-cond|--url|-u|--user|-A|--user-agent|-V|--version|-w|\
|
||||||
|
--write-out|--resolve|--tlsuser|--tlspassword|--about)
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
-K|--config|-b|--cookie|-c|--cookie-jar|-D|--dump-header|--egd-file|\
|
||||||
|
--key|--libcurl|-o|--output|--random-file|-T|--upload-file|--trace|\
|
||||||
|
--trace-ascii|--netrc-file)
|
||||||
|
_filedir
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--cacert|-E|--cert)
|
||||||
|
_filedir '@(c?(e)rt|cer|pem|der)'
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--capath)
|
||||||
|
_filedir -d
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--cert-type|--key-type)
|
||||||
|
COMPREPLY=( $( compgen -W 'DER PEM ENG' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--crlfile)
|
||||||
|
_filedir crl
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
-d|--data|--data-ascii|--data-binary|--data-urlencode)
|
||||||
|
if [[ $cur == \@* ]]; then
|
||||||
|
cur=${cur:1}
|
||||||
|
_filedir
|
||||||
|
COMPREPLY=( "${COMPREPLY[@]/#/@}" )
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--delegation)
|
||||||
|
COMPREPLY=( $( compgen -W 'none policy always' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--engine)
|
||||||
|
COMPREPLY=( $( compgen -W 'list' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--ftp-method)
|
||||||
|
COMPREPLY=( $( compgen -W 'multicwd nocwd singlecwd' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--ftp-ssl-ccc-mode)
|
||||||
|
COMPREPLY=( $( compgen -W 'active passive' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--interface)
|
||||||
|
_available_interfaces -a
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
-x|--proxy|--socks4|--socks4a|--socks5|--socks5-hostname)
|
||||||
|
_known_hosts_real
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--pubkey)
|
||||||
|
_filedir pub
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--stderr)
|
||||||
|
COMPREPLY=( $( compgen -W '-' -- "$cur" ) )
|
||||||
|
_filedir
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--tlsauthtype)
|
||||||
|
COMPREPLY=( $( compgen -W 'SRP' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
--host)
|
||||||
|
COMPREPLY=( $( compgen -W 'http:// https://' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
-ct|--content-type|-ac|--accept)
|
||||||
|
COMPREPLY=( $( compgen -W '${!mime_type_abbreviations[*]}' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the server address based on ~/.ssh/known_hosts
|
||||||
|
# and ~/.ssh/config
|
||||||
|
#
|
||||||
|
local prefix=${COMP_WORDS[COMP_CWORD-2]}
|
||||||
|
local colon=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
if [[ "$colon" == ":" && ( $prefix == "https" || $prefix == "http" ) ]]; then
|
||||||
|
COMPREPLY=()
|
||||||
|
local comp_ssh_hosts=`[[ -f ~/.ssh/known_hosts ]] && \
|
||||||
|
( cat ~/.ssh/known_hosts | \
|
||||||
|
grep '^[a-zA-Z0-9]' | \
|
||||||
|
cut -f 1 -d ' ' | \
|
||||||
|
sed -e s/,.*//g | \
|
||||||
|
grep -v ^# | \
|
||||||
|
uniq | \
|
||||||
|
grep -v "\[" ) ;
|
||||||
|
[[ -f ~/.ssh/config ]] && \
|
||||||
|
( cat ~/.ssh/config | \
|
||||||
|
grep "^Host " | \
|
||||||
|
awk '{print $2}' )`
|
||||||
|
COMPREPLY=( $( compgen -P '//' -W '${comp_ssh_hosts}' -- "${cur:2}") )
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Complete the and cURL's arguments
|
||||||
|
#
|
||||||
|
if [[ $cur == -* ]]; then
|
||||||
|
COMPREPLY=( $( compgen -W '$(_parse_help curl) $(_parse_help $1)' -- "$cur" ) )
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# If the argument starts with a letter this could be either an operation
|
||||||
|
# or an operation parameter
|
||||||
|
# When $cur is empty, suggest the list of operations by default
|
||||||
|
#
|
||||||
|
if [[ $cur =~ ^[A-Za-z_0-9]* ]]; then
|
||||||
|
# If operation has not been yet selected, suggest the list of operations
|
||||||
|
# otherwise suggest arguments of this operation as declared in the
|
||||||
|
# OpenAPI specification
|
||||||
|
if [[ -z $operation ]]; then
|
||||||
|
COMPREPLY=( $(compgen -W '${!operations[*]}' -- ${cur}) )
|
||||||
|
else
|
||||||
|
COMPREPLY=( $(compgen -W '${operation_parameters[$operation]}' -- ${cur}) )
|
||||||
|
compopt -o nospace
|
||||||
|
fi
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
} &&
|
||||||
|
complete -F _
|
||||||
|
|
||||||
|
# ex: ts=4 sw=4 et filetype=sh
|
10
samples/client/petstore/bash/docs/$special[modelName].md
Normal file
10
samples/client/petstore/bash/docs/$special[modelName].md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# $special[model.name]
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**DollarspecialLeft_Square_BracketpropertyPeriodnameRight_Square_Bracket** | **integer** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
samples/client/petstore/bash/docs/200Response.md
Normal file
11
samples/client/petstore/bash/docs/200Response.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# 200_response
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **integer** | | [optional] [default to null]
|
||||||
|
**class** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesAnyType
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesArray
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesBoolean
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -3,8 +3,17 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**map_property** | **map[String, string]** | | [optional] [default to null]
|
**mapUnderscorestring** | **map[String, string]** | | [optional] [default to null]
|
||||||
**map_of_map_property** | **map[String, map[String, string]]** | | [optional] [default to null]
|
**mapUnderscorenumber** | **map[String, integer]** | | [optional] [default to null]
|
||||||
|
**mapUnderscoreinteger** | **map[String, integer]** | | [optional] [default to null]
|
||||||
|
**mapUnderscoreboolean** | **map[String, boolean]** | | [optional] [default to null]
|
||||||
|
**mapUnderscorearrayUnderscoreinteger** | **map[String, array[integer]]** | | [optional] [default to null]
|
||||||
|
**mapUnderscorearrayUnderscoreanytype** | **map[String, array[map]]** | | [optional] [default to null]
|
||||||
|
**mapUnderscoremapUnderscorestring** | **map[String, map[String, string]]** | | [optional] [default to null]
|
||||||
|
**mapUnderscoremapUnderscoreanytype** | **map[String, map[String, map]]** | | [optional] [default to null]
|
||||||
|
**anytypeUnderscore1** | [**map**](.md) | | [optional] [default to null]
|
||||||
|
**anytypeUnderscore2** | [**map**](.md) | | [optional] [default to null]
|
||||||
|
**anytypeUnderscore3** | [**map**](.md) | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesInteger
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesNumber
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesObject
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
|||||||
|
# AdditionalPropertiesString
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -4,25 +4,28 @@ All URIs are relative to */v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
[**123Test@$%SpecialTags**](AnotherFakeApi.md#123Test@$%SpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
|
|
||||||
|
|
||||||
## **testSpecialTags**
|
|
||||||
|
## 123Test@$%SpecialTags
|
||||||
|
|
||||||
To test special tags
|
To test special tags
|
||||||
|
|
||||||
To test special tags
|
To test special tags and operation ID starting with number
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testSpecialTags
|
petstore-cli 123Test@$%SpecialTags
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**client** | [**Client**](Client.md) | client model |
|
**body** | [**Client**](Client.md) | client model |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -34,8 +37,8 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**array_of_string** | **array[string]** | | [optional] [default to null]
|
**arrayUnderscoreofUnderscorestring** | **array[string]** | | [optional] [default to null]
|
||||||
**array_array_of_integer** | **array[array[integer]]** | | [optional] [default to null]
|
**arrayUnderscorearrayUnderscoreofUnderscoreinteger** | **array[array[integer]]** | | [optional] [default to null]
|
||||||
**array_array_of_model** | **array[array[ReadOnlyFirst]]** | | [optional] [default to null]
|
**arrayUnderscorearrayUnderscoreofUnderscoremodel** | **array[array[ReadOnlyFirst]]** | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Name | Type | Description | Notes
|
|||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**smallCamel** | **string** | | [optional] [default to null]
|
**smallCamel** | **string** | | [optional] [default to null]
|
||||||
**CapitalCamel** | **string** | | [optional] [default to null]
|
**CapitalCamel** | **string** | | [optional] [default to null]
|
||||||
**small_Snake** | **string** | | [optional] [default to null]
|
**smallUnderscoreSnake** | **string** | | [optional] [default to null]
|
||||||
**Capital_Snake** | **string** | | [optional] [default to null]
|
**CapitalUnderscoreSnake** | **string** | | [optional] [default to null]
|
||||||
**SCA_ETH_Flow_Points** | **string** | | [optional] [default to null]
|
**SCAUnderscoreETHUnderscoreFlowUnderscorePoints** | **string** | | [optional] [default to null]
|
||||||
**ATT_NAME** | **string** | | [optional] [default to null]
|
**ATTUnderscoreNAME** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
10
samples/client/petstore/bash/docs/CatAllOf.md
Normal file
10
samples/client/petstore/bash/docs/CatAllOf.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Cat_allOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**declawed** | **boolean** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**id** | **integer** | | [optional] [default to null]
|
**id** | **integer** | | [optional] [default to null]
|
||||||
**name** | **string** | | [optional] [default to null]
|
**name** | **string** | | [default to default-name]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**_class** | **string** | | [optional] [default to null]
|
**Underscoreclass** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
39
samples/client/petstore/bash/docs/DefaultApi.md
Normal file
39
samples/client/petstore/bash/docs/DefaultApi.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# DefaultApi
|
||||||
|
|
||||||
|
All URIs are relative to */v2*
|
||||||
|
|
||||||
|
Method | HTTP request | Description
|
||||||
|
------------- | ------------- | -------------
|
||||||
|
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## fooGet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
fooGet
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not Applicable
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
10
samples/client/petstore/bash/docs/DogAllOf.md
Normal file
10
samples/client/petstore/bash/docs/DogAllOf.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Dog_allOf
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**breed** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**just_symbol** | **string** | | [optional] [default to null]
|
**justUnderscoresymbol** | **string** | | [optional] [default to null]
|
||||||
**array_enum** | **array[string]** | | [optional] [default to null]
|
**arrayUnderscoreenum** | **array[string]** | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
14
samples/client/petstore/bash/docs/EnumTest.md
Normal file
14
samples/client/petstore/bash/docs/EnumTest.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Enum_Test
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**enumUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
|
**enumUnderscorestringUnderscorerequired** | **string** | | [default to null]
|
||||||
|
**enumUnderscoreinteger** | **integer** | | [optional] [default to null]
|
||||||
|
**enumUnderscorenumber** | **float** | | [optional] [default to null]
|
||||||
|
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -4,10 +4,12 @@ All URIs are relative to */v2*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||||
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||||
|
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters
|
||||||
@ -15,23 +17,62 @@ Method | HTTP request | Description
|
|||||||
偽のエンドポイント
|
偽のエンドポイント
|
||||||
가짜 엔드 포인트
|
가짜 엔드 포인트
|
||||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||||
|
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||||
|
|
||||||
|
|
||||||
## **fakeOuterBooleanSerialize**
|
|
||||||
|
## createXmlItem
|
||||||
|
|
||||||
|
creates an XmlItem
|
||||||
|
|
||||||
|
this route creates an XmlItem
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
petstore-cli createXmlItem
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**xmlItem** | [**XmlItem**](XmlItem.md) | XmlItem Body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
|
||||||
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## fakeOuterBooleanSerialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer boolean types
|
Test serialization of outer boolean types
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli fakeOuterBooleanSerialize
|
petstore-cli fakeOuterBooleanSerialize
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **boolean** | Input boolean as post body | [optional]
|
**body** | **boolean** | Input boolean as post body | [optional]
|
||||||
@ -46,27 +87,30 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **fakeOuterCompositeSerialize**
|
|
||||||
|
## fakeOuterCompositeSerialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of object with outer number type
|
Test serialization of object with outer number type
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli fakeOuterCompositeSerialize
|
petstore-cli fakeOuterCompositeSerialize
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**outerComposite** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional]
|
**body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -78,24 +122,27 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **fakeOuterNumberSerialize**
|
|
||||||
|
## fakeOuterNumberSerialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer number types
|
Test serialization of outer number types
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli fakeOuterNumberSerialize
|
petstore-cli fakeOuterNumberSerialize
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **integer** | Input number as post body | [optional]
|
**body** | **integer** | Input number as post body | [optional]
|
||||||
@ -110,24 +157,27 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **fakeOuterStringSerialize**
|
|
||||||
|
## fakeOuterStringSerialize
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Test serialization of outer string types
|
Test serialization of outer string types
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli fakeOuterStringSerialize
|
petstore-cli fakeOuterStringSerialize
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | **string** | Input string as post body | [optional]
|
**body** | **string** | Input string as post body | [optional]
|
||||||
@ -142,26 +192,30 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: */*
|
- **Accept**: */*
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **testBodyWithQueryParams**
|
|
||||||
|
## testBodyWithFileSchema
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
For this test, the body for this request much reference a schema named 'File'.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testBodyWithQueryParams query=value
|
petstore-cli testBodyWithFileSchema
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**query** | **string** | |
|
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | |
|
||||||
**user** | [**User**](User.md) | |
|
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -173,27 +227,64 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **testClientModel**
|
|
||||||
|
## testBodyWithQueryParams
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
petstore-cli testBodyWithQueryParams query=value
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**query** | **string** | | [default to null]
|
||||||
|
**body** | [**User**](User.md) | |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## testClientModel
|
||||||
|
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
To test \"client\" model
|
To test \"client\" model
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testClientModel
|
petstore-cli testClientModel
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**client** | [**Client**](Client.md) | client model |
|
**body** | [**Client**](Client.md) | client model |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -205,12 +296,13 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **testEndpointParameters**
|
|
||||||
|
## testEndpointParameters
|
||||||
|
|
||||||
Fake endpoint for testing various parameters
|
Fake endpoint for testing various parameters
|
||||||
假端點
|
假端點
|
||||||
@ -223,12 +315,14 @@ Fake endpoint for testing various parameters
|
|||||||
가짜 엔드 포인트
|
가짜 엔드 포인트
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testEndpointParameters
|
petstore-cli testEndpointParameters
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**number** | **integer** | None | [default to null]
|
**number** | **integer** | None | [default to null]
|
||||||
@ -256,33 +350,36 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **testEnumParameters**
|
|
||||||
|
## testEnumParameters
|
||||||
|
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
To test enum parameters
|
To test enum parameters
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testEnumParameters enum_header_string_array:value enum_header_string:value Specify as: enum_query_string_array="value1,value2,..." enum_query_string=value enum_query_integer=value enum_query_double=value
|
petstore-cli testEnumParameters enum_header_string_array:value enum_header_string:value Specify as: enum_query_string_array="value1,value2,..." enum_query_string=value enum_query_integer=value enum_query_double=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**enumHeaderStringArray** | [**array[string]**](string.md) | Header parameter enum test (string array) | [optional]
|
**enumHeaderStringArray** | [**array[string]**](string.md) | Header parameter enum test (string array) | [optional] [default to null]
|
||||||
**enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg]
|
**enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryStringArray** | [**array[string]**](string.md) | Query parameter enum test (string array) | [optional]
|
**enumQueryStringArray** | [**array[string]**](string.md) | Query parameter enum test (string array) | [optional] [default to null]
|
||||||
**enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg]
|
**enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg]
|
||||||
**enumQueryInteger** | **integer** | Query parameter enum test (double) | [optional]
|
**enumQueryInteger** | **integer** | Query parameter enum test (double) | [optional] [default to null]
|
||||||
**enumQueryDouble** | **float** | Query parameter enum test (double) | [optional]
|
**enumQueryDouble** | **float** | Query parameter enum test (double) | [optional] [default to null]
|
||||||
**enumFormStringArray** | **array[string]** | Form parameter enum test (string array) | [optional] [default to $]
|
**enumFormStringArray** | [**array[string]**](string.md) | Form parameter enum test (string array) | [optional] [default to $]
|
||||||
**enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg]
|
**enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
@ -295,25 +392,35 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **testInlineAdditionalProperties**
|
|
||||||
|
|
||||||
test inline additionalProperties
|
## testGroupParameters
|
||||||
|
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
|
Fake endpoint to test group parameters (optional)
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testInlineAdditionalProperties
|
petstore-cli testGroupParameters required_string_group=value required_boolean_group:value required_int64_group=value string_group=value boolean_group:value int64_group=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**requestBody** | [**map[String, string]**](string.md) | request body |
|
**requiredStringGroup** | **integer** | Required String in group parameters | [default to null]
|
||||||
|
**requiredBooleanGroup** | **boolean** | Required Boolean in group parameters | [default to null]
|
||||||
|
**requiredInt64Group** | **integer** | Required Integer in group parameters | [default to null]
|
||||||
|
**stringGroup** | **integer** | String in group parameters | [optional] [default to null]
|
||||||
|
**booleanGroup** | **boolean** | Boolean in group parameters | [optional] [default to null]
|
||||||
|
**int64Group** | **integer** | Integer in group parameters | [optional] [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -325,22 +432,58 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **testJsonFormData**
|
|
||||||
|
## testInlineAdditionalProperties
|
||||||
|
|
||||||
|
test inline additionalProperties
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
petstore-cli testInlineAdditionalProperties
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**param** | [**map[String, string]**](string.md) | request body |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
(empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json
|
||||||
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## testJsonFormData
|
||||||
|
|
||||||
test json serialization of form data
|
test json serialization of form data
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testJsonFormData
|
petstore-cli testJsonFormData
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**param** | **string** | field1 | [default to null]
|
**param** | **string** | field1 | [default to null]
|
||||||
@ -356,8 +499,8 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -7,22 +7,25 @@ Method | HTTP request | Description
|
|||||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||||
|
|
||||||
|
|
||||||
## **testClassname**
|
|
||||||
|
## testClassname
|
||||||
|
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
To test class name in snake case
|
To test class name in snake case
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli testClassname
|
petstore-cli testClassname
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**client** | [**Client**](Client.md) | client model |
|
**body** | [**Client**](Client.md) | client model |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -34,8 +37,8 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
11
samples/client/petstore/bash/docs/FileSchemaTestClass.md
Normal file
11
samples/client/petstore/bash/docs/FileSchemaTestClass.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# FileSchemaTestClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**file** | [**File**](File.md) | | [optional] [default to null]
|
||||||
|
**files** | [**array[File]**](File.md) | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
samples/client/petstore/bash/docs/Foo.md
Normal file
10
samples/client/petstore/bash/docs/Foo.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# Foo
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**bar** | **string** | | [optional] [default to bar]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
22
samples/client/petstore/bash/docs/FormatTest.md
Normal file
22
samples/client/petstore/bash/docs/FormatTest.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# format_test
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**integer** | **integer** | | [optional] [default to null]
|
||||||
|
**int32** | **integer** | | [optional] [default to null]
|
||||||
|
**int64** | **integer** | | [optional] [default to null]
|
||||||
|
**number** | **integer** | | [default to null]
|
||||||
|
**float** | **float** | | [optional] [default to null]
|
||||||
|
**double** | **float** | | [optional] [default to null]
|
||||||
|
**string** | **string** | | [optional] [default to null]
|
||||||
|
**byte** | **string** | | [default to null]
|
||||||
|
**binary** | **binary** | | [optional] [default to null]
|
||||||
|
**date** | **string** | | [default to null]
|
||||||
|
**dateTime** | **string** | | [optional] [default to null]
|
||||||
|
**uuid** | **string** | | [optional] [default to null]
|
||||||
|
**password** | **string** | | [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
samples/client/petstore/bash/docs/HealthCheckResult.md
Normal file
10
samples/client/petstore/bash/docs/HealthCheckResult.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# HealthCheckResult
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**NullableMessage** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
samples/client/petstore/bash/docs/InlineObject.md
Normal file
11
samples/client/petstore/bash/docs/InlineObject.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# inline_object
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**name** | **string** | | [optional] [default to null]
|
||||||
|
**status** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
samples/client/petstore/bash/docs/InlineObject1.md
Normal file
11
samples/client/petstore/bash/docs/InlineObject1.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# inline_object_1
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**additionalMetadata** | **string** | | [optional] [default to null]
|
||||||
|
**file** | **binary** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
samples/client/petstore/bash/docs/InlineObject2.md
Normal file
11
samples/client/petstore/bash/docs/InlineObject2.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# inline_object_2
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**enumUnderscoreformUnderscorestringUnderscorearray** | **array[string]** | | [optional] [default to null]
|
||||||
|
**enumUnderscoreformUnderscorestring** | **string** | | [optional] [default to -efg]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
23
samples/client/petstore/bash/docs/InlineObject3.md
Normal file
23
samples/client/petstore/bash/docs/InlineObject3.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# inline_object_3
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**integer** | **integer** | | [optional] [default to null]
|
||||||
|
**int32** | **integer** | | [optional] [default to null]
|
||||||
|
**int64** | **integer** | | [optional] [default to null]
|
||||||
|
**number** | **integer** | | [default to null]
|
||||||
|
**float** | **float** | | [optional] [default to null]
|
||||||
|
**double** | **float** | | [default to null]
|
||||||
|
**string** | **string** | | [optional] [default to null]
|
||||||
|
**patternUnderscorewithoutUnderscoredelimiter** | **string** | | [default to null]
|
||||||
|
**byte** | **string** | | [default to null]
|
||||||
|
**binary** | **binary** | | [optional] [default to null]
|
||||||
|
**date** | **string** | | [optional] [default to null]
|
||||||
|
**dateTime** | **string** | | [optional] [default to null]
|
||||||
|
**password** | **string** | | [optional] [default to null]
|
||||||
|
**callback** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
samples/client/petstore/bash/docs/InlineObject4.md
Normal file
11
samples/client/petstore/bash/docs/InlineObject4.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# inline_object_4
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**param** | **string** | | [default to null]
|
||||||
|
**param2** | **string** | | [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
11
samples/client/petstore/bash/docs/InlineObject5.md
Normal file
11
samples/client/petstore/bash/docs/InlineObject5.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# inline_object_5
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**additionalMetadata** | **string** | | [optional] [default to null]
|
||||||
|
**requiredFile** | **binary** | | [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
10
samples/client/petstore/bash/docs/InlineResponseDefault.md
Normal file
10
samples/client/petstore/bash/docs/InlineResponseDefault.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# inline_response_default
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**string** | [**Foo**](Foo.md) | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -3,8 +3,10 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**map_map_of_string** | **map[String, map[String, string]]** | | [optional] [default to null]
|
**mapUnderscoremapUnderscoreofUnderscorestring** | **map[String, map[String, string]]** | | [optional] [default to null]
|
||||||
**map_of_enum_string** | **map[String, string]** | | [optional] [default to null]
|
**mapUnderscoreofUnderscoreenumUnderscorestring** | **map[String, string]** | | [optional] [default to null]
|
||||||
|
**directUnderscoremap** | **map[String, boolean]** | | [optional] [default to null]
|
||||||
|
**indirectUnderscoremap** | **map[String, boolean]** | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **integer** | | [default to null]
|
**name** | **integer** | | [default to null]
|
||||||
**snake_case** | **integer** | | [optional] [default to null]
|
**snakeUnderscorecase** | **integer** | | [optional] [default to null]
|
||||||
**property** | **string** | | [optional] [default to null]
|
**property** | **string** | | [optional] [default to null]
|
||||||
**123Number** | **integer** | | [optional] [default to null]
|
**123Number** | **integer** | | [optional] [default to null]
|
||||||
|
|
||||||
|
21
samples/client/petstore/bash/docs/NullableClass.md
Normal file
21
samples/client/petstore/bash/docs/NullableClass.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# NullableClass
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**integerUnderscoreprop** | **integer** | | [optional] [default to null]
|
||||||
|
**numberUnderscoreprop** | **integer** | | [optional] [default to null]
|
||||||
|
**booleanUnderscoreprop** | **boolean** | | [optional] [default to null]
|
||||||
|
**stringUnderscoreprop** | **string** | | [optional] [default to null]
|
||||||
|
**dateUnderscoreprop** | **string** | | [optional] [default to null]
|
||||||
|
**datetimeUnderscoreprop** | **string** | | [optional] [default to null]
|
||||||
|
**arrayUnderscorenullableUnderscoreprop** | **array[map]** | | [optional] [default to null]
|
||||||
|
**arrayUnderscoreandUnderscoreitemsUnderscorenullableUnderscoreprop** | **array[map]** | | [optional] [default to null]
|
||||||
|
**arrayUnderscoreitemsUnderscorenullable** | **array[map]** | | [optional] [default to null]
|
||||||
|
**objectUnderscorenullableUnderscoreprop** | **map[String, map]** | | [optional] [default to null]
|
||||||
|
**objectUnderscoreandUnderscoreitemsUnderscorenullableUnderscoreprop** | **map[String, map]** | | [optional] [default to null]
|
||||||
|
**objectUnderscoreitemsUnderscorenullable** | **map[String, map]** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
|||||||
## Properties
|
## Properties
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**my_number** | **integer** | | [optional] [default to null]
|
**myUnderscorenumber** | **integer** | | [optional] [default to null]
|
||||||
**my_string** | **string** | | [optional] [default to null]
|
**myUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
**my_boolean** | **boolean** | | [optional] [default to null]
|
**myUnderscoreboolean** | **boolean** | | [optional] [default to null]
|
||||||
|
|
||||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
# OuterEnumDefaultValue
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
9
samples/client/petstore/bash/docs/OuterEnumInteger.md
Normal file
9
samples/client/petstore/bash/docs/OuterEnumInteger.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# OuterEnumInteger
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
# OuterEnumIntegerDefaultValue
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -12,22 +12,26 @@ Method | HTTP request | Description
|
|||||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||||
|
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||||
|
|
||||||
|
|
||||||
## **addPet**
|
|
||||||
|
## addPet
|
||||||
|
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli addPet
|
petstore-cli addPet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store |
|
**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -39,26 +43,29 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **deletePet**
|
|
||||||
|
## deletePet
|
||||||
|
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli deletePet petId=value api_key:value
|
petstore-cli deletePet petId=value api_key:value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **integer** | Pet id to delete |
|
**petId** | **integer** | Pet id to delete | [default to null]
|
||||||
**apiKey** | **string** | | [optional]
|
**apiKey** | **string** | | [optional] [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -70,27 +77,30 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **findPetsByStatus**
|
|
||||||
|
## findPetsByStatus
|
||||||
|
|
||||||
Finds Pets by status
|
Finds Pets by status
|
||||||
|
|
||||||
Multiple status values can be provided with comma separated strings
|
Multiple status values can be provided with comma separated strings
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli findPetsByStatus Specify as: status="value1,value2,..."
|
petstore-cli findPetsByStatus Specify as: status="value1,value2,..."
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**status** | [**array[string]**](string.md) | Status values that need to be considered for filter |
|
**status** | [**array[string]**](string.md) | Status values that need to be considered for filter | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -102,27 +112,30 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **findPetsByTags**
|
|
||||||
|
## findPetsByTags
|
||||||
|
|
||||||
Finds Pets by tags
|
Finds Pets by tags
|
||||||
|
|
||||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli findPetsByTags Specify as: tags="value1,value2,..."
|
petstore-cli findPetsByTags Specify as: tags="value1,value2,..."
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**tags** | [**array[string]**](string.md) | Tags to filter by |
|
**tags** | [**array[string]**](string.md) | Tags to filter by | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -134,27 +147,30 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **getPetById**
|
|
||||||
|
## getPetById
|
||||||
|
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
Returns a single pet
|
Returns a single pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli getPetById petId=value
|
petstore-cli getPetById petId=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **integer** | ID of pet to return |
|
**petId** | **integer** | ID of pet to return | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -166,25 +182,28 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **updatePet**
|
|
||||||
|
## updatePet
|
||||||
|
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli updatePet
|
petstore-cli updatePet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store |
|
**body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -196,25 +215,28 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **updatePetWithForm**
|
|
||||||
|
## updatePetWithForm
|
||||||
|
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli updatePetWithForm petId=value
|
petstore-cli updatePetWithForm petId=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **integer** | ID of pet that needs to be updated |
|
**petId** | **integer** | ID of pet that needs to be updated | [default to null]
|
||||||
**name** | **string** | Updated name of the pet | [optional] [default to null]
|
**name** | **string** | Updated name of the pet | [optional] [default to null]
|
||||||
**status** | **string** | Updated status of the pet | [optional] [default to null]
|
**status** | **string** | Updated status of the pet | [optional] [default to null]
|
||||||
|
|
||||||
@ -228,25 +250,28 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **uploadFile**
|
|
||||||
|
## uploadFile
|
||||||
|
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli uploadFile petId=value
|
petstore-cli uploadFile petId=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **integer** | ID of pet to update |
|
**petId** | **integer** | ID of pet to update | [default to null]
|
||||||
**additionalMetadata** | **string** | Additional data to pass to server | [optional] [default to null]
|
**additionalMetadata** | **string** | Additional data to pass to server | [optional] [default to null]
|
||||||
**file** | **binary** | file to upload | [optional] [default to null]
|
**file** | **binary** | file to upload | [optional] [default to null]
|
||||||
|
|
||||||
@ -260,8 +285,43 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
- **Content-Type**: multipart/form-data
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
||||||
|
## uploadFileWithRequiredFile
|
||||||
|
|
||||||
|
uploads an image (required)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```bash
|
||||||
|
petstore-cli uploadFileWithRequiredFile petId=value
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**petId** | **integer** | ID of pet to update | [default to null]
|
||||||
|
**requiredFile** | **binary** | file to upload | [default to null]
|
||||||
|
**additionalMetadata** | **string** | Additional data to pass to server | [optional] [default to null]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
[**ApiResponse**](ApiResponse.md)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
[petstore_auth](../README.md#petstore_auth)
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: multipart/form-data
|
||||||
|
- **Accept**: application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
10
samples/client/petstore/bash/docs/SpecialModelName.md
Normal file
10
samples/client/petstore/bash/docs/SpecialModelName.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# _special_model.name_
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**DollarspecialLeft_Square_BracketpropertyPeriodnameRight_Square_Bracket** | **integer** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -10,22 +10,25 @@ Method | HTTP request | Description
|
|||||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
## **deleteOrder**
|
|
||||||
|
## deleteOrder
|
||||||
|
|
||||||
Delete purchase order by ID
|
Delete purchase order by ID
|
||||||
|
|
||||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli deleteOrder order_id=value
|
petstore-cli deleteOrder order_id=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**orderId** | **string** | ID of the order that needs to be deleted |
|
**orderId** | **string** | ID of the order that needs to be deleted | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -37,23 +40,26 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **getInventory**
|
|
||||||
|
## getInventory
|
||||||
|
|
||||||
Returns pet inventories by status
|
Returns pet inventories by status
|
||||||
|
|
||||||
Returns a map of status codes to quantities
|
Returns a map of status codes to quantities
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli getInventory
|
petstore-cli getInventory
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
@ -66,27 +72,30 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/json
|
- **Accept**: application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **getOrderById**
|
|
||||||
|
## getOrderById
|
||||||
|
|
||||||
Find purchase order by ID
|
Find purchase order by ID
|
||||||
|
|
||||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli getOrderById order_id=value
|
petstore-cli getOrderById order_id=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**orderId** | **integer** | ID of pet that needs to be fetched |
|
**orderId** | **integer** | ID of pet that needs to be fetched | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -98,25 +107,28 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **placeOrder**
|
|
||||||
|
## placeOrder
|
||||||
|
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli placeOrder
|
petstore-cli placeOrder
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**order** | [**Order**](Order.md) | order placed for purchasing the pet |
|
**body** | [**Order**](Order.md) | order placed for purchasing the pet |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -128,8 +140,8 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
14
samples/client/petstore/bash/docs/TypeHolderDefault.md
Normal file
14
samples/client/petstore/bash/docs/TypeHolderDefault.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# TypeHolderDefault
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**stringUnderscoreitem** | **string** | | [default to what]
|
||||||
|
**numberUnderscoreitem** | **integer** | | [default to null]
|
||||||
|
**integerUnderscoreitem** | **integer** | | [default to null]
|
||||||
|
**boolUnderscoreitem** | **boolean** | | [default to true]
|
||||||
|
**arrayUnderscoreitem** | **array[integer]** | | [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
14
samples/client/petstore/bash/docs/TypeHolderExample.md
Normal file
14
samples/client/petstore/bash/docs/TypeHolderExample.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# TypeHolderExample
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**stringUnderscoreitem** | **string** | | [default to null]
|
||||||
|
**numberUnderscoreitem** | **integer** | | [default to null]
|
||||||
|
**integerUnderscoreitem** | **integer** | | [default to null]
|
||||||
|
**boolUnderscoreitem** | **boolean** | | [default to null]
|
||||||
|
**arrayUnderscoreitem** | **array[integer]** | | [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -14,22 +14,25 @@ Method | HTTP request | Description
|
|||||||
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||||
|
|
||||||
|
|
||||||
## **createUser**
|
|
||||||
|
## createUser
|
||||||
|
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli createUser
|
petstore-cli createUser
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**user** | [**User**](User.md) | Created user object |
|
**body** | [**User**](User.md) | Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -41,25 +44,28 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **createUsersWithArrayInput**
|
|
||||||
|
## createUsersWithArrayInput
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli createUsersWithArrayInput
|
petstore-cli createUsersWithArrayInput
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**user** | [**array[User]**](array.md) | List of user object |
|
**body** | [**array[User]**](User.md) | List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -71,25 +77,28 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **createUsersWithListInput**
|
|
||||||
|
## createUsersWithListInput
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli createUsersWithListInput
|
petstore-cli createUsersWithListInput
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**user** | [**array[User]**](array.md) | List of user object |
|
**body** | [**array[User]**](User.md) | List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -101,27 +110,30 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **deleteUser**
|
|
||||||
|
## deleteUser
|
||||||
|
|
||||||
Delete user
|
Delete user
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli deleteUser username=value
|
petstore-cli deleteUser username=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string** | The name that needs to be deleted |
|
**username** | **string** | The name that needs to be deleted | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -133,25 +145,28 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **getUserByName**
|
|
||||||
|
## getUserByName
|
||||||
|
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli getUserByName username=value
|
petstore-cli getUserByName username=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string** | The name that needs to be fetched. Use user1 for testing. |
|
**username** | **string** | The name that needs to be fetched. Use user1 for testing. | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -163,26 +178,29 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **loginUser**
|
|
||||||
|
## loginUser
|
||||||
|
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli loginUser username=value password=value
|
petstore-cli loginUser username=value password=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string** | The user name for login |
|
**username** | **string** | The user name for login | [default to null]
|
||||||
**password** | **string** | The password for login in clear text |
|
**password** | **string** | The password for login in clear text | [default to null]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -194,21 +212,24 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **logoutUser**
|
|
||||||
|
## logoutUser
|
||||||
|
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli logoutUser
|
petstore-cli logoutUser
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
This endpoint does not need any parameter.
|
This endpoint does not need any parameter.
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
@ -221,28 +242,31 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
## **updateUser**
|
|
||||||
|
## updateUser
|
||||||
|
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
This can only be done by the logged in user.
|
This can only be done by the logged in user.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
petstore-cli updateUser username=value
|
petstore-cli updateUser username=value
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **string** | name that need to be deleted |
|
**username** | **string** | name that need to be deleted | [default to null]
|
||||||
**user** | [**User**](User.md) | Updated user object |
|
**body** | [**User**](User.md) | Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -254,8 +278,8 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not Applicable
|
- **Content-Type**: Not Applicable
|
||||||
- **Accept**: Not Applicable
|
- **Accept**: Not Applicable
|
||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
38
samples/client/petstore/bash/docs/XmlItem.md
Normal file
38
samples/client/petstore/bash/docs/XmlItem.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# XmlItem
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**attributeUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
|
**attributeUnderscorenumber** | **integer** | | [optional] [default to null]
|
||||||
|
**attributeUnderscoreinteger** | **integer** | | [optional] [default to null]
|
||||||
|
**attributeUnderscoreboolean** | **boolean** | | [optional] [default to null]
|
||||||
|
**wrappedUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**nameUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
|
**nameUnderscorenumber** | **integer** | | [optional] [default to null]
|
||||||
|
**nameUnderscoreinteger** | **integer** | | [optional] [default to null]
|
||||||
|
**nameUnderscoreboolean** | **boolean** | | [optional] [default to null]
|
||||||
|
**nameUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**nameUnderscorewrappedUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorenumber** | **integer** | | [optional] [default to null]
|
||||||
|
**prefixUnderscoreinteger** | **integer** | | [optional] [default to null]
|
||||||
|
**prefixUnderscoreboolean** | **boolean** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorewrappedUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**namespaceUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
|
**namespaceUnderscorenumber** | **integer** | | [optional] [default to null]
|
||||||
|
**namespaceUnderscoreinteger** | **integer** | | [optional] [default to null]
|
||||||
|
**namespaceUnderscoreboolean** | **boolean** | | [optional] [default to null]
|
||||||
|
**namespaceUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**namespaceUnderscorewrappedUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorensUnderscorestring** | **string** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorensUnderscorenumber** | **integer** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorensUnderscoreinteger** | **integer** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorensUnderscoreboolean** | **boolean** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorensUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
**prefixUnderscorensUnderscorewrappedUnderscorearray** | **array[integer]** | | [optional] [default to null]
|
||||||
|
|
||||||
|
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
|
@ -95,14 +95,16 @@ declare -a result_color_table=( "$WHITE" "$WHITE" "$GREEN" "$YELLOW" "$WHITE" "$
|
|||||||
# 0 - optional
|
# 0 - optional
|
||||||
# 1 - required
|
# 1 - required
|
||||||
declare -A operation_parameters_minimum_occurrences
|
declare -A operation_parameters_minimum_occurrences
|
||||||
operation_parameters_minimum_occurrences["testSpecialTags:::Client"]=1
|
operation_parameters_minimum_occurrences["123Test@$%SpecialTags:::body"]=1
|
||||||
|
operation_parameters_minimum_occurrences["createXmlItem:::XmlItem"]=1
|
||||||
operation_parameters_minimum_occurrences["fakeOuterBooleanSerialize:::body"]=0
|
operation_parameters_minimum_occurrences["fakeOuterBooleanSerialize:::body"]=0
|
||||||
operation_parameters_minimum_occurrences["fakeOuterCompositeSerialize:::OuterComposite"]=0
|
operation_parameters_minimum_occurrences["fakeOuterCompositeSerialize:::body"]=0
|
||||||
operation_parameters_minimum_occurrences["fakeOuterNumberSerialize:::body"]=0
|
operation_parameters_minimum_occurrences["fakeOuterNumberSerialize:::body"]=0
|
||||||
operation_parameters_minimum_occurrences["fakeOuterStringSerialize:::body"]=0
|
operation_parameters_minimum_occurrences["fakeOuterStringSerialize:::body"]=0
|
||||||
|
operation_parameters_minimum_occurrences["testBodyWithFileSchema:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["testBodyWithQueryParams:::query"]=1
|
operation_parameters_minimum_occurrences["testBodyWithQueryParams:::query"]=1
|
||||||
operation_parameters_minimum_occurrences["testBodyWithQueryParams:::User"]=1
|
operation_parameters_minimum_occurrences["testBodyWithQueryParams:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["testClientModel:::Client"]=1
|
operation_parameters_minimum_occurrences["testClientModel:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["testEndpointParameters:::number"]=1
|
operation_parameters_minimum_occurrences["testEndpointParameters:::number"]=1
|
||||||
operation_parameters_minimum_occurrences["testEndpointParameters:::double"]=1
|
operation_parameters_minimum_occurrences["testEndpointParameters:::double"]=1
|
||||||
operation_parameters_minimum_occurrences["testEndpointParameters:::pattern_without_delimiter"]=1
|
operation_parameters_minimum_occurrences["testEndpointParameters:::pattern_without_delimiter"]=1
|
||||||
@ -125,35 +127,44 @@ operation_parameters_minimum_occurrences["testEnumParameters:::enum_query_intege
|
|||||||
operation_parameters_minimum_occurrences["testEnumParameters:::enum_query_double"]=0
|
operation_parameters_minimum_occurrences["testEnumParameters:::enum_query_double"]=0
|
||||||
operation_parameters_minimum_occurrences["testEnumParameters:::enum_form_string_array"]=0
|
operation_parameters_minimum_occurrences["testEnumParameters:::enum_form_string_array"]=0
|
||||||
operation_parameters_minimum_occurrences["testEnumParameters:::enum_form_string"]=0
|
operation_parameters_minimum_occurrences["testEnumParameters:::enum_form_string"]=0
|
||||||
operation_parameters_minimum_occurrences["testInlineAdditionalProperties:::request_body"]=1
|
operation_parameters_minimum_occurrences["testGroupParameters:::required_string_group"]=1
|
||||||
|
operation_parameters_minimum_occurrences["testGroupParameters:::required_boolean_group"]=1
|
||||||
|
operation_parameters_minimum_occurrences["testGroupParameters:::required_int64_group"]=1
|
||||||
|
operation_parameters_minimum_occurrences["testGroupParameters:::string_group"]=0
|
||||||
|
operation_parameters_minimum_occurrences["testGroupParameters:::boolean_group"]=0
|
||||||
|
operation_parameters_minimum_occurrences["testGroupParameters:::int64_group"]=0
|
||||||
|
operation_parameters_minimum_occurrences["testInlineAdditionalProperties:::param"]=1
|
||||||
operation_parameters_minimum_occurrences["testJsonFormData:::param"]=1
|
operation_parameters_minimum_occurrences["testJsonFormData:::param"]=1
|
||||||
operation_parameters_minimum_occurrences["testJsonFormData:::param2"]=1
|
operation_parameters_minimum_occurrences["testJsonFormData:::param2"]=1
|
||||||
operation_parameters_minimum_occurrences["testClassname:::Client"]=1
|
operation_parameters_minimum_occurrences["testClassname:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["addPet:::Pet"]=1
|
operation_parameters_minimum_occurrences["addPet:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["deletePet:::petId"]=1
|
operation_parameters_minimum_occurrences["deletePet:::petId"]=1
|
||||||
operation_parameters_minimum_occurrences["deletePet:::api_key"]=0
|
operation_parameters_minimum_occurrences["deletePet:::api_key"]=0
|
||||||
operation_parameters_minimum_occurrences["findPetsByStatus:::status"]=1
|
operation_parameters_minimum_occurrences["findPetsByStatus:::status"]=1
|
||||||
operation_parameters_minimum_occurrences["findPetsByTags:::tags"]=1
|
operation_parameters_minimum_occurrences["findPetsByTags:::tags"]=1
|
||||||
operation_parameters_minimum_occurrences["getPetById:::petId"]=1
|
operation_parameters_minimum_occurrences["getPetById:::petId"]=1
|
||||||
operation_parameters_minimum_occurrences["updatePet:::Pet"]=1
|
operation_parameters_minimum_occurrences["updatePet:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["updatePetWithForm:::petId"]=1
|
operation_parameters_minimum_occurrences["updatePetWithForm:::petId"]=1
|
||||||
operation_parameters_minimum_occurrences["updatePetWithForm:::name"]=0
|
operation_parameters_minimum_occurrences["updatePetWithForm:::name"]=0
|
||||||
operation_parameters_minimum_occurrences["updatePetWithForm:::status"]=0
|
operation_parameters_minimum_occurrences["updatePetWithForm:::status"]=0
|
||||||
operation_parameters_minimum_occurrences["uploadFile:::petId"]=1
|
operation_parameters_minimum_occurrences["uploadFile:::petId"]=1
|
||||||
operation_parameters_minimum_occurrences["uploadFile:::additionalMetadata"]=0
|
operation_parameters_minimum_occurrences["uploadFile:::additionalMetadata"]=0
|
||||||
operation_parameters_minimum_occurrences["uploadFile:::file"]=0
|
operation_parameters_minimum_occurrences["uploadFile:::file"]=0
|
||||||
|
operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::petId"]=1
|
||||||
|
operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::requiredFile"]=1
|
||||||
|
operation_parameters_minimum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0
|
||||||
operation_parameters_minimum_occurrences["deleteOrder:::order_id"]=1
|
operation_parameters_minimum_occurrences["deleteOrder:::order_id"]=1
|
||||||
operation_parameters_minimum_occurrences["getOrderById:::order_id"]=1
|
operation_parameters_minimum_occurrences["getOrderById:::order_id"]=1
|
||||||
operation_parameters_minimum_occurrences["placeOrder:::Order"]=1
|
operation_parameters_minimum_occurrences["placeOrder:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["createUser:::User"]=1
|
operation_parameters_minimum_occurrences["createUser:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["createUsersWithArrayInput:::User"]=1
|
operation_parameters_minimum_occurrences["createUsersWithArrayInput:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["createUsersWithListInput:::User"]=1
|
operation_parameters_minimum_occurrences["createUsersWithListInput:::body"]=1
|
||||||
operation_parameters_minimum_occurrences["deleteUser:::username"]=1
|
operation_parameters_minimum_occurrences["deleteUser:::username"]=1
|
||||||
operation_parameters_minimum_occurrences["getUserByName:::username"]=1
|
operation_parameters_minimum_occurrences["getUserByName:::username"]=1
|
||||||
operation_parameters_minimum_occurrences["loginUser:::username"]=1
|
operation_parameters_minimum_occurrences["loginUser:::username"]=1
|
||||||
operation_parameters_minimum_occurrences["loginUser:::password"]=1
|
operation_parameters_minimum_occurrences["loginUser:::password"]=1
|
||||||
operation_parameters_minimum_occurrences["updateUser:::username"]=1
|
operation_parameters_minimum_occurrences["updateUser:::username"]=1
|
||||||
operation_parameters_minimum_occurrences["updateUser:::User"]=1
|
operation_parameters_minimum_occurrences["updateUser:::body"]=1
|
||||||
|
|
||||||
##
|
##
|
||||||
# This array stores the maximum number of allowed occurrences for parameter
|
# This array stores the maximum number of allowed occurrences for parameter
|
||||||
@ -162,14 +173,16 @@ operation_parameters_minimum_occurrences["updateUser:::User"]=1
|
|||||||
# N - N values
|
# N - N values
|
||||||
# 0 - unlimited
|
# 0 - unlimited
|
||||||
declare -A operation_parameters_maximum_occurrences
|
declare -A operation_parameters_maximum_occurrences
|
||||||
operation_parameters_maximum_occurrences["testSpecialTags:::Client"]=0
|
operation_parameters_maximum_occurrences["123Test@$%SpecialTags:::body"]=0
|
||||||
|
operation_parameters_maximum_occurrences["createXmlItem:::XmlItem"]=0
|
||||||
operation_parameters_maximum_occurrences["fakeOuterBooleanSerialize:::body"]=0
|
operation_parameters_maximum_occurrences["fakeOuterBooleanSerialize:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["fakeOuterCompositeSerialize:::OuterComposite"]=0
|
operation_parameters_maximum_occurrences["fakeOuterCompositeSerialize:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["fakeOuterNumberSerialize:::body"]=0
|
operation_parameters_maximum_occurrences["fakeOuterNumberSerialize:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["fakeOuterStringSerialize:::body"]=0
|
operation_parameters_maximum_occurrences["fakeOuterStringSerialize:::body"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testBodyWithFileSchema:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["testBodyWithQueryParams:::query"]=0
|
operation_parameters_maximum_occurrences["testBodyWithQueryParams:::query"]=0
|
||||||
operation_parameters_maximum_occurrences["testBodyWithQueryParams:::User"]=0
|
operation_parameters_maximum_occurrences["testBodyWithQueryParams:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["testClientModel:::Client"]=0
|
operation_parameters_maximum_occurrences["testClientModel:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["testEndpointParameters:::number"]=0
|
operation_parameters_maximum_occurrences["testEndpointParameters:::number"]=0
|
||||||
operation_parameters_maximum_occurrences["testEndpointParameters:::double"]=0
|
operation_parameters_maximum_occurrences["testEndpointParameters:::double"]=0
|
||||||
operation_parameters_maximum_occurrences["testEndpointParameters:::pattern_without_delimiter"]=0
|
operation_parameters_maximum_occurrences["testEndpointParameters:::pattern_without_delimiter"]=0
|
||||||
@ -192,48 +205,59 @@ operation_parameters_maximum_occurrences["testEnumParameters:::enum_query_intege
|
|||||||
operation_parameters_maximum_occurrences["testEnumParameters:::enum_query_double"]=0
|
operation_parameters_maximum_occurrences["testEnumParameters:::enum_query_double"]=0
|
||||||
operation_parameters_maximum_occurrences["testEnumParameters:::enum_form_string_array"]=0
|
operation_parameters_maximum_occurrences["testEnumParameters:::enum_form_string_array"]=0
|
||||||
operation_parameters_maximum_occurrences["testEnumParameters:::enum_form_string"]=0
|
operation_parameters_maximum_occurrences["testEnumParameters:::enum_form_string"]=0
|
||||||
operation_parameters_maximum_occurrences["testInlineAdditionalProperties:::request_body"]=0
|
operation_parameters_maximum_occurrences["testGroupParameters:::required_string_group"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testGroupParameters:::required_boolean_group"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testGroupParameters:::required_int64_group"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testGroupParameters:::string_group"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testGroupParameters:::boolean_group"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testGroupParameters:::int64_group"]=0
|
||||||
|
operation_parameters_maximum_occurrences["testInlineAdditionalProperties:::param"]=0
|
||||||
operation_parameters_maximum_occurrences["testJsonFormData:::param"]=0
|
operation_parameters_maximum_occurrences["testJsonFormData:::param"]=0
|
||||||
operation_parameters_maximum_occurrences["testJsonFormData:::param2"]=0
|
operation_parameters_maximum_occurrences["testJsonFormData:::param2"]=0
|
||||||
operation_parameters_maximum_occurrences["testClassname:::Client"]=0
|
operation_parameters_maximum_occurrences["testClassname:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["addPet:::Pet"]=0
|
operation_parameters_maximum_occurrences["addPet:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["deletePet:::petId"]=0
|
operation_parameters_maximum_occurrences["deletePet:::petId"]=0
|
||||||
operation_parameters_maximum_occurrences["deletePet:::api_key"]=0
|
operation_parameters_maximum_occurrences["deletePet:::api_key"]=0
|
||||||
operation_parameters_maximum_occurrences["findPetsByStatus:::status"]=0
|
operation_parameters_maximum_occurrences["findPetsByStatus:::status"]=0
|
||||||
operation_parameters_maximum_occurrences["findPetsByTags:::tags"]=0
|
operation_parameters_maximum_occurrences["findPetsByTags:::tags"]=0
|
||||||
operation_parameters_maximum_occurrences["getPetById:::petId"]=0
|
operation_parameters_maximum_occurrences["getPetById:::petId"]=0
|
||||||
operation_parameters_maximum_occurrences["updatePet:::Pet"]=0
|
operation_parameters_maximum_occurrences["updatePet:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["updatePetWithForm:::petId"]=0
|
operation_parameters_maximum_occurrences["updatePetWithForm:::petId"]=0
|
||||||
operation_parameters_maximum_occurrences["updatePetWithForm:::name"]=0
|
operation_parameters_maximum_occurrences["updatePetWithForm:::name"]=0
|
||||||
operation_parameters_maximum_occurrences["updatePetWithForm:::status"]=0
|
operation_parameters_maximum_occurrences["updatePetWithForm:::status"]=0
|
||||||
operation_parameters_maximum_occurrences["uploadFile:::petId"]=0
|
operation_parameters_maximum_occurrences["uploadFile:::petId"]=0
|
||||||
operation_parameters_maximum_occurrences["uploadFile:::additionalMetadata"]=0
|
operation_parameters_maximum_occurrences["uploadFile:::additionalMetadata"]=0
|
||||||
operation_parameters_maximum_occurrences["uploadFile:::file"]=0
|
operation_parameters_maximum_occurrences["uploadFile:::file"]=0
|
||||||
|
operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::petId"]=0
|
||||||
|
operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::requiredFile"]=0
|
||||||
|
operation_parameters_maximum_occurrences["uploadFileWithRequiredFile:::additionalMetadata"]=0
|
||||||
operation_parameters_maximum_occurrences["deleteOrder:::order_id"]=0
|
operation_parameters_maximum_occurrences["deleteOrder:::order_id"]=0
|
||||||
operation_parameters_maximum_occurrences["getOrderById:::order_id"]=0
|
operation_parameters_maximum_occurrences["getOrderById:::order_id"]=0
|
||||||
operation_parameters_maximum_occurrences["placeOrder:::Order"]=0
|
operation_parameters_maximum_occurrences["placeOrder:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["createUser:::User"]=0
|
operation_parameters_maximum_occurrences["createUser:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["createUsersWithArrayInput:::User"]=0
|
operation_parameters_maximum_occurrences["createUsersWithArrayInput:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["createUsersWithListInput:::User"]=0
|
operation_parameters_maximum_occurrences["createUsersWithListInput:::body"]=0
|
||||||
operation_parameters_maximum_occurrences["deleteUser:::username"]=0
|
operation_parameters_maximum_occurrences["deleteUser:::username"]=0
|
||||||
operation_parameters_maximum_occurrences["getUserByName:::username"]=0
|
operation_parameters_maximum_occurrences["getUserByName:::username"]=0
|
||||||
operation_parameters_maximum_occurrences["loginUser:::username"]=0
|
operation_parameters_maximum_occurrences["loginUser:::username"]=0
|
||||||
operation_parameters_maximum_occurrences["loginUser:::password"]=0
|
operation_parameters_maximum_occurrences["loginUser:::password"]=0
|
||||||
operation_parameters_maximum_occurrences["updateUser:::username"]=0
|
operation_parameters_maximum_occurrences["updateUser:::username"]=0
|
||||||
operation_parameters_maximum_occurrences["updateUser:::User"]=0
|
operation_parameters_maximum_occurrences["updateUser:::body"]=0
|
||||||
|
|
||||||
##
|
##
|
||||||
# The type of collection for specifying multiple values for parameter:
|
# The type of collection for specifying multiple values for parameter:
|
||||||
# - multi, csv, ssv, tsv
|
# - multi, csv, ssv, tsv
|
||||||
declare -A operation_parameters_collection_type
|
declare -A operation_parameters_collection_type
|
||||||
operation_parameters_collection_type["testSpecialTags:::Client"]=""
|
operation_parameters_collection_type["123Test@$%SpecialTags:::body"]=""
|
||||||
|
operation_parameters_collection_type["createXmlItem:::XmlItem"]=""
|
||||||
operation_parameters_collection_type["fakeOuterBooleanSerialize:::body"]=""
|
operation_parameters_collection_type["fakeOuterBooleanSerialize:::body"]=""
|
||||||
operation_parameters_collection_type["fakeOuterCompositeSerialize:::OuterComposite"]=""
|
operation_parameters_collection_type["fakeOuterCompositeSerialize:::body"]=""
|
||||||
operation_parameters_collection_type["fakeOuterNumberSerialize:::body"]=""
|
operation_parameters_collection_type["fakeOuterNumberSerialize:::body"]=""
|
||||||
operation_parameters_collection_type["fakeOuterStringSerialize:::body"]=""
|
operation_parameters_collection_type["fakeOuterStringSerialize:::body"]=""
|
||||||
|
operation_parameters_collection_type["testBodyWithFileSchema:::body"]=""
|
||||||
operation_parameters_collection_type["testBodyWithQueryParams:::query"]=""
|
operation_parameters_collection_type["testBodyWithQueryParams:::query"]=""
|
||||||
operation_parameters_collection_type["testBodyWithQueryParams:::User"]=""
|
operation_parameters_collection_type["testBodyWithQueryParams:::body"]=""
|
||||||
operation_parameters_collection_type["testClientModel:::Client"]=""
|
operation_parameters_collection_type["testClientModel:::body"]=""
|
||||||
operation_parameters_collection_type["testEndpointParameters:::number"]=""
|
operation_parameters_collection_type["testEndpointParameters:::number"]=""
|
||||||
operation_parameters_collection_type["testEndpointParameters:::double"]=""
|
operation_parameters_collection_type["testEndpointParameters:::double"]=""
|
||||||
operation_parameters_collection_type["testEndpointParameters:::pattern_without_delimiter"]=""
|
operation_parameters_collection_type["testEndpointParameters:::pattern_without_delimiter"]=""
|
||||||
@ -256,35 +280,44 @@ operation_parameters_collection_type["testEnumParameters:::enum_query_integer"]=
|
|||||||
operation_parameters_collection_type["testEnumParameters:::enum_query_double"]=""
|
operation_parameters_collection_type["testEnumParameters:::enum_query_double"]=""
|
||||||
operation_parameters_collection_type["testEnumParameters:::enum_form_string_array"]=
|
operation_parameters_collection_type["testEnumParameters:::enum_form_string_array"]=
|
||||||
operation_parameters_collection_type["testEnumParameters:::enum_form_string"]=""
|
operation_parameters_collection_type["testEnumParameters:::enum_form_string"]=""
|
||||||
operation_parameters_collection_type["testInlineAdditionalProperties:::request_body"]=
|
operation_parameters_collection_type["testGroupParameters:::required_string_group"]=""
|
||||||
|
operation_parameters_collection_type["testGroupParameters:::required_boolean_group"]=""
|
||||||
|
operation_parameters_collection_type["testGroupParameters:::required_int64_group"]=""
|
||||||
|
operation_parameters_collection_type["testGroupParameters:::string_group"]=""
|
||||||
|
operation_parameters_collection_type["testGroupParameters:::boolean_group"]=""
|
||||||
|
operation_parameters_collection_type["testGroupParameters:::int64_group"]=""
|
||||||
|
operation_parameters_collection_type["testInlineAdditionalProperties:::param"]=
|
||||||
operation_parameters_collection_type["testJsonFormData:::param"]=""
|
operation_parameters_collection_type["testJsonFormData:::param"]=""
|
||||||
operation_parameters_collection_type["testJsonFormData:::param2"]=""
|
operation_parameters_collection_type["testJsonFormData:::param2"]=""
|
||||||
operation_parameters_collection_type["testClassname:::Client"]=""
|
operation_parameters_collection_type["testClassname:::body"]=""
|
||||||
operation_parameters_collection_type["addPet:::Pet"]=""
|
operation_parameters_collection_type["addPet:::body"]=""
|
||||||
operation_parameters_collection_type["deletePet:::petId"]=""
|
operation_parameters_collection_type["deletePet:::petId"]=""
|
||||||
operation_parameters_collection_type["deletePet:::api_key"]=""
|
operation_parameters_collection_type["deletePet:::api_key"]=""
|
||||||
operation_parameters_collection_type["findPetsByStatus:::status"]="csv"
|
operation_parameters_collection_type["findPetsByStatus:::status"]="csv"
|
||||||
operation_parameters_collection_type["findPetsByTags:::tags"]="csv"
|
operation_parameters_collection_type["findPetsByTags:::tags"]="csv"
|
||||||
operation_parameters_collection_type["getPetById:::petId"]=""
|
operation_parameters_collection_type["getPetById:::petId"]=""
|
||||||
operation_parameters_collection_type["updatePet:::Pet"]=""
|
operation_parameters_collection_type["updatePet:::body"]=""
|
||||||
operation_parameters_collection_type["updatePetWithForm:::petId"]=""
|
operation_parameters_collection_type["updatePetWithForm:::petId"]=""
|
||||||
operation_parameters_collection_type["updatePetWithForm:::name"]=""
|
operation_parameters_collection_type["updatePetWithForm:::name"]=""
|
||||||
operation_parameters_collection_type["updatePetWithForm:::status"]=""
|
operation_parameters_collection_type["updatePetWithForm:::status"]=""
|
||||||
operation_parameters_collection_type["uploadFile:::petId"]=""
|
operation_parameters_collection_type["uploadFile:::petId"]=""
|
||||||
operation_parameters_collection_type["uploadFile:::additionalMetadata"]=""
|
operation_parameters_collection_type["uploadFile:::additionalMetadata"]=""
|
||||||
operation_parameters_collection_type["uploadFile:::file"]=""
|
operation_parameters_collection_type["uploadFile:::file"]=""
|
||||||
|
operation_parameters_collection_type["uploadFileWithRequiredFile:::petId"]=""
|
||||||
|
operation_parameters_collection_type["uploadFileWithRequiredFile:::requiredFile"]=""
|
||||||
|
operation_parameters_collection_type["uploadFileWithRequiredFile:::additionalMetadata"]=""
|
||||||
operation_parameters_collection_type["deleteOrder:::order_id"]=""
|
operation_parameters_collection_type["deleteOrder:::order_id"]=""
|
||||||
operation_parameters_collection_type["getOrderById:::order_id"]=""
|
operation_parameters_collection_type["getOrderById:::order_id"]=""
|
||||||
operation_parameters_collection_type["placeOrder:::Order"]=""
|
operation_parameters_collection_type["placeOrder:::body"]=""
|
||||||
operation_parameters_collection_type["createUser:::User"]=""
|
operation_parameters_collection_type["createUser:::body"]=""
|
||||||
operation_parameters_collection_type["createUsersWithArrayInput:::User"]=
|
operation_parameters_collection_type["createUsersWithArrayInput:::body"]=
|
||||||
operation_parameters_collection_type["createUsersWithListInput:::User"]=
|
operation_parameters_collection_type["createUsersWithListInput:::body"]=
|
||||||
operation_parameters_collection_type["deleteUser:::username"]=""
|
operation_parameters_collection_type["deleteUser:::username"]=""
|
||||||
operation_parameters_collection_type["getUserByName:::username"]=""
|
operation_parameters_collection_type["getUserByName:::username"]=""
|
||||||
operation_parameters_collection_type["loginUser:::username"]=""
|
operation_parameters_collection_type["loginUser:::username"]=""
|
||||||
operation_parameters_collection_type["loginUser:::password"]=""
|
operation_parameters_collection_type["loginUser:::password"]=""
|
||||||
operation_parameters_collection_type["updateUser:::username"]=""
|
operation_parameters_collection_type["updateUser:::username"]=""
|
||||||
operation_parameters_collection_type["updateUser:::User"]=""
|
operation_parameters_collection_type["updateUser:::body"]=""
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
@ -527,18 +560,16 @@ build_request_path() {
|
|||||||
|
|
||||||
local query_request_part=""
|
local query_request_part=""
|
||||||
|
|
||||||
local count=0
|
|
||||||
for qparam in "${query_params[@]}"; do
|
for qparam in "${query_params[@]}"; do
|
||||||
|
if [[ "${operation_parameters[$qparam]}" == "" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the array of parameter values
|
# Get the array of parameter values
|
||||||
local parameter_value=""
|
local parameter_value=""
|
||||||
local parameter_values
|
local parameter_values
|
||||||
mapfile -t parameter_values < <(sed -e 's/'":::"'/\n/g' <<<"${operation_parameters[$qparam]}")
|
mapfile -t parameter_values < <(sed -e 's/'":::"'/\n/g' <<<"${operation_parameters[$qparam]}")
|
||||||
|
|
||||||
if [[ -n "${parameter_values[*]}" ]]; then
|
|
||||||
if [[ $((count++)) -gt 0 ]]; then
|
|
||||||
query_request_part+="&"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${qparam} == "api_key_query" ]]; then
|
if [[ ${qparam} == "api_key_query" ]]; then
|
||||||
if [[ -n "${parameter_values[*]}" ]]; then
|
if [[ -n "${parameter_values[*]}" ]]; then
|
||||||
@ -617,6 +648,9 @@ build_request_path() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${parameter_value}" ]]; then
|
if [[ -n "${parameter_value}" ]]; then
|
||||||
|
if [[ -n "${query_request_part}" ]]; then
|
||||||
|
query_request_part+="&"
|
||||||
|
fi
|
||||||
query_request_part+="${parameter_value}"
|
query_request_part+="${parameter_value}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -687,16 +721,18 @@ EOF
|
|||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}[anotherFake]${OFF}"
|
echo -e "${BOLD}${WHITE}[anotherFake]${OFF}"
|
||||||
read -r -d '' ops <<EOF
|
read -r -d '' ops <<EOF
|
||||||
${CYAN}testSpecialTags${OFF};To test special tags
|
${CYAN}123Test@$%SpecialTags${OFF};To test special tags
|
||||||
EOF
|
EOF
|
||||||
echo " $ops" | column -t -s ';'
|
echo " $ops" | column -t -s ';'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}[fake]${OFF}"
|
echo -e "${BOLD}${WHITE}[fake]${OFF}"
|
||||||
read -r -d '' ops <<EOF
|
read -r -d '' ops <<EOF
|
||||||
|
${CYAN}createXmlItem${OFF};creates an XmlItem
|
||||||
${CYAN}fakeOuterBooleanSerialize${OFF};
|
${CYAN}fakeOuterBooleanSerialize${OFF};
|
||||||
${CYAN}fakeOuterCompositeSerialize${OFF};
|
${CYAN}fakeOuterCompositeSerialize${OFF};
|
||||||
${CYAN}fakeOuterNumberSerialize${OFF};
|
${CYAN}fakeOuterNumberSerialize${OFF};
|
||||||
${CYAN}fakeOuterStringSerialize${OFF};
|
${CYAN}fakeOuterStringSerialize${OFF};
|
||||||
|
${CYAN}testBodyWithFileSchema${OFF};
|
||||||
${CYAN}testBodyWithQueryParams${OFF};
|
${CYAN}testBodyWithQueryParams${OFF};
|
||||||
${CYAN}testClientModel${OFF};To test \"client\" model
|
${CYAN}testClientModel${OFF};To test \"client\" model
|
||||||
${CYAN}testEndpointParameters${OFF};Fake endpoint for testing various parameters
|
${CYAN}testEndpointParameters${OFF};Fake endpoint for testing various parameters
|
||||||
@ -704,6 +740,7 @@ read -r -d '' ops <<EOF
|
|||||||
偽のエンドポイント
|
偽のエンドポイント
|
||||||
가짜 엔드 포인트 (AUTH)
|
가짜 엔드 포인트 (AUTH)
|
||||||
${CYAN}testEnumParameters${OFF};To test enum parameters
|
${CYAN}testEnumParameters${OFF};To test enum parameters
|
||||||
|
${CYAN}testGroupParameters${OFF};Fake endpoint to test group parameters (optional)
|
||||||
${CYAN}testInlineAdditionalProperties${OFF};test inline additionalProperties
|
${CYAN}testInlineAdditionalProperties${OFF};test inline additionalProperties
|
||||||
${CYAN}testJsonFormData${OFF};test json serialization of form data
|
${CYAN}testJsonFormData${OFF};test json serialization of form data
|
||||||
EOF
|
EOF
|
||||||
@ -725,6 +762,7 @@ read -r -d '' ops <<EOF
|
|||||||
${CYAN}updatePet${OFF};Update an existing pet (AUTH)
|
${CYAN}updatePet${OFF};Update an existing pet (AUTH)
|
||||||
${CYAN}updatePetWithForm${OFF};Updates a pet in the store with form data (AUTH)
|
${CYAN}updatePetWithForm${OFF};Updates a pet in the store with form data (AUTH)
|
||||||
${CYAN}uploadFile${OFF};uploads an image (AUTH)
|
${CYAN}uploadFile${OFF};uploads an image (AUTH)
|
||||||
|
${CYAN}uploadFileWithRequiredFile${OFF};uploads an image (required) (AUTH)
|
||||||
EOF
|
EOF
|
||||||
echo " $ops" | column -t -s ';'
|
echo " $ops" | column -t -s ';'
|
||||||
echo ""
|
echo ""
|
||||||
@ -802,14 +840,14 @@ print_version() {
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Print help for testSpecialTags operation
|
# Print help for 123Test@$%SpecialTags operation
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
print_testSpecialTags_help() {
|
print_123Test@$%SpecialTags_help() {
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}testSpecialTags - To test special tags${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}123Test@$%SpecialTags - To test special tags${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "To test special tags" | paste -sd' ' | fold -sw 80
|
echo -e "To test special tags and operation ID starting with number" | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}body${OFF} ${BLUE}[application/json]${OFF} ${RED}(required)${OFF}${OFF} - client model" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}body${OFF} ${BLUE}[application/json]${OFF} ${RED}(required)${OFF}${OFF} - client model" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
@ -821,6 +859,25 @@ print_testSpecialTags_help() {
|
|||||||
}
|
}
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
# Print help for createXmlItem operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_createXmlItem_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}createXmlItem - creates an XmlItem${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo -e "this route creates an XmlItem" | paste -sd' ' | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
|
echo -e " * ${GREEN}body${OFF} ${BLUE}[application/xml,application/xml; charset=utf-8,application/xml; charset=utf-16,text/xml,text/xml; charset=utf-8,text/xml; charset=utf-16]${OFF} ${RED}(required)${OFF}${OFF} - XmlItem Body" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=200
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 200;successful operation${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
# Print help for fakeOuterBooleanSerialize operation
|
# Print help for fakeOuterBooleanSerialize operation
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -897,6 +954,25 @@ print_fakeOuterStringSerialize_help() {
|
|||||||
}
|
}
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
# Print help for testBodyWithFileSchema operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_testBodyWithFileSchema_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}testBodyWithFileSchema - ${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo -e "For this test, the body for this request much reference a schema named 'File'." | paste -sd' ' | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
|
echo -e " * ${GREEN}body${OFF} ${BLUE}[application/json]${OFF} ${RED}(required)${OFF}${OFF} - " | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=200
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 200;Success${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
# Print help for testBodyWithQueryParams operation
|
# Print help for testBodyWithQueryParams operation
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -905,7 +981,7 @@ print_testBodyWithQueryParams_help() {
|
|||||||
echo -e "${BOLD}${WHITE}testBodyWithQueryParams - ${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}testBodyWithQueryParams - ${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}query${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - ${YELLOW} Specify as: query=value${OFF}" \
|
echo -e " * ${GREEN}query${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ${YELLOW} Specify as: query=value${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}body${OFF} ${BLUE}[application/json]${OFF} ${RED}(required)${OFF}${OFF} - " | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}body${OFF} ${BLUE}[application/json]${OFF} ${RED}(required)${OFF}${OFF} - " | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
@ -970,15 +1046,15 @@ print_testEnumParameters_help() {
|
|||||||
echo -e "To test enum parameters" | paste -sd' ' | fold -sw 80
|
echo -e "To test enum parameters" | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}enum_header_string_array${OFF} ${BLUE}[array[string]]${OFF}${OFF} - Header parameter enum test (string array) ${YELLOW}Specify as: enum_header_string_array:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}enum_header_string_array${OFF} ${BLUE}[array[string]]${OFF} ${CYAN}(default: null)${OFF} - Header parameter enum test (string array) ${YELLOW}Specify as: enum_header_string_array:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}enum_header_string${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: -efg)${OFF} - Header parameter enum test (string) ${YELLOW}Specify as: enum_header_string:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}enum_header_string${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: -efg)${OFF} - Header parameter enum test (string) ${YELLOW}Specify as: enum_header_string:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}enum_query_string_array${OFF} ${BLUE}[array[string]]${OFF}${OFF} - Query parameter enum test (string array)${YELLOW} Specify as: enum_query_string_array="value1,value2,..."${OFF}" \
|
echo -e " * ${GREEN}enum_query_string_array${OFF} ${BLUE}[array[string]]${OFF} ${CYAN}(default: null)${OFF} - Query parameter enum test (string array)${YELLOW} Specify as: enum_query_string_array="value1,value2,..."${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}enum_query_string${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: -efg)${OFF} - Query parameter enum test (string)${YELLOW} Specify as: enum_query_string=value${OFF}" \
|
echo -e " * ${GREEN}enum_query_string${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: -efg)${OFF} - Query parameter enum test (string)${YELLOW} Specify as: enum_query_string=value${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}enum_query_integer${OFF} ${BLUE}[integer]${OFF}${OFF} - Query parameter enum test (double)${YELLOW} Specify as: enum_query_integer=value${OFF}" \
|
echo -e " * ${GREEN}enum_query_integer${OFF} ${BLUE}[integer]${OFF} ${CYAN}(default: null)${OFF} - Query parameter enum test (double)${YELLOW} Specify as: enum_query_integer=value${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}enum_query_double${OFF} ${BLUE}[float]${OFF}${OFF} - Query parameter enum test (double)${YELLOW} Specify as: enum_query_double=value${OFF}" \
|
echo -e " * ${GREEN}enum_query_double${OFF} ${BLUE}[float]${OFF} ${CYAN}(default: null)${OFF} - Query parameter enum test (double)${YELLOW} Specify as: enum_query_double=value${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
@ -989,6 +1065,33 @@ print_testEnumParameters_help() {
|
|||||||
}
|
}
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
# Print help for testGroupParameters operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_testGroupParameters_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}testGroupParameters - Fake endpoint to test group parameters (optional)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo -e "Fake endpoint to test group parameters (optional)" | paste -sd' ' | fold -sw 80
|
||||||
|
echo -e ""
|
||||||
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
|
echo -e " * ${GREEN}required_string_group${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - Required String in group parameters${YELLOW} Specify as: required_string_group=value${OFF}" \
|
||||||
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e " * ${GREEN}required_boolean_group${OFF} ${BLUE}[boolean]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - Required Boolean in group parameters ${YELLOW}Specify as: required_boolean_group:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e " * ${GREEN}required_int64_group${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - Required Integer in group parameters${YELLOW} Specify as: required_int64_group=value${OFF}" \
|
||||||
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e " * ${GREEN}string_group${OFF} ${BLUE}[integer]${OFF} ${CYAN}(default: null)${OFF} - String in group parameters${YELLOW} Specify as: string_group=value${OFF}" \
|
||||||
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e " * ${GREEN}boolean_group${OFF} ${BLUE}[boolean]${OFF} ${CYAN}(default: null)${OFF} - Boolean in group parameters ${YELLOW}Specify as: boolean_group:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e " * ${GREEN}int64_group${OFF} ${BLUE}[integer]${OFF} ${CYAN}(default: null)${OFF} - Integer in group parameters${YELLOW} Specify as: int64_group=value${OFF}" \
|
||||||
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=400
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 400;Someting wrong${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
# Print help for testInlineAdditionalProperties operation
|
# Print help for testInlineAdditionalProperties operation
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
@ -1052,6 +1155,8 @@ print_addPet_help() {
|
|||||||
echo -e ""
|
echo -e ""
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=200
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 200;successful operation${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
code=405
|
code=405
|
||||||
echo -e "${result_color_table[${code:0:1}]} 405;Invalid input${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${result_color_table[${code:0:1}]} 405;Invalid input${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
}
|
}
|
||||||
@ -1065,10 +1170,12 @@ print_deletePet_help() {
|
|||||||
echo -e "${BOLD}${WHITE}deletePet - Deletes a pet${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}deletePet - Deletes a pet${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF}${OFF} - Pet id to delete ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - Pet id to delete ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}api_key${OFF} ${BLUE}[string]${OFF}${OFF} - ${YELLOW}Specify as: api_key:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}api_key${OFF} ${BLUE}[string]${OFF} ${CYAN}(default: null)${OFF} - ${YELLOW}Specify as: api_key:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=200
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 200;successful operation${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
code=400
|
code=400
|
||||||
echo -e "${result_color_table[${code:0:1}]} 400;Invalid pet value${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${result_color_table[${code:0:1}]} 400;Invalid pet value${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
}
|
}
|
||||||
@ -1084,7 +1191,7 @@ print_findPetsByStatus_help() {
|
|||||||
echo -e "Multiple status values can be provided with comma separated strings" | paste -sd' ' | fold -sw 80
|
echo -e "Multiple status values can be provided with comma separated strings" | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}status${OFF} ${BLUE}[array[string]]${OFF} ${RED}(required)${OFF}${OFF} - Status values that need to be considered for filter${YELLOW} Specify as: status="value1,value2,..."${OFF}" \
|
echo -e " * ${GREEN}status${OFF} ${BLUE}[array[string]]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - Status values that need to be considered for filter${YELLOW} Specify as: status="value1,value2,..."${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
@ -1105,7 +1212,7 @@ print_findPetsByTags_help() {
|
|||||||
echo -e "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." | paste -sd' ' | fold -sw 80
|
echo -e "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing." | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}tags${OFF} ${BLUE}[array[string]]${OFF} ${RED}(required)${OFF}${OFF} - Tags to filter by${YELLOW} Specify as: tags="value1,value2,..."${OFF}" \
|
echo -e " * ${GREEN}tags${OFF} ${BLUE}[array[string]]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - Tags to filter by${YELLOW} Specify as: tags="value1,value2,..."${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
@ -1126,7 +1233,7 @@ print_getPetById_help() {
|
|||||||
echo -e "Returns a single pet" | paste -sd' ' | fold -sw 80
|
echo -e "Returns a single pet" | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF}${OFF} - ID of pet to return ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet to return ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=200
|
code=200
|
||||||
@ -1150,6 +1257,8 @@ print_updatePet_help() {
|
|||||||
echo -e ""
|
echo -e ""
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=200
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 200;successful operation${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
code=400
|
code=400
|
||||||
echo -e "${result_color_table[${code:0:1}]} 400;Invalid ID supplied${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${result_color_table[${code:0:1}]} 400;Invalid ID supplied${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
code=404
|
code=404
|
||||||
@ -1167,7 +1276,7 @@ print_updatePetWithForm_help() {
|
|||||||
echo -e "${BOLD}${WHITE}updatePetWithForm - Updates a pet in the store with form data${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}updatePetWithForm - Updates a pet in the store with form data${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF}${OFF} - ID of pet that needs to be updated ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet that needs to be updated ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=405
|
code=405
|
||||||
@ -1183,7 +1292,23 @@ print_uploadFile_help() {
|
|||||||
echo -e "${BOLD}${WHITE}uploadFile - uploads an image${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}uploadFile - uploads an image${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF}${OFF} - ID of pet to update ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet to update ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
|
code=200
|
||||||
|
echo -e "${result_color_table[${code:0:1}]} 200;successful operation${OFF}" | paste -sd' ' | column -t -s ';' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
}
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Print help for uploadFileWithRequiredFile operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
print_uploadFileWithRequiredFile_help() {
|
||||||
|
echo ""
|
||||||
|
echo -e "${BOLD}${WHITE}uploadFileWithRequiredFile - uploads an image (required)${OFF}${BLUE}(AUTH - OAuth2)${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
|
echo -e ""
|
||||||
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
|
echo -e " * ${GREEN}petId${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet to update ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=200
|
code=200
|
||||||
@ -1201,7 +1326,7 @@ print_deleteOrder_help() {
|
|||||||
echo -e "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" | paste -sd' ' | fold -sw 80
|
echo -e "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors" | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}order_id${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - ID of the order that needs to be deleted ${YELLOW}Specify as: order_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}order_id${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of the order that needs to be deleted ${YELLOW}Specify as: order_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=400
|
code=400
|
||||||
@ -1237,7 +1362,7 @@ print_getOrderById_help() {
|
|||||||
echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" | paste -sd' ' | fold -sw 80
|
echo -e "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions" | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}order_id${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF}${OFF} - ID of pet that needs to be fetched ${YELLOW}Specify as: order_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}order_id${OFF} ${BLUE}[integer]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - ID of pet that needs to be fetched ${YELLOW}Specify as: order_id=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=200
|
code=200
|
||||||
@ -1331,7 +1456,7 @@ print_deleteUser_help() {
|
|||||||
echo -e "This can only be done by the logged in user." | paste -sd' ' | fold -sw 80
|
echo -e "This can only be done by the logged in user." | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - The name that needs to be deleted ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - The name that needs to be deleted ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=400
|
code=400
|
||||||
@ -1349,7 +1474,7 @@ print_getUserByName_help() {
|
|||||||
echo -e "${BOLD}${WHITE}getUserByName - Get user by user name${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}getUserByName - Get user by user name${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - The name that needs to be fetched. Use user1 for testing. ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - The name that needs to be fetched. Use user1 for testing. ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
code=200
|
code=200
|
||||||
@ -1369,9 +1494,9 @@ print_loginUser_help() {
|
|||||||
echo -e "${BOLD}${WHITE}loginUser - Logs user into the system${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e "${BOLD}${WHITE}loginUser - Logs user into the system${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - The user name for login${YELLOW} Specify as: username=value${OFF}" \
|
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - The user name for login${YELLOW} Specify as: username=value${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}password${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - The password for login in clear text${YELLOW} Specify as: password=value${OFF}" \
|
echo -e " * ${GREEN}password${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - The password for login in clear text${YELLOW} Specify as: password=value${OFF}" \
|
||||||
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
| paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
echo -e "${BOLD}${WHITE}Responses${OFF}"
|
||||||
@ -1409,7 +1534,7 @@ print_updateUser_help() {
|
|||||||
echo -e "This can only be done by the logged in user." | paste -sd' ' | fold -sw 80
|
echo -e "This can only be done by the logged in user." | paste -sd' ' | fold -sw 80
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
echo -e "${BOLD}${WHITE}Parameters${OFF}"
|
||||||
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF}${OFF} - name that need to be deleted ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}username${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - name that need to be deleted ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e " * ${GREEN}body${OFF} ${BLUE}[]${OFF} ${RED}(required)${OFF}${OFF} - Updated user object" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
echo -e " * ${GREEN}body${OFF} ${BLUE}[]${OFF} ${RED}(required)${OFF}${OFF} - Updated user object" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /'
|
||||||
echo -e ""
|
echo -e ""
|
||||||
echo ""
|
echo ""
|
||||||
@ -1423,10 +1548,10 @@ print_updateUser_help() {
|
|||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Call testSpecialTags operation
|
# Call 123Test@$%SpecialTags operation
|
||||||
#
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
call_testSpecialTags() {
|
call_123Test@$%SpecialTags() {
|
||||||
# ignore error about 'path_parameter_names' being unused; passed by reference
|
# ignore error about 'path_parameter_names' being unused; passed by reference
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
local path_parameter_names=()
|
local path_parameter_names=()
|
||||||
@ -1499,6 +1624,86 @@ call_testSpecialTags() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call createXmlItem operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_createXmlItem() {
|
||||||
|
# ignore error about 'path_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local path_parameter_names=()
|
||||||
|
# ignore error about 'query_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local query_parameter_names=()
|
||||||
|
local path
|
||||||
|
|
||||||
|
if ! path=$(build_request_path "/v2/fake/create_xml_item" path_parameter_names query_parameter_names); then
|
||||||
|
ERROR_MSG=$path
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
local method="POST"
|
||||||
|
local headers_curl
|
||||||
|
headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
local body_json_curl=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the user provided 'Content-type' headers in the
|
||||||
|
# command line. If not try to set them based on the OpenAPI specification
|
||||||
|
# if values produces and consumes are defined unambigously
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $header_content_type && "$force" = false ]]; then
|
||||||
|
:
|
||||||
|
echo "ERROR: Request's content-type not specified!!!"
|
||||||
|
echo "This operation expects content-type in one of the following formats:"
|
||||||
|
echo -e "\\t- application/xml"
|
||||||
|
echo -e "\\t- application/xml; charset=utf-8"
|
||||||
|
echo -e "\\t- application/xml; charset=utf-16"
|
||||||
|
echo -e "\\t- text/xml"
|
||||||
|
echo -e "\\t- text/xml; charset=utf-8"
|
||||||
|
echo -e "\\t- text/xml; charset=utf-16"
|
||||||
|
echo ""
|
||||||
|
echo "Use '--content-type' to set proper content type"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
headers_curl="${headers_curl} -H 'Content-type: ${header_content_type}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we have received some body content over pipe, pass it from the
|
||||||
|
# temporary file to cURL
|
||||||
|
#
|
||||||
|
if [[ -n $body_content_temp_file ]]; then
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
else
|
||||||
|
eval "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
fi
|
||||||
|
rm "${body_content_temp_file}"
|
||||||
|
#
|
||||||
|
# If not, try to build the content body from arguments KEY==VALUE and KEY:=VALUE
|
||||||
|
#
|
||||||
|
else
|
||||||
|
body_json_curl=$(body_parameters_to_json)
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Call fakeOuterBooleanSerialize operation
|
# Call fakeOuterBooleanSerialize operation
|
||||||
@ -1775,6 +1980,84 @@ call_fakeOuterStringSerialize() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call testBodyWithFileSchema operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_testBodyWithFileSchema() {
|
||||||
|
# ignore error about 'path_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local path_parameter_names=()
|
||||||
|
# ignore error about 'query_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local query_parameter_names=()
|
||||||
|
local path
|
||||||
|
|
||||||
|
if ! path=$(build_request_path "/v2/fake/body-with-file-schema" path_parameter_names query_parameter_names); then
|
||||||
|
ERROR_MSG=$path
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
local method="PUT"
|
||||||
|
local headers_curl
|
||||||
|
headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
local body_json_curl=""
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the user provided 'Content-type' headers in the
|
||||||
|
# command line. If not try to set them based on the OpenAPI specification
|
||||||
|
# if values produces and consumes are defined unambigously
|
||||||
|
#
|
||||||
|
if [[ -z $header_content_type ]]; then
|
||||||
|
header_content_type="application/json"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -z $header_content_type && "$force" = false ]]; then
|
||||||
|
:
|
||||||
|
echo "ERROR: Request's content-type not specified!!!"
|
||||||
|
echo "This operation expects content-type in one of the following formats:"
|
||||||
|
echo -e "\\t- application/json"
|
||||||
|
echo ""
|
||||||
|
echo "Use '--content-type' to set proper content type"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
headers_curl="${headers_curl} -H 'Content-type: ${header_content_type}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# If we have received some body content over pipe, pass it from the
|
||||||
|
# temporary file to cURL
|
||||||
|
#
|
||||||
|
if [[ -n $body_content_temp_file ]]; then
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
else
|
||||||
|
eval "cat ${body_content_temp_file} | curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\" -d @-"
|
||||||
|
fi
|
||||||
|
rm "${body_content_temp_file}"
|
||||||
|
#
|
||||||
|
# If not, try to build the content body from arguments KEY==VALUE and KEY:=VALUE
|
||||||
|
#
|
||||||
|
else
|
||||||
|
body_json_curl=$(body_parameters_to_json)
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} ${body_json_curl} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Call testBodyWithQueryParams operation
|
# Call testBodyWithQueryParams operation
|
||||||
@ -2003,6 +2286,42 @@ call_testEnumParameters() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call testGroupParameters operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_testGroupParameters() {
|
||||||
|
# ignore error about 'path_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local path_parameter_names=()
|
||||||
|
# ignore error about 'query_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local query_parameter_names=(required_string_group required_int64_group string_group int64_group)
|
||||||
|
local path
|
||||||
|
|
||||||
|
if ! path=$(build_request_path "/v2/fake" path_parameter_names query_parameter_names); then
|
||||||
|
ERROR_MSG=$path
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
local method="DELETE"
|
||||||
|
local headers_curl
|
||||||
|
headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Call testInlineAdditionalProperties operation
|
# Call testInlineAdditionalProperties operation
|
||||||
@ -2563,6 +2882,42 @@ call_uploadFile() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
#
|
||||||
|
# Call uploadFileWithRequiredFile operation
|
||||||
|
#
|
||||||
|
##############################################################################
|
||||||
|
call_uploadFileWithRequiredFile() {
|
||||||
|
# ignore error about 'path_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local path_parameter_names=(petId)
|
||||||
|
# ignore error about 'query_parameter_names' being unused; passed by reference
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
local query_parameter_names=( )
|
||||||
|
local path
|
||||||
|
|
||||||
|
if ! path=$(build_request_path "/v2/fake/{petId}/uploadImageWithRequiredFile" path_parameter_names query_parameter_names); then
|
||||||
|
ERROR_MSG=$path
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
local method="POST"
|
||||||
|
local headers_curl
|
||||||
|
headers_curl=$(header_arguments_to_curl)
|
||||||
|
if [[ -n $header_accept ]]; then
|
||||||
|
headers_curl="${headers_curl} -H 'Accept: ${header_accept}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local basic_auth_option=""
|
||||||
|
if [[ -n $basic_auth_credential ]]; then
|
||||||
|
basic_auth_option="-u ${basic_auth_credential}"
|
||||||
|
fi
|
||||||
|
if [[ "$print_curl" = true ]]; then
|
||||||
|
echo "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\""
|
||||||
|
else
|
||||||
|
eval "curl ${basic_auth_option} ${curl_arguments} ${headers_curl} -X ${method} \"${host}${path}\""
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# Call deleteOrder operation
|
# Call deleteOrder operation
|
||||||
@ -3257,8 +3612,11 @@ case $key in
|
|||||||
OFF=""
|
OFF=""
|
||||||
result_color_table=( "" "" "" "" "" "" "" )
|
result_color_table=( "" "" "" "" "" "" "" )
|
||||||
;;
|
;;
|
||||||
testSpecialTags)
|
123Test@$%SpecialTags)
|
||||||
operation="testSpecialTags"
|
operation="123Test@$%SpecialTags"
|
||||||
|
;;
|
||||||
|
createXmlItem)
|
||||||
|
operation="createXmlItem"
|
||||||
;;
|
;;
|
||||||
fakeOuterBooleanSerialize)
|
fakeOuterBooleanSerialize)
|
||||||
operation="fakeOuterBooleanSerialize"
|
operation="fakeOuterBooleanSerialize"
|
||||||
@ -3272,6 +3630,9 @@ case $key in
|
|||||||
fakeOuterStringSerialize)
|
fakeOuterStringSerialize)
|
||||||
operation="fakeOuterStringSerialize"
|
operation="fakeOuterStringSerialize"
|
||||||
;;
|
;;
|
||||||
|
testBodyWithFileSchema)
|
||||||
|
operation="testBodyWithFileSchema"
|
||||||
|
;;
|
||||||
testBodyWithQueryParams)
|
testBodyWithQueryParams)
|
||||||
operation="testBodyWithQueryParams"
|
operation="testBodyWithQueryParams"
|
||||||
;;
|
;;
|
||||||
@ -3284,6 +3645,9 @@ case $key in
|
|||||||
testEnumParameters)
|
testEnumParameters)
|
||||||
operation="testEnumParameters"
|
operation="testEnumParameters"
|
||||||
;;
|
;;
|
||||||
|
testGroupParameters)
|
||||||
|
operation="testGroupParameters"
|
||||||
|
;;
|
||||||
testInlineAdditionalProperties)
|
testInlineAdditionalProperties)
|
||||||
operation="testInlineAdditionalProperties"
|
operation="testInlineAdditionalProperties"
|
||||||
;;
|
;;
|
||||||
@ -3317,6 +3681,9 @@ case $key in
|
|||||||
uploadFile)
|
uploadFile)
|
||||||
operation="uploadFile"
|
operation="uploadFile"
|
||||||
;;
|
;;
|
||||||
|
uploadFileWithRequiredFile)
|
||||||
|
operation="uploadFileWithRequiredFile"
|
||||||
|
;;
|
||||||
deleteOrder)
|
deleteOrder)
|
||||||
operation="deleteOrder"
|
operation="deleteOrder"
|
||||||
;;
|
;;
|
||||||
@ -3437,8 +3804,11 @@ fi
|
|||||||
|
|
||||||
# Run cURL command based on the operation ID
|
# Run cURL command based on the operation ID
|
||||||
case $operation in
|
case $operation in
|
||||||
testSpecialTags)
|
123Test@$%SpecialTags)
|
||||||
call_testSpecialTags
|
call_123Test@$%SpecialTags
|
||||||
|
;;
|
||||||
|
createXmlItem)
|
||||||
|
call_createXmlItem
|
||||||
;;
|
;;
|
||||||
fakeOuterBooleanSerialize)
|
fakeOuterBooleanSerialize)
|
||||||
call_fakeOuterBooleanSerialize
|
call_fakeOuterBooleanSerialize
|
||||||
@ -3452,6 +3822,9 @@ case $operation in
|
|||||||
fakeOuterStringSerialize)
|
fakeOuterStringSerialize)
|
||||||
call_fakeOuterStringSerialize
|
call_fakeOuterStringSerialize
|
||||||
;;
|
;;
|
||||||
|
testBodyWithFileSchema)
|
||||||
|
call_testBodyWithFileSchema
|
||||||
|
;;
|
||||||
testBodyWithQueryParams)
|
testBodyWithQueryParams)
|
||||||
call_testBodyWithQueryParams
|
call_testBodyWithQueryParams
|
||||||
;;
|
;;
|
||||||
@ -3464,6 +3837,9 @@ case $operation in
|
|||||||
testEnumParameters)
|
testEnumParameters)
|
||||||
call_testEnumParameters
|
call_testEnumParameters
|
||||||
;;
|
;;
|
||||||
|
testGroupParameters)
|
||||||
|
call_testGroupParameters
|
||||||
|
;;
|
||||||
testInlineAdditionalProperties)
|
testInlineAdditionalProperties)
|
||||||
call_testInlineAdditionalProperties
|
call_testInlineAdditionalProperties
|
||||||
;;
|
;;
|
||||||
@ -3497,6 +3873,9 @@ case $operation in
|
|||||||
uploadFile)
|
uploadFile)
|
||||||
call_uploadFile
|
call_uploadFile
|
||||||
;;
|
;;
|
||||||
|
uploadFileWithRequiredFile)
|
||||||
|
call_uploadFileWithRequiredFile
|
||||||
|
;;
|
||||||
deleteOrder)
|
deleteOrder)
|
||||||
call_deleteOrder
|
call_deleteOrder
|
||||||
;;
|
;;
|
||||||
|
@ -68,15 +68,18 @@ _petstore-cli()
|
|||||||
# The list of available operation in the REST service
|
# The list of available operation in the REST service
|
||||||
# It's modelled as an associative array for efficient key lookup
|
# It's modelled as an associative array for efficient key lookup
|
||||||
declare -A operations
|
declare -A operations
|
||||||
operations["testSpecialTags"]=1
|
operations["123Test@$%SpecialTags"]=1
|
||||||
|
operations["createXmlItem"]=1
|
||||||
operations["fakeOuterBooleanSerialize"]=1
|
operations["fakeOuterBooleanSerialize"]=1
|
||||||
operations["fakeOuterCompositeSerialize"]=1
|
operations["fakeOuterCompositeSerialize"]=1
|
||||||
operations["fakeOuterNumberSerialize"]=1
|
operations["fakeOuterNumberSerialize"]=1
|
||||||
operations["fakeOuterStringSerialize"]=1
|
operations["fakeOuterStringSerialize"]=1
|
||||||
|
operations["testBodyWithFileSchema"]=1
|
||||||
operations["testBodyWithQueryParams"]=1
|
operations["testBodyWithQueryParams"]=1
|
||||||
operations["testClientModel"]=1
|
operations["testClientModel"]=1
|
||||||
operations["testEndpointParameters"]=1
|
operations["testEndpointParameters"]=1
|
||||||
operations["testEnumParameters"]=1
|
operations["testEnumParameters"]=1
|
||||||
|
operations["testGroupParameters"]=1
|
||||||
operations["testInlineAdditionalProperties"]=1
|
operations["testInlineAdditionalProperties"]=1
|
||||||
operations["testJsonFormData"]=1
|
operations["testJsonFormData"]=1
|
||||||
operations["testClassname"]=1
|
operations["testClassname"]=1
|
||||||
@ -88,6 +91,7 @@ _petstore-cli()
|
|||||||
operations["updatePet"]=1
|
operations["updatePet"]=1
|
||||||
operations["updatePetWithForm"]=1
|
operations["updatePetWithForm"]=1
|
||||||
operations["uploadFile"]=1
|
operations["uploadFile"]=1
|
||||||
|
operations["uploadFileWithRequiredFile"]=1
|
||||||
operations["deleteOrder"]=1
|
operations["deleteOrder"]=1
|
||||||
operations["getInventory"]=1
|
operations["getInventory"]=1
|
||||||
operations["getOrderById"]=1
|
operations["getOrderById"]=1
|
||||||
@ -104,15 +108,18 @@ _petstore-cli()
|
|||||||
# An associative array of operations to their parameters
|
# An associative array of operations to their parameters
|
||||||
# Only include path, query and header parameters
|
# Only include path, query and header parameters
|
||||||
declare -A operation_parameters
|
declare -A operation_parameters
|
||||||
operation_parameters["testSpecialTags"]=""
|
operation_parameters["123Test@$%SpecialTags"]=""
|
||||||
|
operation_parameters["createXmlItem"]=""
|
||||||
operation_parameters["fakeOuterBooleanSerialize"]=""
|
operation_parameters["fakeOuterBooleanSerialize"]=""
|
||||||
operation_parameters["fakeOuterCompositeSerialize"]=""
|
operation_parameters["fakeOuterCompositeSerialize"]=""
|
||||||
operation_parameters["fakeOuterNumberSerialize"]=""
|
operation_parameters["fakeOuterNumberSerialize"]=""
|
||||||
operation_parameters["fakeOuterStringSerialize"]=""
|
operation_parameters["fakeOuterStringSerialize"]=""
|
||||||
|
operation_parameters["testBodyWithFileSchema"]=""
|
||||||
operation_parameters["testBodyWithQueryParams"]="query= "
|
operation_parameters["testBodyWithQueryParams"]="query= "
|
||||||
operation_parameters["testClientModel"]=""
|
operation_parameters["testClientModel"]=""
|
||||||
operation_parameters["testEndpointParameters"]=""
|
operation_parameters["testEndpointParameters"]=""
|
||||||
operation_parameters["testEnumParameters"]="enum_query_string_array= enum_query_string= enum_query_integer= enum_query_double= enum_header_string_array: enum_header_string: "
|
operation_parameters["testEnumParameters"]="enum_query_string_array= enum_query_string= enum_query_integer= enum_query_double= enum_header_string_array: enum_header_string: "
|
||||||
|
operation_parameters["testGroupParameters"]="required_string_group= required_int64_group= string_group= int64_group= required_boolean_group: boolean_group: "
|
||||||
operation_parameters["testInlineAdditionalProperties"]=""
|
operation_parameters["testInlineAdditionalProperties"]=""
|
||||||
operation_parameters["testJsonFormData"]=""
|
operation_parameters["testJsonFormData"]=""
|
||||||
operation_parameters["testClassname"]=""
|
operation_parameters["testClassname"]=""
|
||||||
@ -124,6 +131,7 @@ _petstore-cli()
|
|||||||
operation_parameters["updatePet"]=""
|
operation_parameters["updatePet"]=""
|
||||||
operation_parameters["updatePetWithForm"]="petId= "
|
operation_parameters["updatePetWithForm"]="petId= "
|
||||||
operation_parameters["uploadFile"]="petId= "
|
operation_parameters["uploadFile"]="petId= "
|
||||||
|
operation_parameters["uploadFileWithRequiredFile"]="petId= "
|
||||||
operation_parameters["deleteOrder"]="order_id= "
|
operation_parameters["deleteOrder"]="order_id= "
|
||||||
operation_parameters["getInventory"]=""
|
operation_parameters["getInventory"]=""
|
||||||
operation_parameters["getOrderById"]="order_id= "
|
operation_parameters["getOrderById"]="order_id= "
|
||||||
@ -139,6 +147,18 @@ _petstore-cli()
|
|||||||
|
|
||||||
# An associative array of possible values for enum parameters
|
# An associative array of possible values for enum parameters
|
||||||
declare -A operation_parameters_enum_values
|
declare -A operation_parameters_enum_values
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::required_boolean_group"]="true false"
|
||||||
|
operation_parameters_enum_values["testGroupParameters::boolean_group"]="true false"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check if this is OSX and use special __osx_init_completion function
|
# Check if this is OSX and use special __osx_init_completion function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user