From d04b7642f6b9311b827ff1bd52a217accca877f6 Mon Sep 17 00:00:00 2001 From: Kenny Jones Date: Thu, 28 Sep 2017 01:17:48 -0400 Subject: [PATCH] Feature: Adds doc generation (#6570) Reference #2359 --- .../codegen/languages/BashClientCodegen.java | 120 ++++++- .../src/main/resources/bash/README.mustache | 40 ++- .../src/main/resources/bash/api_doc.mustache | 47 +++ .../src/main/resources/bash/client.mustache | 6 +- .../main/resources/bash/model_doc.mustache | 11 + samples/client/petstore/bash/README.md | 112 ++++++- .../bash/docs/$special[model.name].md | 10 + .../client/petstore/bash/docs/200_response.md | 11 + .../bash/docs/AdditionalPropertiesClass.md | 11 + samples/client/petstore/bash/docs/Animal.md | 11 + .../client/petstore/bash/docs/AnimalFarm.md | 9 + .../petstore/bash/docs/AnotherFakeApi.md | 41 +++ .../client/petstore/bash/docs/ApiResponse.md | 12 + .../bash/docs/ArrayOfArrayOfNumberOnly.md | 10 + .../petstore/bash/docs/ArrayOfNumberOnly.md | 10 + .../client/petstore/bash/docs/ArrayTest.md | 12 + .../petstore/bash/docs/Capitalization.md | 15 + samples/client/petstore/bash/docs/Cat.md | 12 + samples/client/petstore/bash/docs/Category.md | 11 + .../client/petstore/bash/docs/ClassModel.md | 10 + samples/client/petstore/bash/docs/Client.md | 10 + samples/client/petstore/bash/docs/Dog.md | 12 + .../client/petstore/bash/docs/EnumArrays.md | 11 + .../client/petstore/bash/docs/EnumClass.md | 9 + .../client/petstore/bash/docs/Enum_Test.md | 13 + samples/client/petstore/bash/docs/FakeApi.md | 302 ++++++++++++++++++ .../bash/docs/FakeClassnameTags123Api.md | 39 +++ .../client/petstore/bash/docs/Format_test.md | 22 ++ .../petstore/bash/docs/HasOnlyReadOnly.md | 11 + samples/client/petstore/bash/docs/MapTest.md | 11 + ...dPropertiesAndAdditionalPropertiesClass.md | 12 + samples/client/petstore/bash/docs/Name.md | 13 + .../client/petstore/bash/docs/NumberOnly.md | 10 + samples/client/petstore/bash/docs/Order.md | 15 + .../client/petstore/bash/docs/OuterBoolean.md | 9 + .../petstore/bash/docs/OuterComposite.md | 12 + .../client/petstore/bash/docs/OuterEnum.md | 9 + .../client/petstore/bash/docs/OuterNumber.md | 9 + .../client/petstore/bash/docs/OuterString.md | 9 + samples/client/petstore/bash/docs/Pet.md | 15 + samples/client/petstore/bash/docs/PetApi.md | 277 ++++++++++++++++ .../petstore/bash/docs/ReadOnlyFirst.md | 11 + samples/client/petstore/bash/docs/Return.md | 10 + samples/client/petstore/bash/docs/StoreApi.md | 137 ++++++++ samples/client/petstore/bash/docs/Tag.md | 11 + samples/client/petstore/bash/docs/User.md | 17 + samples/client/petstore/bash/docs/UserApi.md | 271 ++++++++++++++++ samples/client/petstore/bash/petstore-cli | 38 +-- 48 files changed, 1815 insertions(+), 31 deletions(-) create mode 100644 modules/swagger-codegen/src/main/resources/bash/api_doc.mustache create mode 100644 modules/swagger-codegen/src/main/resources/bash/model_doc.mustache create mode 100644 samples/client/petstore/bash/docs/$special[model.name].md create mode 100644 samples/client/petstore/bash/docs/200_response.md create mode 100644 samples/client/petstore/bash/docs/AdditionalPropertiesClass.md create mode 100644 samples/client/petstore/bash/docs/Animal.md create mode 100644 samples/client/petstore/bash/docs/AnimalFarm.md create mode 100644 samples/client/petstore/bash/docs/AnotherFakeApi.md create mode 100644 samples/client/petstore/bash/docs/ApiResponse.md create mode 100644 samples/client/petstore/bash/docs/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/client/petstore/bash/docs/ArrayOfNumberOnly.md create mode 100644 samples/client/petstore/bash/docs/ArrayTest.md create mode 100644 samples/client/petstore/bash/docs/Capitalization.md create mode 100644 samples/client/petstore/bash/docs/Cat.md create mode 100644 samples/client/petstore/bash/docs/Category.md create mode 100644 samples/client/petstore/bash/docs/ClassModel.md create mode 100644 samples/client/petstore/bash/docs/Client.md create mode 100644 samples/client/petstore/bash/docs/Dog.md create mode 100644 samples/client/petstore/bash/docs/EnumArrays.md create mode 100644 samples/client/petstore/bash/docs/EnumClass.md create mode 100644 samples/client/petstore/bash/docs/Enum_Test.md create mode 100644 samples/client/petstore/bash/docs/FakeApi.md create mode 100644 samples/client/petstore/bash/docs/FakeClassnameTags123Api.md create mode 100644 samples/client/petstore/bash/docs/Format_test.md create mode 100644 samples/client/petstore/bash/docs/HasOnlyReadOnly.md create mode 100644 samples/client/petstore/bash/docs/MapTest.md create mode 100644 samples/client/petstore/bash/docs/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/client/petstore/bash/docs/Name.md create mode 100644 samples/client/petstore/bash/docs/NumberOnly.md create mode 100644 samples/client/petstore/bash/docs/Order.md create mode 100644 samples/client/petstore/bash/docs/OuterBoolean.md create mode 100644 samples/client/petstore/bash/docs/OuterComposite.md create mode 100644 samples/client/petstore/bash/docs/OuterEnum.md create mode 100644 samples/client/petstore/bash/docs/OuterNumber.md create mode 100644 samples/client/petstore/bash/docs/OuterString.md create mode 100644 samples/client/petstore/bash/docs/Pet.md create mode 100644 samples/client/petstore/bash/docs/PetApi.md create mode 100644 samples/client/petstore/bash/docs/ReadOnlyFirst.md create mode 100644 samples/client/petstore/bash/docs/Return.md create mode 100644 samples/client/petstore/bash/docs/StoreApi.md create mode 100644 samples/client/petstore/bash/docs/Tag.md create mode 100644 samples/client/petstore/bash/docs/User.md create mode 100644 samples/client/petstore/bash/docs/UserApi.md diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/BashClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/BashClientCodegen.java index de7ae732d8b..e80fd0961d0 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/BashClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/BashClientCodegen.java @@ -39,7 +39,8 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { protected String hostEnvironmentVariable; protected String basicAuthEnvironmentVariable; protected String apiKeyAuthEnvironmentVariable; - + protected String apiDocPath = "docs/"; + protected String modelDocPath = "docs/"; public static final String CURL_OPTIONS = "curlOptions"; public static final String PROCESS_MARKDOWN = "processMarkdown"; @@ -105,6 +106,13 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { apiTemplateFiles.clear(); + /** + * docs files. + */ + modelDocTemplateFiles.put("model_doc.mustache", ".md"); + apiDocTemplateFiles.put("api_doc.mustache", ".md"); + + /** * Templates location for client script and bash completion template. */ @@ -169,6 +177,7 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { typeMapping.put("int", "integer"); typeMapping.put("float", "float"); typeMapping.put("number", "integer"); + typeMapping.put("date", "string"); typeMapping.put("DateTime", "string"); typeMapping.put("long", "integer"); typeMapping.put("short", "integer"); @@ -185,12 +194,22 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { * are available in models, apis, and supporting files. */ additionalProperties.put("apiVersion", apiVersion); + // make api and model doc path available in mustache template + additionalProperties.put("apiDocPath", apiDocPath); + additionalProperties.put("modelDocPath", modelDocPath); /** * Language Specific Primitives. These types will not trigger imports by * the client generator */ - languageSpecificPrimitives = new HashSet(); + languageSpecificPrimitives.clear(); + languageSpecificPrimitives.add("array"); + languageSpecificPrimitives.add("map"); + languageSpecificPrimitives.add("boolean"); + languageSpecificPrimitives.add("integer"); + languageSpecificPrimitives.add("float"); + languageSpecificPrimitives.add("string"); + languageSpecificPrimitives.add("binary"); } @@ -239,15 +258,15 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { } supportingFiles.add(new SupportingFile( - "client.mustache", "", scriptName)); + "client.mustache", "", scriptName)); supportingFiles.add(new SupportingFile( - "bash-completion.mustache", "", scriptName+".bash-completion")); + "bash-completion.mustache", "", scriptName+".bash-completion")); supportingFiles.add(new SupportingFile( - "zsh-completion.mustache", "", "_"+scriptName)); + "zsh-completion.mustache", "", "_"+scriptName)); supportingFiles.add(new SupportingFile( - "README.mustache", "", "README.md")); + "README.mustache", "", "README.md")); supportingFiles.add(new SupportingFile( - "Dockerfile.mustache", "", "Dockerfile")); + "Dockerfile.mustache", "", "Dockerfile")); } public void setCurlOptions(String curlOptions) { @@ -314,6 +333,25 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { return outputFolder; } + @Override + public String apiDocFileFolder() { + return (outputFolder + "/" + apiDocPath); + } + + @Override + public String modelDocFileFolder() { + return (outputFolder + "/" + modelDocPath); + } + + @Override + public String toModelDocFilename(String name) { + return toModelName(name); + } + + @Override + public String toApiDocFilename(String name) { + return toApiName(name); + } /** * Optional - type declaration. This is a String which is used by the @@ -355,8 +393,9 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { if(languageSpecificPrimitives.contains(type)) return type; } - else + else { type = swaggerType; + } return toModelName(type); } @@ -656,4 +695,69 @@ public class BashClientCodegen extends DefaultCodegen implements CodegenConfig { } + @Override + public void setParameterExampleValue(CodegenParameter p) { + String example; + + if (p.defaultValue == null) { + example = p.example; + } else { + example = p.defaultValue; + } + + String type = p.baseType; + if (type == null) { + type = p.dataType; + } + + if ("string".equalsIgnoreCase(type)) { + if (example == null) { + example = p.paramName + "_example"; + } + example = "'" + escapeText(example) + "'"; + } else if ("integer".equals(type)) { + if (example == null) { + example = "56"; + } + } else if ("float".equalsIgnoreCase(type)) { + if (example == null) { + example = "3.4"; + } + } else if ("boolean".equalsIgnoreCase(type)) { + if (example == null) { + example = "True"; + } + } else if ("file".equalsIgnoreCase(type)) { + if (example == null) { + example = "/path/to/file"; + } + example = "'" + escapeText(example) + "'"; + } else if ("date".equalsIgnoreCase(type)) { + if (example == null) { + example = "2013-10-20"; + } + example = "'" + escapeText(example) + "'"; + } else if ("datetime".equalsIgnoreCase(type)) { + if (example == null) { + example = "2013-10-20T19:20:30+01:00"; + } + example = "'" + escapeText(example) + "'"; + } else if (!languageSpecificPrimitives.contains(type)) { + // type is a model class, e.g. User + example = type; + } else { + LOGGER.warn("Type " + type + " not handled properly in setParameterExampleValue"); + } + + if (example == null) { + example = "NULL"; + } else if (Boolean.TRUE.equals(p.isListContainer)) { + example = "[" + example + "]"; + } else if (Boolean.TRUE.equals(p.isMapContainer)) { + example = "{'key': " + example + "}"; + } + + p.example = example; + } + } diff --git a/modules/swagger-codegen/src/main/resources/bash/README.mustache b/modules/swagger-codegen/src/main/resources/bash/README.mustache index bbb85fb225b..db1abc26ffd 100644 --- a/modules/swagger-codegen/src/main/resources/bash/README.mustache +++ b/modules/swagger-codegen/src/main/resources/bash/README.mustache @@ -3,7 +3,7 @@ ## Overview This is a Bash client script for accessing {{appName}} service. -The script uses cURL underneath for making all REST calls. +The script uses cURL underneath for making all REST calls. ## Usage @@ -86,3 +86,41 @@ fi ### Zsh In Zsh, the generated `_{{scriptName}}` Zsh completion file must be copied to one of the folders under `$FPATH` variable. + + +## Documentation for API Endpoints + +All URIs are relative to *{{basePathWithoutHost}}* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} + +## Documentation For Models + +{{#models}}{{#model}} - [{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) +{{/model}}{{/models}} + +## Documentation For Authorization + +{{^authMethods}} All endpoints do not require authorization. +{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}} +{{#authMethods}}## {{{name}}} + +{{#isApiKey}}- **Type**: API key +- **API key parameter name**: {{{keyParamName}}} +- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} +{{/isApiKey}} +{{#isBasic}}- **Type**: HTTP basic authentication +{{/isBasic}} +{{#isOAuth}}- **Type**: OAuth +- **Flow**: {{{flow}}}{{#authorizationUrl}} +- **Authorization URL**: {{{authorizationUrl}}}{{/authorizationUrl}}{{#tokenUrl}} +- **Token URL**: {{{tokenUrl}}}{{/tokenUrl}} +- **Scopes**:{{^scopes}} N/A{{/scopes}} +{{#scopes}} - **{{{scope}}}**: {{{description}}} +{{/scopes}} +{{/isOAuth}} + +{{/authMethods}} diff --git a/modules/swagger-codegen/src/main/resources/bash/api_doc.mustache b/modules/swagger-codegen/src/main/resources/bash/api_doc.mustache new file mode 100644 index 00000000000..8b663e4772f --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/bash/api_doc.mustache @@ -0,0 +1,47 @@ +# {{classname}}{{#description}} +{{description}}{{/description}} + +All URIs are relative to *{{basePathWithoutHost}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} +## **{{{operationId}}}** + +{{{summary}}}{{#notes}} + +{{{notes}}}{{/notes}} + +### Example +```bash +{{scriptName}} {{operationId}}{{#allParams}}{{#isPathParam}} {{baseName}}=value{{/isPathParam}}{{#isQueryParam}} {{#isContainer}} Specify as: {{#vendorExtensions}}{{#x-codegen-collection-multi}} {{baseName}}=value1 {{baseName}}=value2 {{baseName}}=...{{/x-codegen-collection-multi}}{{#x-codegen-collection-csv}} {{baseName}}="value1,value2,..."{{/x-codegen-collection-csv}}{{#x-codegen-collection-pipes}} {{baseName}}="value1|value2|..."{{/x-codegen-collection-pipes}}{{#x-codegen-collection-ssv}} {{baseName}}="value1 value2 ..."{{/x-codegen-collection-ssv}}{{#x-codegen-collection-tsv}} {{baseName}}="value1\\tvalue2\\t..."{{/x-codegen-collection-tsv}}{{/vendorExtensions}}{{/isContainer}}{{^isContainer}} {{baseName}}=value{{/isContainer}}{{/isQueryParam}}{{#isHeaderParam}} {{baseName}}:value{{/isHeaderParam}}{{#isBodyParam}}{{#vendorExtensions}}{{#x-codegen-body-example}} '{{{x-codegen-body-example}}}'{{/x-codegen-body-example}}{{/vendorExtensions}}{{/isBodyParam}}{{/allParams}} +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{baseType}}.md){{/isPrimitiveType}}{{/isFile}} | {{{description}}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}(empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not Applicable{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not Applicable{{/produces}} + +[[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) + +{{/operation}} +{{/operations}} diff --git a/modules/swagger-codegen/src/main/resources/bash/client.mustache b/modules/swagger-codegen/src/main/resources/bash/client.mustache index 0922d286b83..d97b85bafb2 100644 --- a/modules/swagger-codegen/src/main/resources/bash/client.mustache +++ b/modules/swagger-codegen/src/main/resources/bash/client.mustache @@ -577,9 +577,11 @@ EOF {{#x-codegen-apikey-env}}echo -e " or export ${RED}{{x-codegen-apikey-env}}=''${OFF}"{{/x-codegen-apikey-env}} {{/isApiKey}} {{#isOAuth}} - echo -e " - ${MAGENTA}OAuth2 (flow: {{flow}})${OFF}" + echo -e " - ${MAGENTA}OAuth2 (flow: {{flow}})${OFF}"{{#authorizationUrl}} echo -e " Authorization URL: " - echo -e " * {{authorizationUrl}}" + echo -e " * {{authorizationUrl}}"{{/authorizationUrl}}{{#tokenUrl}} + echo -e " Token URL: " + echo -e " * {{tokenUrl}}"{{/tokenUrl}} echo -e " Scopes:" {{#scopes}} echo -e " * {{scope}} - {{description}}" diff --git a/modules/swagger-codegen/src/main/resources/bash/model_doc.mustache b/modules/swagger-codegen/src/main/resources/bash/model_doc.mustache new file mode 100644 index 00000000000..ad08afe6397 --- /dev/null +++ b/modules/swagger-codegen/src/main/resources/bash/model_doc.mustache @@ -0,0 +1,11 @@ +{{#models}}{{#model}}# {{name}} + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{datatype}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{datatype}}**]({{complexType}}.md){{/isPrimitiveType}} | {{title}} | {{^required}}[optional] {{/required}}{{#readOnly}}[readonly] {{/readOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} +{{/vars}} + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + +{{/model}}{{/models}} diff --git a/samples/client/petstore/bash/README.md b/samples/client/petstore/bash/README.md index 619928a4026..534b292a6a7 100644 --- a/samples/client/petstore/bash/README.md +++ b/samples/client/petstore/bash/README.md @@ -3,7 +3,7 @@ ## Overview This is a Bash client script for accessing Swagger Petstore service. -The script uses cURL underneath for making all REST calls. +The script uses cURL underneath for making all REST calls. ## Usage @@ -86,3 +86,113 @@ fi ### Zsh In Zsh, the generated `_petstore-cli` Zsh completion file must be copied to one of the folders under `$FPATH` variable. + + +## Documentation for API Endpoints + +All URIs are relative to */v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**testSpecialTags**](docs/AnotherFakeApi.md#testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*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* | [**testEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*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 +*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*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* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*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* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [$special[model.name]](docs/$special[model.name].md) + - [200_response](docs/200_response.md) + - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) + - [Animal](docs/Animal.md) + - [AnimalFarm](docs/AnimalFarm.md) + - [ApiResponse](docs/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) + - [ArrayTest](docs/ArrayTest.md) + - [Capitalization](docs/Capitalization.md) + - [Category](docs/Category.md) + - [ClassModel](docs/ClassModel.md) + - [Client](docs/Client.md) + - [EnumArrays](docs/EnumArrays.md) + - [EnumClass](docs/EnumClass.md) + - [Enum_Test](docs/Enum_Test.md) + - [Format_test](docs/Format_test.md) + - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) + - [MapTest](docs/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Name](docs/Name.md) + - [NumberOnly](docs/NumberOnly.md) + - [Order](docs/Order.md) + - [OuterBoolean](docs/OuterBoolean.md) + - [OuterComposite](docs/OuterComposite.md) + - [OuterEnum](docs/OuterEnum.md) + - [OuterNumber](docs/OuterNumber.md) + - [OuterString](docs/OuterString.md) + - [Pet](docs/Pet.md) + - [ReadOnlyFirst](docs/ReadOnlyFirst.md) + - [Return](docs/Return.md) + - [Tag](docs/Tag.md) + - [User](docs/User.md) + - [Cat](docs/Cat.md) + - [Dog](docs/Dog.md) + + +## Documentation For Authorization + + +## api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +## api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +## http_basic_test + +- **Type**: HTTP basic authentication + +## petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + diff --git a/samples/client/petstore/bash/docs/$special[model.name].md b/samples/client/petstore/bash/docs/$special[model.name].md new file mode 100644 index 00000000000..2b02e4cece0 --- /dev/null +++ b/samples/client/petstore/bash/docs/$special[model.name].md @@ -0,0 +1,10 @@ +# $special[model.name] + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**$special[property.name]** | **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) + + diff --git a/samples/client/petstore/bash/docs/200_response.md b/samples/client/petstore/bash/docs/200_response.md new file mode 100644 index 00000000000..b575df6f2eb --- /dev/null +++ b/samples/client/petstore/bash/docs/200_response.md @@ -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) + + diff --git a/samples/client/petstore/bash/docs/AdditionalPropertiesClass.md b/samples/client/petstore/bash/docs/AdditionalPropertiesClass.md new file mode 100644 index 00000000000..70fe49c1edf --- /dev/null +++ b/samples/client/petstore/bash/docs/AdditionalPropertiesClass.md @@ -0,0 +1,11 @@ +# AdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**map_property** | **map[String, string]** | | [optional] [default to null] +**map_of_map_property** | **map[String, map[String, 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) + + diff --git a/samples/client/petstore/bash/docs/Animal.md b/samples/client/petstore/bash/docs/Animal.md new file mode 100644 index 00000000000..ea3395629b8 --- /dev/null +++ b/samples/client/petstore/bash/docs/Animal.md @@ -0,0 +1,11 @@ +# Animal + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **string** | | [default to null] +**color** | **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) + + diff --git a/samples/client/petstore/bash/docs/AnimalFarm.md b/samples/client/petstore/bash/docs/AnimalFarm.md new file mode 100644 index 00000000000..df6bab21dae --- /dev/null +++ b/samples/client/petstore/bash/docs/AnimalFarm.md @@ -0,0 +1,9 @@ +# AnimalFarm + +## 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) + + diff --git a/samples/client/petstore/bash/docs/AnotherFakeApi.md b/samples/client/petstore/bash/docs/AnotherFakeApi.md new file mode 100644 index 00000000000..039b7f381c6 --- /dev/null +++ b/samples/client/petstore/bash/docs/AnotherFakeApi.md @@ -0,0 +1,41 @@ +# AnotherFakeApi + +All URIs are relative to */v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags + + +## **testSpecialTags** + +To test special tags + +To test special tags + +### Example +```bash +petstore-cli testSpecialTags +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + diff --git a/samples/client/petstore/bash/docs/ApiResponse.md b/samples/client/petstore/bash/docs/ApiResponse.md new file mode 100644 index 00000000000..9ca9e51945f --- /dev/null +++ b/samples/client/petstore/bash/docs/ApiResponse.md @@ -0,0 +1,12 @@ +# ApiResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **integer** | | [optional] [default to null] +**type** | **string** | | [optional] [default to null] +**message** | **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) + + diff --git a/samples/client/petstore/bash/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/bash/docs/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 00000000000..76d03f4d1ba --- /dev/null +++ b/samples/client/petstore/bash/docs/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayArrayNumber** | **array[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) + + diff --git a/samples/client/petstore/bash/docs/ArrayOfNumberOnly.md b/samples/client/petstore/bash/docs/ArrayOfNumberOnly.md new file mode 100644 index 00000000000..c299fcd3c4b --- /dev/null +++ b/samples/client/petstore/bash/docs/ArrayOfNumberOnly.md @@ -0,0 +1,10 @@ +# ArrayOfNumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArrayNumber** | **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) + + diff --git a/samples/client/petstore/bash/docs/ArrayTest.md b/samples/client/petstore/bash/docs/ArrayTest.md new file mode 100644 index 00000000000..6c86d88f309 --- /dev/null +++ b/samples/client/petstore/bash/docs/ArrayTest.md @@ -0,0 +1,12 @@ +# ArrayTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**array_of_string** | **array[string]** | | [optional] [default to null] +**array_array_of_integer** | **array[array[integer]]** | | [optional] [default to null] +**array_array_of_model** | **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) + + diff --git a/samples/client/petstore/bash/docs/Capitalization.md b/samples/client/petstore/bash/docs/Capitalization.md new file mode 100644 index 00000000000..362258aa0d4 --- /dev/null +++ b/samples/client/petstore/bash/docs/Capitalization.md @@ -0,0 +1,15 @@ +# Capitalization + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallCamel** | **string** | | [optional] [default to null] +**CapitalCamel** | **string** | | [optional] [default to null] +**small_Snake** | **string** | | [optional] [default to null] +**Capital_Snake** | **string** | | [optional] [default to null] +**SCA_ETH_Flow_Points** | **string** | | [optional] [default to null] +**ATT_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) + + diff --git a/samples/client/petstore/bash/docs/Cat.md b/samples/client/petstore/bash/docs/Cat.md new file mode 100644 index 00000000000..6b75b077f21 --- /dev/null +++ b/samples/client/petstore/bash/docs/Cat.md @@ -0,0 +1,12 @@ +# Cat + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **string** | | [default to null] +**color** | **string** | | [optional] [default to null] +**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) + + diff --git a/samples/client/petstore/bash/docs/Category.md b/samples/client/petstore/bash/docs/Category.md new file mode 100644 index 00000000000..5af29e81851 --- /dev/null +++ b/samples/client/petstore/bash/docs/Category.md @@ -0,0 +1,11 @@ +# Category + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **integer** | | [optional] [default to null] +**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) + + diff --git a/samples/client/petstore/bash/docs/ClassModel.md b/samples/client/petstore/bash/docs/ClassModel.md new file mode 100644 index 00000000000..7979502a642 --- /dev/null +++ b/samples/client/petstore/bash/docs/ClassModel.md @@ -0,0 +1,10 @@ +# ClassModel + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_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) + + diff --git a/samples/client/petstore/bash/docs/Client.md b/samples/client/petstore/bash/docs/Client.md new file mode 100644 index 00000000000..cbe0f4e3c20 --- /dev/null +++ b/samples/client/petstore/bash/docs/Client.md @@ -0,0 +1,10 @@ +# Client + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **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) + + diff --git a/samples/client/petstore/bash/docs/Dog.md b/samples/client/petstore/bash/docs/Dog.md new file mode 100644 index 00000000000..9947ad0b79b --- /dev/null +++ b/samples/client/petstore/bash/docs/Dog.md @@ -0,0 +1,12 @@ +# Dog + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**className** | **string** | | [default to null] +**color** | **string** | | [optional] [default to null] +**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) + + diff --git a/samples/client/petstore/bash/docs/EnumArrays.md b/samples/client/petstore/bash/docs/EnumArrays.md new file mode 100644 index 00000000000..70798f4be67 --- /dev/null +++ b/samples/client/petstore/bash/docs/EnumArrays.md @@ -0,0 +1,11 @@ +# EnumArrays + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**just_symbol** | **string** | | [optional] [default to null] +**array_enum** | **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) + + diff --git a/samples/client/petstore/bash/docs/EnumClass.md b/samples/client/petstore/bash/docs/EnumClass.md new file mode 100644 index 00000000000..67f017becd0 --- /dev/null +++ b/samples/client/petstore/bash/docs/EnumClass.md @@ -0,0 +1,9 @@ +# EnumClass + +## 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) + + diff --git a/samples/client/petstore/bash/docs/Enum_Test.md b/samples/client/petstore/bash/docs/Enum_Test.md new file mode 100644 index 00000000000..b9de3aae862 --- /dev/null +++ b/samples/client/petstore/bash/docs/Enum_Test.md @@ -0,0 +1,13 @@ +# Enum_Test + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enum_string** | **string** | | [optional] [default to null] +**enum_integer** | **integer** | | [optional] [default to null] +**enum_number** | **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) + + diff --git a/samples/client/petstore/bash/docs/FakeApi.md b/samples/client/petstore/bash/docs/FakeApi.md new file mode 100644 index 00000000000..a79c43542a3 --- /dev/null +++ b/samples/client/petstore/bash/docs/FakeApi.md @@ -0,0 +1,302 @@ +# FakeApi + +All URIs are relative to */v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | +[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters +假端點 +偽のエンドポイント +가짜 엔드 포인트 +[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters +[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data + + +## **fakeOuterBooleanSerialize** + + + +Test serialization of outer boolean types + +### Example +```bash +petstore-cli fakeOuterBooleanSerialize +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterBoolean**](OuterBoolean.md) | Input boolean as post body | [optional] + +### Return type + +[**OuterBoolean**](OuterBoolean.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + +## **fakeOuterCompositeSerialize** + + + +Test serialization of object with outer number type + +### Example +```bash +petstore-cli fakeOuterCompositeSerialize +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + +## **fakeOuterNumberSerialize** + + + +Test serialization of outer number types + +### Example +```bash +petstore-cli fakeOuterNumberSerialize +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterNumber**](OuterNumber.md) | Input number as post body | [optional] + +### Return type + +[**OuterNumber**](OuterNumber.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + +## **fakeOuterStringSerialize** + + + +Test serialization of outer string types + +### Example +```bash +petstore-cli fakeOuterStringSerialize +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**OuterString**](OuterString.md) | Input string as post body | [optional] + +### Return type + +[**OuterString**](OuterString.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + +## **testClientModel** + +To test \"client\" model + +To test \"client\" model + +### Example +```bash +petstore-cli testClientModel +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: 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) + +## **testEndpointParameters** + +Fake endpoint for testing various parameters +假端點 +偽のエンドポイント +가짜 엔드 포인트 + +Fake endpoint for testing various parameters +假端點 +偽のエンドポイント +가짜 엔드 포인트 + +### Example +```bash +petstore-cli testEndpointParameters +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **integer** | None | + **double** | **float** | None | + **patternWithoutDelimiter** | **string** | None | + **byte** | **string** | None | + **integer** | **integer** | None | [optional] + **int32** | **integer** | None | [optional] + **int64** | **integer** | None | [optional] + **float** | **float** | None | [optional] + **string** | **string** | None | [optional] + **binary** | **binary** | None | [optional] + **date** | **string** | None | [optional] + **dateTime** | **string** | None | [optional] + **password** | **string** | None | [optional] + **callback** | **string** | None | [optional] + +### Return type + +(empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/xml; charset=utf-8, application/json; charset=utf-8 + - **Accept**: application/xml; charset=utf-8, application/json; charset=utf-8 + +[[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** + +To test enum parameters + +To test enum parameters + +### Example +```bash +petstore-cli testEnumParameters enum_header_string_array:value enum_header_string:value Specify as: enum_query_string=value enum_query_integer=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumFormStringArray** | [**array[string]**](string.md) | Form parameter enum test (string array) | [optional] + **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] + **enumHeaderStringArray** | [**array[string]**](string.md) | Header parameter enum test (string array) | [optional] + **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] + **enumQueryStringArray** | [**array[string]**](string.md) | Query parameter enum test (string array) | [optional] + **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] + **enumQueryInteger** | **integer** | Query parameter enum test (double) | [optional] + **enumQueryDouble** | **float** | Query parameter enum test (double) | [optional] + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: */* + - **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) + +## **testJsonFormData** + +test json serialization of form data + + + +### Example +```bash +petstore-cli testJsonFormData +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **string** | field1 | + **param2** | **string** | field2 | + +### 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) + diff --git a/samples/client/petstore/bash/docs/FakeClassnameTags123Api.md b/samples/client/petstore/bash/docs/FakeClassnameTags123Api.md new file mode 100644 index 00000000000..00a1f8b36be --- /dev/null +++ b/samples/client/petstore/bash/docs/FakeClassnameTags123Api.md @@ -0,0 +1,39 @@ +# FakeClassnameTags123Api + +All URIs are relative to */v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +## **testClassname** + +To test class name in snake case + +### Example +```bash +petstore-cli testClassname +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Client**](Client.md) | client model | + +### Return type + +[**Client**](Client.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: 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) + diff --git a/samples/client/petstore/bash/docs/Format_test.md b/samples/client/petstore/bash/docs/Format_test.md new file mode 100644 index 00000000000..8f73bb59bbc --- /dev/null +++ b/samples/client/petstore/bash/docs/Format_test.md @@ -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) + + diff --git a/samples/client/petstore/bash/docs/HasOnlyReadOnly.md b/samples/client/petstore/bash/docs/HasOnlyReadOnly.md new file mode 100644 index 00000000000..136c1624714 --- /dev/null +++ b/samples/client/petstore/bash/docs/HasOnlyReadOnly.md @@ -0,0 +1,11 @@ +# hasOnlyReadOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **string** | | [optional] [default to null] +**foo** | **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) + + diff --git a/samples/client/petstore/bash/docs/MapTest.md b/samples/client/petstore/bash/docs/MapTest.md new file mode 100644 index 00000000000..31ca86b91c1 --- /dev/null +++ b/samples/client/petstore/bash/docs/MapTest.md @@ -0,0 +1,11 @@ +# MapTest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**map_map_of_string** | **map[String, map[String, string]]** | | [optional] [default to null] +**map_of_enum_string** | **map[String, 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) + + diff --git a/samples/client/petstore/bash/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/bash/docs/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 00000000000..ce8cc62c694 --- /dev/null +++ b/samples/client/petstore/bash/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,12 @@ +# MixedPropertiesAndAdditionalPropertiesClass + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **string** | | [optional] [default to null] +**dateTime** | **string** | | [optional] [default to null] +**map** | [**map[String, Animal]**](Animal.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) + + diff --git a/samples/client/petstore/bash/docs/Name.md b/samples/client/petstore/bash/docs/Name.md new file mode 100644 index 00000000000..8f59de26d01 --- /dev/null +++ b/samples/client/petstore/bash/docs/Name.md @@ -0,0 +1,13 @@ +# Name + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **integer** | | [default to null] +**snake_case** | **integer** | | [optional] [default to null] +**property** | **string** | | [optional] [default to null] +**123Number** | **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) + + diff --git a/samples/client/petstore/bash/docs/NumberOnly.md b/samples/client/petstore/bash/docs/NumberOnly.md new file mode 100644 index 00000000000..5e0f270ec27 --- /dev/null +++ b/samples/client/petstore/bash/docs/NumberOnly.md @@ -0,0 +1,10 @@ +# NumberOnly + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JustNumber** | **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) + + diff --git a/samples/client/petstore/bash/docs/Order.md b/samples/client/petstore/bash/docs/Order.md new file mode 100644 index 00000000000..d8b67f7f972 --- /dev/null +++ b/samples/client/petstore/bash/docs/Order.md @@ -0,0 +1,15 @@ +# Order + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **integer** | | [optional] [default to null] +**petId** | **integer** | | [optional] [default to null] +**quantity** | **integer** | | [optional] [default to null] +**shipDate** | **string** | | [optional] [default to null] +**status** | **string** | | [optional] [default to null] +**complete** | **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) + + diff --git a/samples/client/petstore/bash/docs/OuterBoolean.md b/samples/client/petstore/bash/docs/OuterBoolean.md new file mode 100644 index 00000000000..8b243399474 --- /dev/null +++ b/samples/client/petstore/bash/docs/OuterBoolean.md @@ -0,0 +1,9 @@ +# OuterBoolean + +## 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) + + diff --git a/samples/client/petstore/bash/docs/OuterComposite.md b/samples/client/petstore/bash/docs/OuterComposite.md new file mode 100644 index 00000000000..78c79032912 --- /dev/null +++ b/samples/client/petstore/bash/docs/OuterComposite.md @@ -0,0 +1,12 @@ +# OuterComposite + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**my_number** | [**OuterNumber**](OuterNumber.md) | | [optional] [default to null] +**my_string** | [**OuterString**](OuterString.md) | | [optional] [default to null] +**my_boolean** | [**OuterBoolean**](OuterBoolean.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) + + diff --git a/samples/client/petstore/bash/docs/OuterEnum.md b/samples/client/petstore/bash/docs/OuterEnum.md new file mode 100644 index 00000000000..06d413b0168 --- /dev/null +++ b/samples/client/petstore/bash/docs/OuterEnum.md @@ -0,0 +1,9 @@ +# OuterEnum + +## 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) + + diff --git a/samples/client/petstore/bash/docs/OuterNumber.md b/samples/client/petstore/bash/docs/OuterNumber.md new file mode 100644 index 00000000000..8aa37f329bd --- /dev/null +++ b/samples/client/petstore/bash/docs/OuterNumber.md @@ -0,0 +1,9 @@ +# OuterNumber + +## 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) + + diff --git a/samples/client/petstore/bash/docs/OuterString.md b/samples/client/petstore/bash/docs/OuterString.md new file mode 100644 index 00000000000..9ccaadaf98d --- /dev/null +++ b/samples/client/petstore/bash/docs/OuterString.md @@ -0,0 +1,9 @@ +# OuterString + +## 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) + + diff --git a/samples/client/petstore/bash/docs/Pet.md b/samples/client/petstore/bash/docs/Pet.md new file mode 100644 index 00000000000..b86df96bb59 --- /dev/null +++ b/samples/client/petstore/bash/docs/Pet.md @@ -0,0 +1,15 @@ +# Pet + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **integer** | | [optional] [default to null] +**category** | [**Category**](Category.md) | | [optional] [default to null] +**name** | **string** | | [default to null] +**photoUrls** | **array[string]** | | [default to null] +**tags** | [**array[Tag]**](Tag.md) | | [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) + + diff --git a/samples/client/petstore/bash/docs/PetApi.md b/samples/client/petstore/bash/docs/PetApi.md new file mode 100644 index 00000000000..661ee03cbbf --- /dev/null +++ b/samples/client/petstore/bash/docs/PetApi.md @@ -0,0 +1,277 @@ +# PetApi + +All URIs are relative to */v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID +[**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 +[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image + + +## **addPet** + +Add a new pet to the store + + + +### Example +```bash +petstore-cli addPet +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +(empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **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) + +## **deletePet** + +Deletes a pet + + + +### Example +```bash +petstore-cli deletePet petId=value api_key:value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **integer** | Pet id to delete | + **apiKey** | **string** | | [optional] + +### Return type + +(empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **findPetsByStatus** + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```bash +petstore-cli findPetsByStatus Specify as: status="value1,value2,..." +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**array[string]**](string.md) | Status values that need to be considered for filter | + +### Return type + +[**array[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **findPetsByTags** + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```bash +petstore-cli findPetsByTags Specify as: tags="value1,value2,..." +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**array[string]**](string.md) | Tags to filter by | + +### Return type + +[**array[Pet]**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **getPetById** + +Find pet by ID + +Returns a single pet + +### Example +```bash +petstore-cli getPetById petId=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **integer** | ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **updatePet** + +Update an existing pet + + + +### Example +```bash +petstore-cli updatePet +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | + +### Return type + +(empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **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) + +## **updatePetWithForm** + +Updates a pet in the store with form data + + + +### Example +```bash +petstore-cli updatePetWithForm petId=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **integer** | ID of pet that needs to be updated | + **name** | **string** | Updated name of the pet | [optional] + **status** | **string** | Updated status of the pet | [optional] + +### Return type + +(empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **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) + +## **uploadFile** + +uploads an image + + + +### Example +```bash +petstore-cli uploadFile petId=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petId** | **integer** | ID of pet to update | + **additionalMetadata** | **string** | Additional data to pass to server | [optional] + **file** | **File** | file to upload | [optional] + +### 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) + diff --git a/samples/client/petstore/bash/docs/ReadOnlyFirst.md b/samples/client/petstore/bash/docs/ReadOnlyFirst.md new file mode 100644 index 00000000000..de713c7197b --- /dev/null +++ b/samples/client/petstore/bash/docs/ReadOnlyFirst.md @@ -0,0 +1,11 @@ +# ReadOnlyFirst + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **string** | | [optional] [default to null] +**baz** | **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) + + diff --git a/samples/client/petstore/bash/docs/Return.md b/samples/client/petstore/bash/docs/Return.md new file mode 100644 index 00000000000..dfe5ec9bb45 --- /dev/null +++ b/samples/client/petstore/bash/docs/Return.md @@ -0,0 +1,10 @@ +# Return + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return** | **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) + + diff --git a/samples/client/petstore/bash/docs/StoreApi.md b/samples/client/petstore/bash/docs/StoreApi.md new file mode 100644 index 00000000000..8e4bd83d3c4 --- /dev/null +++ b/samples/client/petstore/bash/docs/StoreApi.md @@ -0,0 +1,137 @@ +# StoreApi + +All URIs are relative to */v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet + + +## **deleteOrder** + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```bash +petstore-cli deleteOrder order_id=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **string** | ID of the order that needs to be deleted | + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **getInventory** + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```bash +petstore-cli getInventory +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**map[String, integer]** + +### Authorization + +[api_key](../README.md#api_key) + +### 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) + +## **getOrderById** + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +### Example +```bash +petstore-cli getOrderById order_id=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **integer** | ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **placeOrder** + +Place an order for a pet + + + +### Example +```bash +petstore-cli placeOrder +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**Order**](Order.md) | order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + diff --git a/samples/client/petstore/bash/docs/Tag.md b/samples/client/petstore/bash/docs/Tag.md new file mode 100644 index 00000000000..ce2d01c66e4 --- /dev/null +++ b/samples/client/petstore/bash/docs/Tag.md @@ -0,0 +1,11 @@ +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **integer** | | [optional] [default to null] +**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) + + diff --git a/samples/client/petstore/bash/docs/User.md b/samples/client/petstore/bash/docs/User.md new file mode 100644 index 00000000000..1323b94963b --- /dev/null +++ b/samples/client/petstore/bash/docs/User.md @@ -0,0 +1,17 @@ +# User + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **integer** | | [optional] [default to null] +**username** | **string** | | [optional] [default to null] +**firstName** | **string** | | [optional] [default to null] +**lastName** | **string** | | [optional] [default to null] +**email** | **string** | | [optional] [default to null] +**password** | **string** | | [optional] [default to null] +**phone** | **string** | | [optional] [default to null] +**userStatus** | **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) + + diff --git a/samples/client/petstore/bash/docs/UserApi.md b/samples/client/petstore/bash/docs/UserApi.md new file mode 100644 index 00000000000..e2d48888ed6 --- /dev/null +++ b/samples/client/petstore/bash/docs/UserApi.md @@ -0,0 +1,271 @@ +# UserApi + +All URIs are relative to */v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user + + +## **createUser** + +Create user + +This can only be done by the logged in user. + +### Example +```bash +petstore-cli createUser +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**User**](User.md) | Created user object | + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **createUsersWithArrayInput** + +Creates list of users with given input array + + + +### Example +```bash +petstore-cli createUsersWithArrayInput +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**array[User]**](User.md) | List of user object | + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **createUsersWithListInput** + +Creates list of users with given input array + + + +### Example +```bash +petstore-cli createUsersWithListInput +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**array[User]**](User.md) | List of user object | + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **deleteUser** + +Delete user + +This can only be done by the logged in user. + +### Example +```bash +petstore-cli deleteUser username=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string** | The name that needs to be deleted | + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **getUserByName** + +Get user by user name + + + +### Example +```bash +petstore-cli getUserByName username=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string** | The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **loginUser** + +Logs user into the system + + + +### Example +```bash +petstore-cli loginUser username=value password=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string** | The user name for login | + **password** | **string** | The password for login in clear text | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **logoutUser** + +Logs out current logged in user session + + + +### Example +```bash +petstore-cli logoutUser +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + +## **updateUser** + +Updated user + +This can only be done by the logged in user. + +### Example +```bash +petstore-cli updateUser username=value +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **string** | name that need to be deleted | + **body** | [**User**](User.md) | Updated user object | + +### Return type + +(empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not Applicable + - **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) + diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 04b0fd2f634..ea797959531 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -940,13 +940,13 @@ print_testEnumParameters_help() { echo -e "To test enum parameters" | paste -sd' ' | fold -sw 80 echo -e "" 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${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: ${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${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: ${OFF}" \ | 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/^/ /' - 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}${OFF} - Query parameter enum test (double)${YELLOW} Specify as: enum_query_integer=value${OFF}" \ | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" @@ -1020,8 +1020,8 @@ print_deletePet_help() { echo -e "" | paste -sd' ' | fold -sw 80 echo -e "" 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}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}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}api_key${OFF} ${BLUE}[string]${OFF}${OFF} - ${YELLOW}Specify as: api_key:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" code=400 @@ -1039,7 +1039,7 @@ print_findPetsByStatus_help() { echo -e "Multiple status values can be provided with comma separated strings" | paste -sd' ' | fold -sw 80 echo -e "" 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}${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/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" @@ -1060,7 +1060,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 "" 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}${OFF} - Tags to filter by${YELLOW} Specify as: tags="value1,value2,..."${OFF}" \ | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" @@ -1081,7 +1081,7 @@ print_getPetById_help() { echo -e "Returns a single pet" | paste -sd' ' | fold -sw 80 echo -e "" 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}${OFF} - ID of pet to return ${YELLOW}Specify as: petId=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" code=200 @@ -1126,7 +1126,7 @@ print_updatePetWithForm_help() { echo -e "" | paste -sd' ' | fold -sw 80 echo -e "" 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}${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 -e "${BOLD}${WHITE}Responses${OFF}" code=405 @@ -1144,7 +1144,7 @@ print_uploadFile_help() { echo -e "" | paste -sd' ' | fold -sw 80 echo -e "" 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}${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 @@ -1162,7 +1162,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 "" 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}${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 -e "${BOLD}${WHITE}Responses${OFF}" code=400 @@ -1198,7 +1198,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 "" 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}${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 -e "${BOLD}${WHITE}Responses${OFF}" code=200 @@ -1298,7 +1298,7 @@ print_deleteUser_help() { echo -e "This can only be done by the logged in user." | paste -sd' ' | fold -sw 80 echo -e "" 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}${OFF} - The name that needs to be deleted ${YELLOW}Specify as: username=value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" code=400 @@ -1318,7 +1318,7 @@ print_getUserByName_help() { echo -e "" | paste -sd' ' | fold -sw 80 echo -e "" 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}${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 -e "${BOLD}${WHITE}Responses${OFF}" code=200 @@ -1340,9 +1340,9 @@ print_loginUser_help() { echo -e "" | paste -sd' ' | fold -sw 80 echo -e "" 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}${OFF} - The user name for login${YELLOW} Specify as: username=value${OFF}" \ | 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}${OFF} - The password for login in clear text${YELLOW} Specify as: password=value${OFF}" \ | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo "" echo -e "${BOLD}${WHITE}Responses${OFF}" @@ -1382,7 +1382,7 @@ print_updateUser_help() { echo -e "This can only be done by the logged in user." | paste -sd' ' | fold -sw 80 echo -e "" 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}${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 "" echo ""