mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
[rust] Fix for allOf multi model with only metadata fields (#20892)
* Fix for allof multi model with only metadata fields * Update samples * fixed compiler errors in java 17 and lower * refactored isMetadataOnlySchema to ModelUtils.java
This commit is contained in:
parent
1eee6038df
commit
35ba0414fb
@ -30,6 +30,7 @@ import io.swagger.v3.oas.models.parameters.Parameter;
|
|||||||
import io.swagger.v3.oas.models.parameters.RequestBody;
|
import io.swagger.v3.oas.models.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.models.responses.ApiResponse;
|
import io.swagger.v3.oas.models.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.models.responses.ApiResponses;
|
import io.swagger.v3.oas.models.responses.ApiResponses;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.openapitools.codegen.utils.ModelUtils;
|
import org.openapitools.codegen.utils.ModelUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -417,7 +418,18 @@ public class InlineModelResolver {
|
|||||||
if (schema.getAllOf().size() == 1) {
|
if (schema.getAllOf().size() == 1) {
|
||||||
// handle earlier in this function when looping through properties
|
// handle earlier in this function when looping through properties
|
||||||
} else if (schema.getAllOf().size() > 1) {
|
} else if (schema.getAllOf().size() > 1) {
|
||||||
LOGGER.warn("allOf schema `{}` containing multiple types (not model) is not supported at the moment.", schema.getName());
|
// Check if there is only one "non metadata" schema.
|
||||||
|
// For example, there may be an `description` only schema that is used to override the descrption.
|
||||||
|
// In these cases, we can simply discard those schemas.
|
||||||
|
List<Schema> nonMetadataOnlySchemas = (List<Schema>) schema.getAllOf().stream()
|
||||||
|
.filter(v -> ModelUtils.isMetadataOnlySchema((Schema) v))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
if (nonMetadataOnlySchemas.size() == 1) {
|
||||||
|
schema.setAllOf(nonMetadataOnlySchemas);
|
||||||
|
} else {
|
||||||
|
LOGGER.warn("allOf schema `{}` containing multiple types (not model) is not supported at the moment.", schema.getName());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
LOGGER.error("allOf schema `{}` contains no items.", schema.getName());
|
LOGGER.error("allOf schema `{}` contains no items.", schema.getName());
|
||||||
}
|
}
|
||||||
|
@ -2336,6 +2336,32 @@ public class ModelUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if a schema is only metadata and not an actual type.
|
||||||
|
* For example, a schema that only has a `description` without any `properties` or `$ref` defined.
|
||||||
|
*
|
||||||
|
* @param schema the schema
|
||||||
|
* @return if the schema is only metadata and not an actual type
|
||||||
|
*/
|
||||||
|
public static boolean isMetadataOnlySchema(Schema schema) {
|
||||||
|
return schema.get$ref() != null ||
|
||||||
|
schema.getProperties() != null ||
|
||||||
|
schema.getType() != null ||
|
||||||
|
schema.getAdditionalProperties() != null ||
|
||||||
|
schema.getAllOf() != null ||
|
||||||
|
schema.getAnyOf() != null ||
|
||||||
|
schema.getOneOf() != null ||
|
||||||
|
schema.getPrefixItems() != null ||
|
||||||
|
schema.getItems() != null ||
|
||||||
|
schema.getTypes() != null ||
|
||||||
|
schema.getPatternProperties() != null ||
|
||||||
|
schema.getContains() != null ||
|
||||||
|
schema.get$dynamicAnchor() != null ||
|
||||||
|
schema.get$anchor() != null ||
|
||||||
|
schema.getContentSchema() != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
private interface OpenAPISchemaVisitor {
|
private interface OpenAPISchemaVisitor {
|
||||||
|
|
||||||
|
@ -1088,3 +1088,22 @@ components:
|
|||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
|
existing_tags_array:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
nullable: true
|
||||||
|
description: 'existing_tags_array'
|
||||||
|
example:
|
||||||
|
- base-image
|
||||||
|
- prod
|
||||||
|
TestAllOfWithMultiMetadataOnly:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
foo:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/existing_tags_array'
|
||||||
|
- description: This is a test for allOf with metadata only fields
|
||||||
|
@ -12,7 +12,7 @@ class_name DemoActionContainerModel
|
|||||||
|
|
||||||
# Required: True
|
# Required: True
|
||||||
# isArray: false
|
# isArray: false
|
||||||
@export var action: DemoBazModel:
|
@export var action: Baz:
|
||||||
set(value):
|
set(value):
|
||||||
__action__was__set = true
|
__action__was__set = true
|
||||||
action = value
|
action = value
|
||||||
@ -37,7 +37,7 @@ func bzz_normalize() -> Dictionary:
|
|||||||
static func bzz_denormalize_single(from_dict: Dictionary):
|
static func bzz_denormalize_single(from_dict: Dictionary):
|
||||||
var me := new()
|
var me := new()
|
||||||
if from_dict.has("action"):
|
if from_dict.has("action"):
|
||||||
me.action = DemoBazModel.bzz_denormalize_single(from_dict["action"])
|
me.action = from_dict["action"]
|
||||||
return me
|
return me
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -63,6 +64,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -22,6 +22,7 @@ docs/FooPropertyTest.md
|
|||||||
docs/FooRef.md
|
docs/FooRef.md
|
||||||
docs/FooReturn.md
|
docs/FooReturn.md
|
||||||
docs/FooTag.md
|
docs/FooTag.md
|
||||||
|
docs/FooTestAllOfWithMultiMetadataOnly.md
|
||||||
docs/FooTestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/FooTestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/FooTypeTesting.md
|
docs/FooTypeTesting.md
|
||||||
docs/FooUniqueItemArrayTesting.md
|
docs/FooUniqueItemArrayTesting.md
|
||||||
@ -60,6 +61,7 @@ src/models/foo_property_test.rs
|
|||||||
src/models/foo_ref.rs
|
src/models/foo_ref.rs
|
||||||
src/models/foo_return.rs
|
src/models/foo_return.rs
|
||||||
src/models/foo_tag.rs
|
src/models/foo_tag.rs
|
||||||
|
src/models/foo_test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/foo_type_testing.rs
|
src/models/foo_type_testing.rs
|
||||||
src/models/foo_unique_item_array_testing.rs
|
src/models/foo_unique_item_array_testing.rs
|
||||||
src/models/foo_user.rs
|
src/models/foo_user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [FooRef](docs/FooRef.md)
|
- [FooRef](docs/FooRef.md)
|
||||||
- [FooReturn](docs/FooReturn.md)
|
- [FooReturn](docs/FooReturn.md)
|
||||||
- [FooTag](docs/FooTag.md)
|
- [FooTag](docs/FooTag.md)
|
||||||
|
- [FooTestAllOfWithMultiMetadataOnly](docs/FooTestAllOfWithMultiMetadataOnly.md)
|
||||||
- [FooTestsDiscriminatorDuplicateEnumsGet200Response](docs/FooTestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [FooTestsDiscriminatorDuplicateEnumsGet200Response](docs/FooTestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [FooTypeTesting](docs/FooTypeTesting.md)
|
- [FooTypeTesting](docs/FooTypeTesting.md)
|
||||||
- [FooUniqueItemArrayTesting](docs/FooUniqueItemArrayTesting.md)
|
- [FooUniqueItemArrayTesting](docs/FooUniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# FooTestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct FooActionContainer {
|
pub struct FooActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::FooBaz>,
|
pub action: models::FooBaz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FooActionContainer {
|
impl FooActionContainer {
|
||||||
pub fn new(action: models::FooBaz) -> FooActionContainer {
|
pub fn new(action: models::FooBaz) -> FooActionContainer {
|
||||||
FooActionContainer {
|
FooActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct FooTestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FooTestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> FooTestAllOfWithMultiMetadataOnly {
|
||||||
|
FooTestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -36,6 +36,8 @@ pub mod foo_return;
|
|||||||
pub use self::foo_return::FooReturn;
|
pub use self::foo_return::FooReturn;
|
||||||
pub mod foo_tag;
|
pub mod foo_tag;
|
||||||
pub use self::foo_tag::FooTag;
|
pub use self::foo_tag::FooTag;
|
||||||
|
pub mod foo_test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::foo_test_all_of_with_multi_metadata_only::FooTestAllOfWithMultiMetadataOnly;
|
||||||
pub mod foo__tests_discriminator_duplicate_enums_get_200_response;
|
pub mod foo__tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::foo__tests_discriminator_duplicate_enums_get_200_response::FooTestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::foo__tests_discriminator_duplicate_enums_get_200_response::FooTestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod foo_type_testing;
|
pub mod foo_type_testing;
|
||||||
|
@ -24,6 +24,7 @@ docs/Ref.md
|
|||||||
docs/Return.md
|
docs/Return.md
|
||||||
docs/StoreApi.md
|
docs/StoreApi.md
|
||||||
docs/Tag.md
|
docs/Tag.md
|
||||||
|
docs/TestAllOfWithMultiMetadataOnly.md
|
||||||
docs/TestingApi.md
|
docs/TestingApi.md
|
||||||
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
docs/TestsDiscriminatorDuplicateEnumsGet200Response.md
|
||||||
docs/TypeTesting.md
|
docs/TypeTesting.md
|
||||||
@ -61,6 +62,7 @@ src/models/person.rs
|
|||||||
src/models/pet.rs
|
src/models/pet.rs
|
||||||
src/models/property_test.rs
|
src/models/property_test.rs
|
||||||
src/models/tag.rs
|
src/models/tag.rs
|
||||||
|
src/models/test_all_of_with_multi_metadata_only.rs
|
||||||
src/models/type_testing.rs
|
src/models/type_testing.rs
|
||||||
src/models/unique_item_array_testing.rs
|
src/models/unique_item_array_testing.rs
|
||||||
src/models/user.rs
|
src/models/user.rs
|
||||||
|
@ -74,6 +74,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [Ref](docs/Ref.md)
|
- [Ref](docs/Ref.md)
|
||||||
- [Return](docs/Return.md)
|
- [Return](docs/Return.md)
|
||||||
- [Tag](docs/Tag.md)
|
- [Tag](docs/Tag.md)
|
||||||
|
- [TestAllOfWithMultiMetadataOnly](docs/TestAllOfWithMultiMetadataOnly.md)
|
||||||
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
- [TestsDiscriminatorDuplicateEnumsGet200Response](docs/TestsDiscriminatorDuplicateEnumsGet200Response.md)
|
||||||
- [TypeTesting](docs/TypeTesting.md)
|
- [TypeTesting](docs/TypeTesting.md)
|
||||||
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
- [UniqueItemArrayTesting](docs/UniqueItemArrayTesting.md)
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
# TestAllOfWithMultiMetadataOnly
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------ | ------------- | ------------- | -------------
|
||||||
|
**id** | Option<**i64**> | | [optional]
|
||||||
|
**foo** | Option<**Vec<String>**> | existing_tags_array | [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)
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ use serde::{Deserialize, Serialize};
|
|||||||
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct ActionContainer {
|
pub struct ActionContainer {
|
||||||
#[serde(rename = "action")]
|
#[serde(rename = "action")]
|
||||||
pub action: Box<models::Baz>,
|
pub action: models::Baz,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ActionContainer {
|
impl ActionContainer {
|
||||||
pub fn new(action: models::Baz) -> ActionContainer {
|
pub fn new(action: models::Baz) -> ActionContainer {
|
||||||
ActionContainer {
|
ActionContainer {
|
||||||
action: Box::new(action),
|
action,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ pub mod model_return;
|
|||||||
pub use self::model_return::Return;
|
pub use self::model_return::Return;
|
||||||
pub mod tag;
|
pub mod tag;
|
||||||
pub use self::tag::Tag;
|
pub use self::tag::Tag;
|
||||||
|
pub mod test_all_of_with_multi_metadata_only;
|
||||||
|
pub use self::test_all_of_with_multi_metadata_only::TestAllOfWithMultiMetadataOnly;
|
||||||
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
pub mod _tests_discriminator_duplicate_enums_get_200_response;
|
||||||
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
pub use self::_tests_discriminator_duplicate_enums_get_200_response::TestsDiscriminatorDuplicateEnumsGet200Response;
|
||||||
pub mod type_testing;
|
pub mod type_testing;
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* OpenAPI Petstore
|
||||||
|
*
|
||||||
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||||
|
*
|
||||||
|
* The version of the OpenAPI document: 1.0.0
|
||||||
|
*
|
||||||
|
* Generated by: https://openapi-generator.tech
|
||||||
|
*/
|
||||||
|
|
||||||
|
use crate::models;
|
||||||
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
|
||||||
|
pub struct TestAllOfWithMultiMetadataOnly {
|
||||||
|
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub id: Option<i64>,
|
||||||
|
/// existing_tags_array
|
||||||
|
#[serde(rename = "foo", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||||
|
pub foo: Option<Option<Vec<String>>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl TestAllOfWithMultiMetadataOnly {
|
||||||
|
pub fn new() -> TestAllOfWithMultiMetadataOnly {
|
||||||
|
TestAllOfWithMultiMetadataOnly {
|
||||||
|
id: None,
|
||||||
|
foo: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -26,7 +26,7 @@ const apiInstance = new DefaultApi(configuration);
|
|||||||
const request: DefaultApiFilePostRequest = {
|
const request: DefaultApiFilePostRequest = {
|
||||||
|
|
||||||
filePostRequest: {
|
filePostRequest: {
|
||||||
file: null,
|
null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user