update samples

This commit is contained in:
William Cheng 2024-06-26 10:04:23 +08:00
parent 7dac40e31c
commit 0da60def01
80 changed files with 654 additions and 617 deletions

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes 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] **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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes 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] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes 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] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**foo_prop_a** | Option<**String**> | | [optional]
**foo_prop_b** | Option<**String**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes 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] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,12 +4,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**vendor** | Option<**String**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,12 +4,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**pizza_size** | Option<**f64**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**toppings** | Option<**String**> | | [optional]
**pizza_size** | Option<**f64**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,17 +13,11 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Bar { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
#[serde(rename = "id")]
pub id: String,
/// A URI to a JSON-Schema file that defines additional attributes and relationships /// A URI to a JSON-Schema file that defines additional attributes and relationships
#[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")] #[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")]
pub at_schema_location: Option<String>, pub at_schema_location: Option<String>,
@ -33,19 +27,25 @@ pub struct Bar {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl Bar {
pub fn new(id: String, at_type: String) -> Bar { pub fn new(id: String, at_type: String) -> Bar {
Bar { Bar {
id,
bar_prop_a: None,
foo_prop_b: None,
foo: None,
href: None, href: None,
id,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
bar_prop_a: None,
foo_prop_b: None,
foo: None,
} }
} }
} }

View File

@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BarCreate { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -34,19 +28,25 @@ pub struct BarCreate {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl BarCreate {
pub fn new(at_type: String) -> BarCreate { pub fn new(at_type: String) -> BarCreate {
BarCreate { BarCreate {
bar_prop_a: None,
foo_prop_b: None,
foo: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
bar_prop_a: None,
foo_prop_b: None,
foo: None,
} }
} }
} }

View File

@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BarRef { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -34,18 +28,24 @@ pub struct BarRef {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl BarRef {
pub fn new(at_type: String) -> BarRef { pub fn new(at_type: String) -> BarRef {
BarRef { BarRef {
name: None,
at_referred_type: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
name: None,
at_referred_type: None,
} }
} }
} }

View File

@ -11,18 +11,11 @@
use crate::models; use crate::models;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
/// EntityRef : Entity reference schema to be use for all entityRef class.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "@type")] #[serde(tag = "@type")]
pub enum EntityRef { pub enum EntityRef {
#[serde(rename="BarRef")] #[serde(rename="BarRef")]
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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
href: Option<String>, href: Option<String>,
@ -35,15 +28,15 @@ pub enum EntityRef {
/// When sub-classing, this defines the super-class /// When sub-classing, this defines the super-class
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")] #[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
at_base_type: Option<String>, 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")] #[serde(rename="FooRef")]
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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
href: Option<String>, href: Option<String>,
@ -56,18 +49,24 @@ pub enum EntityRef {
/// When sub-classing, this defines the super-class /// When sub-classing, this defines the super-class
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")] #[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
at_base_type: Option<String>, 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 { impl Default for EntityRef {
fn default() -> Self { fn default() -> Self {
Self::BarRef { Self::BarRef {
name: Default::default(),
at_referred_type: Default::default(),
href: Default::default(), href: Default::default(),
id: Default::default(), id: Default::default(),
at_schema_location: Default::default(), at_schema_location: Default::default(),
at_base_type: Default::default(), at_base_type: Default::default(),
name: Default::default(),
at_referred_type: Default::default(),
} }
} }

View File

@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Foo { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -32,18 +28,22 @@ pub struct Foo {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl Foo {
pub fn new(at_type: String) -> Foo { pub fn new(at_type: String) -> Foo {
Foo { Foo {
foo_prop_a: None,
foo_prop_b: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
foo_prop_a: None,
foo_prop_b: None,
} }
} }
} }

View File

@ -13,14 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FooRef { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -36,19 +28,27 @@ pub struct FooRef {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl FooRef {
pub fn new(at_type: String) -> FooRef { pub fn new(at_type: String) -> FooRef {
FooRef { FooRef {
fooref_prop_a: None,
name: None,
at_referred_type: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
name: None,
at_referred_type: None,
fooref_prop_a: None,
} }
} }
} }

View File

@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Pasta { pub struct Pasta {
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
pub vendor: Option<String>,
/// Hyperlink reference /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -30,17 +28,19 @@ pub struct Pasta {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, pub at_type: String,
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
pub vendor: Option<String>,
} }
impl Pasta { impl Pasta {
pub fn new(at_type: String) -> Pasta { pub fn new(at_type: String) -> Pasta {
Pasta { Pasta {
vendor: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
vendor: None,
} }
} }
} }

View File

@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Pizza { pub struct Pizza {
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
pub pizza_size: Option<f64>,
/// Hyperlink reference /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -30,17 +28,19 @@ pub struct Pizza {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, pub at_type: String,
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
pub pizza_size: Option<f64>,
} }
impl Pizza { impl Pizza {
pub fn new(at_type: String) -> Pizza { pub fn new(at_type: String) -> Pizza {
Pizza { Pizza {
pizza_size: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
pizza_size: None,
} }
} }
} }

View File

@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PizzaSpeziale { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -32,18 +28,22 @@ pub struct PizzaSpeziale {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl PizzaSpeziale {
pub fn new(at_type: String) -> PizzaSpeziale { pub fn new(at_type: String) -> PizzaSpeziale {
PizzaSpeziale { PizzaSpeziale {
toppings: None,
pizza_size: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
pizza_size: None,
toppings: None,
} }
} }
} }

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes 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] **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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes 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] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes 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] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**foo_prop_a** | Option<**String**> | | [optional]
**foo_prop_b** | Option<**String**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,14 +4,14 @@
Name | Type | Description | Notes 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] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,12 +4,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**vendor** | Option<**String**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,12 +4,12 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**pizza_size** | Option<**f64**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -4,13 +4,13 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**toppings** | Option<**String**> | | [optional]
**pizza_size** | Option<**f64**> | | [optional]
**href** | Option<**String**> | Hyperlink reference | [optional] **href** | Option<**String**> | Hyperlink reference | [optional]
**id** | Option<**String**> | unique identifier | [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_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_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 | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,17 +13,11 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Bar { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
#[serde(rename = "id")]
pub id: String,
/// A URI to a JSON-Schema file that defines additional attributes and relationships /// A URI to a JSON-Schema file that defines additional attributes and relationships
#[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")] #[serde(rename = "@schemaLocation", skip_serializing_if = "Option::is_none")]
pub at_schema_location: Option<String>, pub at_schema_location: Option<String>,
@ -33,19 +27,25 @@ pub struct Bar {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl Bar {
pub fn new(id: String, at_type: String) -> Bar { pub fn new(id: String, at_type: String) -> Bar {
Bar { Bar {
id,
bar_prop_a: None,
foo_prop_b: None,
foo: None,
href: None, href: None,
id,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
bar_prop_a: None,
foo_prop_b: None,
foo: None,
} }
} }
} }

View File

@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BarCreate { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -34,19 +28,25 @@ pub struct BarCreate {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl BarCreate {
pub fn new(at_type: String) -> BarCreate { pub fn new(at_type: String) -> BarCreate {
BarCreate { BarCreate {
bar_prop_a: None,
foo_prop_b: None,
foo: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
bar_prop_a: None,
foo_prop_b: None,
foo: None,
} }
} }
} }

View File

@ -13,12 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BarRef { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -34,18 +28,24 @@ pub struct BarRef {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl BarRef {
pub fn new(at_type: String) -> BarRef { pub fn new(at_type: String) -> BarRef {
BarRef { BarRef {
name: None,
at_referred_type: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
name: None,
at_referred_type: None,
} }
} }
} }

View File

@ -11,18 +11,11 @@
use crate::models; use crate::models;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
/// EntityRef : Entity reference schema to be use for all entityRef class.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "@type")] #[serde(tag = "@type")]
pub enum EntityRef { pub enum EntityRef {
#[serde(rename="BarRef")] #[serde(rename="BarRef")]
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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
href: Option<String>, href: Option<String>,
@ -35,15 +28,15 @@ pub enum EntityRef {
/// When sub-classing, this defines the super-class /// When sub-classing, this defines the super-class
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")] #[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
at_base_type: Option<String>, 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")] #[serde(rename="FooRef")]
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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
href: Option<String>, href: Option<String>,
@ -56,18 +49,24 @@ pub enum EntityRef {
/// When sub-classing, this defines the super-class /// When sub-classing, this defines the super-class
#[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")] #[serde(rename = "@baseType", skip_serializing_if = "Option::is_none")]
at_base_type: Option<String>, 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 { impl Default for EntityRef {
fn default() -> Self { fn default() -> Self {
Self::BarRef { Self::BarRef {
name: Default::default(),
at_referred_type: Default::default(),
href: Default::default(), href: Default::default(),
id: Default::default(), id: Default::default(),
at_schema_location: Default::default(), at_schema_location: Default::default(),
at_base_type: Default::default(), at_base_type: Default::default(),
name: Default::default(),
at_referred_type: Default::default(),
} }
} }

View File

@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Foo { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -32,18 +28,22 @@ pub struct Foo {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl Foo {
pub fn new(at_type: String) -> Foo { pub fn new(at_type: String) -> Foo {
Foo { Foo {
foo_prop_a: None,
foo_prop_b: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
foo_prop_a: None,
foo_prop_b: None,
} }
} }
} }

View File

@ -13,14 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FooRef { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -36,19 +28,27 @@ pub struct FooRef {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl FooRef {
pub fn new(at_type: String) -> FooRef { pub fn new(at_type: String) -> FooRef {
FooRef { FooRef {
fooref_prop_a: None,
name: None,
at_referred_type: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
name: None,
at_referred_type: None,
fooref_prop_a: None,
} }
} }
} }

View File

@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Pasta { pub struct Pasta {
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
pub vendor: Option<String>,
/// Hyperlink reference /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -30,17 +28,19 @@ pub struct Pasta {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, pub at_type: String,
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
pub vendor: Option<String>,
} }
impl Pasta { impl Pasta {
pub fn new(at_type: String) -> Pasta { pub fn new(at_type: String) -> Pasta {
Pasta { Pasta {
vendor: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
vendor: None,
} }
} }
} }

View File

@ -13,8 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Pizza { pub struct Pizza {
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
pub pizza_size: Option<f64>,
/// Hyperlink reference /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -30,17 +28,19 @@ pub struct Pizza {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, pub at_type: String,
#[serde(rename = "pizzaSize", skip_serializing_if = "Option::is_none")]
pub pizza_size: Option<f64>,
} }
impl Pizza { impl Pizza {
pub fn new(at_type: String) -> Pizza { pub fn new(at_type: String) -> Pizza {
Pizza { Pizza {
pizza_size: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
pizza_size: None,
} }
} }
} }

View File

@ -13,10 +13,6 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PizzaSpeziale { 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 /// Hyperlink reference
#[serde(rename = "href", skip_serializing_if = "Option::is_none")] #[serde(rename = "href", skip_serializing_if = "Option::is_none")]
pub href: Option<String>, pub href: Option<String>,
@ -32,18 +28,22 @@ pub struct PizzaSpeziale {
/// When sub-classing, this defines the sub-class Extensible name /// When sub-classing, this defines the sub-class Extensible name
#[serde(rename = "@type")] #[serde(rename = "@type")]
pub at_type: String, 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 { impl PizzaSpeziale {
pub fn new(at_type: String) -> PizzaSpeziale { pub fn new(at_type: String) -> PizzaSpeziale {
PizzaSpeziale { PizzaSpeziale {
toppings: None,
pizza_size: None,
href: None, href: None,
id: None, id: None,
at_schema_location: None, at_schema_location: None,
at_base_type: None, at_base_type: None,
at_type, at_type,
pizza_size: None,
toppings: None,
} }
} }
} }

View File

@ -64,8 +64,11 @@ components:
type: integer type: integer
type: object type: object
- $ref: '#/components/schemas/Person' - $ref: '#/components/schemas/Person'
description: A representation of a child - description: A representation of a child
properties: properties:
boosterSeat: boosterSeat:
type: boolean type: boolean
type: object
example: null
example: null

View File

@ -1,5 +1,4 @@
# Org.OpenAPITools.Model.Child # Org.OpenAPITools.Model.Child
A representation of a child
## Properties ## Properties

View File

@ -25,7 +25,7 @@ using Org.OpenAPITools.Client;
namespace Org.OpenAPITools.Model namespace Org.OpenAPITools.Model
{ {
/// <summary> /// <summary>
/// A representation of a child /// Child
/// </summary> /// </summary>
public partial class Child : Person, IValidatableObject public partial class Child : Person, IValidatableObject
{ {
@ -33,11 +33,11 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="Child" /> class. /// Initializes a new instance of the <see cref="Child" /> class.
/// </summary> /// </summary>
/// <param name="age">age</param> /// <param name="age">age</param>
/// <param name="boosterSeat">boosterSeat</param>
/// <param name="firstName">firstName</param> /// <param name="firstName">firstName</param>
/// <param name="lastName">lastName</param> /// <param name="lastName">lastName</param>
/// <param name="boosterSeat">boosterSeat</param>
[JsonConstructor] [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; AgeOption = age;
BoosterSeatOption = boosterSeat; BoosterSeatOption = boosterSeat;
@ -59,13 +59,6 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("age")] [JsonPropertyName("age")]
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option<int?>(value); } } 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> /// <summary>
/// Used to track the state of BoosterSeat /// Used to track the state of BoosterSeat
/// </summary> /// </summary>
@ -79,6 +72,13 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("boosterSeat")] [JsonPropertyName("boosterSeat")]
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new Option<bool?>(value); } } 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> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -118,10 +118,10 @@ namespace Org.OpenAPITools.Model
JsonTokenType startingTokenType = utf8JsonReader.TokenType; JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Option<int?> age = default; Option<int?> age = default;
Option<bool?> boosterSeat = default;
Option<string> firstName = default; Option<string> firstName = default;
Option<string> lastName = default; Option<string> lastName = default;
Option<string> type = default; Option<string> type = default;
Option<bool?> boosterSeat = default;
while (utf8JsonReader.Read()) while (utf8JsonReader.Read())
{ {
@ -142,6 +142,10 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReader.TokenType != JsonTokenType.Null) if (utf8JsonReader.TokenType != JsonTokenType.Null)
age = new Option<int?>(utf8JsonReader.GetInt32()); age = new Option<int?>(utf8JsonReader.GetInt32());
break; break;
case "boosterSeat":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
break;
case "firstName": case "firstName":
firstName = new Option<string>(utf8JsonReader.GetString()); firstName = new Option<string>(utf8JsonReader.GetString());
break; break;
@ -151,10 +155,6 @@ namespace Org.OpenAPITools.Model
case "$_type": case "$_type":
type = new Option<string>(utf8JsonReader.GetString()); type = new Option<string>(utf8JsonReader.GetString());
break; break;
case "boosterSeat":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
break;
default: default:
break; break;
} }
@ -164,6 +164,9 @@ namespace Org.OpenAPITools.Model
if (age.IsSet && age.Value == null) if (age.IsSet && age.Value == null)
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); 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) if (firstName.IsSet && firstName.Value == null)
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); 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) if (type.IsSet && type.Value == null)
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
if (boosterSeat.IsSet && boosterSeat.Value == null) return new Child(age, boosterSeat, firstName, lastName);
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
return new Child(age, firstName, lastName, boosterSeat);
} }
/// <summary> /// <summary>
@ -212,6 +212,9 @@ namespace Org.OpenAPITools.Model
if (child.AgeOption.IsSet) if (child.AgeOption.IsSet)
writer.WriteNumber("age", child.AgeOption.Value.Value); writer.WriteNumber("age", child.AgeOption.Value.Value);
if (child.BoosterSeatOption.IsSet)
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
if (child.FirstNameOption.IsSet) if (child.FirstNameOption.IsSet)
writer.WriteString("firstName", child.FirstName); writer.WriteString("firstName", child.FirstName);
@ -219,9 +222,6 @@ namespace Org.OpenAPITools.Model
writer.WriteString("lastName", child.LastName); writer.WriteString("lastName", child.LastName);
writer.WriteString("$_type", child.Type); writer.WriteString("$_type", child.Type);
if (child.BoosterSeatOption.IsSet)
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
} }
} }
} }

View File

@ -64,8 +64,11 @@ components:
type: integer type: integer
type: object type: object
- $ref: '#/components/schemas/Person' - $ref: '#/components/schemas/Person'
description: A representation of a child - description: A representation of a child
properties: properties:
boosterSeat: boosterSeat:
type: boolean type: boolean
type: object
example: null
example: null

View File

@ -1,5 +1,4 @@
# Org.OpenAPITools.Model.Child # Org.OpenAPITools.Model.Child
A representation of a child
## Properties ## Properties

View File

@ -25,7 +25,7 @@ using Org.OpenAPITools.Client;
namespace Org.OpenAPITools.Model namespace Org.OpenAPITools.Model
{ {
/// <summary> /// <summary>
/// A representation of a child /// Child
/// </summary> /// </summary>
public partial class Child : Person, IValidatableObject public partial class Child : Person, IValidatableObject
{ {
@ -33,11 +33,11 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="Child" /> class. /// Initializes a new instance of the <see cref="Child" /> class.
/// </summary> /// </summary>
/// <param name="age">age</param> /// <param name="age">age</param>
/// <param name="boosterSeat">boosterSeat</param>
/// <param name="firstName">firstName</param> /// <param name="firstName">firstName</param>
/// <param name="lastName">lastName</param> /// <param name="lastName">lastName</param>
/// <param name="boosterSeat">boosterSeat</param>
[JsonConstructor] [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; AgeOption = age;
BoosterSeatOption = boosterSeat; BoosterSeatOption = boosterSeat;
@ -59,13 +59,6 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("age")] [JsonPropertyName("age")]
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new Option<int?>(value); } } 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> /// <summary>
/// Used to track the state of BoosterSeat /// Used to track the state of BoosterSeat
/// </summary> /// </summary>
@ -79,6 +72,13 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("boosterSeat")] [JsonPropertyName("boosterSeat")]
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new Option<bool?>(value); } } 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> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -118,10 +118,10 @@ namespace Org.OpenAPITools.Model
JsonTokenType startingTokenType = utf8JsonReader.TokenType; JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Option<int?> age = default; Option<int?> age = default;
Option<bool?> boosterSeat = default;
Option<string> firstName = default; Option<string> firstName = default;
Option<string> lastName = default; Option<string> lastName = default;
Option<string> type = default; Option<string> type = default;
Option<bool?> boosterSeat = default;
while (utf8JsonReader.Read()) while (utf8JsonReader.Read())
{ {
@ -142,6 +142,10 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReader.TokenType != JsonTokenType.Null) if (utf8JsonReader.TokenType != JsonTokenType.Null)
age = new Option<int?>(utf8JsonReader.GetInt32()); age = new Option<int?>(utf8JsonReader.GetInt32());
break; break;
case "boosterSeat":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
break;
case "firstName": case "firstName":
firstName = new Option<string>(utf8JsonReader.GetString()); firstName = new Option<string>(utf8JsonReader.GetString());
break; break;
@ -151,10 +155,6 @@ namespace Org.OpenAPITools.Model
case "$_type": case "$_type":
type = new Option<string>(utf8JsonReader.GetString()); type = new Option<string>(utf8JsonReader.GetString());
break; break;
case "boosterSeat":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
break;
default: default:
break; break;
} }
@ -164,6 +164,9 @@ namespace Org.OpenAPITools.Model
if (age.IsSet && age.Value == null) if (age.IsSet && age.Value == null)
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); 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) if (firstName.IsSet && firstName.Value == null)
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); 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) if (type.IsSet && type.Value == null)
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
if (boosterSeat.IsSet && boosterSeat.Value == null) return new Child(age, boosterSeat, firstName, lastName);
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
return new Child(age, firstName, lastName, boosterSeat);
} }
/// <summary> /// <summary>
@ -212,6 +212,9 @@ namespace Org.OpenAPITools.Model
if (child.AgeOption.IsSet) if (child.AgeOption.IsSet)
writer.WriteNumber("age", child.AgeOption.Value.Value); writer.WriteNumber("age", child.AgeOption.Value.Value);
if (child.BoosterSeatOption.IsSet)
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
if (child.FirstNameOption.IsSet) if (child.FirstNameOption.IsSet)
writer.WriteString("firstName", child.FirstName); writer.WriteString("firstName", child.FirstName);
@ -219,9 +222,6 @@ namespace Org.OpenAPITools.Model
writer.WriteString("lastName", child.LastName); writer.WriteString("lastName", child.LastName);
writer.WriteString("$_type", child.Type); writer.WriteString("$_type", child.Type);
if (child.BoosterSeatOption.IsSet)
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value.Value);
} }
} }
} }

View File

@ -64,8 +64,11 @@ components:
type: integer type: integer
type: object type: object
- $ref: '#/components/schemas/Person' - $ref: '#/components/schemas/Person'
description: A representation of a child - description: A representation of a child
properties: properties:
boosterSeat: boosterSeat:
type: boolean type: boolean
type: object
example: null
example: null

View File

@ -1,5 +1,4 @@
# Org.OpenAPITools.Model.Child # Org.OpenAPITools.Model.Child
A representation of a child
## Properties ## Properties

View File

@ -27,7 +27,7 @@ using Org.OpenAPITools.Client;
namespace Org.OpenAPITools.Model namespace Org.OpenAPITools.Model
{ {
/// <summary> /// <summary>
/// A representation of a child /// Child
/// </summary> /// </summary>
public partial class Child : Person, IValidatableObject public partial class Child : Person, IValidatableObject
{ {
@ -35,11 +35,11 @@ namespace Org.OpenAPITools.Model
/// Initializes a new instance of the <see cref="Child" /> class. /// Initializes a new instance of the <see cref="Child" /> class.
/// </summary> /// </summary>
/// <param name="age">age</param> /// <param name="age">age</param>
/// <param name="boosterSeat">boosterSeat</param>
/// <param name="firstName">firstName</param> /// <param name="firstName">firstName</param>
/// <param name="lastName">lastName</param> /// <param name="lastName">lastName</param>
/// <param name="boosterSeat">boosterSeat</param>
[JsonConstructor] [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; AgeOption = age;
BoosterSeatOption = boosterSeat; BoosterSeatOption = boosterSeat;
@ -61,13 +61,6 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("age")] [JsonPropertyName("age")]
public int? Age { get { return this.AgeOption; } set { this.AgeOption = new(value); } } 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> /// <summary>
/// Used to track the state of BoosterSeat /// Used to track the state of BoosterSeat
/// </summary> /// </summary>
@ -81,6 +74,13 @@ namespace Org.OpenAPITools.Model
[JsonPropertyName("boosterSeat")] [JsonPropertyName("boosterSeat")]
public bool? BoosterSeat { get { return this.BoosterSeatOption; } set { this.BoosterSeatOption = new(value); } } 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> /// <summary>
/// Returns the string presentation of the object /// Returns the string presentation of the object
/// </summary> /// </summary>
@ -120,10 +120,10 @@ namespace Org.OpenAPITools.Model
JsonTokenType startingTokenType = utf8JsonReader.TokenType; JsonTokenType startingTokenType = utf8JsonReader.TokenType;
Option<int?> age = default; Option<int?> age = default;
Option<bool?> boosterSeat = default;
Option<string?> firstName = default; Option<string?> firstName = default;
Option<string?> lastName = default; Option<string?> lastName = default;
Option<string?> type = default; Option<string?> type = default;
Option<bool?> boosterSeat = default;
while (utf8JsonReader.Read()) while (utf8JsonReader.Read())
{ {
@ -144,6 +144,10 @@ namespace Org.OpenAPITools.Model
if (utf8JsonReader.TokenType != JsonTokenType.Null) if (utf8JsonReader.TokenType != JsonTokenType.Null)
age = new Option<int?>(utf8JsonReader.GetInt32()); age = new Option<int?>(utf8JsonReader.GetInt32());
break; break;
case "boosterSeat":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
break;
case "firstName": case "firstName":
firstName = new Option<string?>(utf8JsonReader.GetString()!); firstName = new Option<string?>(utf8JsonReader.GetString()!);
break; break;
@ -153,10 +157,6 @@ namespace Org.OpenAPITools.Model
case "$_type": case "$_type":
type = new Option<string?>(utf8JsonReader.GetString()!); type = new Option<string?>(utf8JsonReader.GetString()!);
break; break;
case "boosterSeat":
if (utf8JsonReader.TokenType != JsonTokenType.Null)
boosterSeat = new Option<bool?>(utf8JsonReader.GetBoolean());
break;
default: default:
break; break;
} }
@ -166,6 +166,9 @@ namespace Org.OpenAPITools.Model
if (age.IsSet && age.Value == null) if (age.IsSet && age.Value == null)
throw new ArgumentNullException(nameof(age), "Property is not nullable for class Child."); 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) if (firstName.IsSet && firstName.Value == null)
throw new ArgumentNullException(nameof(firstName), "Property is not nullable for class Child."); 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) if (type.IsSet && type.Value == null)
throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child."); throw new ArgumentNullException(nameof(type), "Property is not nullable for class Child.");
if (boosterSeat.IsSet && boosterSeat.Value == null) return new Child(age, boosterSeat, firstName, lastName);
throw new ArgumentNullException(nameof(boosterSeat), "Property is not nullable for class Child.");
return new Child(age, firstName, lastName, boosterSeat);
} }
/// <summary> /// <summary>
@ -214,6 +214,9 @@ namespace Org.OpenAPITools.Model
if (child.AgeOption.IsSet) if (child.AgeOption.IsSet)
writer.WriteNumber("age", child.AgeOption.Value!.Value); writer.WriteNumber("age", child.AgeOption.Value!.Value);
if (child.BoosterSeatOption.IsSet)
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value!.Value);
if (child.FirstNameOption.IsSet) if (child.FirstNameOption.IsSet)
writer.WriteString("firstName", child.FirstName); writer.WriteString("firstName", child.FirstName);
@ -221,9 +224,6 @@ namespace Org.OpenAPITools.Model
writer.WriteString("lastName", child.LastName); writer.WriteString("lastName", child.LastName);
writer.WriteString("$_type", child.Type); writer.WriteString("$_type", child.Type);
if (child.BoosterSeatOption.IsSet)
writer.WriteBoolean("boosterSeat", child.BoosterSeatOption.Value!.Value);
} }
} }
} }

View File

@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **String** | |
**barPropA** | **String** | | [optional]
**fooPropB** | **String** | | [optional]
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | |
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**barPropA** | **String** | | [optional]
**fooPropB** | **String** | | [optional]
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes 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] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**id** | **String** | unique identifier |
**barPropA** | **String** | | [optional]
**fooPropB** | **String** | | [optional]
**foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional]
**href** | **String** | Hyperlink reference | [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] **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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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] **name** | **String** | Name of the related entity. | [optional]
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional]

View File

@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes 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] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**fooPropA** | **String** | | [optional]
**fooPropB** | **String** | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,14 +8,14 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes 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] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,16 +8,16 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**fooPropA** | **String** | | [optional]
**fooPropB** | **String** | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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] **name** | **String** | Name of the related entity. | [optional]
**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,12 +8,12 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**vendor** | **String** | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,12 +8,12 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**pizzaSize** | **num** | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -8,13 +8,13 @@ import 'package:openapi/api.dart';
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**toppings** | **String** | | [optional]
**pizzaSize** | **num** | | [optional]
**href** | **String** | Hyperlink reference | [optional] **href** | **String** | Hyperlink reference | [optional]
**id** | **String** | unique identifier | [optional] **id** | **String** | unique identifier | [optional]
**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [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] **atBaseType** | **String** | When sub-classing, this defines the super-class | [optional]
**atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -13,14 +13,14 @@ part 'bar.g.dart';
/// Bar /// Bar
/// ///
/// Properties: /// Properties:
/// * [id]
/// * [barPropA]
/// * [fooPropB]
/// * [foo]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id]
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [barPropA]
/// * [fooPropB]
/// * [foo]
@BuiltValue() @BuiltValue()
abstract class Bar implements Entity, Built<Bar, BarBuilder> { abstract class Bar implements Entity, Built<Bar, BarBuilder> {
@BuiltValueField(wireName: r'foo') @BuiltValueField(wireName: r'foo')

View File

@ -13,14 +13,14 @@ part 'bar_create.g.dart';
/// BarCreate /// BarCreate
/// ///
/// Properties: /// Properties:
/// * [barPropA]
/// * [fooPropB]
/// * [foo]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [barPropA]
/// * [fooPropB]
/// * [foo]
@BuiltValue() @BuiltValue()
abstract class BarCreate implements Entity, Built<BarCreate, BarCreateBuilder> { abstract class BarCreate implements Entity, Built<BarCreate, BarCreateBuilder> {
@BuiltValueField(wireName: r'foo') @BuiltValueField(wireName: r'foo')

View File

@ -12,13 +12,13 @@ part 'bar_ref.g.dart';
/// BarRef /// BarRef
/// ///
/// Properties: /// Properties:
/// * [name] - Name of the related entity.
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [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() @BuiltValue()
abstract class BarRef implements EntityRef, Built<BarRef, BarRefBuilder> { abstract class BarRef implements EntityRef, Built<BarRef, BarRefBuilder> {
BarRef._(); BarRef._();

View File

@ -15,14 +15,14 @@ part 'bar_ref_or_value.g.dart';
/// BarRefOrValue /// BarRefOrValue
/// ///
/// Properties: /// Properties:
/// * [id] - unique identifier
/// * [barPropA]
/// * [fooPropB]
/// * [foo]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [barPropA]
/// * [fooPropB]
/// * [foo]
/// * [name] - Name of the related entity. /// * [name] - Name of the related entity.
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation. /// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
@BuiltValue() @BuiltValue()

View File

@ -12,16 +12,16 @@ import 'package:built_value/serializer.dart';
part 'entity_ref.g.dart'; part 'entity_ref.g.dart';
/// Entity reference schema to be use for all entityRef class. /// EntityRef
/// ///
/// Properties: /// Properties:
/// * [name] - Name of the related entity.
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [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) @BuiltValue(instantiable: false)
abstract class EntityRef implements Addressable, Extensible { abstract class EntityRef implements Addressable, Extensible {
/// The actual type of the target instance when needed for disambiguation. /// The actual type of the target instance when needed for disambiguation.

View File

@ -12,13 +12,13 @@ part 'foo.g.dart';
/// Foo /// Foo
/// ///
/// Properties: /// Properties:
/// * [fooPropA]
/// * [fooPropB]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [fooPropA]
/// * [fooPropB]
@BuiltValue() @BuiltValue()
abstract class Foo implements Entity, Built<Foo, FooBuilder> { abstract class Foo implements Entity, Built<Foo, FooBuilder> {
@BuiltValueField(wireName: r'fooPropA') @BuiltValueField(wireName: r'fooPropA')

View File

@ -12,14 +12,14 @@ part 'foo_ref.g.dart';
/// FooRef /// FooRef
/// ///
/// Properties: /// Properties:
/// * [foorefPropA]
/// * [name] - Name of the related entity.
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [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() @BuiltValue()
abstract class FooRef implements EntityRef, Built<FooRef, FooRefBuilder> { abstract class FooRef implements EntityRef, Built<FooRef, FooRefBuilder> {
@BuiltValueField(wireName: r'foorefPropA') @BuiltValueField(wireName: r'foorefPropA')

View File

@ -14,16 +14,16 @@ part 'foo_ref_or_value.g.dart';
/// FooRefOrValue /// FooRefOrValue
/// ///
/// Properties: /// Properties:
/// * [fooPropA]
/// * [fooPropB]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [foorefPropA] /// * [fooPropA]
/// * [fooPropB]
/// * [name] - Name of the related entity. /// * [name] - Name of the related entity.
/// * [atReferredType] - The actual type of the target instance when needed for disambiguation. /// * [atReferredType] - The actual type of the target instance when needed for disambiguation.
/// * [foorefPropA]
@BuiltValue() @BuiltValue()
abstract class FooRefOrValue implements Built<FooRefOrValue, FooRefOrValueBuilder> { abstract class FooRefOrValue implements Built<FooRefOrValue, FooRefOrValueBuilder> {
/// One Of [Foo], [FooRef] /// One Of [Foo], [FooRef]

View File

@ -12,12 +12,12 @@ part 'pasta.g.dart';
/// Pasta /// Pasta
/// ///
/// Properties: /// Properties:
/// * [vendor]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [vendor]
@BuiltValue() @BuiltValue()
abstract class Pasta implements Entity, Built<Pasta, PastaBuilder> { abstract class Pasta implements Entity, Built<Pasta, PastaBuilder> {
@BuiltValueField(wireName: r'vendor') @BuiltValueField(wireName: r'vendor')

View File

@ -13,12 +13,12 @@ part 'pizza.g.dart';
/// Pizza /// Pizza
/// ///
/// Properties: /// Properties:
/// * [pizzaSize]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [pizzaSize]
@BuiltValue(instantiable: false) @BuiltValue(instantiable: false)
abstract class Pizza implements Entity { abstract class Pizza implements Entity {
@BuiltValueField(wireName: r'pizzaSize') @BuiltValueField(wireName: r'pizzaSize')

View File

@ -12,13 +12,13 @@ part 'pizza_speziale.g.dart';
/// PizzaSpeziale /// PizzaSpeziale
/// ///
/// Properties: /// Properties:
/// * [toppings]
/// * [pizzaSize]
/// * [href] - Hyperlink reference /// * [href] - Hyperlink reference
/// * [id] - unique identifier /// * [id] - unique identifier
/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships /// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships
/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atBaseType] - When sub-classing, this defines the super-class
/// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [atType] - When sub-classing, this defines the sub-class Extensible name
/// * [pizzaSize]
/// * [toppings]
@BuiltValue() @BuiltValue()
abstract class PizzaSpeziale implements Pizza, Built<PizzaSpeziale, PizzaSpezialeBuilder> { abstract class PizzaSpeziale implements Pizza, Built<PizzaSpeziale, PizzaSpezialeBuilder> {
@BuiltValueField(wireName: r'toppings') @BuiltValueField(wireName: r'toppings')

View File

@ -692,44 +692,49 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/OrderInfo' - $ref: '#/components/schemas/OrderInfo'
- $ref: '#/components/schemas/SpecialInfo' - $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: example:
petId: 6 petId: 5
quantity: 1 quantity: 5
requireTest: requireTest
comment: comment comment: comment
id: 0 id: 1
shipDate: 2000-01-23T04:56:07.000+00:00 shipDate: 2000-01-23T04:56:07.000+00:00
type: type
complete: false complete: false
promotion: true
status: placed 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 type: object
xml: xml:
name: Order name: Order

View File

@ -17,11 +17,7 @@ import (
// Order - An order for a pets from the pet store
type Order struct { type Order struct {
SpecialInfo
Id int64 `json:"id,omitempty"`
PetId int64 `json:"petId,omitempty"` PetId int64 `json:"petId,omitempty"`
@ -29,6 +25,8 @@ type Order struct {
ShipDate time.Time `json:"shipDate,omitempty"` ShipDate time.Time `json:"shipDate,omitempty"`
Id int64 `json:"id,omitempty"`
// Order Status // Order Status
Status string `json:"status,omitempty"` 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 return nil
} }

View File

@ -71,7 +71,7 @@ public interface BarApi {
getRequest().ifPresent(request -> { getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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); ApiUtil.setExampleResponse(request, "application/json", exampleString);
break; break;
} }

View File

@ -71,7 +71,7 @@ public interface FooApi {
getRequest().ifPresent(request -> { getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { 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); ApiUtil.setExampleResponse(request, "application/json", exampleString);
break; break;
} }
@ -109,7 +109,7 @@ public interface FooApi {
getRequest().ifPresent(request -> { getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json;charset=utf-8"))) { 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); ApiUtil.setExampleResponse(request, "application/json;charset=utf-8", exampleString);
break; break;
} }

View File

@ -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) { public BarRef href(String href) {
super.href(href); super.href(href);
return this; return this;
@ -72,6 +62,16 @@ public class BarRef extends EntityRef implements BarRefOrValue {
super.atType(atType); super.atType(atType);
return this; return this;
} }
public BarRef name(String name) {
super.name(name);
return this;
}
public BarRef atReferredType(String atReferredType) {
super.atReferredType(atReferredType);
return this;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@ -126,18 +126,6 @@ public class BarRef extends EntityRef implements BarRefOrValue {
return this; 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 @Override
public BarRef.Builder href(String href) { public BarRef.Builder href(String href) {
this.instance.href(href); this.instance.href(href);
@ -168,6 +156,18 @@ public class BarRef extends EntityRef implements BarRefOrValue {
return this; 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. * returns a built BarRef instance.
* *

View File

@ -18,10 +18,9 @@ import java.util.*;
import javax.annotation.Generated; 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( @JsonIgnoreProperties(
value = "@type", // ignore manually set @type, it will be automatically generated by Jackson during serialization 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 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") @Generated(value = "org.openapitools.codegen.languages.SpringCodegen", comments = "Generator version: 7.7.0-SNAPSHOT")
public class EntityRef { public class EntityRef {
private String name;
private String atReferredType;
private String href; private String href;
private String id; private String id;
@ -49,6 +44,10 @@ public class EntityRef {
private String atType; private String atType;
private String name;
private String atReferredType;
public EntityRef() { public EntityRef() {
super(); super();
} }
@ -60,46 +59,6 @@ public class EntityRef {
this.atType = atType; 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) { public EntityRef href(String href) {
this.href = href; this.href = href;
return this; return this;
@ -200,6 +159,46 @@ public class EntityRef {
this.atType = atType; 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 @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@ -209,31 +208,31 @@ public class EntityRef {
return false; return false;
} }
EntityRef entityRef = (EntityRef) o; EntityRef entityRef = (EntityRef) o;
return Objects.equals(this.name, entityRef.name) && return Objects.equals(this.href, entityRef.href) &&
Objects.equals(this.atReferredType, entityRef.atReferredType) &&
Objects.equals(this.href, entityRef.href) &&
Objects.equals(this.id, entityRef.id) && Objects.equals(this.id, entityRef.id) &&
Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) && Objects.equals(this.atSchemaLocation, entityRef.atSchemaLocation) &&
Objects.equals(this.atBaseType, entityRef.atBaseType) && 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 @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, atReferredType, href, id, atSchemaLocation, atBaseType, atType); return Objects.hash(href, id, atSchemaLocation, atBaseType, atType, name, atReferredType);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class EntityRef {\n"); 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(" href: ").append(toIndentedString(href)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n"); sb.append(" atSchemaLocation: ").append(toIndentedString(atSchemaLocation)).append("\n");
sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n"); sb.append(" atBaseType: ").append(toIndentedString(atBaseType)).append("\n");
sb.append(" atType: ").append(toIndentedString(atType)).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("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
@ -262,26 +261,16 @@ public class EntityRef {
} }
protected Builder copyOf(EntityRef value) { protected Builder copyOf(EntityRef value) {
this.instance.setName(value.name);
this.instance.setAtReferredType(value.atReferredType);
this.instance.setHref(value.href); this.instance.setHref(value.href);
this.instance.setId(value.id); this.instance.setId(value.id);
this.instance.setAtSchemaLocation(value.atSchemaLocation); this.instance.setAtSchemaLocation(value.atSchemaLocation);
this.instance.setAtBaseType(value.atBaseType); this.instance.setAtBaseType(value.atBaseType);
this.instance.setAtType(value.atType); this.instance.setAtType(value.atType);
this.instance.setName(value.name);
this.instance.setAtReferredType(value.atReferredType);
return this; 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) { public EntityRef.Builder href(String href) {
this.instance.href(href); this.instance.href(href);
return this; return this;
@ -307,6 +296,16 @@ public class EntityRef {
return this; 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. * returns a built EntityRef instance.
* *

View File

@ -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) { public FooRef href(String href) {
super.href(href); super.href(href);
return this; return this;
@ -94,6 +84,16 @@ public class FooRef extends EntityRef implements FooRefOrValue {
super.atType(atType); super.atType(atType);
return this; return this;
} }
public FooRef name(String name) {
super.name(name);
return this;
}
public FooRef atReferredType(String atReferredType) {
super.atReferredType(atReferredType);
return this;
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (this == o) { if (this == o) {
@ -157,18 +157,6 @@ public class FooRef extends EntityRef implements FooRefOrValue {
return this; 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 @Override
public FooRef.Builder href(String href) { public FooRef.Builder href(String href) {
this.instance.href(href); this.instance.href(href);
@ -199,6 +187,18 @@ public class FooRef extends EntityRef implements FooRefOrValue {
return this; 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. * returns a built FooRef instance.
* *

View File

@ -135,17 +135,20 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/Addressable' - $ref: '#/components/schemas/Addressable'
- $ref: '#/components/schemas/Extensible' - $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: discriminator:
propertyName: '@type' 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 type: object
example: null
FooRefOrValue: FooRefOrValue:
discriminator: discriminator:
propertyName: '@type' propertyName: '@type'
@ -157,22 +160,32 @@ components:
Foo: Foo:
allOf: allOf:
- $ref: '#/components/schemas/Entity' - $ref: '#/components/schemas/Entity'
- properties:
fooPropA:
type: string
fooPropB:
type: string
type: object
example: null
example: example:
'@baseType': '@baseType'
'@type': '@type'
fooPropA: fooPropA fooPropA: fooPropA
href: href
id: id
fooPropB: fooPropB fooPropB: fooPropB
properties: '@schemaLocation': '@schemaLocation'
fooPropA:
type: string
fooPropB:
type: string
type: object type: object
FooRef: FooRef:
allOf: allOf:
- $ref: '#/components/schemas/EntityRef' - $ref: '#/components/schemas/EntityRef'
properties: - properties:
foorefPropA: foorefPropA:
type: string type: string
type: object
example: null
type: object type: object
example: null
BarRef: BarRef:
allOf: allOf:
- $ref: '#/components/schemas/EntityRef' - $ref: '#/components/schemas/EntityRef'
@ -180,35 +193,49 @@ components:
Bar_Create: Bar_Create:
allOf: allOf:
- $ref: '#/components/schemas/Entity' - $ref: '#/components/schemas/Entity'
properties: - properties:
barPropA: barPropA:
type: string type: string
fooPropB: fooPropB:
type: string type: string
foo: foo:
$ref: '#/components/schemas/FooRefOrValue' $ref: '#/components/schemas/FooRefOrValue'
type: object
example: null
type: object type: object
example: null
Bar: Bar:
allOf: allOf:
- $ref: '#/components/schemas/Entity' - $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: example:
'@baseType': '@baseType'
'@type': '@type'
foo: foo:
'@baseType': '@baseType'
'@type': '@type'
fooPropA: fooPropA fooPropA: fooPropA
href: href
id: id
fooPropB: fooPropB fooPropB: fooPropB
'@schemaLocation': '@schemaLocation'
href: href
id: id id: id
fooPropB: fooPropB fooPropB: fooPropB
'@schemaLocation': '@schemaLocation'
barPropA: barPropA barPropA: barPropA
properties:
id:
type: string
barPropA:
type: string
fooPropB:
type: string
foo:
$ref: '#/components/schemas/FooRefOrValue'
required:
- id
type: object type: object
BarRefOrValue: BarRefOrValue:
oneOf: oneOf:
@ -219,24 +246,33 @@ components:
Pizza: Pizza:
allOf: allOf:
- $ref: '#/components/schemas/Entity' - $ref: '#/components/schemas/Entity'
properties: - properties:
pizzaSize: pizzaSize:
type: number type: number
type: object
example: null
type: object type: object
example: null
Pasta: Pasta:
allOf: allOf:
- $ref: '#/components/schemas/Entity' - $ref: '#/components/schemas/Entity'
properties: - properties:
vendor: vendor:
type: string type: string
type: object
example: null
type: object type: object
example: null
PizzaSpeziale: PizzaSpeziale:
allOf: allOf:
- $ref: '#/components/schemas/Pizza' - $ref: '#/components/schemas/Pizza'
properties: - properties:
toppings: toppings:
type: string type: string
type: object
example: null
type: object type: object
example: null
FruitType: FruitType:
enum: enum:
- APPLE - APPLE

View File

@ -948,44 +948,48 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/OrderInfo' - $ref: '#/components/schemas/OrderInfo'
- $ref: '#/components/schemas/SpecialInfo' - $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: example:
petId: 6 petId: 5
quantity: 1 quantity: 5
comment: comment comment: comment
id: 0 id: 1
shipDate: 2000-01-23T04:56:07.000+00:00 shipDate: 2000-01-23T04:56:07.000+00:00
type: type
complete: false complete: false
promotion: true
status: placed 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 type: object
xml: xml:
name: Order name: Order

View File

@ -17,11 +17,7 @@ import (
// Order - An order for a pets from the pet store
type Order struct { type Order struct {
SpecialInfo
Id int64 `json:"id,omitempty"`
PetId int64 `json:"petId,omitempty"` PetId int64 `json:"petId,omitempty"`
@ -29,6 +25,8 @@ type Order struct {
ShipDate time.Time `json:"shipDate,omitempty"` ShipDate time.Time `json:"shipDate,omitempty"`
Id int64 `json:"id,omitempty"`
// Order Status // Order Status
Status string `json:"status,omitempty"` 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 return nil
} }

View File

@ -948,44 +948,48 @@ components:
allOf: allOf:
- $ref: '#/components/schemas/OrderInfo' - $ref: '#/components/schemas/OrderInfo'
- $ref: '#/components/schemas/SpecialInfo' - $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: example:
petId: 6 petId: 5
quantity: 1 quantity: 5
comment: comment comment: comment
id: 0 id: 1
shipDate: 2000-01-23T04:56:07.000+00:00 shipDate: 2000-01-23T04:56:07.000+00:00
type: type
complete: false complete: false
promotion: true
status: placed 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 type: object
xml: xml:
name: Order name: Order

View File

@ -17,11 +17,7 @@ import (
// Order - An order for a pets from the pet store
type Order struct { type Order struct {
SpecialInfo
Id int64 `json:"id,omitempty"`
PetId int64 `json:"petId,omitempty"` PetId int64 `json:"petId,omitempty"`
@ -29,6 +25,8 @@ type Order struct {
ShipDate time.Time `json:"shipDate,omitempty"` ShipDate time.Time `json:"shipDate,omitempty"`
Id int64 `json:"id,omitempty"`
// Order Status // Order Status
Status string `json:"status,omitempty"` 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 return nil
} }

View File

@ -146,11 +146,14 @@ components:
allOfObject: allOfObject:
allOf: allOf:
- $ref: '#/components/schemas/baseAllOf' - $ref: '#/components/schemas/baseAllOf'
- properties:
sampleProperty:
type: string
type: object
example: null
example: example:
sampleProperty: sampleProperty sampleProperty: sampleProperty
properties: sampleBaseProperty: sampleBaseProperty
sampleProperty:
type: string
baseAllOf: baseAllOf:
properties: properties:
sampleBaseProperty: sampleBaseProperty:

View File

@ -3,8 +3,8 @@
## Properties ## Properties
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**sample_property** | **String** | | [optional] [default to None]
**sample_base_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) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -196,14 +196,14 @@ impl ::std::str::FromStr for AdditionalPropertiesObject {
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)] #[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize, validator::Validate)]
#[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))] #[cfg_attr(feature = "conversion", derive(frunk::LabelledGeneric))]
pub struct AllOfObject { pub struct AllOfObject {
#[serde(rename = "sampleProperty")]
#[serde(skip_serializing_if="Option::is_none")]
pub sample_property: Option<String>,
#[serde(rename = "sampleBaseProperty")] #[serde(rename = "sampleBaseProperty")]
#[serde(skip_serializing_if="Option::is_none")] #[serde(skip_serializing_if="Option::is_none")]
pub sample_base_property: Option<String>, 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)] #[allow(clippy::new_without_default)]
pub fn new() -> AllOfObject { pub fn new() -> AllOfObject {
AllOfObject { AllOfObject {
sample_property: None,
sample_base_property: None, sample_base_property: None,
sample_property: None,
} }
} }
} }
@ -224,14 +224,6 @@ impl std::string::ToString for AllOfObject {
fn to_string(&self) -> String { fn to_string(&self) -> String {
let params: Vec<Option<String>> = vec![ 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| { self.sample_base_property.as_ref().map(|sample_base_property| {
[ [
"sampleBaseProperty".to_string(), "sampleBaseProperty".to_string(),
@ -239,6 +231,14 @@ impl std::string::ToString for AllOfObject {
].join(",") ].join(",")
}), }),
self.sample_property.as_ref().map(|sample_property| {
[
"sampleProperty".to_string(),
sample_property.to_string(),
].join(",")
}),
]; ];
params.into_iter().flatten().collect::<Vec<_>>().join(",") params.into_iter().flatten().collect::<Vec<_>>().join(",")
@ -256,8 +256,8 @@ impl std::str::FromStr for AllOfObject {
#[derive(Default)] #[derive(Default)]
#[allow(dead_code)] #[allow(dead_code)]
struct IntermediateRep { struct IntermediateRep {
pub sample_property: Vec<String>,
pub sample_base_property: Vec<String>, pub sample_base_property: Vec<String>,
pub sample_property: Vec<String>,
} }
let mut intermediate_rep = IntermediateRep::default(); let mut intermediate_rep = IntermediateRep::default();
@ -275,10 +275,10 @@ impl std::str::FromStr for AllOfObject {
if let Some(key) = key_result { if let Some(key) = key_result {
#[allow(clippy::match_single_binding)] #[allow(clippy::match_single_binding)]
match key { 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)] #[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())?), "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()) _ => 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 // Use the intermediate representation to return the struct
std::result::Result::Ok(AllOfObject { 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_base_property: intermediate_rep.sample_base_property.into_iter().next(),
sample_property: intermediate_rep.sample_property.into_iter().next(),
}) })
} }
} }