mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
f0b7daeec6
* rename rust2 to rust-server * update rust-server batch file to use petstore test spec |
||
---|---|---|
.. | ||
.cargo | ||
.swagger-codegen | ||
api | ||
examples | ||
src | ||
.gitignore | ||
.swagger-codegen-ignore | ||
Cargo.toml | ||
README.md |
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 from a remote server, you can easily generate a server stub.
To see how to make this your own, look here:
- API version: 1.0.0
- Build date: 2017-10-19T17:45:37.995+08:00
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 GetXmlFeatures
cargo run --example client PostXmlFeatures
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
.