mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
update samples
This commit is contained in:
parent
7dac40e31c
commit
0da60def01
@ -4,14 +4,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | |
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | **String** | |
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**foo_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**fooref_prop_a** | Option<**String**> | | [optional]
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**fooref_prop_a** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**vendor** | Option<**String**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**vendor** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**toppings** | Option<**String**> | | [optional]
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
**toppings** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -13,17 +13,11 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Bar {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
/// A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
#[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")]
|
||||
pub at_schema_location: Option<String>,
|
||||
@ -33,19 +27,25 @@ pub struct Bar {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
}
|
||||
|
||||
impl Bar {
|
||||
pub fn new(id: String, at_type: String) -> Bar {
|
||||
Bar {
|
||||
id,
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
href: None,
|
||||
id,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BarCreate {
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -34,19 +28,25 @@ pub struct BarCreate {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
}
|
||||
|
||||
impl BarCreate {
|
||||
pub fn new(at_type: String) -> BarCreate {
|
||||
BarCreate {
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BarRef {
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -34,18 +28,24 @@ pub struct BarRef {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
}
|
||||
|
||||
impl BarRef {
|
||||
pub fn new(at_type: String) -> BarRef {
|
||||
BarRef {
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,18 +11,11 @@
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// EntityRef : Entity reference schema to be use for all entityRef class.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(tag = "@type")]
|
||||
pub enum EntityRef {
|
||||
#[serde(rename="BarRef")]
|
||||
BarRef {
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
href: Option<String>,
|
||||
@ -35,15 +28,15 @@ pub enum EntityRef {
|
||||
/// When sub-classing, this defines the super-class
|
||||
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
|
||||
at_base_type: Option<String>,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
},
|
||||
#[serde(rename="FooRef")]
|
||||
FooRef {
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
href: Option<String>,
|
||||
@ -56,18 +49,24 @@ pub enum EntityRef {
|
||||
/// When sub-classing, this defines the super-class
|
||||
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
|
||||
at_base_type: Option<String>,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
impl Default for EntityRef {
|
||||
fn default() -> Self {
|
||||
Self::BarRef {
|
||||
name: Default::default(),
|
||||
at_referred_type: Default::default(),
|
||||
href: Default::default(),
|
||||
id: Default::default(),
|
||||
at_schema_location: Default::default(),
|
||||
at_base_type: Default::default(),
|
||||
name: Default::default(),
|
||||
at_referred_type: Default::default(),
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Foo {
|
||||
#[serde(rename = "fooPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -32,18 +28,22 @@ pub struct Foo {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "fooPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
pub fn new(at_type: String) -> Foo {
|
||||
Foo {
|
||||
foo_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
foo_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,14 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct FooRef {
|
||||
#[serde(rename = "foorefPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub fooref_prop_a: Option<String>,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -36,19 +28,27 @@ pub struct FooRef {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
#[serde(rename = "foorefPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub fooref_prop_a: Option<String>,
|
||||
}
|
||||
|
||||
impl FooRef {
|
||||
pub fn new(at_type: String) -> FooRef {
|
||||
FooRef {
|
||||
fooref_prop_a: None,
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
fooref_prop_a: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Pasta {
|
||||
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
|
||||
pub vendor: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -30,17 +28,19 @@ pub struct Pasta {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
|
||||
pub vendor: Option<String>,
|
||||
}
|
||||
|
||||
impl Pasta {
|
||||
pub fn new(at_type: String) -> Pasta {
|
||||
Pasta {
|
||||
vendor: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
vendor: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Pizza {
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -30,17 +28,19 @@ pub struct Pizza {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
}
|
||||
|
||||
impl Pizza {
|
||||
pub fn new(at_type: String) -> Pizza {
|
||||
Pizza {
|
||||
pizza_size: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
pizza_size: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PizzaSpeziale {
|
||||
#[serde(rename = "toppings", skip_serializing_if = "Option::is_none")]
|
||||
pub toppings: Option<String>,
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -32,18 +28,22 @@ pub struct PizzaSpeziale {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
#[serde(rename = "toppings", skip_serializing_if = "Option::is_none")]
|
||||
pub toppings: Option<String>,
|
||||
}
|
||||
|
||||
impl PizzaSpeziale {
|
||||
pub fn new(at_type: String) -> PizzaSpeziale {
|
||||
PizzaSpeziale {
|
||||
toppings: None,
|
||||
pizza_size: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
pizza_size: None,
|
||||
toppings: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | |
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | **String** | |
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**bar_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**foo** | Option<[**models::FooRefOrValue**](FooRefOrValue.md)> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foo_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**foo_prop_a** | Option<**String**> | | [optional]
|
||||
**foo_prop_b** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**fooref_prop_a** | Option<**String**> | | [optional]
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | Option<**String**> | Name of the related entity. | [optional]
|
||||
**at_referred_type** | Option<**String**> | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**fooref_prop_a** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**vendor** | Option<**String**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**vendor** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,12 +4,12 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**toppings** | Option<**String**> | | [optional]
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
**href** | Option<**String**> | Hyperlink reference | [optional]
|
||||
**id** | Option<**String**> | unique identifier | [optional]
|
||||
**at_schema_location** | Option<**String**> | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**at_base_type** | Option<**String**> | When sub-classing, this defines the super-class | [optional]
|
||||
**at_type** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**pizza_size** | Option<**f64**> | | [optional]
|
||||
**toppings** | Option<**String**> | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -13,17 +13,11 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Bar {
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
#[serde(rename = "id")]
|
||||
pub id: String,
|
||||
/// A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
#[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")]
|
||||
pub at_schema_location: Option<String>,
|
||||
@ -33,19 +27,25 @@ pub struct Bar {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
}
|
||||
|
||||
impl Bar {
|
||||
pub fn new(id: String, at_type: String) -> Bar {
|
||||
Bar {
|
||||
id,
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
href: None,
|
||||
id,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BarCreate {
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -34,19 +28,25 @@ pub struct BarCreate {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "barPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub bar_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
#[serde(rename = "foo", skip_serializing_if = "Option::is_none")]
|
||||
pub foo: Option<Box<models::FooRefOrValue>>,
|
||||
}
|
||||
|
||||
impl BarCreate {
|
||||
pub fn new(at_type: String) -> BarCreate {
|
||||
BarCreate {
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
bar_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
foo: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct BarRef {
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -34,18 +28,24 @@ pub struct BarRef {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
}
|
||||
|
||||
impl BarRef {
|
||||
pub fn new(at_type: String) -> BarRef {
|
||||
BarRef {
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,18 +11,11 @@
|
||||
use crate::models;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// EntityRef : Entity reference schema to be use for all entityRef class.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(tag = "@type")]
|
||||
pub enum EntityRef {
|
||||
#[serde(rename="BarRef")]
|
||||
BarRef {
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
href: Option<String>,
|
||||
@ -35,15 +28,15 @@ pub enum EntityRef {
|
||||
/// When sub-classing, this defines the super-class
|
||||
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
|
||||
at_base_type: Option<String>,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
},
|
||||
#[serde(rename="FooRef")]
|
||||
FooRef {
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
href: Option<String>,
|
||||
@ -56,18 +49,24 @@ pub enum EntityRef {
|
||||
/// When sub-classing, this defines the super-class
|
||||
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
|
||||
at_base_type: Option<String>,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
at_referred_type: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
impl Default for EntityRef {
|
||||
fn default() -> Self {
|
||||
Self::BarRef {
|
||||
name: Default::default(),
|
||||
at_referred_type: Default::default(),
|
||||
href: Default::default(),
|
||||
id: Default::default(),
|
||||
at_schema_location: Default::default(),
|
||||
at_base_type: Default::default(),
|
||||
name: Default::default(),
|
||||
at_referred_type: Default::default(),
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Foo {
|
||||
#[serde(rename = "fooPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -32,18 +28,22 @@ pub struct Foo {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "fooPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_a: Option<String>,
|
||||
#[serde(rename = "fooPropB", skip_serializing_if = "Option::is_none")]
|
||||
pub foo_prop_b: Option<String>,
|
||||
}
|
||||
|
||||
impl Foo {
|
||||
pub fn new(at_type: String) -> Foo {
|
||||
Foo {
|
||||
foo_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
foo_prop_a: None,
|
||||
foo_prop_b: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,14 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct FooRef {
|
||||
#[serde(rename = "foorefPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub fooref_prop_a: Option<String>,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -36,19 +28,27 @@ pub struct FooRef {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
/// Name of the related entity.
|
||||
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
|
||||
pub name: Option<String>,
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
#[serde(rename = "@referredType", skip_serializing_if = "Option::is_none")]
|
||||
pub at_referred_type: Option<String>,
|
||||
#[serde(rename = "foorefPropA", skip_serializing_if = "Option::is_none")]
|
||||
pub fooref_prop_a: Option<String>,
|
||||
}
|
||||
|
||||
impl FooRef {
|
||||
pub fn new(at_type: String) -> FooRef {
|
||||
FooRef {
|
||||
fooref_prop_a: None,
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
name: None,
|
||||
at_referred_type: None,
|
||||
fooref_prop_a: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Pasta {
|
||||
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
|
||||
pub vendor: Option<String>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -30,17 +28,19 @@ pub struct Pasta {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
|
||||
pub vendor: Option<String>,
|
||||
}
|
||||
|
||||
impl Pasta {
|
||||
pub fn new(at_type: String) -> Pasta {
|
||||
Pasta {
|
||||
vendor: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
vendor: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Pizza {
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -30,17 +28,19 @@ pub struct Pizza {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
}
|
||||
|
||||
impl Pizza {
|
||||
pub fn new(at_type: String) -> Pizza {
|
||||
Pizza {
|
||||
pizza_size: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
pizza_size: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct PizzaSpeziale {
|
||||
#[serde(rename = "toppings", skip_serializing_if = "Option::is_none")]
|
||||
pub toppings: Option<String>,
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
/// Hyperlink reference
|
||||
#[serde(rename = "href", skip_serializing_if = "Option::is_none")]
|
||||
pub href: Option<String>,
|
||||
@ -32,18 +28,22 @@ pub struct PizzaSpeziale {
|
||||
/// When sub-classing, this defines the sub-class Extensible name
|
||||
#[serde(rename = "@type")]
|
||||
pub at_type: String,
|
||||
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
|
||||
pub pizza_size: Option<f64>,
|
||||
#[serde(rename = "toppings", skip_serializing_if = "Option::is_none")]
|
||||
pub toppings: Option<String>,
|
||||
}
|
||||
|
||||
impl PizzaSpeziale {
|
||||
pub fn new(at_type: String) -> PizzaSpeziale {
|
||||
PizzaSpeziale {
|
||||
toppings: None,
|
||||
pizza_size: None,
|
||||
href: None,
|
||||
id: None,
|
||||
at_schema_location: None,
|
||||
at_base_type: None,
|
||||
at_type,
|
||||
pizza_size: None,
|
||||
toppings: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,8 +64,11 @@ components:
|
||||
type: integer
|
||||
type: object
|
||||
- $ref: '#/components/schemas/Person'
|
||||
description: A representation of a child
|
||||
properties:
|
||||
boosterSeat:
|
||||
type: boolean
|
||||
- description: A representation of a child
|
||||
properties:
|
||||
boosterSeat:
|
||||
type: boolean
|
||||
type: object
|
||||
example: null
|
||||
example: null
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Org.OpenAPITools.Model.Child
|
||||
A representation of a child
|
||||
|
||||
## Properties
|
||||
|
||||
|
@ -25,7 +25,7 @@ using Org.OpenAPITools.Client;
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// A representation of a child
|
||||
/// Child
|
||||
/// </summary>
|
||||
public partial class Child : Person, IValidatableObject
|
||||
{
|
||||
@ -33,11 +33,11 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Child" /> class.
|
||||
/// </summary>
|
||||
/// <param name="age">age</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
[JsonConstructor]
|
||||
public Child(Option<int?> age = default, Option<string> firstName = default, Option<string> lastName = default, Option<bool?> boosterSeat = default) : base(firstName, lastName)
|
||||
public Child(Option<int?> age = default, Option<bool?> boosterSeat = default, Option<string> firstName = default, Option<string> lastName = default) : base(firstName, lastName)
|
||||
{
|
||||
AgeOption = age;
|
||||
BoosterSeatOption = boosterSeat;
|
||||
@ -59,13 +59,6 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("age")]
|
||||
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option<int?>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of BoosterSeat
|
||||
/// </summary>
|
||||
@ -79,6 +72,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("boosterSeat")]
|
||||
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new Option<bool?>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@ -118,10 +118,10 @@ namespace Org.OpenAPITools.Model
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<int?> age = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
@ -142,6 +142,10 @@ namespace Org.OpenAPITools.Model
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
@ -151,10 +155,6 @@ namespace Org.OpenAPITools.Model
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -164,6 +164,9 @@ namespace Org.OpenAPITools.Model
|
||||
if (age.IsSet && age.Value == null)
|
||||
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child.");
|
||||
|
||||
if (boosterSeat.IsSet && boosterSeat.Value == null)
|
||||
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
|
||||
|
||||
if (firstName.IsSet && firstName.Value == null)
|
||||
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child.");
|
||||
|
||||
@ -173,10 +176,7 @@ namespace Org.OpenAPITools.Model
|
||||
if (type.IsSet && type.Value == null)
|
||||
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
|
||||
|
||||
if (boosterSeat.IsSet && boosterSeat.Value == null)
|
||||
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
|
||||
|
||||
return new Child(age, firstName, lastName, boosterSeat);
|
||||
return new Child(age, boosterSeat, firstName, lastName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -212,6 +212,9 @@ namespace Org.OpenAPITools.Model
|
||||
if (child.AgeOption.IsSet)
|
||||
writer.WriteNumber("age", child.AgeOption.Value.Value);
|
||||
|
||||
if (child.BoosterSeatOption.IsSet)
|
||||
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
|
||||
|
||||
if (child.FirstNameOption.IsSet)
|
||||
writer.WriteString("firstName", child.FirstName);
|
||||
|
||||
@ -219,9 +222,6 @@ namespace Org.OpenAPITools.Model
|
||||
writer.WriteString("lastName", child.LastName);
|
||||
|
||||
writer.WriteString("$_type", child.Type);
|
||||
|
||||
if (child.BoosterSeatOption.IsSet)
|
||||
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,8 +64,11 @@ components:
|
||||
type: integer
|
||||
type: object
|
||||
- $ref: '#/components/schemas/Person'
|
||||
description: A representation of a child
|
||||
properties:
|
||||
boosterSeat:
|
||||
type: boolean
|
||||
- description: A representation of a child
|
||||
properties:
|
||||
boosterSeat:
|
||||
type: boolean
|
||||
type: object
|
||||
example: null
|
||||
example: null
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Org.OpenAPITools.Model.Child
|
||||
A representation of a child
|
||||
|
||||
## Properties
|
||||
|
||||
|
@ -25,7 +25,7 @@ using Org.OpenAPITools.Client;
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// A representation of a child
|
||||
/// Child
|
||||
/// </summary>
|
||||
public partial class Child : Person, IValidatableObject
|
||||
{
|
||||
@ -33,11 +33,11 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Child" /> class.
|
||||
/// </summary>
|
||||
/// <param name="age">age</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
[JsonConstructor]
|
||||
public Child(Option<int?> age = default, Option<string> firstName = default, Option<string> lastName = default, Option<bool?> boosterSeat = default) : base(firstName, lastName)
|
||||
public Child(Option<int?> age = default, Option<bool?> boosterSeat = default, Option<string> firstName = default, Option<string> lastName = default) : base(firstName, lastName)
|
||||
{
|
||||
AgeOption = age;
|
||||
BoosterSeatOption = boosterSeat;
|
||||
@ -59,13 +59,6 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("age")]
|
||||
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option<int?>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of BoosterSeat
|
||||
/// </summary>
|
||||
@ -79,6 +72,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("boosterSeat")]
|
||||
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new Option<bool?>(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@ -118,10 +118,10 @@ namespace Org.OpenAPITools.Model
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<int?> age = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
Option<string> firstName = default;
|
||||
Option<string> lastName = default;
|
||||
Option<string> type = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
@ -142,6 +142,10 @@ namespace Org.OpenAPITools.Model
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
@ -151,10 +155,6 @@ namespace Org.OpenAPITools.Model
|
||||
case "$_type":
|
||||
type = new Option<string>(utf8JsonReader.GetString());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -164,6 +164,9 @@ namespace Org.OpenAPITools.Model
|
||||
if (age.IsSet && age.Value == null)
|
||||
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child.");
|
||||
|
||||
if (boosterSeat.IsSet && boosterSeat.Value == null)
|
||||
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
|
||||
|
||||
if (firstName.IsSet && firstName.Value == null)
|
||||
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child.");
|
||||
|
||||
@ -173,10 +176,7 @@ namespace Org.OpenAPITools.Model
|
||||
if (type.IsSet && type.Value == null)
|
||||
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
|
||||
|
||||
if (boosterSeat.IsSet && boosterSeat.Value == null)
|
||||
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
|
||||
|
||||
return new Child(age, firstName, lastName, boosterSeat);
|
||||
return new Child(age, boosterSeat, firstName, lastName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -212,6 +212,9 @@ namespace Org.OpenAPITools.Model
|
||||
if (child.AgeOption.IsSet)
|
||||
writer.WriteNumber("age", child.AgeOption.Value.Value);
|
||||
|
||||
if (child.BoosterSeatOption.IsSet)
|
||||
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
|
||||
|
||||
if (child.FirstNameOption.IsSet)
|
||||
writer.WriteString("firstName", child.FirstName);
|
||||
|
||||
@ -219,9 +222,6 @@ namespace Org.OpenAPITools.Model
|
||||
writer.WriteString("lastName", child.LastName);
|
||||
|
||||
writer.WriteString("$_type", child.Type);
|
||||
|
||||
if (child.BoosterSeatOption.IsSet)
|
||||
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,8 +64,11 @@ components:
|
||||
type: integer
|
||||
type: object
|
||||
- $ref: '#/components/schemas/Person'
|
||||
description: A representation of a child
|
||||
properties:
|
||||
boosterSeat:
|
||||
type: boolean
|
||||
- description: A representation of a child
|
||||
properties:
|
||||
boosterSeat:
|
||||
type: boolean
|
||||
type: object
|
||||
example: null
|
||||
example: null
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
# Org.OpenAPITools.Model.Child
|
||||
A representation of a child
|
||||
|
||||
## Properties
|
||||
|
||||
|
@ -27,7 +27,7 @@ using Org.OpenAPITools.Client;
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// A representation of a child
|
||||
/// Child
|
||||
/// </summary>
|
||||
public partial class Child : Person, IValidatableObject
|
||||
{
|
||||
@ -35,11 +35,11 @@ namespace Org.OpenAPITools.Model
|
||||
/// Initializes a new instance of the <see cref="Child" /> class.
|
||||
/// </summary>
|
||||
/// <param name="age">age</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
/// <param name="firstName">firstName</param>
|
||||
/// <param name="lastName">lastName</param>
|
||||
/// <param name="boosterSeat">boosterSeat</param>
|
||||
[JsonConstructor]
|
||||
public Child(Option<int?> age = default, Option<string?> firstName = default, Option<string?> lastName = default, Option<bool?> boosterSeat = default) : base(firstName, lastName)
|
||||
public Child(Option<int?> age = default, Option<bool?> boosterSeat = default, Option<string?> firstName = default, Option<string?> lastName = default) : base(firstName, lastName)
|
||||
{
|
||||
AgeOption = age;
|
||||
BoosterSeatOption = boosterSeat;
|
||||
@ -61,13 +61,6 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("age")]
|
||||
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the state of BoosterSeat
|
||||
/// </summary>
|
||||
@ -81,6 +74,13 @@ namespace Org.OpenAPITools.Model
|
||||
[JsonPropertyName("boosterSeat")]
|
||||
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new(value); } }
|
||||
|
||||
/// <summary>
|
||||
/// The discriminator
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public new string Type { get; } = "Child";
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@ -120,10 +120,10 @@ namespace Org.OpenAPITools.Model
|
||||
JsonTokenType startingTokenType = utf8JsonReader.TokenType;
|
||||
|
||||
Option<int?> age = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
Option<string?> firstName = default;
|
||||
Option<string?> lastName = default;
|
||||
Option<string?> type = default;
|
||||
Option<bool?> boosterSeat = default;
|
||||
|
||||
while (utf8JsonReader.Read())
|
||||
{
|
||||
@ -144,6 +144,10 @@ namespace Org.OpenAPITools.Model
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
age = new Option<int?>(utf8JsonReader.GetInt32());
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
|
||||
break;
|
||||
case "firstName":
|
||||
firstName = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
@ -153,10 +157,6 @@ namespace Org.OpenAPITools.Model
|
||||
case "$_type":
|
||||
type = new Option<string?>(utf8JsonReader.GetString()!);
|
||||
break;
|
||||
case "boosterSeat":
|
||||
if (utf8JsonReader.TokenType != JsonTokenType.Null)
|
||||
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -166,6 +166,9 @@ namespace Org.OpenAPITools.Model
|
||||
if (age.IsSet && age.Value == null)
|
||||
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child.");
|
||||
|
||||
if (boosterSeat.IsSet && boosterSeat.Value == null)
|
||||
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
|
||||
|
||||
if (firstName.IsSet && firstName.Value == null)
|
||||
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child.");
|
||||
|
||||
@ -175,10 +178,7 @@ namespace Org.OpenAPITools.Model
|
||||
if (type.IsSet && type.Value == null)
|
||||
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
|
||||
|
||||
if (boosterSeat.IsSet && boosterSeat.Value == null)
|
||||
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
|
||||
|
||||
return new Child(age, firstName, lastName, boosterSeat);
|
||||
return new Child(age, boosterSeat, firstName, lastName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -214,6 +214,9 @@ namespace Org.OpenAPITools.Model
|
||||
if (child.AgeOption.IsSet)
|
||||
writer.WriteNumber("age", child.AgeOption.Value!.Value);
|
||||
|
||||
if (child.BoosterSeatOption.IsSet)
|
||||
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value!.Value);
|
||||
|
||||
if (child.FirstNameOption.IsSet)
|
||||
writer.WriteString("firstName", child.FirstName);
|
||||
|
||||
@ -221,9 +224,6 @@ namespace Org.OpenAPITools.Model
|
||||
writer.WriteString("lastName", child.LastName);
|
||||
|
||||
writer.WriteString("$_type", child.Type);
|
||||
|
||||
if (child.BoosterSeatOption.IsSet)
|
||||
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value!.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | |
|
||||
**barPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | |
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**barPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**barPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**barPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **String** | unique identifier |
|
||||
**barPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier |
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**barPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
|
||||
|
@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**fooPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**fooPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**foorefPropA** | **String** | | [optional]
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**foorefPropA** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,16 +8,16 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**fooPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**foorefPropA** | **String** | | [optional]
|
||||
**fooPropA** | **String** | | [optional]
|
||||
**fooPropB** | **String** | | [optional]
|
||||
**name** | **String** | Name of the related entity. | [optional]
|
||||
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]
|
||||
**foorefPropA** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,12 +8,12 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**vendor** | **String** | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**vendor** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,12 +8,12 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**pizzaSize** | **num** | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**pizzaSize** | **num** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**toppings** | **String** | | [optional]
|
||||
**pizzaSize** | **num** | | [optional]
|
||||
**href** | **String** | Hyperlink reference | [optional]
|
||||
**id** | **String** | unique identifier | [optional]
|
||||
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional]
|
||||
**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
|
||||
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name |
|
||||
**pizzaSize** | **num** | | [optional]
|
||||
**toppings** | **String** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -13,14 +13,14 @@ part 'bar.g.dart';
|
||||
/// Bar
|
||||
///
|
||||
/// Properties:
|
||||
/// * [id]
|
||||
/// * [barPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [foo]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id]
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [barPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [foo]
|
||||
@BuiltValue()
|
||||
abstract class Bar implements Entity, Built<Bar, BarBuilder> {
|
||||
@BuiltValueField(wireName: r'foo')
|
||||
|
@ -13,14 +13,14 @@ part 'bar_create.g.dart';
|
||||
/// BarCreate
|
||||
///
|
||||
/// Properties:
|
||||
/// * [barPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [foo]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [barPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [foo]
|
||||
@BuiltValue()
|
||||
abstract class BarCreate implements Entity, Built<BarCreate, BarCreateBuilder> {
|
||||
@BuiltValueField(wireName: r'foo')
|
||||
|
@ -12,13 +12,13 @@ part 'bar_ref.g.dart';
|
||||
/// BarRef
|
||||
///
|
||||
/// Properties:
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
@BuiltValue()
|
||||
abstract class BarRef implements EntityRef, Built<BarRef, BarRefBuilder> {
|
||||
BarRef._();
|
||||
|
@ -15,14 +15,14 @@ part 'bar_ref_or_value.g.dart';
|
||||
/// BarRefOrValue
|
||||
///
|
||||
/// Properties:
|
||||
/// * [id] - unique identifier
|
||||
/// * [barPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [foo]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [barPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [foo]
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
@BuiltValue()
|
||||
|
@ -12,16 +12,16 @@ import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'entity_ref.g.dart';
|
||||
|
||||
/// Entity reference schema to be use for all entityRef class.
|
||||
/// EntityRef
|
||||
///
|
||||
/// Properties:
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
@BuiltValue(instantiable: false)
|
||||
abstract class EntityRef implements Addressable, Extensible {
|
||||
/// The actual type of the target instance when needed for disambiguation.
|
||||
|
@ -12,13 +12,13 @@ part 'foo.g.dart';
|
||||
/// Foo
|
||||
///
|
||||
/// Properties:
|
||||
/// * [fooPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [fooPropA]
|
||||
/// * [fooPropB]
|
||||
@BuiltValue()
|
||||
abstract class Foo implements Entity, Built<Foo, FooBuilder> {
|
||||
@BuiltValueField(wireName: r'fooPropA')
|
||||
|
@ -12,14 +12,14 @@ part 'foo_ref.g.dart';
|
||||
/// FooRef
|
||||
///
|
||||
/// Properties:
|
||||
/// * [foorefPropA]
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
/// * [foorefPropA]
|
||||
@BuiltValue()
|
||||
abstract class FooRef implements EntityRef, Built<FooRef, FooRefBuilder> {
|
||||
@BuiltValueField(wireName: r'foorefPropA')
|
||||
|
@ -14,16 +14,16 @@ part 'foo_ref_or_value.g.dart';
|
||||
/// FooRefOrValue
|
||||
///
|
||||
/// Properties:
|
||||
/// * [fooPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [foorefPropA]
|
||||
/// * [fooPropA]
|
||||
/// * [fooPropB]
|
||||
/// * [name] - Name of the related entity.
|
||||
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
|
||||
/// * [foorefPropA]
|
||||
@BuiltValue()
|
||||
abstract class FooRefOrValue implements Built<FooRefOrValue, FooRefOrValueBuilder> {
|
||||
/// One Of [Foo], [FooRef]
|
||||
|
@ -12,12 +12,12 @@ part 'pasta.g.dart';
|
||||
/// Pasta
|
||||
///
|
||||
/// Properties:
|
||||
/// * [vendor]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [vendor]
|
||||
@BuiltValue()
|
||||
abstract class Pasta implements Entity, Built<Pasta, PastaBuilder> {
|
||||
@BuiltValueField(wireName: r'vendor')
|
||||
|
@ -13,12 +13,12 @@ part 'pizza.g.dart';
|
||||
/// Pizza
|
||||
///
|
||||
/// Properties:
|
||||
/// * [pizzaSize]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [pizzaSize]
|
||||
@BuiltValue(instantiable: false)
|
||||
abstract class Pizza implements Entity {
|
||||
@BuiltValueField(wireName: r'pizzaSize')
|
||||
|
@ -12,13 +12,13 @@ part 'pizza_speziale.g.dart';
|
||||
/// PizzaSpeziale
|
||||
///
|
||||
/// Properties:
|
||||
/// * [toppings]
|
||||
/// * [pizzaSize]
|
||||
/// * [href] - Hyperlink reference
|
||||
/// * [id] - unique identifier
|
||||
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
|
||||
/// * [atBaseType] - When sub-classing, this defines the super-class
|
||||
/// * [atType] - When sub-classing, this defines the sub-class Extensible name
|
||||
/// * [pizzaSize]
|
||||
/// * [toppings]
|
||||
@BuiltValue()
|
||||
abstract class PizzaSpeziale implements Pizza, Built<PizzaSpeziale, PizzaSpezialeBuilder> {
|
||||
@BuiltValueField(wireName: r'toppings')
|
||||
|
@ -692,44 +692,49 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OrderInfo'
|
||||
- $ref: '#/components/schemas/SpecialInfo'
|
||||
description: An order for a pets from the pet store
|
||||
- description: An order for a pets from the pet store
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
petId:
|
||||
format: int64
|
||||
type: integer
|
||||
quantity:
|
||||
format: int32
|
||||
type: integer
|
||||
shipDate:
|
||||
format: date-time
|
||||
type: string
|
||||
status:
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
type: string
|
||||
complete:
|
||||
default: false
|
||||
type: boolean
|
||||
comment:
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- comment
|
||||
title: Pet Order
|
||||
type: object
|
||||
example: null
|
||||
example:
|
||||
petId: 6
|
||||
quantity: 1
|
||||
petId: 5
|
||||
quantity: 5
|
||||
requireTest: requireTest
|
||||
comment: comment
|
||||
id: 0
|
||||
id: 1
|
||||
shipDate: 2000-01-23T04:56:07.000+00:00
|
||||
type: type
|
||||
complete: false
|
||||
promotion: true
|
||||
status: placed
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
petId:
|
||||
format: int64
|
||||
type: integer
|
||||
quantity:
|
||||
format: int32
|
||||
type: integer
|
||||
shipDate:
|
||||
format: date-time
|
||||
type: string
|
||||
status:
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
type: string
|
||||
complete:
|
||||
default: false
|
||||
type: boolean
|
||||
comment:
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- comment
|
||||
title: Pet Order
|
||||
type: object
|
||||
xml:
|
||||
name: Order
|
||||
|
@ -17,11 +17,7 @@ import (
|
||||
|
||||
|
||||
|
||||
// Order - An order for a pets from the pet store
|
||||
type Order struct {
|
||||
SpecialInfo
|
||||
|
||||
Id int64 `json:"id,omitempty"`
|
||||
|
||||
PetId int64 `json:"petId,omitempty"`
|
||||
|
||||
@ -29,6 +25,8 @@ type Order struct {
|
||||
|
||||
ShipDate time.Time `json:"shipDate,omitempty"`
|
||||
|
||||
Id int64 `json:"id,omitempty"`
|
||||
|
||||
// Order Status
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
@ -49,10 +47,6 @@ func AssertOrderRequired(obj Order) error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := AssertSpecialInfoRequired(obj.SpecialInfo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -71,7 +71,7 @@ public interface BarApi {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"foo\" : { \"fooPropA\" : \"fooPropA\", \"fooPropB\" : \"fooPropB\" }, \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"barPropA\" : \"barPropA\" }";
|
||||
String exampleString = "{ \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"foo\" : { \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"fooPropA\" : \"fooPropA\", \"href\" : \"href\", \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"@schemaLocation\" : \"@schemaLocation\" }, \"href\" : \"href\", \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"@schemaLocation\" : \"@schemaLocation\", \"barPropA\" : \"barPropA\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public interface FooApi {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
|
||||
String exampleString = "{ \"fooPropA\" : \"fooPropA\", \"fooPropB\" : \"fooPropB\" }";
|
||||
String exampleString = "{ \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"fooPropA\" : \"fooPropA\", \"href\" : \"href\", \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"@schemaLocation\" : \"@schemaLocation\" }";
|
||||
ApiUtil.setExampleResponse(request, "application/json", exampleString);
|
||||
break;
|
||||
}
|
||||
@ -109,7 +109,7 @@ public interface FooApi {
|
||||
getRequest().ifPresent(request -> {
|
||||
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
|
||||
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json;charset=utf-8"))) {
|
||||
String exampleString = "[ { \"fooPropA\" : \"fooPropA\", \"fooPropB\" : \"fooPropB\" }, { \"fooPropA\" : \"fooPropA\", \"fooPropB\" : \"fooPropB\" } ]";
|
||||
String exampleString = "[ { \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"fooPropA\" : \"fooPropA\", \"href\" : \"href\", \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"@schemaLocation\" : \"@schemaLocation\" }, { \"@baseType\" : \"@baseType\", \"@type\" : \"@type\", \"fooPropA\" : \"fooPropA\", \"href\" : \"href\", \"id\" : \"id\", \"fooPropB\" : \"fooPropB\", \"@schemaLocation\" : \"@schemaLocation\" } ]";
|
||||
ApiUtil.setExampleResponse(request, "application/json;charset=utf-8", exampleString);
|
||||
break;
|
||||
}
|
||||
|
@ -38,16 +38,6 @@ public class BarRef extends EntityRef implements BarRefOrValue {
|
||||
}
|
||||
|
||||
|
||||
public BarRef name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BarRef atReferredType(String atReferredType) {
|
||||
super.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BarRef href(String href) {
|
||||
super.href(href);
|
||||
return this;
|
||||
@ -72,6 +62,16 @@ public class BarRef extends EntityRef implements BarRefOrValue {
|
||||
super.atType(atType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BarRef name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BarRef atReferredType(String atReferredType) {
|
||||
super.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@ -126,18 +126,6 @@ public class BarRef extends EntityRef implements BarRefOrValue {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarRef.Builder name(String name) {
|
||||
this.instance.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarRef.Builder atReferredType(String atReferredType) {
|
||||
this.instance.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarRef.Builder href(String href) {
|
||||
this.instance.href(href);
|
||||
@ -168,6 +156,18 @@ public class BarRef extends EntityRef implements BarRefOrValue {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarRef.Builder name(String name) {
|
||||
this.instance.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BarRef.Builder atReferredType(String atReferredType) {
|
||||
this.instance.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a built BarRef instance.
|
||||
*
|
||||
|
@ -18,10 +18,9 @@ import java.util.*;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
/**
|
||||
* Entity reference schema to be use for all entityRef class.
|
||||
* EntityRef
|
||||
*/
|
||||
|
||||
@Schema(name = "EntityRef", description = "Entity reference schema to be use for all entityRef class.")
|
||||
@JsonIgnoreProperties(
|
||||
value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization
|
||||
allowSetters = true // allows the @type to be set during deserialization
|
||||
@ -35,10 +34,6 @@ import javax.annotation.Generated;
|
||||
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.7.0-SNAPSHOT")
|
||||
public class EntityRef {
|
||||
|
||||
private String name;
|
||||
|
||||
private String atReferredType;
|
||||
|
||||
private String href;
|
||||
|
||||
private String id;
|
||||
@ -49,6 +44,10 @@ public class EntityRef {
|
||||
|
||||
private String atType;
|
||||
|
||||
private String name;
|
||||
|
||||
private String atReferredType;
|
||||
|
||||
public EntityRef() {
|
||||
super();
|
||||
}
|
||||
@ -60,46 +59,6 @@ public class EntityRef {
|
||||
this.atType = atType;
|
||||
}
|
||||
|
||||
public EntityRef name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the related entity.
|
||||
* @return name
|
||||
*/
|
||||
|
||||
@Schema(name = "name", description = "Name of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty("name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public EntityRef atReferredType(String atReferredType) {
|
||||
this.atReferredType = atReferredType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual type of the target instance when needed for disambiguation.
|
||||
* @return atReferredType
|
||||
*/
|
||||
|
||||
@Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty("@referredType")
|
||||
public String getAtReferredType() {
|
||||
return atReferredType;
|
||||
}
|
||||
|
||||
public void setAtReferredType(String atReferredType) {
|
||||
this.atReferredType = atReferredType;
|
||||
}
|
||||
|
||||
public EntityRef href(String href) {
|
||||
this.href = href;
|
||||
return this;
|
||||
@ -200,6 +159,46 @@ public class EntityRef {
|
||||
this.atType = atType;
|
||||
}
|
||||
|
||||
public EntityRef name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the related entity.
|
||||
* @return name
|
||||
*/
|
||||
|
||||
@Schema(name = "name", description = "Name of the related entity.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty("name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public EntityRef atReferredType(String atReferredType) {
|
||||
this.atReferredType = atReferredType;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* The actual type of the target instance when needed for disambiguation.
|
||||
* @return atReferredType
|
||||
*/
|
||||
|
||||
@Schema(name = "@referredType", description = "The actual type of the target instance when needed for disambiguation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
||||
@JsonProperty("@referredType")
|
||||
public String getAtReferredType() {
|
||||
return atReferredType;
|
||||
}
|
||||
|
||||
public void setAtReferredType(String atReferredType) {
|
||||
this.atReferredType = atReferredType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@ -209,31 +208,31 @@ public class EntityRef {
|
||||
return false;
|
||||
}
|
||||
EntityRef entityRef = (EntityRef) o;
|
||||
return Objects.equals(this.name, entityRef.name) &&
|
||||
Objects.equals(this.atReferredType, entityRef.atReferredType) &&
|
||||
Objects.equals(this.href, entityRef.href) &&
|
||||
return Objects.equals(this.href, entityRef.href) &&
|
||||
Objects.equals(this.id, entityRef.id) &&
|
||||
Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) &&
|
||||
Objects.equals(this.atBaseType, entityRef.atBaseType) &&
|
||||
Objects.equals(this.atType, entityRef.atType);
|
||||
Objects.equals(this.atType, entityRef.atType) &&
|
||||
Objects.equals(this.name, entityRef.name) &&
|
||||
Objects.equals(this.atReferredType, entityRef.atReferredType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name, atReferredType, href, id, atSchemaLocation, atBaseType, atType);
|
||||
return Objects.hash(href, id, atSchemaLocation, atBaseType, atType, name, atReferredType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class EntityRef {\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).append("\n");
|
||||
sb.append(" href: ").append(toIndentedString(href)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
|
||||
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
|
||||
sb.append(" atType: ").append(toIndentedString(atType)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" atReferredType: ").append(toIndentedString(atReferredType)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
@ -262,26 +261,16 @@ public class EntityRef {
|
||||
}
|
||||
|
||||
protected Builder copyOf(EntityRef value) {
|
||||
this.instance.setName(value.name);
|
||||
this.instance.setAtReferredType(value.atReferredType);
|
||||
this.instance.setHref(value.href);
|
||||
this.instance.setId(value.id);
|
||||
this.instance.setAtSchemaLocation(value.atSchemaLocation);
|
||||
this.instance.setAtBaseType(value.atBaseType);
|
||||
this.instance.setAtType(value.atType);
|
||||
this.instance.setName(value.name);
|
||||
this.instance.setAtReferredType(value.atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EntityRef.Builder name(String name) {
|
||||
this.instance.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EntityRef.Builder atReferredType(String atReferredType) {
|
||||
this.instance.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EntityRef.Builder href(String href) {
|
||||
this.instance.href(href);
|
||||
return this;
|
||||
@ -307,6 +296,16 @@ public class EntityRef {
|
||||
return this;
|
||||
}
|
||||
|
||||
public EntityRef.Builder name(String name) {
|
||||
this.instance.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public EntityRef.Builder atReferredType(String atReferredType) {
|
||||
this.instance.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a built EntityRef instance.
|
||||
*
|
||||
|
@ -60,16 +60,6 @@ public class FooRef extends EntityRef implements FooRefOrValue {
|
||||
}
|
||||
|
||||
|
||||
public FooRef name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FooRef atReferredType(String atReferredType) {
|
||||
super.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FooRef href(String href) {
|
||||
super.href(href);
|
||||
return this;
|
||||
@ -94,6 +84,16 @@ public class FooRef extends EntityRef implements FooRefOrValue {
|
||||
super.atType(atType);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FooRef name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
public FooRef atReferredType(String atReferredType) {
|
||||
super.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
@ -157,18 +157,6 @@ public class FooRef extends EntityRef implements FooRefOrValue {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FooRef.Builder name(String name) {
|
||||
this.instance.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FooRef.Builder atReferredType(String atReferredType) {
|
||||
this.instance.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FooRef.Builder href(String href) {
|
||||
this.instance.href(href);
|
||||
@ -199,6 +187,18 @@ public class FooRef extends EntityRef implements FooRefOrValue {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FooRef.Builder name(String name) {
|
||||
this.instance.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FooRef.Builder atReferredType(String atReferredType) {
|
||||
this.instance.atReferredType(atReferredType);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a built FooRef instance.
|
||||
*
|
||||
|
@ -135,17 +135,20 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Addressable'
|
||||
- $ref: '#/components/schemas/Extensible'
|
||||
description: Entity reference schema to be use for all entityRef class.
|
||||
- description: Entity reference schema to be use for all entityRef class.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the related entity.
|
||||
type: string
|
||||
'@referredType':
|
||||
description: The actual type of the target instance when needed for disambiguation.
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
discriminator:
|
||||
propertyName: '@type'
|
||||
properties:
|
||||
name:
|
||||
description: Name of the related entity.
|
||||
type: string
|
||||
'@referredType':
|
||||
description: The actual type of the target instance when needed for disambiguation.
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
FooRefOrValue:
|
||||
discriminator:
|
||||
propertyName: '@type'
|
||||
@ -157,22 +160,32 @@ components:
|
||||
Foo:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Entity'
|
||||
- properties:
|
||||
fooPropA:
|
||||
type: string
|
||||
fooPropB:
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
example:
|
||||
'@baseType': '@baseType'
|
||||
'@type': '@type'
|
||||
fooPropA: fooPropA
|
||||
href: href
|
||||
id: id
|
||||
fooPropB: fooPropB
|
||||
properties:
|
||||
fooPropA:
|
||||
type: string
|
||||
fooPropB:
|
||||
type: string
|
||||
'@schemaLocation': '@schemaLocation'
|
||||
type: object
|
||||
FooRef:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/EntityRef'
|
||||
properties:
|
||||
foorefPropA:
|
||||
type: string
|
||||
- properties:
|
||||
foorefPropA:
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
type: object
|
||||
example: null
|
||||
BarRef:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/EntityRef'
|
||||
@ -180,35 +193,49 @@ components:
|
||||
Bar_Create:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Entity'
|
||||
properties:
|
||||
barPropA:
|
||||
type: string
|
||||
fooPropB:
|
||||
type: string
|
||||
foo:
|
||||
$ref: '#/components/schemas/FooRefOrValue'
|
||||
- properties:
|
||||
barPropA:
|
||||
type: string
|
||||
fooPropB:
|
||||
type: string
|
||||
foo:
|
||||
$ref: '#/components/schemas/FooRefOrValue'
|
||||
type: object
|
||||
example: null
|
||||
type: object
|
||||
example: null
|
||||
Bar:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Entity'
|
||||
- properties:
|
||||
id:
|
||||
type: string
|
||||
barPropA:
|
||||
type: string
|
||||
fooPropB:
|
||||
type: string
|
||||
foo:
|
||||
$ref: '#/components/schemas/FooRefOrValue'
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
example: null
|
||||
example:
|
||||
'@baseType': '@baseType'
|
||||
'@type': '@type'
|
||||
foo:
|
||||
'@baseType': '@baseType'
|
||||
'@type': '@type'
|
||||
fooPropA: fooPropA
|
||||
href: href
|
||||
id: id
|
||||
fooPropB: fooPropB
|
||||
'@schemaLocation': '@schemaLocation'
|
||||
href: href
|
||||
id: id
|
||||
fooPropB: fooPropB
|
||||
'@schemaLocation': '@schemaLocation'
|
||||
barPropA: barPropA
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
barPropA:
|
||||
type: string
|
||||
fooPropB:
|
||||
type: string
|
||||
foo:
|
||||
$ref: '#/components/schemas/FooRefOrValue'
|
||||
required:
|
||||
- id
|
||||
type: object
|
||||
BarRefOrValue:
|
||||
oneOf:
|
||||
@ -219,24 +246,33 @@ components:
|
||||
Pizza:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Entity'
|
||||
properties:
|
||||
pizzaSize:
|
||||
type: number
|
||||
- properties:
|
||||
pizzaSize:
|
||||
type: number
|
||||
type: object
|
||||
example: null
|
||||
type: object
|
||||
example: null
|
||||
Pasta:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Entity'
|
||||
properties:
|
||||
vendor:
|
||||
type: string
|
||||
- properties:
|
||||
vendor:
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
type: object
|
||||
example: null
|
||||
PizzaSpeziale:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Pizza'
|
||||
properties:
|
||||
toppings:
|
||||
type: string
|
||||
- properties:
|
||||
toppings:
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
type: object
|
||||
example: null
|
||||
FruitType:
|
||||
enum:
|
||||
- APPLE
|
||||
|
@ -948,44 +948,48 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OrderInfo'
|
||||
- $ref: '#/components/schemas/SpecialInfo'
|
||||
description: An order for a pets from the pet store
|
||||
- description: An order for a pets from the pet store
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
petId:
|
||||
format: int64
|
||||
type: integer
|
||||
quantity:
|
||||
format: int32
|
||||
type: integer
|
||||
shipDate:
|
||||
format: date-time
|
||||
type: string
|
||||
status:
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
type: string
|
||||
complete:
|
||||
default: false
|
||||
type: boolean
|
||||
comment:
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- comment
|
||||
title: Pet Order
|
||||
type: object
|
||||
example: null
|
||||
example:
|
||||
petId: 6
|
||||
quantity: 1
|
||||
petId: 5
|
||||
quantity: 5
|
||||
comment: comment
|
||||
id: 0
|
||||
id: 1
|
||||
shipDate: 2000-01-23T04:56:07.000+00:00
|
||||
type: type
|
||||
complete: false
|
||||
promotion: true
|
||||
status: placed
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
petId:
|
||||
format: int64
|
||||
type: integer
|
||||
quantity:
|
||||
format: int32
|
||||
type: integer
|
||||
shipDate:
|
||||
format: date-time
|
||||
type: string
|
||||
status:
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
type: string
|
||||
complete:
|
||||
default: false
|
||||
type: boolean
|
||||
comment:
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- comment
|
||||
title: Pet Order
|
||||
type: object
|
||||
xml:
|
||||
name: Order
|
||||
|
@ -17,11 +17,7 @@ import (
|
||||
|
||||
|
||||
|
||||
// Order - An order for a pets from the pet store
|
||||
type Order struct {
|
||||
SpecialInfo
|
||||
|
||||
Id int64 `json:"id,omitempty"`
|
||||
|
||||
PetId int64 `json:"petId,omitempty"`
|
||||
|
||||
@ -29,6 +25,8 @@ type Order struct {
|
||||
|
||||
ShipDate time.Time `json:"shipDate,omitempty"`
|
||||
|
||||
Id int64 `json:"id,omitempty"`
|
||||
|
||||
// Order Status
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
@ -48,10 +46,6 @@ func AssertOrderRequired(obj Order) error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := AssertSpecialInfoRequired(obj.SpecialInfo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -948,44 +948,48 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/OrderInfo'
|
||||
- $ref: '#/components/schemas/SpecialInfo'
|
||||
description: An order for a pets from the pet store
|
||||
- description: An order for a pets from the pet store
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
petId:
|
||||
format: int64
|
||||
type: integer
|
||||
quantity:
|
||||
format: int32
|
||||
type: integer
|
||||
shipDate:
|
||||
format: date-time
|
||||
type: string
|
||||
status:
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
type: string
|
||||
complete:
|
||||
default: false
|
||||
type: boolean
|
||||
comment:
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- comment
|
||||
title: Pet Order
|
||||
type: object
|
||||
example: null
|
||||
example:
|
||||
petId: 6
|
||||
quantity: 1
|
||||
petId: 5
|
||||
quantity: 5
|
||||
comment: comment
|
||||
id: 0
|
||||
id: 1
|
||||
shipDate: 2000-01-23T04:56:07.000+00:00
|
||||
type: type
|
||||
complete: false
|
||||
promotion: true
|
||||
status: placed
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
petId:
|
||||
format: int64
|
||||
type: integer
|
||||
quantity:
|
||||
format: int32
|
||||
type: integer
|
||||
shipDate:
|
||||
format: date-time
|
||||
type: string
|
||||
status:
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
type: string
|
||||
complete:
|
||||
default: false
|
||||
type: boolean
|
||||
comment:
|
||||
nullable: true
|
||||
type: string
|
||||
required:
|
||||
- comment
|
||||
title: Pet Order
|
||||
type: object
|
||||
xml:
|
||||
name: Order
|
||||
|
@ -17,11 +17,7 @@ import (
|
||||
|
||||
|
||||
|
||||
// Order - An order for a pets from the pet store
|
||||
type Order struct {
|
||||
SpecialInfo
|
||||
|
||||
Id int64 `json:"id,omitempty"`
|
||||
|
||||
PetId int64 `json:"petId,omitempty"`
|
||||
|
||||
@ -29,6 +25,8 @@ type Order struct {
|
||||
|
||||
ShipDate time.Time `json:"shipDate,omitempty"`
|
||||
|
||||
Id int64 `json:"id,omitempty"`
|
||||
|
||||
// Order Status
|
||||
Status string `json:"status,omitempty"`
|
||||
|
||||
@ -48,10 +46,6 @@ func AssertOrderRequired(obj Order) error {
|
||||
}
|
||||
}
|
||||
|
||||
if err := AssertSpecialInfoRequired(obj.SpecialInfo); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -146,11 +146,14 @@ components:
|
||||
allOfObject:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/baseAllOf'
|
||||
- properties:
|
||||
sampleProperty:
|
||||
type: string
|
||||
type: object
|
||||
example: null
|
||||
example:
|
||||
sampleProperty: sampleProperty
|
||||
properties:
|
||||
sampleProperty:
|
||||
type: string
|
||||
sampleBaseProperty: sampleBaseProperty
|
||||
baseAllOf:
|
||||
properties:
|
||||
sampleBaseProperty:
|
||||
|
@ -3,8 +3,8 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**sample_property** | **String** | | [optional] [default to None]
|
||||
**sample_base_property** | **String** | | [optional] [default to None]
|
||||
**sample_property** | **String** | | [optional] [default to None]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -196,14 +196,14 @@ impl ::std::str::FromStr for AdditionalPropertiesObject {
|
||||
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
|
||||
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
|
||||
pub struct AllOfObject {
|
||||
#[serde(rename = "sampleProperty")]
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub sample_property: Option<String>,
|
||||
|
||||
#[serde(rename = "sampleBaseProperty")]
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub sample_base_property: Option<String>,
|
||||
|
||||
#[serde(rename = "sampleProperty")]
|
||||
#[serde(skip_serializing_if="Option::is_none")]
|
||||
pub sample_property: Option<String>,
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -211,8 +211,8 @@ impl AllOfObject {
|
||||
#[allow(clippy::new_without_default)]
|
||||
pub fn new() -> AllOfObject {
|
||||
AllOfObject {
|
||||
sample_property: None,
|
||||
sample_base_property: None,
|
||||
sample_property: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -224,14 +224,6 @@ impl std::string::ToString for AllOfObject {
|
||||
fn to_string(&self) -> String {
|
||||
let params: Vec<Option<String>> = vec![
|
||||
|
||||
self.sample_property.as_ref().map(|sample_property| {
|
||||
[
|
||||
"sampleProperty".to_string(),
|
||||
sample_property.to_string(),
|
||||
].join(",")
|
||||
}),
|
||||
|
||||
|
||||
self.sample_base_property.as_ref().map(|sample_base_property| {
|
||||
[
|
||||
"sampleBaseProperty".to_string(),
|
||||
@ -239,6 +231,14 @@ impl std::string::ToString for AllOfObject {
|
||||
].join(",")
|
||||
}),
|
||||
|
||||
|
||||
self.sample_property.as_ref().map(|sample_property| {
|
||||
[
|
||||
"sampleProperty".to_string(),
|
||||
sample_property.to_string(),
|
||||
].join(",")
|
||||
}),
|
||||
|
||||
];
|
||||
|
||||
params.into_iter().flatten().collect::<Vec<_>>().join(",")
|
||||
@ -256,8 +256,8 @@ impl std::str::FromStr for AllOfObject {
|
||||
#[derive(Default)]
|
||||
#[allow(dead_code)]
|
||||
struct IntermediateRep {
|
||||
pub sample_property: Vec<String>,
|
||||
pub sample_base_property: Vec<String>,
|
||||
pub sample_property: Vec<String>,
|
||||
}
|
||||
|
||||
let mut intermediate_rep = IntermediateRep::default();
|
||||
@ -275,10 +275,10 @@ impl std::str::FromStr for AllOfObject {
|
||||
if let Some(key) = key_result {
|
||||
#[allow(clippy::match_single_binding)]
|
||||
match key {
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"sampleProperty" => intermediate_rep.sample_property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"sampleBaseProperty" => intermediate_rep.sample_base_property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
#[allow(clippy::redundant_clone)]
|
||||
"sampleProperty" => intermediate_rep.sample_property.push(<String as std::str::FromStr>::from_str(val).map_err(|x| x.to_string())?),
|
||||
_ => return std::result::Result::Err("Unexpected key while parsing AllOfObject".to_string())
|
||||
}
|
||||
}
|
||||
@ -289,8 +289,8 @@ impl std::str::FromStr for AllOfObject {
|
||||
|
||||
// Use the intermediate representation to return the struct
|
||||
std::result::Result::Ok(AllOfObject {
|
||||
sample_property: intermediate_rep.sample_property.into_iter().next(),
|
||||
sample_base_property: intermediate_rep.sample_base_property.into_iter().next(),
|
||||
sample_property: intermediate_rep.sample_property.into_iter().next(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user