[rust-server] API version constant and composite version support (#7969)

* Add constant with API version

* Use semver::Version for ApiVersion

* Go back to API version as a string

* Rust composite services

* Actually use the version from the swagger file
This commit is contained in:
Benjamin Gill
2018-04-06 06:27:13 +01:00
committed by William Cheng
parent 386b9f432a
commit 37faaf9266
7 changed files with 22 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ chrono = { version = "0.4", features = ["serde"] }
futures = "0.1"
hyper = {version = "0.11", optional = true}
hyper-tls = {version = "0.1.2", optional = true}
swagger = "0.9"
swagger = "0.10.0"
# Not required by example server.
#

View File

@@ -33,6 +33,7 @@ mod mimetypes;
pub use swagger::{ApiError, Context, ContextWrapper};
pub const BASE_PATH: &'static str = "{{basePathWithoutHost}}";
pub const API_VERSION: &'static str = "{{appVersion}}";
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}
{{^isResponseFile}}