forked from loafle/openapi-generator-original
[Rust Client] several small fixes to code generation errors (#8845)
* fix cyclic types * fixed up bad enum names * fixed double crate:: issue * add required ToString for enum classes * Adds Debug/Clone derive macro for generated configuration type * Updates versions of dependencies recorded in generated Cargo.toml * fix merge * bin/generate-samples.sh Co-authored-by: Benjamin Naecker <bnaecker@fastmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ edition = "2018"
|
||||
serde = "^1.0"
|
||||
serde_derive = "^1.0"
|
||||
serde_json = "^1.0"
|
||||
url = "1.5"
|
||||
url = "^2.2"
|
||||
[dependencies.reqwest]
|
||||
version = "^0.11"
|
||||
default-features = false
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
use reqwest;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Configuration {
|
||||
pub base_path: String,
|
||||
pub user_agent: Option<String>,
|
||||
@@ -24,6 +25,7 @@ pub struct Configuration {
|
||||
|
||||
pub type BasicAuth = (String, Option<String>);
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct ApiKey {
|
||||
pub prefix: Option<String>,
|
||||
pub key: String,
|
||||
|
||||
@@ -17,7 +17,7 @@ pub struct Pet {
|
||||
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||
pub id: Option<i64>,
|
||||
#[serde(rename = "category", skip_serializing_if = "Option::is_none")]
|
||||
pub category: Option<crate::models::Category>,
|
||||
pub category: Option<Box<crate::models::Category>>,
|
||||
#[serde(rename = "name")]
|
||||
pub name: String,
|
||||
#[serde(rename = "photoUrls")]
|
||||
|
||||
Reference in New Issue
Block a user