forked from loafle/openapi-generator-original
[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:
committed by
William Cheng
parent
386b9f432a
commit
37faaf9266
@@ -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.
|
||||
#
|
||||
|
||||
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user