forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rust] add petstore sample for withAWSV4Signature option for reqwest (O…
…penAPITools#11193) Signed-off-by: Jérôme Jutteau <[email protected]>
- Loading branch information
1 parent
2d28dc0
commit 1ed80e6
Showing
32 changed files
with
2,516 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
generatorName: rust | ||
outputDir: samples/client/petstore/rust/reqwest/petstore-awsv4signature | ||
library: reqwest | ||
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml | ||
templateDir: modules/openapi-generator/src/main/resources/rust | ||
additionalProperties: | ||
supportAsync: false | ||
packageName: petstore-reqwest-awsv4signature | ||
withAWSV4Signature: true |
3 changes: 3 additions & 0 deletions
3
samples/client/petstore/rust/reqwest/petstore-awsv4signature/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/target/ | ||
**/*.rs.bk | ||
Cargo.lock |
23 changes: 23 additions & 0 deletions
23
samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator-ignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
27 changes: 27 additions & 0 deletions
27
samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator/FILES
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
.gitignore | ||
.travis.yml | ||
Cargo.toml | ||
README.md | ||
docs/ApiResponse.md | ||
docs/Category.md | ||
docs/Order.md | ||
docs/Pet.md | ||
docs/PetApi.md | ||
docs/StoreApi.md | ||
docs/Tag.md | ||
docs/User.md | ||
docs/UserApi.md | ||
git_push.sh | ||
src/apis/configuration.rs | ||
src/apis/mod.rs | ||
src/apis/pet_api.rs | ||
src/apis/store_api.rs | ||
src/apis/user_api.rs | ||
src/lib.rs | ||
src/models/api_response.rs | ||
src/models/category.rs | ||
src/models/mod.rs | ||
src/models/order.rs | ||
src/models/pet.rs | ||
src/models/tag.rs | ||
src/models/user.rs |
1 change: 1 addition & 0 deletions
1
samples/client/petstore/rust/reqwest/petstore-awsv4signature/.openapi-generator/VERSION
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5.3.1 |
1 change: 1 addition & 0 deletions
1
samples/client/petstore/rust/reqwest/petstore-awsv4signature/.travis.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
language: rust |
17 changes: 17 additions & 0 deletions
17
samples/client/petstore/rust/reqwest/petstore-awsv4signature/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "petstore-reqwest-awsv4signature" | ||
version = "1.0.0" | ||
authors = ["OpenAPI Generator team and contributors"] | ||
edition = "2018" | ||
|
||
[dependencies] | ||
serde = "^1.0" | ||
serde_derive = "^1.0" | ||
serde_json = "^1.0" | ||
url = "^2.2" | ||
reqwest = "~0.9" | ||
aws-sigv4 = "0.3.0" | ||
http = "0.2.5" | ||
secrecy = "0.8.0" | ||
|
||
[dev-dependencies] |
69 changes: 69 additions & 0 deletions
69
samples/client/petstore/rust/reqwest/petstore-awsv4signature/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Rust API client for petstore-reqwest-awsv4signature | ||
|
||
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. | ||
|
||
|
||
## Overview | ||
|
||
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. | ||
|
||
- API version: 1.0.0 | ||
- Package version: 1.0.0 | ||
- Build package: `org.openapitools.codegen.languages.RustClientCodegen` | ||
|
||
## Installation | ||
|
||
Put the package under your project folder in a directory named `petstore-reqwest-awsv4signature` and add the following to `Cargo.toml` under `[dependencies]`: | ||
|
||
``` | ||
petstore-reqwest-awsv4signature = { path = "./petstore-reqwest-awsv4signature" } | ||
``` | ||
|
||
## Documentation for API Endpoints | ||
|
||
All URIs are relative to *http://petstore.swagger.io/v2* | ||
|
||
Class | Method | HTTP request | Description | ||
------------ | ------------- | ------------- | ------------- | ||
*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store | ||
*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet | ||
*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status | ||
*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags | ||
*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID | ||
*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet | ||
*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data | ||
*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image | ||
*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{orderId} | Delete purchase order by ID | ||
*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status | ||
*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{orderId} | Find purchase order by ID | ||
*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet | ||
*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user | ||
*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array | ||
*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array | ||
*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user | ||
*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name | ||
*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system | ||
*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session | ||
*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user | ||
|
||
|
||
## Documentation For Models | ||
|
||
- [ApiResponse](docs/ApiResponse.md) | ||
- [Category](docs/Category.md) | ||
- [Order](docs/Order.md) | ||
- [Pet](docs/Pet.md) | ||
- [Tag](docs/Tag.md) | ||
- [User](docs/User.md) | ||
|
||
|
||
To get access to the crate's generated documentation, use: | ||
|
||
``` | ||
cargo doc --open | ||
``` | ||
|
||
## Author | ||
|
||
|
||
|
13 changes: 13 additions & 0 deletions
13
samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/ApiResponse.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ApiResponse | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**code** | Option<**i32**> | | [optional] | ||
**_type** | Option<**String**> | | [optional] | ||
**message** | Option<**String**> | | [optional] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/Category.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Category | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | Option<**i64**> | | [optional] | ||
**name** | Option<**String**> | | [optional] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/Order.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Order | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | Option<**i64**> | | [optional] | ||
**pet_id** | Option<**i64**> | | [optional] | ||
**quantity** | Option<**i32**> | | [optional] | ||
**ship_date** | Option<**String**> | | [optional] | ||
**status** | Option<**String**> | Order Status | [optional] | ||
**complete** | Option<**bool**> | | [optional][default to 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) | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
samples/client/petstore/rust/reqwest/petstore-awsv4signature/docs/Pet.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Pet | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | Option<**i64**> | | [optional] | ||
**category** | Option<[**crate::models::Category**](Category.md)> | | [optional] | ||
**name** | **String** | | | ||
**photo_urls** | **Vec<String>** | | | ||
**tags** | Option<[**Vec<crate::models::Tag>**](Tag.md)> | | [optional] | ||
**status** | Option<**String**> | pet status in the store | [optional] | ||
|
||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
||
|
Oops, something went wrong.