Skip to content

Instantly share code, notes, and snippets.

@KeenS
Last active December 7, 2017 02:48
Show Gist options
  • Select an option

  • Save KeenS/195f694ce0e0215dc76541f799ba713d to your computer and use it in GitHub Desktop.

Select an option

Save KeenS/195f694ce0e0215dc76541f799ba713d to your computer and use it in GitHub Desktop.
$ cargo build
Compiling swagger_client v1.0.0 (file:///home/kim/Idein/actcast/specification/server)
error: no rules expected the token `.`
--> src/mimetypes.rs:9:97
|
9 | pub static ref PET_FIND_BY_STATUS_GET_SUCCESSFUL_OPERATION: Mime = mime!(Application/Vnd.petstore.v1+json);
| ^
error: aborting due to previous error
error: Could not compile `swagger_client`.
To learn more, run the command again with --verbose.
/// mime types for requests and responses
pub mod responses {
use hyper::mime::*;
// The macro is called per-operation to beat the recursion limit
/// Create Mime objects for the response content types for PetFindByStatusGet
lazy_static! {
pub static ref PET_FIND_BY_STATUS_GET_SUCCESSFUL_OPERATION: Mime = mime!(Application/Vnd.petstore.v1+json);
}
}
pub mod requests {
use hyper::mime::*;
}
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore"
},
"paths": {
"/pet/findByStatus": {
"get": {
"produces": [
"application/vnd.petstore.v1+json"
],
"responses": {
"200": {
"description": "successful operation",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Pet"
}
}
}
}
}
}
},
"definitions": {
"Pet": {
"type": "object"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment