forked from loafle/openapi-generator-original
udpate rust server samples
This commit is contained in:
parent
926b971497
commit
0c52fcd5ff
@ -43,6 +43,14 @@ use {Api,
|
|||||||
};
|
};
|
||||||
use models;
|
use models;
|
||||||
|
|
||||||
|
define_encode_set! {
|
||||||
|
/// This encode set is used for object IDs
|
||||||
|
///
|
||||||
|
/// Aside from the special characters defined in the `PATH_SEGMENT_ENCODE_SET`,
|
||||||
|
/// the vertical bar (|) is encoded.
|
||||||
|
pub ID_ENCODE_SET = [PATH_SEGMENT_ENCODE_SET] | {'|'}
|
||||||
|
}
|
||||||
|
|
||||||
/// Convert input into a base path, e.g. "http://example:123". Also checks the scheme as it goes.
|
/// Convert input into a base path, e.g. "http://example:123". Also checks the scheme as it goes.
|
||||||
fn into_base_path(input: &str, correct_scheme: Option<&'static str>) -> Result<String, ClientInitError> {
|
fn into_base_path(input: &str, correct_scheme: Option<&'static str>) -> Result<String, ClientInitError> {
|
||||||
// First convert to Uri, since a base path is a subset of Uri.
|
// First convert to Uri, since a base path is a subset of Uri.
|
||||||
|
@ -19,6 +19,9 @@ extern crate hyper;
|
|||||||
|
|
||||||
extern crate swagger;
|
extern crate swagger;
|
||||||
|
|
||||||
|
#[macro_use]
|
||||||
|
extern crate url;
|
||||||
|
|
||||||
use futures::Stream;
|
use futures::Stream;
|
||||||
use std::io::Error;
|
use std::io::Error;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user