forked from loafle/openapi-generator-original
* [Rust] Use serde Value for objects This hopefully fixes the previous TODO; it at least fixes compilation errors for the specific swagger model I'm working with. * [Rust] Update Cargo.toml to specify versions Letting the version float freely is scary, to say the least. This gives it a better chance at being future-proof. When the crate author had a recommended selector I picked that, otherwise I went semver compatible. * [Rust] Regenerate the example
85 lines
2.6 KiB
Markdown
85 lines
2.6 KiB
Markdown
# Rust API for petstore_api
|
|
|
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
|
|
|
## Overview
|
|
This client/server was generated by the [swagger-codegen]
|
|
(https://github.com/swagger-api/swagger-codegen) project.
|
|
By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub.
|
|
-
|
|
|
|
To see how to make this your own, look here:
|
|
|
|
[README](https://github.com/swagger-api/swagger-codegen/blob/master/README.md)
|
|
|
|
- API version: 1.0.0
|
|
- Build date: 2017-10-30T02:13:46.477Z
|
|
|
|
## Examples
|
|
|
|
Run examples with:
|
|
|
|
```
|
|
cargo run --example <example-name>
|
|
```
|
|
|
|
To pass in arguments to the examples, put them after `--`, for example:
|
|
|
|
```
|
|
cargo run --example client -- --help
|
|
```
|
|
|
|
### Running the server
|
|
To run the server, follow these simple steps:
|
|
|
|
```
|
|
cargo run --example server
|
|
```
|
|
|
|
### Running a client
|
|
To run a client, follow one of the following simple steps:
|
|
|
|
```
|
|
cargo run --example client TestSpecialTags
|
|
cargo run --example client FakeOuterBooleanSerialize
|
|
cargo run --example client FakeOuterCompositeSerialize
|
|
cargo run --example client FakeOuterNumberSerialize
|
|
cargo run --example client FakeOuterStringSerialize
|
|
cargo run --example client TestClientModel
|
|
cargo run --example client TestEndpointParameters
|
|
cargo run --example client TestEnumParameters
|
|
cargo run --example client TestInlineAdditionalProperties
|
|
cargo run --example client TestJsonFormData
|
|
cargo run --example client TestClassname
|
|
cargo run --example client AddPet
|
|
cargo run --example client DeletePet
|
|
cargo run --example client FindPetsByStatus
|
|
cargo run --example client FindPetsByTags
|
|
cargo run --example client GetPetById
|
|
cargo run --example client UpdatePet
|
|
cargo run --example client UpdatePetWithForm
|
|
cargo run --example client UploadFile
|
|
cargo run --example client DeleteOrder
|
|
cargo run --example client GetInventory
|
|
cargo run --example client GetOrderById
|
|
cargo run --example client PlaceOrder
|
|
cargo run --example client CreateUser
|
|
cargo run --example client CreateUsersWithArrayInput
|
|
cargo run --example client CreateUsersWithListInput
|
|
cargo run --example client DeleteUser
|
|
cargo run --example client GetUserByName
|
|
cargo run --example client LoginUser
|
|
cargo run --example client LogoutUser
|
|
cargo run --example client UpdateUser
|
|
```
|
|
|
|
### HTTPS
|
|
The examples can be run in HTTPS mode by passing in the flag `--https`, for example:
|
|
|
|
```
|
|
cargo run --example server -- --https
|
|
```
|
|
|
|
This will use the keys/certificates from the examples directory. Note that the server chain is signed with
|
|
`CN=localhost`.
|