[rust-server] Added client documentation to rust-server (#2159)

* Added client documentation to rust-server

* Removed comments

* Removed go auth example
This commit is contained in:
Luis Alejandro Herrera León 2019-02-18 02:02:40 -08:00 committed by William Cheng
parent 594af33fb8
commit b4b8c28b2a
53 changed files with 2030 additions and 3 deletions

View File

@ -54,6 +54,8 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
protected int serverPort = 8080;
protected String projectName = "openapi-server";
protected String apiPath = "rust-server";
protected String apiDocPath = "docs/";
protected String modelDocPath = "docs/";
protected String packageName;
protected String packageVersion;
protected String externCrateName;
@ -83,6 +85,9 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
*/
apiTemplateFiles.clear();
modelDocTemplateFiles.put("model_doc.mustache", ".md");
apiDocTemplateFiles.put("api_doc.mustache", ".md");
/*
* Template Location. This is the location which templates will be read from. The generator
* will use the resource stream to attempt to read the templates.
@ -127,7 +132,8 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
"usize",
"f32",
"f64",
"str")
"str",
"String")
);
instantiationTypes.clear();
@ -209,6 +215,9 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION));
}
additionalProperties.put("apiDocPath", apiDocPath);
additionalProperties.put("modelDocPath", modelDocPath);
additionalProperties.put(CodegenConstants.PACKAGE_NAME, packageName);
additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion);
additionalProperties.put("externCrateName", externCrateName);
@ -439,6 +448,26 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
return underscore(name);
}
@Override
public String apiDocFileFolder() {
return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar);
}
@Override
public String modelDocFileFolder() {
return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar);
}
@Override
public String toModelDocFilename(String name) {
return toModelName(name);
}
@Override
public String toApiDocFilename(String name) {
return toApiName(name) + "_api";
}
@Override
public String escapeQuotationMark(String input) {
// remove " to avoid code injection
@ -765,7 +794,6 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
String name = "models::" + getTypeDeclaration(parameter.dataType);
parameter.dataType = name;
parameter.baseType = name;
}
return parameter;
@ -783,7 +811,6 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
String name = "models::" + getTypeDeclaration(parameter.dataType);
parameter.dataType = name;
parameter.baseType = name;
}
}
@ -928,6 +955,9 @@ public class RustServerCodegen extends DefaultCodegen implements CodegenConfig {
} else {
property.dataType = camelize(property.dataType, false);
}
property.isPrimitiveType = property.isContainer && languageSpecificPrimitives.contains(typeMapping.get(property.complexType));
} else {
property.isPrimitiveType = true;
}
if ("integer".equals(property.baseType)) {

View File

@ -110,3 +110,60 @@ Now replace the implementations in `src/server.rs` with your own code as require
Later, if the API changes, you can copy new sections from the autogenerated API stub into your implementation.
Alternatively, implement the now-missing methods based on the compiler's error messages.
## Documentation for API Endpoints
All URIs are relative to *{{{basePath}}}*
Method | HTTP request | Description
------------- | ------------- | -------------
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}[**{{{operationIdOriginal}}}**]({{{apiDocPath}}}{{classname}}_api.md#{{{operationIdOriginal}}}) | **{{{httpMethod}}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}}
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
## Documentation For Models
{{#models}}{{#model}} - [{{{classname}}}]({{{modelDocPath}}}{{{classname}}}.md)
{{/model}}{{/models}}
## Documentation For Authorization
{{^authMethods}} Endpoints do not require authorization.
{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}}
{{#authMethods}}
## {{{name}}}
{{#isApiKey}}- **Type**: API key
Example
```
{{! TODO: Add API Key example }}
```
{{/isApiKey}}
{{#isBasic}}- **Type**: HTTP basic authentication
Example
```
{{! TODO: Add HTTP basic authentication }}
```
{{/isBasic}}
{{#isOAuth}}- **Type**: OAuth
- **Flow**: {{{flow}}}
- **Authorization URL**: {{{authorizationUrl}}}
- **Scopes**: {{^scopes}}N/A{{/scopes}}
{{#scopes}} - **{{{scope}}}**: {{{description}}}
{{/scopes}}
Example
```
{{! TODO: OAuth example }}
```
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
```
{{! TODO: OAuth example }}
```
{{/isOAuth}}
{{/authMethods}}
## Author
{{#apiInfo}}{{#apis}}{{^hasMore}}{{{infoEmail}}}
{{/hasMore}}{{/apis}}{{/apiInfo}}

View File

@ -0,0 +1,50 @@
# {{{invokerPackage}}}{{{classname}}}_api{{#description}}
{{{description}}}{{/description}}
All URIs are relative to *{{{basePath}}}*
Method | HTTP request | Description
------------- | ------------- | -------------
{{#operations}}{{#operation}}**{{{operationIdOriginal}}}**]({{classname}}_api.md#{{{operationIdOriginal}}}) | **{{{httpMethod}}}** {{{path}}} | {{#summary}}{{{summary}}}{{/summary}}
{{/operation}}{{/operations}}
{{#operations}}
{{#operation}}
# **{{{operationIdOriginal}}}**
> {{#returnType}}{{{returnType}}} {{/returnType}}{{{operationIdOriginal}}}({{#authMethods}}ctx, {{/authMethods}}{{#allParams}}{{#required}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/required}}{{/allParams}}{{#hasOptionalParams}}optional{{/hasOptionalParams}})
{{{summary}}}{{#notes}}
{{{notes}}}{{/notes}}
### Required Parameters
{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{#authMethods}}
**ctx** | **context.Context** | context containing the authentication | nil if no authentication{{/authMethods}}{{/-last}}{{/allParams}}{{#allParams}}{{#required}}
**{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{baseType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}{{/required}}{{/allParams}}{{#hasOptionalParams}}
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
{{#allParams}}{{#-last}}
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}{{#allParams}}
**{{{paramName}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{baseType}}}**]({{{baseType}}}.md){{/isPrimitiveType}}| {{{description}}} | {{#defaultValue}}[default to {{{defaultValue}}}]{{/defaultValue}}{{/allParams}}{{/hasOptionalParams}}
### 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 defined{{/consumes}}
- **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/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}}

View File

@ -0,0 +1,11 @@
{{#models}}{{#model}}# {{{classname}}}
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
{{#vars}}**{{{name}}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{^isContainer}}{{^isDateTime}}*{{/isDateTime}}{{/isContainer}}{{{dataType}}}**]({{{complexType}}}.md){{/isPrimitiveType}} | {{{description}}} | {{^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}}

View File

@ -133,3 +133,123 @@ Now replace the implementations in `src/server.rs` with your own code as require
Later, if the API changes, you can copy new sections from the autogenerated API stub into your implementation.
Alternatively, implement the now-missing methods based on the compiler's error messages.
## Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**test_special_tags**](docs/another_fake_api.md#test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
[**fakeOuterBooleanSerialize**](docs/fake_api.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
[**fakeOuterCompositeSerialize**](docs/fake_api.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](docs/fake_api.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
[**fakeOuterStringSerialize**](docs/fake_api.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
[**testBodyWithQueryParams**](docs/fake_api.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](docs/fake_api.md#testClientModel) | **PATCH** /fake | To test \"client\" model
[**testEndpointParameters**](docs/fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumParameters**](docs/fake_api.md#testEnumParameters) | **GET** /fake | To test enum parameters
[**testInlineAdditionalProperties**](docs/fake_api.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
[**testJsonFormData**](docs/fake_api.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
[**testClassname**](docs/fake_classname_tags123_api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
[**addPet**](docs/pet_api.md#addPet) | **POST** /pet | Add a new pet to the store
[**deletePet**](docs/pet_api.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](docs/pet_api.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](docs/pet_api.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](docs/pet_api.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
[**updatePet**](docs/pet_api.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](docs/pet_api.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](docs/pet_api.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
[**deleteOrder**](docs/store_api.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
[**getInventory**](docs/store_api.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getOrderById**](docs/store_api.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
[**placeOrder**](docs/store_api.md#placeOrder) | **POST** /store/order | Place an order for a pet
[**createUser**](docs/user_api.md#createUser) | **POST** /user | Create user
[**createUsersWithArrayInput**](docs/user_api.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
[**createUsersWithListInput**](docs/user_api.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
[**deleteUser**](docs/user_api.md#deleteUser) | **DELETE** /user/{username} | Delete user
[**getUserByName**](docs/user_api.md#getUserByName) | **GET** /user/{username} | Get user by user name
[**loginUser**](docs/user_api.md#loginUser) | **GET** /user/login | Logs user into the system
[**logoutUser**](docs/user_api.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
[**updateUser**](docs/user_api.md#updateUser) | **PUT** /user/{username} | Updated user
## Documentation For Models
- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [Animal](docs/Animal.md)
- [ApiResponse](docs/ApiResponse.md)
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
- [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
- [Dog](docs/Dog.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
- [FormatTest](docs/FormatTest.md)
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [List](docs/List.md)
- [MapTest](docs/MapTest.md)
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.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)
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
## Documentation For Authorization
## api_key
- **Type**: API key
Example
```
```
## api_key_query
- **Type**: API key
Example
```
```
## http_basic_test
- **Type**: HTTP basic authentication
Example
```
```
## 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
Example
```
```
Or via OAuth2 module to automatically refresh tokens and perform user authentication.
```
```
## Author

View File

@ -0,0 +1,11 @@
# AdditionalPropertiesClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_property** | **HashMap<String, String>** | | [optional] [default to None]
**map_of_map_property** | [**HashMap<String, HashMap<String, String>>**](map.md) | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Animal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **String** | |
**color** | **String** | | [optional] [default to Some("red".to_string())]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **i32** | | [optional] [default to None]
**_type** | **String** | | [optional] [default to None]
**message** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# ArrayOfArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_array_number** | [**Vec<Vec<f64>>**](array.md) | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# ArrayOfNumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_number** | **Vec<f64>** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,13 @@
# ArrayTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_of_string** | **Vec<String>** | | [optional] [default to None]
**array_array_of_integer** | [**Vec<Vec<i64>>**](array.md) | | [optional] [default to None]
**array_array_of_model** | [**Vec<Vec<models::ReadOnlyFirst>>**](array.md) | | [optional] [default to None]
**array_of_enum** | **Vec<String>** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# Capitalization
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**small_camel** | **String** | | [optional] [default to None]
**capital_camel** | **String** | | [optional] [default to None]
**small_snake** | **String** | | [optional] [default to None]
**capital_snake** | **String** | | [optional] [default to None]
**sca_eth_flow_points** | **String** | | [optional] [default to None]
**att_name** | **String** | Name of the pet | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# Cat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **String** | |
**color** | **String** | | [optional] [default to Some("red".to_string())]
**declawed** | **bool** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Category
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **i64** | | [optional] [default to None]
**name** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# ClassModel
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# Client
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# Dog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **String** | |
**color** | **String** | | [optional] [default to Some("red".to_string())]
**breed** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# EnumArrays
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_symbol** | **String** | | [optional] [default to None]
**array_enum** | **Vec<String>** | | [optional] [default to None]
**array_array_enum** | [**Vec<Vec<String>>**](array.md) | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -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)

View File

@ -0,0 +1,14 @@
# EnumTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enum_string** | **String** | | [optional] [default to None]
**enum_string_required** | **String** | |
**enum_integer** | **i32** | | [optional] [default to None]
**enum_number** | **f64** | | [optional] [default to None]
**outer_enum** | [***models::OuterEnum**](OuterEnum.md) | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,22 @@
# FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **u8** | | [optional] [default to None]
**int32** | **u32** | | [optional] [default to None]
**int64** | **i64** | | [optional] [default to None]
**number** | **f64** | |
**float** | **f32** | | [optional] [default to None]
**double** | **f64** | | [optional] [default to None]
**string** | **String** | | [optional] [default to None]
**byte** | [***swagger::ByteArray**](ByteArray.md) | |
**binary** | [***swagger::ByteArray**](file.md) | | [optional] [default to None]
**date** | [***chrono::DateTime<chrono::Utc>**](date.md) | |
**date_time** | [**chrono::DateTime<chrono::Utc>**](DateTime.md) | | [optional] [default to None]
**uuid** | [***uuid::Uuid**](UUID.md) | | [optional] [default to None]
**password** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# HasOnlyReadOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional] [default to None]
**foo** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# List
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_123_list** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# MapTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_map_of_string** | [**HashMap<String, HashMap<String, String>>**](map.md) | | [optional] [default to None]
**map_map_of_enum** | [**HashMap<String, HashMap<String, String>>**](map.md) | | [optional] [default to None]
**map_of_enum_string** | **HashMap<String, String>** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,12 @@
# MixedPropertiesAndAdditionalPropertiesClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | [***uuid::Uuid**](UUID.md) | | [optional] [default to None]
**date_time** | [**chrono::DateTime<chrono::Utc>**](DateTime.md) | | [optional] [default to None]
**map** | [**HashMap<String, models::Animal>**](Animal.md) | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Model200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **i32** | | [optional] [default to None]
**class** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# ModelReturn
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **i32** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,13 @@
# Name
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **i32** | |
**snake_case** | **i32** | | [optional] [default to None]
**property** | **String** | | [optional] [default to None]
**_123_number** | **isize** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# NumberOnly
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_number** | **f64** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# Order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **i64** | | [optional] [default to None]
**pet_id** | **i64** | | [optional] [default to None]
**quantity** | **i32** | | [optional] [default to None]
**ship_date** | [**chrono::DateTime<chrono::Utc>**](DateTime.md) | | [optional] [default to None]
**status** | **String** | Order Status | [optional] [default to None]
**complete** | **bool** | | [optional] [default to Some(false)]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -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)

View File

@ -0,0 +1,12 @@
# OuterComposite
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**my_number** | **f64** | | [optional] [default to None]
**my_string** | **String** | | [optional] [default to None]
**my_boolean** | **bool** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -0,0 +1,15 @@
# Pet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **i64** | | [optional] [default to None]
**category** | [***models::Category**](Category.md) | | [optional] [default to None]
**name** | **String** | |
**photo_urls** | **Vec<String>** | |
**tags** | [**Vec<models::Tag>**](Tag.md) | | [optional] [default to None]
**status** | **String** | pet status in the store | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# ReadOnlyFirst
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional] [default to None]
**baz** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# SpecialModelName
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **i64** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# Tag
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **i64** | | [optional] [default to None]
**name** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,17 @@
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **i64** | | [optional] [default to None]
**username** | **String** | | [optional] [default to None]
**first_name** | **String** | | [optional] [default to None]
**last_name** | **String** | | [optional] [default to None]
**email** | **String** | | [optional] [default to None]
**password** | **String** | | [optional] [default to None]
**phone** | **String** | | [optional] [default to None]
**user_status** | **i32** | User Status | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,36 @@
# another_fake_api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
**test_special_tags**](another_fake_api.md#test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
# **test_special_tags**
> models::Client test_special_tags(body)
To test special tags
To test special tags
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
### Return type
[**models::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)

View File

@ -0,0 +1,350 @@
# fake_api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
**fakeOuterBooleanSerialize**](fake_api.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
**fakeOuterCompositeSerialize**](fake_api.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
**fakeOuterNumberSerialize**](fake_api.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
**fakeOuterStringSerialize**](fake_api.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
**testBodyWithQueryParams**](fake_api.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
**testClientModel**](fake_api.md#testClientModel) | **PATCH** /fake | To test \"client\" model
**testEndpointParameters**](fake_api.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
**testEnumParameters**](fake_api.md#testEnumParameters) | **GET** /fake | To test enum parameters
**testInlineAdditionalProperties**](fake_api.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
**testJsonFormData**](fake_api.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
# **fakeOuterBooleanSerialize**
> bool fakeOuterBooleanSerialize(optional)
Test serialization of outer boolean types
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **bool**| Input boolean as post body |
### Return type
[**bool**](boolean.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)
# **fakeOuterCompositeSerialize**
> models::OuterComposite fakeOuterCompositeSerialize(optional)
Test serialization of object with outer number type
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body |
### Return type
[**models::OuterComposite**](OuterComposite.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)
# **fakeOuterNumberSerialize**
> f64 fakeOuterNumberSerialize(optional)
Test serialization of outer number types
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **f64**| Input number as post body |
### Return type
[**f64**](number.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)
# **fakeOuterStringSerialize**
> String fakeOuterStringSerialize(optional)
Test serialization of outer string types
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **String**| Input string as post body |
### Return type
[**String**](string.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)
# **testBodyWithQueryParams**
> testBodyWithQueryParams(query, body)
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **String**| |
**body** | [**User**](User.md)| |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[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**
> models::Client testClientModel(body)
To test \"client\" model
To test \"client\" model
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
### Return type
[**models::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**
> testEndpointParameters(ctx, number, double, pattern_without_delimiter, byte, optional)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**number** | **f64**| None |
**double** | **f64**| None |
**pattern_without_delimiter** | **String**| None |
**byte** | **swagger::ByteArray**| None |
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**number** | **f64**| None |
**double** | **f64**| None |
**pattern_without_delimiter** | **String**| None |
**byte** | **swagger::ByteArray**| None |
**integer** | **i32**| None |
**int32** | **i32**| None |
**int64** | **i64**| None |
**float** | **f32**| None |
**string** | **String**| None |
**binary** | **swagger::ByteArray**| None |
**date** | **chrono::DateTime<chrono::Utc>**| None |
**date_time** | **chrono::DateTime<chrono::Utc>**| None |
**password** | **String**| None |
**callback** | **String**| None |
### Return type
(empty response body)
### Authorization
[http_basic_test](../README.md#http_basic_test)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
[[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(optional)
To test enum parameters
To test enum parameters
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**enum_header_string_array** | [**String**](String.md)| Header parameter enum test (string array) |
**enum_header_string** | **String**| Header parameter enum test (string) | [default to "-efg".to_string()]
**enum_query_string_array** | [**String**](String.md)| Query parameter enum test (string array) |
**enum_query_string** | **String**| Query parameter enum test (string) | [default to "-efg".to_string()]
**enum_query_integer** | **i32**| Query parameter enum test (double) |
**enum_query_double** | **f64**| Query parameter enum test (double) |
**enum_form_string** | **String**| Form parameter enum test (string) | [default to "-efg".to_string()]
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
[[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**
> testInlineAdditionalProperties(param)
test inline additionalProperties
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**param** | [**string**](string.md)| request body |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[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**
> testJsonFormData(param, param2)
test json serialization of form data
### Required 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/x-www-form-urlencoded
- **Accept**: Not defined
[[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)

View File

@ -0,0 +1,37 @@
# fake_classname_tags123_api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
**testClassname**](fake_classname_tags123_api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
# **testClassname**
> models::Client testClassname(ctx, body)
To test class name in snake case
To test class name in snake case
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**body** | [**Client**](Client.md)| client model |
### Return type
[**models::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)

View File

@ -0,0 +1,259 @@
# pet_api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
**addPet**](pet_api.md#addPet) | **POST** /pet | Add a new pet to the store
**deletePet**](pet_api.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
**findPetsByStatus**](pet_api.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
**findPetsByTags**](pet_api.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
**getPetById**](pet_api.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
**updatePet**](pet_api.md#updatePet) | **PUT** /pet | Update an existing pet
**updatePetWithForm**](pet_api.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
**uploadFile**](pet_api.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
# **addPet**
> addPet(ctx, body)
Add a new pet to the store
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**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**: Not defined
[[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(ctx, pet_id, optional)
Deletes a pet
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**pet_id** | **i64**| Pet id to delete |
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **i64**| Pet id to delete |
**api_key** | **String**| |
### Return type
(empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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**
> Vec<models::Pet> findPetsByStatus(ctx, status)
Finds Pets by status
Multiple status values can be provided with comma separated strings
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**status** | [**String**](String.md)| Status values that need to be considered for filter |
### Return type
[**Vec<models::Pet>**](Pet.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml,
[[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**
> Vec<models::Pet> findPetsByTags(ctx, tags)
Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**tags** | [**String**](String.md)| Tags to filter by |
### Return type
[**Vec<models::Pet>**](Pet.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml,
[[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**
> models::Pet getPetById(ctx, pet_id)
Find pet by ID
Returns a single pet
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**pet_id** | **i64**| ID of pet to return |
### Return type
[**models::Pet**](Pet.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml,
[[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(ctx, body)
Update an existing pet
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**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**: Not defined
[[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(ctx, pet_id, optional)
Updates a pet in the store with form data
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**pet_id** | **i64**| ID of pet that needs to be updated |
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **i64**| ID of pet that needs to be updated |
**name** | **String**| Updated name of the pet |
**status** | **String**| Updated status of the pet |
### Return type
(empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
[[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**
> models::ApiResponse uploadFile(ctx, pet_id, optional)
uploads an image
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context containing the authentication | nil if no authentication
**pet_id** | **i64**| ID of pet to update |
**optional** | **map[string]interface{}** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a map[string]interface{}.
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet_id** | **i64**| ID of pet to update |
**additional_metadata** | **String**| Additional data to pass to server |
**file** | **swagger::ByteArray**| file to upload |
### Return type
[**models::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)

View File

@ -0,0 +1,115 @@
# store_api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
**deleteOrder**](store_api.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
**getInventory**](store_api.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
**getOrderById**](store_api.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
**placeOrder**](store_api.md#placeOrder) | **POST** /store/order | Place an order for a pet
# **deleteOrder**
> deleteOrder(order_id)
Delete purchase order by ID
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **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 defined
- **Accept**: Not defined
[[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**
> HashMap<String, i32> getInventory(ctx, )
Returns pet inventories by status
Returns a map of status codes to quantities
### Required Parameters
This endpoint does not need any parameter.
### Return type
[**HashMap<String, i32>**](integer.md)
### Authorization
[api_key](../README.md#api_key)
### HTTP request headers
- **Content-Type**: Not defined
- **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**
> models::Order getOrderById(order_id)
Find purchase order by ID
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order_id** | **i64**| ID of pet that needs to be fetched |
### Return type
[**models::Order**](Order.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml,
[[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**
> models::Order placeOrder(body)
Place an order for a pet
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
[**models::Order**](Order.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/jsonapplication/xml
[[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)

View File

@ -0,0 +1,221 @@
# user_api
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
**createUser**](user_api.md#createUser) | **POST** /user | Create user
**createUsersWithArrayInput**](user_api.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
**createUsersWithListInput**](user_api.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
**deleteUser**](user_api.md#deleteUser) | **DELETE** /user/{username} | Delete user
**getUserByName**](user_api.md#getUserByName) | **GET** /user/{username} | Get user by user name
**loginUser**](user_api.md#loginUser) | **GET** /user/login | Logs user into the system
**logoutUser**](user_api.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
**updateUser**](user_api.md#updateUser) | **PUT** /user/{username} | Updated user
# **createUser**
> createUser(body)
Create user
This can only be done by the logged in user.
### Required 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 defined
- **Accept**: Not defined
[[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(body)
Creates list of users with given input array
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**array**](array.md)| List of user object |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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(body)
Creates list of users with given input array
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**array**](array.md)| List of user object |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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(username)
Delete user
This can only be done by the logged in user.
### Required 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 defined
- **Accept**: Not defined
[[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**
> models::User getUserByName(username)
Get user by user name
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
### Return type
[**models::User**](User.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml,
[[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**
> String loginUser(username, password)
Logs user into the system
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The user name for login |
**password** | **String**| The password for login in clear text |
### Return type
[**String**](string.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml,
[[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
### Required Parameters
This endpoint does not need any parameter.
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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(username, body)
Updated user
This can only be done by the logged in user.
### Required 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 defined
- **Accept**: Not defined
[[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)

View File

@ -106,3 +106,33 @@ Now replace the implementations in `src/server.rs` with your own code as require
Later, if the API changes, you can copy new sections from the autogenerated API stub into your implementation.
Alternatively, implement the now-missing methods based on the compiler's error messages.
## Documentation for API Endpoints
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[****](docs/default_api.md#) | **GET** /dummy | A dummy endpoint to make the spec valid.
[****](docs/default_api.md#) | **PUT** /dummy |
[****](docs/default_api.md#) | **GET** /file_response | Get a file
[****](docs/default_api.md#) | **POST** /html | Test HTML handling
[****](docs/default_api.md#) | **GET** /raw_json | Get an arbitrary JSON blob.
## Documentation For Models
- [ANullableContainer](docs/ANullableContainer.md)
- [InlineObject](docs/InlineObject.md)
- [ObjectOfObjects](docs/ObjectOfObjects.md)
- [ObjectOfObjectsInner](docs/ObjectOfObjectsInner.md)
## Documentation For Authorization
Endpoints do not require authorization.
## Author

View File

@ -0,0 +1,11 @@
# ANullableContainer
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nullable_thing** | **String** | | [optional] [default to None]
**required_nullable_thing** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,129 @@
# \default
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**Default**](defaultapi.md#Default) | **GET** /dummy | A dummy endpoint to make the spec valid.
[**Default**](defaultapi.md#Default) | **PUT** /dummy |
[**Default**](defaultapi.md#Default) | **GET** /file_response | Get a file
[**Default**](defaultapi.md#Default) | **POST** /html | Test HTML handling
[**Default**](defaultapi.md#Default) | **GET** /raw_json | Get an arbitrary JSON blob.
# **DummyGet**
> DummyGet()
A dummy endpoint to make the spec valid.
### Required Parameters
This endpoint does not need any parameter.
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
# **DummyPut**
> DummyPut(nested_response)
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**nested_response** | [**InlineObject**](InlineObject.md)| |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
# **FileResponseGet**
> swagger::ByteArray FileResponseGet()
Get a file
### Required Parameters
This endpoint does not need any parameter.
### Return type
[**swagger::ByteArray**](file.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)
# **HtmlPost**
> String HtmlPost(body)
Test HTML handling
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **String**| |
### Return type
[**String**](string.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: text/html
- **Accept**: text/html,
[[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)
# **RawJsonGet**
> object RawJsonGet()
Get an arbitrary JSON blob.
### Required Parameters
This endpoint does not need any parameter.
### Return type
[**object**](object.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)

View File

@ -0,0 +1,11 @@
# InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**password** | **String** | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,10 @@
# ObjectOfObjects
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**inner** | [***models::ObjectOfObjectsInner**](ObjectOfObjects_inner.md) | | [optional] [default to None]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,11 @@
# ObjectOfObjectsInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**optional_thing** | **isize** | | [optional] [default to None]
**required_thing** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,129 @@
# default_api
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
****](default_api.md#) | **GET** /dummy | A dummy endpoint to make the spec valid.
****](default_api.md#) | **PUT** /dummy |
****](default_api.md#) | **GET** /file_response | Get a file
****](default_api.md#) | **POST** /html | Test HTML handling
****](default_api.md#) | **GET** /raw_json | Get an arbitrary JSON blob.
# ****
> ()
A dummy endpoint to make the spec valid.
### Required Parameters
This endpoint does not need any parameter.
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
# ****
> (nested_response)
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**nested_response** | [**InlineObject**](InlineObject.md)| |
### Return type
(empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[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)
# ****
> swagger::ByteArray ()
Get a file
### Required Parameters
This endpoint does not need any parameter.
### Return type
[**swagger::ByteArray**](file.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)
# ****
> String (body)
Test HTML handling
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **String**| |
### Return type
[**String**](string.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: text/html
- **Accept**: text/html,
[[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)
# ****
> object ()
Get an arbitrary JSON blob.
### Required Parameters
This endpoint does not need any parameter.
### Return type
[**object**](object.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **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)