[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:
Adam Leventhal
2021-03-14 19:30:22 -07:00
committed by GitHub
parent a8c56fb26a
commit 15c3bf47a4
14 changed files with 51 additions and 32 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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")]