Files
openapi-generator/samples/server/petstore/rust-server
Benjamin Gill a57fb0c7db [rust-server] add license and description to Cargo.toml (#7080)
* Move errant file to 'rust-server'

Rust2 was the old name

* Add license and description to Cargo.toml

For rust-server, getting them from the swagger

* Valid Java doesn't have uninitialised variables...

* Default license to "Unlicense"

* Set license to "Unlicense" for generated crates
2017-12-08 00:28:29 +08:00
..

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:

README

  • API version: 1.0.0
  • Build date: 2017-11-30T15:18:45.444Z

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.