From 3489bdd87a449ca7240cf582474f2b567f0054bf Mon Sep 17 00:00:00 2001 From: Cantasura Date: Tue, 6 May 2025 08:15:00 +0200 Subject: [PATCH 1/3] add lower camel case option --- ...-petstore-client-use-lower-camel-case.yaml | 13 + ...-petstore-client-use-lower-camel-case.yaml | 10 + docs/generators/dart-dio.md | 286 +-- docs/generators/dart.md | 280 +-- .../languages/AbstractDartCodegen.java | 22 +- .../3_0/petstore-use-lower-camel-case.yaml | 2064 +++++++++++++++++ 6 files changed, 2396 insertions(+), 279 deletions(-) create mode 100644 bin/configs/dart-dio-petstore-client-use-lower-camel-case.yaml create mode 100644 bin/configs/dart-petstore-client-use-lower-camel-case.yaml create mode 100644 modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml diff --git a/bin/configs/dart-dio-petstore-client-use-lower-camel-case.yaml b/bin/configs/dart-dio-petstore-client-use-lower-camel-case.yaml new file mode 100644 index 000000000000..2863135e90a6 --- /dev/null +++ b/bin/configs/dart-dio-petstore-client-use-lower-camel-case.yaml @@ -0,0 +1,13 @@ +generatorName: dart-dio +outputDir: samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml +templateDir: modules/openapi-generator/src/main/resources/dart/libraries/dio +typeMappings: + Client: "ModelClient" + File: "ModelFile" + EnumClass: "ModelEnumClass" +additionalProperties: + hideGenerationTimestamp: "true" + enumUnknownDefaultCase: "true" + serializationLibrary: "json_serializable" + useLowerCamelCase: "true" diff --git a/bin/configs/dart-petstore-client-use-lower-camel-case.yaml b/bin/configs/dart-petstore-client-use-lower-camel-case.yaml new file mode 100644 index 000000000000..0e9fc7b1f8e4 --- /dev/null +++ b/bin/configs/dart-petstore-client-use-lower-camel-case.yaml @@ -0,0 +1,10 @@ +generatorName: dart +outputDir: samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml +templateDir: modules/openapi-generator/src/main/resources/dart2 +typeMappings: + Client: "ModelClient" + File: "ModelFile" +additionalProperties: + hideGenerationTimestamp: "true" + useLowerCamelCase: "true" \ No newline at end of file diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md index f93b09ffbf8d..eb4e5a962ab8 100644 --- a/docs/generators/dart-dio.md +++ b/docs/generators/dart-dio.md @@ -4,55 +4,56 @@ title: Documentation for the dart-dio Generator ## METADATA -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | dart-dio | pass this to the generate command after -g | -| generator stability | STABLE | | -| generator type | CLIENT | | -| generator language | Dart | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Dart Dio client library. | | +| Property | Value | Notes | +|-------------------------------------|--------------------------------------|--------------------------------------------| +| generator name | dart-dio | pass this to the generate command after -g | +| generator stability | STABLE | | +| generator type | CLIENT | | +| generator language | Dart | | +| generator default templating engine | mustache | | +| helpTxt | Generates a Dart Dio client library. | | ## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|dateLibrary|Specify Date library|
**core**
[DEFAULT] Dart core library (DateTime)
**timemachine**
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
|core| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|equalityCheckMethod|Specify equality check method. Takes effect only in case if serializationLibrary is json_serializable.|
**default**
[DEFAULT] Built in hash code generation method
**equatable**
Uses equatable library for equality checking
|default| -|finalProperties|Whether properties are marked as final when using Json Serializable for serialization| |true| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |Author| -|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage| -|pubDescription|Description in generated pubspec| |OpenAPI API client| -|pubHomepage|Homepage in generated pubspec| |homepage| -|pubLibrary|Library name in generated code| |openapi.api| -|pubName|Name in generated pubspec| |openapi| -|pubPublishTo|Publish_to in generated pubspec| |null| -|pubRepository|Repository in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |1.0.0| -|serializationLibrary|Specify serialization library|
**built_value**
[DEFAULT] built_value
**json_serializable**
[BETA] json_serializable
|built_value| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |false| +These options may be applied as additional-properties (cli) or configOptions (plugins). Refer +to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. + +| Option | Description | Values | Default | +|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| +| allowUnicodeIdentifiers | boolean, toggles whether unicode identifiers are allowed in names or not, default is false | | false | +| dateLibrary | Specify Date library |
**core**
[DEFAULT] Dart core library (DateTime)
**timemachine**
Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
| core | +| disallowAdditionalPropertiesIfNotPresent | If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. |
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
| true | +| ensureUniqueParams | Whether to ensure parameter names are unique in an operation (rename parameters that are not). | | true | +| enumUnknownDefaultCase | If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case. |
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
| false | +| equalityCheckMethod | Specify equality check method. Takes effect only in case if serializationLibrary is json_serializable. |
**default**
[DEFAULT] Built in hash code generation method
**equatable**
Uses equatable library for equality checking
| default | +| finalProperties | Whether properties are marked as final when using Json Serializable for serialization | | true | +| legacyDiscriminatorBehavior | Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default). |
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
| true | +| prependFormOrBodyParameters | Add form or body parameters to the beginning of the parameter list. | | false | +| pubAuthor | Author name in generated pubspec | | Author | +| pubAuthorEmail | Email address of the author in generated pubspec | | author@homepage | +| pubDescription | Description in generated pubspec | | OpenAPI API client | +| pubHomepage | Homepage in generated pubspec | | homepage | +| pubLibrary | Library name in generated code | | openapi.api | +| pubName | Name in generated pubspec | | openapi | +| pubPublishTo | Publish_to in generated pubspec | | null | +| pubRepository | Repository in generated pubspec | | null | +| pubVersion | Version in generated pubspec | | 1.0.0 | +| serializationLibrary | Specify serialization library |
**built_value**
[DEFAULT] built_value
**json_serializable**
[BETA] json_serializable
| built_value | +| sortModelPropertiesByRequiredFlag | Sort model properties to place required parameters before optional parameters. | | true | +| sortParamsByRequiredFlag | Sort method arguments to place required parameters before optional parameters. | | true | +| sourceFolder | source folder for generated code | | src | +| useEnumExtension | Allow the 'x-enum-values' extension for enums | | false | +| useLowerCamelCase | Use the lower camel case style |
**true**
The values and names will be in lowerCamelCase, also all screaming case values will then be in lower camel case.
**false**
The values and names can still be in screaming case.
| true | ## IMPORT MAPPING | Type/Alias | Imports | -| ---------- | ------- | - +|------------|---------| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | -| ---------- | --------------- | - +|------------|-----------------| ## LANGUAGE PRIMITIVES @@ -144,119 +145,126 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## FEATURE SET - ### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✓|ToolingExtension -|UserAgent|✓|ToolingExtension -|MockServer|✗|ToolingExtension + +| Name | Supported | Defined By | +|----------------|-----------|------------------| +| BasePath | ✓ | ToolingExtension | +| Authorizations | ✓ | ToolingExtension | +| UserAgent | ✓ | ToolingExtension | +| MockServer | ✗ | ToolingExtension | ### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Uuid|✗| -|Array|✓|OAS2,OAS3 -|Null|✗|OAS3 -|AnyType|✗|OAS2,OAS3 -|Object|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension + +| Name | Supported | Defined By | +|-------------------------------|-----------|------------------| +| Custom | ✗ | OAS2,OAS3 | +| Int32 | ✓ | OAS2,OAS3 | +| Int64 | ✓ | OAS2,OAS3 | +| Float | ✓ | OAS2,OAS3 | +| Double | ✓ | OAS2,OAS3 | +| Decimal | ✓ | ToolingExtension | +| String | ✓ | OAS2,OAS3 | +| Byte | ✓ | OAS2,OAS3 | +| Binary | ✓ | OAS2,OAS3 | +| Boolean | ✓ | OAS2,OAS3 | +| Date | ✓ | OAS2,OAS3 | +| DateTime | ✓ | OAS2,OAS3 | +| Password | ✓ | OAS2,OAS3 | +| File | ✓ | OAS2 | +| Uuid | ✗ | | +| Array | ✓ | OAS2,OAS3 | +| Null | ✗ | OAS3 | +| AnyType | ✗ | OAS2,OAS3 | +| Object | ✓ | OAS2,OAS3 | +| Maps | ✓ | ToolingExtension | +| CollectionFormat | ✓ | OAS2 | +| CollectionFormatMulti | ✓ | OAS2 | +| Enum | ✓ | OAS2,OAS3 | +| ArrayOfEnum | ✓ | ToolingExtension | +| ArrayOfModel | ✓ | ToolingExtension | +| ArrayOfCollectionOfPrimitives | ✓ | ToolingExtension | +| ArrayOfCollectionOfModel | ✓ | ToolingExtension | +| ArrayOfCollectionOfEnum | ✓ | ToolingExtension | +| MapOfEnum | ✓ | ToolingExtension | +| MapOfModel | ✓ | ToolingExtension | +| MapOfCollectionOfPrimitives | ✓ | ToolingExtension | +| MapOfCollectionOfModel | ✓ | ToolingExtension | +| MapOfCollectionOfEnum | ✓ | ToolingExtension | ### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension + +| Name | Supported | Defined By | +|--------|-----------|------------------| +| Readme | ✓ | ToolingExtension | +| Model | ✓ | ToolingExtension | +| Api | ✓ | ToolingExtension | ### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 + +| Name | Supported | Defined By | +|-------------------------|-----------|------------| +| Host | ✓ | OAS2,OAS3 | +| BasePath | ✓ | OAS2,OAS3 | +| Info | ✓ | OAS2,OAS3 | +| Schemes | ✗ | OAS2,OAS3 | +| PartialSchemes | ✓ | OAS2,OAS3 | +| Consumes | ✓ | OAS2 | +| Produces | ✓ | OAS2 | +| ExternalDocumentation | ✓ | OAS2,OAS3 | +| Examples | ✓ | OAS2,OAS3 | +| XMLStructureDefinitions | ✗ | OAS2,OAS3 | +| MultiServer | ✗ | OAS3 | +| ParameterizedServer | ✗ | OAS3 | +| ParameterStyling | ✗ | OAS3 | +| Callbacks | ✗ | OAS3 | +| LinkObjects | ✗ | OAS3 | ### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 + +| Name | Supported | Defined By | +|---------------|-----------|------------| +| Path | ✓ | OAS2,OAS3 | +| Query | ✓ | OAS2,OAS3 | +| Header | ✓ | OAS2,OAS3 | +| Body | ✓ | OAS2 | +| FormUnencoded | ✓ | OAS2 | +| FormMultipart | ✓ | OAS2 | +| Cookie | ✓ | OAS3 | ### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✓|OAS2,OAS3 -|Union|✓|OAS3 -|allOf|✓|OAS2,OAS3 -|anyOf|✓|OAS3 -|oneOf|✓|OAS3 -|not|✗|OAS3 + +| Name | Supported | Defined By | +|--------------|-----------|------------| +| Simple | ✓ | OAS2,OAS3 | +| Composite | ✓ | OAS2,OAS3 | +| Polymorphism | ✓ | OAS2,OAS3 | +| Union | ✓ | OAS3 | +| allOf | ✓ | OAS2,OAS3 | +| anyOf | ✓ | OAS3 | +| oneOf | ✓ | OAS3 | +| not | ✗ | OAS3 | ### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✓|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 -|SignatureAuth|✗|OAS3 -|AWSV4Signature|✗|ToolingExtension + +| Name | Supported | Defined By | +|--------------------------|-----------|------------------| +| BasicAuth | ✓ | OAS2,OAS3 | +| ApiKey | ✓ | OAS2,OAS3 | +| OpenIDConnect | ✗ | OAS3 | +| BearerToken | ✓ | OAS3 | +| OAuth2_Implicit | ✓ | OAS2,OAS3 | +| OAuth2_Password | ✗ | OAS2,OAS3 | +| OAuth2_ClientCredentials | ✗ | OAS2,OAS3 | +| OAuth2_AuthorizationCode | ✗ | OAS2,OAS3 | +| SignatureAuth | ✗ | OAS3 | +| AWSV4Signature | ✗ | ToolingExtension | ### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 + +| Name | Supported | Defined By | +|----------|-----------|------------------| +| JSON | ✓ | OAS2,OAS3 | +| XML | ✗ | OAS2,OAS3 | +| PROTOBUF | ✗ | ToolingExtension | +| Custom | ✗ | OAS2,OAS3 | diff --git a/docs/generators/dart.md b/docs/generators/dart.md index 79148a7e4791..f1fdae2c77ef 100644 --- a/docs/generators/dart.md +++ b/docs/generators/dart.md @@ -4,52 +4,53 @@ title: Documentation for the dart Generator ## METADATA -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | dart | pass this to the generate command after -g | -| generator stability | STABLE | | -| generator type | CLIENT | | -| generator language | Dart | | -| generator default templating engine | mustache | | -| helpTxt | Generates a Dart client library. | | +| Property | Value | Notes | +|-------------------------------------|----------------------------------|--------------------------------------------| +| generator name | dart | pass this to the generate command after -g | +| generator stability | STABLE | | +| generator type | CLIENT | | +| generator language | Dart | | +| generator default templating engine | mustache | | +| helpTxt | Generates a Dart client library. | | ## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
|true| -|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true| -|enumUnknownDefaultCase|If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case.|
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
|false| -|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true| -|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false| -|pubAuthor|Author name in generated pubspec| |Author| -|pubAuthorEmail|Email address of the author in generated pubspec| |author@homepage| -|pubDescription|Description in generated pubspec| |OpenAPI API client| -|pubHomepage|Homepage in generated pubspec| |homepage| -|pubLibrary|Library name in generated code| |openapi.api| -|pubName|Name in generated pubspec| |openapi| -|pubPublishTo|Publish_to in generated pubspec| |null| -|pubRepository|Repository in generated pubspec| |null| -|pubVersion|Version in generated pubspec| |1.0.0| -|serializationLibrary|Specify serialization library|
**native_serialization**
Use native serializer, backwards compatible
|native_serialization| -|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src| -|useEnumExtension|Allow the 'x-enum-values' extension for enums| |false| +These options may be applied as additional-properties (cli) or configOptions (plugins). Refer +to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. + +| Option | Description | Values | Default | +|------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------| +| allowUnicodeIdentifiers | boolean, toggles whether unicode identifiers are allowed in names or not, default is false | | false | +| disallowAdditionalPropertiesIfNotPresent | If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. |
**false**
The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
**true**
Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.
| true | +| ensureUniqueParams | Whether to ensure parameter names are unique in an operation (rename parameters that are not). | | true | +| enumUnknownDefaultCase | If the server adds new enum cases, that are unknown by an old spec/client, the client will fail to parse the network response.With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the server sends an enum case that is not known by the client/spec, they can safely fallback to this case. |
**false**
No changes to the enum's are made, this is the default option.
**true**
With this option enabled, each enum will have a new case, 'unknown_default_open_api', so that when the enum case sent by the server is not known by the client/spec, can safely be decoded to this case.
| false | +| legacyDiscriminatorBehavior | Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default). |
**true**
The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
**false**
The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
| true | +| prependFormOrBodyParameters | Add form or body parameters to the beginning of the parameter list. | | false | +| pubAuthor | Author name in generated pubspec | | Author | +| pubAuthorEmail | Email address of the author in generated pubspec | | author@homepage | +| pubDescription | Description in generated pubspec | | OpenAPI API client | +| pubHomepage | Homepage in generated pubspec | | homepage | +| pubLibrary | Library name in generated code | | openapi.api | +| pubName | Name in generated pubspec | | openapi | +| pubPublishTo | Publish_to in generated pubspec | | null | +| pubRepository | Repository in generated pubspec | | null | +| pubVersion | Version in generated pubspec | | 1.0.0 | +| serializationLibrary | Specify serialization library |
**native_serialization**
Use native serializer, backwards compatible
| native_serialization | +| sortModelPropertiesByRequiredFlag | Sort model properties to place required parameters before optional parameters. | | true | +| sortParamsByRequiredFlag | Sort method arguments to place required parameters before optional parameters. | | true | +| sourceFolder | source folder for generated code | | src | +| useEnumExtension | Allow the 'x-enum-values' extension for enums | | false | +| useLowerCamelCase | Use the lower camel case style |
**true**
The values and names will be in lowerCamelCase, also all screaming case values will then be in lower camel case.
**false**
The values and names can still be in screaming case.
| true | ## IMPORT MAPPING | Type/Alias | Imports | -| ---------- | ------- | - +|------------|---------| ## INSTANTIATION TYPES | Type/Alias | Instantiated By | -| ---------- | --------------- | - +|------------|-----------------| ## LANGUAGE PRIMITIVES @@ -141,119 +142,126 @@ These options may be applied as additional-properties (cli) or configOptions (pl ## FEATURE SET - ### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✗|ToolingExtension -|MockServer|✗|ToolingExtension + +| Name | Supported | Defined By | +|----------------|-----------|------------------| +| BasePath | ✓ | ToolingExtension | +| Authorizations | ✗ | ToolingExtension | +| UserAgent | ✗ | ToolingExtension | +| MockServer | ✗ | ToolingExtension | ### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Uuid|✗| -|Array|✓|OAS2,OAS3 -|Null|✗|OAS3 -|AnyType|✗|OAS2,OAS3 -|Object|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension + +| Name | Supported | Defined By | +|-------------------------------|-----------|------------------| +| Custom | ✗ | OAS2,OAS3 | +| Int32 | ✓ | OAS2,OAS3 | +| Int64 | ✓ | OAS2,OAS3 | +| Float | ✓ | OAS2,OAS3 | +| Double | ✓ | OAS2,OAS3 | +| Decimal | ✓ | ToolingExtension | +| String | ✓ | OAS2,OAS3 | +| Byte | ✓ | OAS2,OAS3 | +| Binary | ✓ | OAS2,OAS3 | +| Boolean | ✓ | OAS2,OAS3 | +| Date | ✓ | OAS2,OAS3 | +| DateTime | ✓ | OAS2,OAS3 | +| Password | ✓ | OAS2,OAS3 | +| File | ✓ | OAS2 | +| Uuid | ✗ | | +| Array | ✓ | OAS2,OAS3 | +| Null | ✗ | OAS3 | +| AnyType | ✗ | OAS2,OAS3 | +| Object | ✓ | OAS2,OAS3 | +| Maps | ✓ | ToolingExtension | +| CollectionFormat | ✓ | OAS2 | +| CollectionFormatMulti | ✓ | OAS2 | +| Enum | ✓ | OAS2,OAS3 | +| ArrayOfEnum | ✓ | ToolingExtension | +| ArrayOfModel | ✓ | ToolingExtension | +| ArrayOfCollectionOfPrimitives | ✓ | ToolingExtension | +| ArrayOfCollectionOfModel | ✓ | ToolingExtension | +| ArrayOfCollectionOfEnum | ✓ | ToolingExtension | +| MapOfEnum | ✓ | ToolingExtension | +| MapOfModel | ✓ | ToolingExtension | +| MapOfCollectionOfPrimitives | ✓ | ToolingExtension | +| MapOfCollectionOfModel | ✓ | ToolingExtension | +| MapOfCollectionOfEnum | ✓ | ToolingExtension | ### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension + +| Name | Supported | Defined By | +|--------|-----------|------------------| +| Readme | ✓ | ToolingExtension | +| Model | ✓ | ToolingExtension | +| Api | ✓ | ToolingExtension | ### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 + +| Name | Supported | Defined By | +|-------------------------|-----------|------------| +| Host | ✓ | OAS2,OAS3 | +| BasePath | ✓ | OAS2,OAS3 | +| Info | ✓ | OAS2,OAS3 | +| Schemes | ✗ | OAS2,OAS3 | +| PartialSchemes | ✓ | OAS2,OAS3 | +| Consumes | ✓ | OAS2 | +| Produces | ✓ | OAS2 | +| ExternalDocumentation | ✓ | OAS2,OAS3 | +| Examples | ✓ | OAS2,OAS3 | +| XMLStructureDefinitions | ✗ | OAS2,OAS3 | +| MultiServer | ✗ | OAS3 | +| ParameterizedServer | ✗ | OAS3 | +| ParameterStyling | ✗ | OAS3 | +| Callbacks | ✗ | OAS3 | +| LinkObjects | ✗ | OAS3 | ### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✓|OAS3 + +| Name | Supported | Defined By | +|---------------|-----------|------------| +| Path | ✓ | OAS2,OAS3 | +| Query | ✓ | OAS2,OAS3 | +| Header | ✓ | OAS2,OAS3 | +| Body | ✓ | OAS2 | +| FormUnencoded | ✓ | OAS2 | +| FormMultipart | ✓ | OAS2 | +| Cookie | ✓ | OAS3 | ### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✗|OAS2,OAS3 -|Polymorphism|✗|OAS2,OAS3 -|Union|✗|OAS3 -|allOf|✗|OAS2,OAS3 -|anyOf|✗|OAS3 -|oneOf|✗|OAS3 -|not|✗|OAS3 + +| Name | Supported | Defined By | +|--------------|-----------|------------| +| Simple | ✓ | OAS2,OAS3 | +| Composite | ✗ | OAS2,OAS3 | +| Polymorphism | ✗ | OAS2,OAS3 | +| Union | ✗ | OAS3 | +| allOf | ✗ | OAS2,OAS3 | +| anyOf | ✗ | OAS3 | +| oneOf | ✗ | OAS3 | +| not | ✗ | OAS3 | ### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✓|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 -|SignatureAuth|✗|OAS3 -|AWSV4Signature|✗|ToolingExtension + +| Name | Supported | Defined By | +|--------------------------|-----------|------------------| +| BasicAuth | ✓ | OAS2,OAS3 | +| ApiKey | ✓ | OAS2,OAS3 | +| OpenIDConnect | ✗ | OAS3 | +| BearerToken | ✓ | OAS3 | +| OAuth2_Implicit | ✓ | OAS2,OAS3 | +| OAuth2_Password | ✗ | OAS2,OAS3 | +| OAuth2_ClientCredentials | ✗ | OAS2,OAS3 | +| OAuth2_AuthorizationCode | ✗ | OAS2,OAS3 | +| SignatureAuth | ✗ | OAS3 | +| AWSV4Signature | ✗ | ToolingExtension | ### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✗|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 + +| Name | Supported | Defined By | +|----------|-----------|------------------| +| JSON | ✓ | OAS2,OAS3 | +| XML | ✗ | OAS2,OAS3 | +| PROTOBUF | ✗ | ToolingExtension | +| Custom | ✗ | OAS2,OAS3 | diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java index 79bcdf1f5b07..9015be82094f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java @@ -46,6 +46,7 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { public static final String PUB_REPOSITORY = "pubRepository"; public static final String PUB_PUBLISH_TO = "pubPublishTo"; public static final String USE_ENUM_EXTENSION = "useEnumExtension"; + public static final String USE_LOWER_CAMEL_CASE = "useLowerCamelCase"; @Setter protected String pubLibrary = "openapi.api"; @Setter protected String pubName = "openapi"; @@ -57,6 +58,7 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { @Setter protected String pubRepository = null; @Setter protected String pubPublishTo = null; @Setter protected boolean useEnumExtension = false; + @Setter protected boolean useLowerCamelCase = true; @Setter protected String sourceFolder = "src"; protected String libPath = "lib" + File.separator; protected String apiDocPath = "doc/"; @@ -196,6 +198,7 @@ public AbstractDartCodegen() { addOption(PUB_REPOSITORY, "Repository in generated pubspec", pubRepository); addOption(PUB_PUBLISH_TO, "Publish_to in generated pubspec", pubPublishTo); addOption(USE_ENUM_EXTENSION, "Allow the 'x-enum-values' extension for enums", String.valueOf(useEnumExtension)); + addOption(USE_LOWER_CAMEL_CASE, "Use lower camel case", String.valueOf(useLowerCamelCase)); addOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC, sourceFolder); } @@ -302,6 +305,12 @@ public void processOpts() { additionalProperties.put(USE_ENUM_EXTENSION, useEnumExtension); } + if (additionalProperties.containsKey(USE_LOWER_CAMEL_CASE)) { + this.setUseEnumExtension(convertPropertyToBooleanAndWriteBack(USE_LOWER_CAMEL_CASE)); + } else { + additionalProperties.put(USE_ENUM_EXTENSION, useLowerCamelCase); + } + if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { String srcFolder = (String) additionalProperties.get(CodegenConstants.SOURCE_FOLDER); this.setSourceFolder(srcFolder.replace('/', File.separatorChar)); @@ -387,7 +396,7 @@ public String toVarName(String name) { name = name.replaceAll("^_", ""); // if it's all upper case, do nothing - if (name.matches("^[A-Z_]*$")) { + if (!useLowerCamelCase && name.matches("^[A-Z_]*$")) { return name; } @@ -399,9 +408,14 @@ public String toVarName(String name) { // remove the rest name = sanitizeName(name); - // camelize (lower first character) the variable name - // pet_id => petId - name = camelize(name, LOWERCASE_FIRST_LETTER); + if (useLowerCamelCase) { + //to camelize it correctly it needs to be lower cased + name = camelize(name.toLowerCase(), LOWERCASE_FIRST_LETTER); + } else { + // camelize (lower first character) the variable name + // pet_id => petId + name = camelize(name, LOWERCASE_FIRST_LETTER); + } if (name.matches("^\\d.*")) { name = "n" + name; diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml new file mode 100644 index 000000000000..e4957b4e19d1 --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml @@ -0,0 +1,2064 @@ +openapi: 3.0.0 +info: + description: >- + This spec is mainly for testing Petstore server and contains fake endpoints, + models. Please do not use this for any other purpose. Special characters: " + \ + version: 1.0.0 + title: OpenAPI Petstore + license: + name: Apache-2.0 + url: 'https://www.apache.org/licenses/LICENSE-2.0.html' +tags: + - name: pet + description: Everything about your Pets + - name: store + description: Access to Petstore orders + - name: user + description: Operations about user +paths: + /foo: + get: + responses: + default: + description: response + content: + application/json: + schema: + type: object + properties: + string: + $ref: '#/components/schemas/Foo' + /pet: + servers: + - url: 'http://petstore.swagger.io/v2' + - url: 'http://path-server-test.petstore.local/v2' + - url: 'http://{server}.swagger.io:{port}/v2' + description: test server with variables + variables: + server: + description: target server + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + post: + tags: + - pet + summary: Add a new pet to the store + description: '' + operationId: addPet + responses: + '200': + description: Successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + put: + tags: + - pet + summary: Update an existing pet + description: '' + operationId: updatePet + x-webclient-blocking: true + responses: + '200': + description: Successful operation + '400': + description: Invalid ID supplied + '404': + description: Pet not found + '405': + description: Validation exception + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + $ref: '#/components/requestBodies/Pet' + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + description: Multiple status values can be provided with comma separated strings + operationId: findPetsByStatus + x-webclient-blocking: true + parameters: + - name: status + in: query + description: Status values that need to be considered for filter + required: true + style: form + explode: false + deprecated: true + schema: + type: array + items: + type: string + enum: + - available + - pending + - sold + default: available + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid status value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + description: >- + Multiple tags can be provided with comma separated strings. Use tag1, + tag2, tag3 for testing. + operationId: findPetsByTags + x-webclient-blocking: true + parameters: + - name: tags + in: query + description: Tags to filter by + required: true + style: form + explode: false + schema: + type: array + items: + type: string + uniqueItems: true + responses: + '200': + description: successful operation + content: + application/xml: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Pet' + uniqueItems: true + '400': + description: Invalid tag value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + deprecated: true + '/pet/{petId}': + get: + tags: + - pet + summary: Find pet by ID + description: Returns a single pet + operationId: getPetById + x-webclient-blocking: true + parameters: + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Pet' + application/json: + schema: + $ref: '#/components/schemas/Pet' + '400': + description: Invalid ID supplied + '404': + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: '' + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Successful operation + '405': + description: Invalid input + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a pet + description: '' + operationId: deletePet + parameters: + - name: api_key + in: header + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: Successful operation + '400': + description: Invalid pet value + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + '/pet/{petId}/uploadImage': + post: + tags: + - pet + summary: uploads an image + description: '' + operationId: uploadFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + file: + description: file to upload + type: string + format: binary + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + description: Returns a map of status codes to quantities + operationId: getInventory + x-webclient-blocking: false + responses: + '200': + description: successful operation + content: + application/json: + schema: + type: object + additionalProperties: + type: integer + format: int32 + security: + - api_key: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: '' + operationId: placeOrder + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid Order + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Order' + description: order placed for purchasing the pet + required: true + '/store/order/{order_id}': + get: + tags: + - store + summary: Find purchase order by ID + description: >- + For valid response try integer IDs with value <= 5 or > 10. Other values + will generate exceptions + operationId: getOrderById + parameters: + - name: order_id + in: path + description: ID of pet that needs to be fetched + required: true + schema: + type: integer + format: int64 + minimum: 1 + maximum: 5 + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/json: + schema: + $ref: '#/components/schemas/Order' + '400': + description: Invalid ID supplied + '404': + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + description: >- + For valid response try integer IDs with value < 1000. Anything above + 1000 or nonintegers will generate API errors + operationId: deleteOrder + parameters: + - name: order_id + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid ID supplied + '404': + description: Order not found + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created user object + required: true + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input array + description: '' + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: '#/components/requestBodies/UserArray' + /user/login: + get: + tags: + - user + summary: Logs user into the system + description: '' + operationId: loginUser + parameters: + - name: username + in: query + description: The user name for login + required: true + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: true + schema: + type: string + responses: + '200': + description: successful operation + headers: + X-Rate-Limit: + description: calls per hour allowed by the user + schema: + type: integer + format: int32 + X-Expires-After: + description: date in UTC when token expires + schema: + type: string + format: date-time + content: + application/xml: + schema: + type: string + application/json: + schema: + type: string + '400': + description: Invalid username/password supplied + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: '' + operationId: logoutUser + responses: + default: + description: successful operation + '/user/{username}': + get: + tags: + - user + summary: Get user by user name + description: '' + operationId: getUserByName + parameters: + - name: username + in: path + description: The name that needs to be fetched. Use user1 for testing. + required: true + schema: + type: string + responses: + '200': + description: successful operation + content: + application/xml: + schema: + $ref: '#/components/schemas/User' + application/json: + schema: + $ref: '#/components/schemas/User' + '400': + description: Invalid username supplied + '404': + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid user supplied + '404': + description: User not found + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete user + description: This can only be done by the logged in user. + operationId: deleteUser + parameters: + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + /fake_classname_test: + patch: + tags: + - 'fake_classname_tags 123#$%^' + summary: To test class name in snake case + description: To test class name in snake case + operationId: testClassname + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + security: + - api_key_query: [] + requestBody: + $ref: '#/components/requestBodies/Client' + /fake: + patch: + tags: + - fake + summary: To test "client" model + description: To test "client" model + operationId: testClientModel + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + get: + tags: + - fake + summary: To test enum parameters + description: To test enum parameters + operationId: testEnumParameters + parameters: + - name: enum_header_string_array + in: header + description: Header parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_header_string + in: header + description: Header parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_string_array + in: query + description: Query parameter enum test (string array) + schema: + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + - name: enum_query_string + in: query + description: Query parameter enum test (string) + schema: + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + - name: enum_query_integer + in: query + description: Query parameter enum test (double) + schema: + type: integer + format: int32 + enum: + - 1 + - -2 + - name: enum_query_double + in: query + description: Query parameter enum test (double) + schema: + type: number + format: double + enum: + - 1.1 + - -1.2 + - name: enum_query_model_array + in: query + schema: + type: array + items: + $ref: '#/components/schemas/EnumClass' + responses: + '400': + description: Invalid request + '404': + description: Not found + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + enum_form_string_array: + description: Form parameter enum test (string array) + type: array + items: + type: string + default: $ + enum: + - '>' + - $ + enum_form_string: + description: Form parameter enum test (string) + type: string + enum: + - _abc + - '-efg' + - (xyz) + default: '-efg' + post: + tags: + - fake + summary: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + description: | + Fake endpoint for testing various parameters + 假端點 + 偽のエンドポイント + 가짜 엔드 포인트 + operationId: testEndpointParameters + responses: + '400': + description: Invalid username supplied + '404': + description: User not found + security: + - http_basic_test: [] + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + integer: + description: None + type: integer + minimum: 10 + maximum: 100 + int32: + description: None + type: integer + format: int32 + minimum: 20 + maximum: 200 + int64: + description: None + type: integer + format: int64 + number: + description: None + type: number + minimum: 32.1 + maximum: 543.2 + float: + description: None + type: number + format: float + maximum: 987.6 + double: + description: None + type: number + format: double + minimum: 67.8 + maximum: 123.4 + string: + description: None + type: string + pattern: '/[a-z]/i' + pattern_without_delimiter: + description: None + type: string + pattern: '^[A-Z].*' + byte: + description: None + type: string + format: byte + binary: + description: None + type: string + format: binary + date: + description: None + type: string + format: date + dateTime: + description: None + type: string + format: date-time + password: + description: None + type: string + format: password + minLength: 10 + maxLength: 64 + callback: + description: None + type: string + required: + - number + - double + - pattern_without_delimiter + - byte + delete: + tags: + - fake + security: + - bearer_test: [] + summary: Fake endpoint to test group parameters (optional) + description: Fake endpoint to test group parameters (optional) + operationId: testGroupParameters + x-group-parameters: true + parameters: + - name: required_string_group + in: query + description: Required String in group parameters + required: true + schema: + type: integer + - name: required_boolean_group + in: header + description: Required Boolean in group parameters + required: true + schema: + type: boolean + - name: required_int64_group + in: query + description: Required Integer in group parameters + required: true + schema: + type: integer + format: int64 + - name: string_group + in: query + description: String in group parameters + schema: + type: integer + - name: boolean_group + in: header + description: Boolean in group parameters + schema: + type: boolean + - name: int64_group + in: query + description: Integer in group parameters + schema: + type: integer + format: int64 + responses: + '400': + description: Something wrong + /fake/outer/number: + post: + tags: + - fake + description: Test serialization of outer number types + operationId: fakeOuterNumberSerialize + responses: + '200': + description: Output number + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterNumber' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterNumber' + description: Input number as post body + /fake/property/enum-int: + post: + tags: + - fake + description: Test serialization of enum (int) properties with examples + operationId: fakePropertyEnumIntegerSerialize + responses: + '200': + description: Output enum (int) + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/OuterObjectWithEnumProperty' + description: Input enum (int) as post body + /fake/outer/string: + post: + tags: + - fake + description: Test serialization of outer string types + operationId: fakeOuterStringSerialize + responses: + '200': + description: Output string + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterString' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterString' + description: Input string as post body + /fake/outer/boolean: + post: + tags: + - fake + description: Test serialization of outer boolean types + operationId: fakeOuterBooleanSerialize + responses: + '200': + description: Output boolean + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterBoolean' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterBoolean' + description: Input boolean as post body + /fake/outer/composite: + post: + tags: + - fake + description: Test serialization of object with outer number type + operationId: fakeOuterCompositeSerialize + responses: + '200': + description: Output composite + content: + '*/*': + schema: + $ref: '#/components/schemas/OuterComposite' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/OuterComposite' + description: Input composite as post body + /fake/BigDecimalMap: + get: + tags: + - fake + description: for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + operationId: fakeBigDecimalMap + responses: + '200': + description: successful operation + content: + '*/*': + schema: + type: object + properties: + someId: + type: number + someMap: + type: object + additionalProperties: + type: number + /fake/jsonFormData: + get: + tags: + - fake + summary: test json serialization of form data + description: '' + operationId: testJsonFormData + responses: + '200': + description: successful operation + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + param: + description: field1 + type: string + param2: + description: field2 + type: string + required: + - param + - param2 + /fake/additionalProperties-reference: + post: + tags: + - fake + summary: test referenced additionalProperties + description: '' + operationId: testAdditionalPropertiesReference + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FreeFormObject' + description: request body + required: true + /fake/stringMap-reference: + post: + tags: + - fake + summary: test referenced string map + description: '' + operationId: testStringMapReference + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/MapOfString' + description: request body + required: true + /fake/inline-additionalProperties: + post: + tags: + - fake + summary: test inline additionalProperties + description: '' + operationId: testInlineAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + additionalProperties: + type: string + description: request body + required: true + /fake/inline-freeform-additionalProperties: + post: + tags: + - fake + summary: test inline free-form additionalProperties + description: '' + operationId: testInlineFreeformAdditionalProperties + responses: + '200': + description: successful operation + requestBody: + content: + application/json: + schema: + type: object + properties: + someProperty: + type: string + additionalProperties: true + description: request body + required: true + /fake/nullable: + post: + tags: + - fake + summary: test nullable parent property + description: "" + operationId: testNullable + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ChildWithNullable' + description: request body + required: true + responses: + "200": + description: successful operation + /fake/body-with-query-params: + put: + tags: + - fake + operationId: testBodyWithQueryParams + parameters: + - name: query + in: query + required: true + schema: + type: string + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/User' + required: true + /another-fake/dummy: + patch: + tags: + - $another-fake? + summary: To test special tags + description: To test special tags and operation ID starting with number + operationId: '123_test_@#$%_special_tags' + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + requestBody: + $ref: '#/components/requestBodies/Client' + /fake/body-with-file-schema: + put: + tags: + - fake + description: >- + For this test, the body for this request must reference a schema named + `File`. + operationId: testBodyWithFileSchema + responses: + '200': + description: Success + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/FileSchemaTestClass' + required: true + /fake/body-with-binary: + put: + tags: + - fake + description: >- + For this test, the body has to be a binary file. + operationId: testBodyWithBinary + responses: + '200': + description: Success + requestBody: + content: + image/png: + schema: + type: string + nullable: true + format: binary + description: image to upload + required: true + /fake/test-query-parameters: + put: + tags: + - fake + description: To test the collection format in query parameters + operationId: testQueryParameterCollectionFormat + parameters: + - name: pipe + in: query + required: true + style: pipeDelimited + schema: + type: array + items: + type: string + - name: ioutil + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: http + in: query + required: true + style: spaceDelimited + schema: + type: array + items: + type: string + - name: url + in: query + required: true + style: form + explode: false + schema: + type: array + items: + type: string + - name: context + in: query + required: true + explode: true + schema: + type: array + items: + type: string + - name: language + in: query + required: false + schema: + type: object + additionalProperties: + type: string + format: string + - name: allowEmpty + in: query + required: true + allowEmptyValue: true + schema: + type: string + responses: + "200": + description: Success + '/fake/{petId}/uploadImageWithRequiredFile': + post: + tags: + - pet + summary: uploads an image (required) + description: '' + operationId: uploadFileWithRequiredFile + parameters: + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + responses: + '200': + description: successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + security: + - petstore_auth: + - 'write:pets' + - 'read:pets' + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + additionalMetadata: + description: Additional data to pass to server + type: string + requiredFile: + description: file to upload + type: string + format: binary + required: + - requiredFile + /fake/health: + get: + tags: + - fake + summary: Health check endpoint + responses: + 200: + description: The instance started successfully + content: + application/json: + schema: + $ref: '#/components/schemas/HealthCheckResult' + /fake/http-signature-test: + get: + tags: + - fake + summary: test http signature authentication + operationId: fake-http-signature-test + parameters: + - name: query_1 + in: query + description: query parameter + required: optional + schema: + type: string + - name: header_1 + in: header + description: header parameter + required: optional + schema: + type: string + security: + - http_signature_test: [] + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + 200: + description: The instance started successfully +servers: + - url: 'http://{server}.swagger.io:{port}/v2' + description: petstore server + variables: + server: + enum: + - 'petstore' + - 'qa-petstore' + - 'dev-petstore' + default: 'petstore' + port: + enum: + - 80 + - 8080 + default: 80 + - url: https://localhost:8080/{version} + description: The local server + variables: + version: + enum: + - 'v1' + - 'v2' + default: 'v2' + - url: https://127.0.0.1/no_varaible + description: The local server without variables +components: + requestBodies: + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' + description: List of user object + required: true + Client: + content: + application/json: + schema: + $ref: '#/components/schemas/Client' + description: client model + required: true + Pet: + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + required: true + securitySchemes: + petstore_auth: + type: oauth2 + flows: + implicit: + authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog' + scopes: + 'write:pets': modify pets in your account + 'read:pets': read your pets + api_key: + type: apiKey + name: api_key + in: header + api_key_query: + type: apiKey + name: api_key_query + in: query + http_basic_test: + type: http + scheme: basic + bearer_test: + type: http + scheme: bearer + bearerFormat: JWT + http_signature_test: + type: http + scheme: signature + schemas: + Foo: + type: object + properties: + bar: + $ref: '#/components/schemas/Bar' + Bar: + type: string + default: bar + Order: + type: object + properties: + id: + type: integer + format: int64 + petId: + type: integer + format: int64 + quantity: + type: integer + format: int32 + shipDate: + type: string + format: date-time + status: + type: string + description: Order Status + enum: + - placed + - approved + - delivered + complete: + type: boolean + default: false + xml: + name: Order + Category: + type: object + required: + - name + properties: + id: + type: integer + format: int64 + name: + type: string + default: default-name + xml: + name: Category + User: + type: object + properties: + id: + type: integer + format: int64 + x-is-unique: true + username: + type: string + firstName: + type: string + lastName: + type: string + email: + type: string + password: + type: string + phone: + type: string + userStatus: + type: integer + format: int32 + description: User Status + xml: + name: User + Tag: + type: object + properties: + id: + type: integer + format: int64 + name: + type: string + xml: + name: Tag + Pet: + type: object + required: + - name + - photoUrls + properties: + id: + type: integer + format: int64 + x-is-unique: true + category: + $ref: '#/components/schemas/Category' + name: + type: string + example: doggie + photoUrls: + type: array + xml: + wrapped: true + items: + type: string + xml: + name: photoUrl + uniqueItems: true + tags: + type: array + xml: + name: tag + wrapped: true + items: + $ref: '#/components/schemas/Tag' + status: + type: string + description: pet status in the store + enum: + - available + - pending + - sold + xml: + name: Pet + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Return: + description: Model for testing reserved words + properties: + return: + type: integer + format: int32 + xml: + name: Return + Name: + description: Model for testing model name same as property name + required: + - name + properties: + name: + type: integer + format: int32 + snake_case: + readOnly: true + type: integer + format: int32 + property: + type: string + 123Number: + type: integer + readOnly: true + xml: + name: Name + 200_response: + description: Model for testing model name starting with number + properties: + name: + type: integer + format: int32 + class: + type: string + xml: + name: Name + ClassModel: + description: Model for testing model with "_class" property + properties: + _class: + type: string + Dog: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + breed: + type: string + Cat: + allOf: + - $ref: '#/components/schemas/Animal' + - type: object + properties: + declawed: + type: boolean + Animal: + type: object + discriminator: + propertyName: className + mapping: + DOG: '#/components/schemas/Dog' + CAT: '#/components/schemas/Cat' + required: + - className + properties: + className: + type: string + color: + type: string + default: red + AnimalFarm: + type: array + items: + $ref: '#/components/schemas/Animal' + format_test: + type: object + required: + - number + - byte + - date + - password + properties: + integer: + type: integer + maximum: 100 + minimum: 10 + int32: + type: integer + format: int32 + maximum: 200 + minimum: 20 + int64: + type: integer + format: int64 + number: + maximum: 543.2 + minimum: 32.1 + type: number + float: + type: number + format: float + maximum: 987.6 + minimum: 54.3 + double: + type: number + format: double + maximum: 123.4 + minimum: 67.8 + decimal: + type: string + format: number + string: + type: string + pattern: '/[a-z]/i' + byte: + type: string + format: byte + binary: + type: string + format: binary + date: + type: string + format: date + dateTime: + type: string + format: date-time + uuid: + type: string + format: uuid + example: 72f98069-206d-4f12-9f12-3d1e525a8e84 + password: + type: string + format: password + maxLength: 64 + minLength: 10 + pattern_with_digits: + description: A string that is a 10 digit number. Can have leading zeros. + type: string + pattern: '^\d{10}$' + pattern_with_digits_and_delimiter: + description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + type: string + pattern: '/^image_\d{1,3}$/i' + EnumClass: + type: string + default: '-efg' + enum: + - _abc + - '-efg' + - (xyz) + Enum_Test: + type: object + required: + - enum_string_required + properties: + enum_string: + type: string + enum: + - UPPER + - lower + - '' + enum_string_required: + type: string + enum: + - UPPER + - lower + - '' + enum_integer: + type: integer + format: int32 + enum: + - 1 + - -1 + enum_number: + type: number + format: double + enum: + - 1.1 + - -1.2 + outerEnum: + $ref: '#/components/schemas/OuterEnum' + outerEnumInteger: + $ref: '#/components/schemas/OuterEnumInteger' + outerEnumDefaultValue: + $ref: '#/components/schemas/OuterEnumDefaultValue' + outerEnumIntegerDefaultValue: + $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' + AdditionalPropertiesClass: + type: object + properties: + map_property: + type: object + additionalProperties: + type: string + map_of_map_property: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + MixedPropertiesAndAdditionalPropertiesClass: + type: object + properties: + uuid: + type: string + format: uuid + dateTime: + type: string + format: date-time + map: + type: object + additionalProperties: + $ref: '#/components/schemas/Animal' + List: + type: object + properties: + 123-list: + type: string + Client: + type: object + properties: + client: + type: string + ReadOnlyFirst: + type: object + properties: + bar: + type: string + readOnly: true + baz: + type: string + hasOnlyReadOnly: + type: object + properties: + bar: + type: string + readOnly: true + foo: + type: string + readOnly: true + Capitalization: + type: object + properties: + smallCamel: + type: string + CapitalCamel: + type: string + small_Snake: + type: string + Capital_Snake: + type: string + SCA_ETH_Flow_Points: + type: string + ATT_NAME: + description: | + Name of the pet + type: string + MapTest: + type: object + properties: + map_map_of_string: + type: object + additionalProperties: + type: object + additionalProperties: + type: string + map_of_enum_string: + type: object + additionalProperties: + type: string + enum: + - UPPER + - lower + direct_map: + type: object + additionalProperties: + type: boolean + indirect_map: + $ref: '#/components/schemas/StringBooleanMap' + ArrayTest: + type: object + properties: + array_of_string: + type: array + items: + type: string + minItems: 0 + maxItems: 3 + array_array_of_integer: + type: array + items: + type: array + items: + type: integer + format: int64 + array_array_of_model: + type: array + items: + type: array + items: + $ref: '#/components/schemas/ReadOnlyFirst' + NumberOnly: + type: object + properties: + JustNumber: + type: number + ArrayOfNumberOnly: + type: object + properties: + ArrayNumber: + type: array + items: + type: number + ArrayOfArrayOfNumberOnly: + type: object + properties: + ArrayArrayNumber: + type: array + items: + type: array + items: + type: number + EnumArrays: + type: object + properties: + just_symbol: + type: string + enum: + - '>=' + - $ + array_enum: + type: array + items: + type: string + enum: + - fish + - crab + FreeFormObject: + type: object + description: A schema consisting only of additional properties + additionalProperties: true + MapOfString: + type: object + description: A schema consisting only of additional properties of type string + additionalProperties: + type: string + OuterEnum: + nullable: true + type: string + enum: + - placed + - approved + - delivered + OuterEnumInteger: + type: integer + enum: + - 0 + - 1 + - 2 + example: 2 + OuterEnumDefaultValue: + type: string + enum: + - placed + - approved + - delivered + default: placed + OuterEnumIntegerDefaultValue: + type: integer + enum: + - 0 + - 1 + - 2 + default: 0 + OuterComposite: + type: object + properties: + my_number: + $ref: '#/components/schemas/OuterNumber' + my_string: + $ref: '#/components/schemas/OuterString' + my_boolean: + $ref: '#/components/schemas/OuterBoolean' + OuterNumber: + type: number + OuterString: + type: string + OuterBoolean: + type: boolean + x-codegen-body-parameter-name: boolean_post_body + ParentWithNullable: + type: object + discriminator: + propertyName: type + properties: + type: + type: string + enum: + - ChildWithNullable + nullableProperty: + type: string + nullable: true + ChildWithNullable: + allOf: + - $ref: '#/components/schemas/ParentWithNullable' + - type: object + properties: + otherProperty: + type: string + StringBooleanMap: + additionalProperties: + type: boolean + FileSchemaTestClass: + type: object + properties: + file: + $ref: '#/components/schemas/File' + files: + type: array + items: + $ref: '#/components/schemas/File' + File: + type: object + description: Must be named `File` for test. + properties: + sourceURI: + description: Test capitalization + type: string + _special_model.name_: + properties: + '$special[property.name]': + type: integer + format: int64 + xml: + name: '$special[model.name]' + HealthCheckResult: + type: object + properties: + NullableMessage: + nullable: true + type: string + description: Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. + NullableClass: + type: object + properties: + integer_prop: + type: integer + nullable: true + number_prop: + type: number + nullable: true + boolean_prop: + type: boolean + nullable: true + string_prop: + type: string + nullable: true + date_prop: + type: string + format: date + nullable: true + datetime_prop: + type: string + format: date-time + nullable: true + array_nullable_prop: + type: array + nullable: true + items: + type: object + array_and_items_nullable_prop: + type: array + nullable: true + items: + type: object + nullable: true + array_items_nullable: + type: array + items: + type: object + nullable: true + object_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + object_and_items_nullable_prop: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + object_items_nullable: + type: object + additionalProperties: + type: object + nullable: true + additionalProperties: + type: object + nullable: true + OuterObjectWithEnumProperty: + type: object + example: + value: 2 + required: + - value + properties: + value: + $ref: '#/components/schemas/OuterEnumInteger' + DeprecatedObject: + type: object + deprecated: true + properties: + name: + type: string + ObjectWithDeprecatedFields: + type: object + properties: + uuid: + type: string + id: + type: number + deprecated: true + deprecatedRef: + $ref: '#/components/schemas/DeprecatedObject' + bars: + type: array + deprecated: true + items: + $ref: '#/components/schemas/Bar' + AllOfWithSingleRef: + type: object + properties: + username: + type: string + SingleRefType: + allOf: + - $ref: '#/components/schemas/SingleRefType' + SingleRefType: + type: string + title: SingleRefType + enum: + - admin + - user From bde341ad6262f61bc773aae87b4a872b50ea0e38 Mon Sep 17 00:00:00 2001 From: Cantasura Date: Tue, 6 May 2025 08:19:42 +0200 Subject: [PATCH 2/3] updated dart samples --- .../README.md | 4 +- .../doc/Bar.md | 8 +- .../doc/BarApi.md | 8 +- .../doc/BarCreate.md | 8 +- .../doc/BarRef.md | 6 +- .../doc/BarRefOrValue.md | 10 +- .../doc/Entity.md | 4 +- .../doc/EntityRef.md | 6 +- .../doc/Extensible.md | 4 +- .../doc/Foo.md | 8 +- .../doc/FooRef.md | 8 +- .../doc/FooRefOrValue.md | 12 +- .../doc/Fruit.md | 2 +- .../doc/Pasta.md | 4 +- .../doc/Pizza.md | 6 +- .../doc/PizzaSpeziale.md | 6 +- .../lib/src/api/bar_api.dart | 6 +- .../lib/src/model/bar.dart | 84 +- .../lib/src/model/bar_create.dart | 84 +- .../lib/src/model/bar_ref.dart | 44 +- .../lib/src/model/bar_ref_or_value.dart | 10 +- .../lib/src/model/entity.dart | 44 +- .../lib/src/model/entity_ref.dart | 54 +- .../lib/src/model/extensible.dart | 20 +- .../lib/src/model/foo.dart | 68 +- .../lib/src/model/foo_ref.dart | 70 +- .../lib/src/model/foo_ref_or_value.dart | 12 +- .../lib/src/model/fruit.dart | 10 +- .../lib/src/model/fruit_type.dart | 4 +- .../lib/src/model/pasta.dart | 44 +- .../lib/src/model/pizza.dart | 54 +- .../lib/src/model/pizza_speziale.dart | 44 +- .../README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../doc/Dog.md | 2 +- .../doc/EnumTest.md | 8 +- .../doc/FakeApi.md | 64 +- .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../doc/Pet.md | 2 +- .../doc/PetApi.md | 52 +- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../doc/User.md | 6 +- .../lib/src/api/another_fake_api.dart | 6 +- .../lib/src/api/fake_api.dart | 46 +- .../src/api/fake_classname_tags123_api.dart | 6 +- .../lib/src/api/pet_api.dart | 42 +- .../lib/src/model/all_of_with_single_ref.dart | 8 +- .../lib/src/model/animal.dart | 8 +- .../model/array_of_array_of_number_only.dart | 8 +- .../lib/src/model/array_of_number_only.dart | 8 +- .../lib/src/model/capitalization.dart | 32 +- .../lib/src/model/cat.dart | 8 +- .../lib/src/model/child_with_nullable.dart | 18 +- .../lib/src/model/dog.dart | 8 +- .../lib/src/model/enum_test.dart | 40 +- .../fake_big_decimal_map200_response.dart | 16 +- .../lib/src/model/format_test.dart | 8 +- .../lib/src/model/health_check_result.dart | 8 +- .../lib/src/model/map_test.dart | 2 +- ...rties_and_additional_properties_class.dart | 8 +- .../lib/src/model/model_enum_class.dart | 2 +- .../lib/src/model/model_file.dart | 8 +- .../lib/src/model/number_only.dart | 8 +- .../model/object_with_deprecated_fields.dart | 10 +- .../lib/src/model/order.dart | 16 +- .../lib/src/model/parent_with_nullable.dart | 10 +- .../lib/src/model/pet.dart | 8 +- .../lib/src/model/special_model_name.dart | 8 +- ...reeform_additional_properties_request.dart | 8 +- .../lib/src/model/user.dart | 24 +- .../petstore_client_lib_fake/README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../petstore_client_lib_fake/doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../petstore_client_lib_fake/doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../petstore_client_lib_fake/doc/Dog.md | 2 +- .../petstore_client_lib_fake/doc/EnumTest.md | 8 +- .../petstore_client_lib_fake/doc/FakeApi.md | 64 +- .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore_client_lib_fake/doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../petstore_client_lib_fake/doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../petstore_client_lib_fake/doc/Pet.md | 2 +- .../petstore_client_lib_fake/doc/PetApi.md | 52 +- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../petstore_client_lib_fake/doc/User.md | 6 +- .../lib/src/api/another_fake_api.dart | 6 +- .../lib/src/api/fake_api.dart | 48 +- .../src/api/fake_classname_tags123_api.dart | 6 +- .../lib/src/api/pet_api.dart | 48 +- .../lib/src/model/all_of_with_single_ref.dart | 12 +- .../lib/src/model/animal.dart | 8 +- .../model/array_of_array_of_number_only.dart | 10 +- .../lib/src/model/array_of_number_only.dart | 10 +- .../lib/src/model/capitalization.dart | 40 +- .../lib/src/model/cat.dart | 28 +- .../lib/src/model/child_with_nullable.dart | 44 +- .../lib/src/model/dog.dart | 26 +- .../lib/src/model/enum_test.dart | 56 +- .../fake_big_decimal_map200_response.dart | 20 +- .../lib/src/model/format_test.dart | 10 +- .../lib/src/model/health_check_result.dart | 10 +- .../lib/src/model/map_test.dart | 2 +- ...rties_and_additional_properties_class.dart | 10 +- .../lib/src/model/model_enum_class.dart | 2 +- .../lib/src/model/model_file.dart | 10 +- .../lib/src/model/number_only.dart | 10 +- .../model/object_with_deprecated_fields.dart | 12 +- .../lib/src/model/order.dart | 20 +- .../lib/src/model/parent_with_nullable.dart | 12 +- .../lib/src/model/pet.dart | 8 +- .../lib/src/model/special_model_name.dart | 10 +- ...reeform_additional_properties_request.dart | 10 +- .../lib/src/model/user.dart | 30 +- .../.gitignore | 41 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 185 ++ .../.openapi-generator/VERSION | 1 + .../README.md | 212 ++ .../analysis_options.yaml | 10 + .../build.yaml | 18 + .../doc/AdditionalPropertiesClass.md | 16 + .../doc/AllOfWithSingleRef.md | 16 + .../doc/Animal.md | 16 + .../doc/AnotherFakeApi.md | 57 + .../doc/ApiResponse.md | 17 + .../doc/ArrayOfArrayOfNumberOnly.md | 15 + .../doc/ArrayOfNumberOnly.md | 15 + .../doc/ArrayTest.md | 17 + .../doc/Capitalization.md | 20 + .../doc/Cat.md | 17 + .../doc/Category.md | 16 + .../doc/ChildWithNullable.md | 17 + .../doc/ClassModel.md | 15 + .../doc/DefaultApi.md | 51 + .../doc/DeprecatedObject.md | 15 + .../doc/Dog.md | 17 + .../doc/EnumArrays.md | 16 + .../doc/EnumTest.md | 22 + .../doc/FakeApi.md | 1028 ++++++++++ .../doc/FakeBigDecimalMap200Response.md | 16 + .../doc/FakeClassnameTags123Api.md | 61 + .../doc/FileSchemaTestClass.md | 16 + .../doc/Foo.md | 15 + .../doc/FooGetDefaultResponse.md | 15 + .../doc/FormatTest.md | 30 + .../doc/HasOnlyReadOnly.md | 16 + .../doc/HealthCheckResult.md | 15 + .../doc/MapTest.md | 18 + ...dPropertiesAndAdditionalPropertiesClass.md | 17 + .../doc/Model200Response.md | 16 + .../doc/ModelClient.md | 15 + .../doc/ModelEnumClass.md | 14 + .../doc/ModelFile.md | 15 + .../doc/ModelList.md | 15 + .../doc/ModelReturn.md | 15 + .../doc/Name.md | 18 + .../doc/NullableClass.md | 26 + .../doc/NumberOnly.md | 15 + .../doc/ObjectWithDeprecatedFields.md | 18 + .../doc/Order.md | 20 + .../doc/OuterComposite.md | 17 + .../doc/OuterEnum.md | 14 + .../doc/OuterEnumDefaultValue.md | 14 + .../doc/OuterEnumInteger.md | 14 + .../doc/OuterEnumIntegerDefaultValue.md | 14 + .../doc/OuterObjectWithEnumProperty.md | 15 + .../doc/ParentWithNullable.md | 16 + .../doc/Pet.md | 20 + .../doc/PetApi.md | 439 +++++ .../doc/ReadOnlyFirst.md | 16 + .../doc/SingleRefType.md | 14 + .../doc/SpecialModelName.md | 15 + .../doc/StoreApi.md | 188 ++ .../doc/Tag.md | 16 + ...lineFreeformAdditionalPropertiesRequest.md | 15 + .../doc/User.md | 22 + .../doc/UserApi.md | 359 ++++ .../lib/openapi.dart | 70 + .../lib/src/api.dart | 110 ++ .../lib/src/api/another_fake_api.dart | 109 ++ .../lib/src/api/default_api.dart | 89 + .../lib/src/api/fake_api.dart | 1712 +++++++++++++++++ .../src/api/fake_classname_tags123_api.dart | 116 ++ .../lib/src/api/pet_api.dart | 727 +++++++ .../lib/src/api/store_api.dart | 303 +++ .../lib/src/api/user_api.dart | 524 +++++ .../lib/src/auth/api_key_auth.dart | 30 + .../lib/src/auth/auth.dart | 18 + .../lib/src/auth/basic_auth.dart | 37 + .../lib/src/auth/bearer_auth.dart | 26 + .../lib/src/auth/oauth.dart | 26 + .../lib/src/deserialize.dart | 195 ++ .../model/additional_properties_class.dart | 72 + .../lib/src/model/all_of_with_single_ref.dart | 74 + .../lib/src/model/animal.dart | 72 + .../lib/src/model/api_response.dart | 88 + .../model/array_of_array_of_number_only.dart | 56 + .../lib/src/model/array_of_number_only.dart | 56 + .../lib/src/model/array_test.dart | 89 + .../lib/src/model/capitalization.dart | 137 ++ .../lib/src/model/cat.dart | 91 + .../lib/src/model/category.dart | 72 + .../lib/src/model/child_with_nullable.dart | 108 ++ .../lib/src/model/class_model.dart | 56 + .../lib/src/model/deprecated_object.dart | 57 + .../lib/src/model/dog.dart | 91 + .../lib/src/model/enum_arrays.dart | 110 ++ .../lib/src/model/enum_test.dart | 256 +++ .../fake_big_decimal_map200_response.dart | 72 + .../lib/src/model/file_schema_test_class.dart | 73 + .../lib/src/model/foo.dart | 56 + .../src/model/foo_get_default_response.dart | 57 + .../lib/src/model/format_test.dart | 304 +++ .../lib/src/model/has_only_read_only.dart | 72 + .../lib/src/model/health_check_result.dart | 56 + .../lib/src/model/map_test.dart | 123 ++ ...rties_and_additional_properties_class.dart | 89 + .../lib/src/model/model200_response.dart | 72 + .../lib/src/model/model_client.dart | 56 + .../lib/src/model/model_enum_class.dart | 25 + .../lib/src/model/model_file.dart | 57 + .../lib/src/model/model_list.dart | 56 + .../lib/src/model/model_return.dart | 56 + .../lib/src/model/name.dart | 104 + .../lib/src/model/nullable_class.dart | 232 +++ .../lib/src/model/number_only.dart | 56 + .../model/object_with_deprecated_fields.dart | 108 ++ .../lib/src/model/order.dart | 162 ++ .../lib/src/model/outer_composite.dart | 88 + .../lib/src/model/outer_enum.dart | 25 + .../src/model/outer_enum_default_value.dart | 25 + .../lib/src/model/outer_enum_integer.dart | 25 + .../outer_enum_integer_default_value.dart | 25 + .../outer_object_with_enum_property.dart | 58 + .../lib/src/model/parent_with_nullable.dart | 89 + .../lib/src/model/pet.dart | 164 ++ .../lib/src/model/read_only_first.dart | 72 + .../lib/src/model/single_ref_type.dart | 23 + .../lib/src/model/special_model_name.dart | 56 + .../lib/src/model/tag.dart | 72 + ...reeform_additional_properties_request.dart | 56 + .../lib/src/model/user.dart | 169 ++ .../pubspec.yaml | 17 + .../additional_properties_class_test.dart | 21 + .../test/all_of_with_single_ref_test.dart | 21 + .../test/animal_test.dart | 21 + .../test/another_fake_api_test.dart | 20 + .../test/api_response_test.dart | 26 + .../array_of_array_of_number_only_test.dart | 16 + .../test/array_of_number_only_test.dart | 16 + .../test/array_test_test.dart | 26 + .../test/capitalization_test.dart | 42 + .../test/cat_test.dart | 26 + .../test/category_test.dart | 21 + .../test/child_with_nullable_test.dart | 26 + .../test/class_model_test.dart | 16 + .../test/default_api_test.dart | 16 + .../test/deprecated_object_test.dart | 16 + .../test/dog_test.dart | 26 + .../test/enum_arrays_test.dart | 21 + .../test/enum_test_test.dart | 51 + .../test/fake_api_test.dart | 183 ++ ...fake_big_decimal_map200_response_test.dart | 21 + .../test/fake_classname_tags123_api_test.dart | 20 + .../test/file_schema_test_class_test.dart | 21 + .../test/foo_get_default_response_test.dart | 16 + .../test/foo_test.dart | 16 + .../test/format_test_test.dart | 93 + .../test/has_only_read_only_test.dart | 21 + .../test/health_check_result_test.dart | 16 + .../test/map_test_test.dart | 31 + ..._and_additional_properties_class_test.dart | 26 + .../test/model200_response_test.dart | 21 + .../test/model_client_test.dart | 16 + .../test/model_enum_class_test.dart | 9 + .../test/model_file_test.dart | 17 + .../test/model_list_test.dart | 16 + .../test/model_return_test.dart | 16 + .../test/name_test.dart | 31 + .../test/nullable_class_test.dart | 71 + .../test/number_only_test.dart | 16 + .../object_with_deprecated_fields_test.dart | 31 + .../test/order_test.dart | 42 + .../test/outer_composite_test.dart | 26 + .../test/outer_enum_default_value_test.dart | 9 + ...outer_enum_integer_default_value_test.dart | 9 + .../test/outer_enum_integer_test.dart | 9 + .../test/outer_enum_test.dart | 9 + .../outer_object_with_enum_property_test.dart | 16 + .../test/parent_with_nullable_test.dart | 21 + .../test/pet_api_test.dart | 92 + .../test/pet_test.dart | 42 + .../test/read_only_first_test.dart | 21 + .../test/single_ref_type_test.dart | 9 + .../test/special_model_name_test.dart | 16 + .../test/store_api_test.dart | 47 + .../test/tag_test.dart | 21 + ...rm_additional_properties_request_test.dart | 16 + .../test/user_api_test.dart | 83 + .../test/user_test.dart | 52 + .../dart2/petstore_client_lib/doc/Order.md | 4 +- .../dart2/petstore_client_lib/doc/Pet.md | 2 +- .../dart2/petstore_client_lib/doc/PetApi.md | 36 +- .../dart2/petstore_client_lib/doc/StoreApi.md | 16 +- .../dart2/petstore_client_lib/doc/User.md | 6 +- .../petstore_client_lib/lib/api/pet_api.dart | 56 +- .../lib/api/store_api.dart | 24 +- .../petstore_client_lib/lib/model/order.dart | 30 +- .../petstore_client_lib/lib/model/pet.dart | 14 +- .../petstore_client_lib/lib/model/user.dart | 44 +- .../dart2/petstore_client_lib_fake/README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../petstore_client_lib_fake/doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../dart2/petstore_client_lib_fake/doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../dart2/petstore_client_lib_fake/doc/Dog.md | 2 +- .../petstore_client_lib_fake/doc/EnumTest.md | 8 +- .../petstore_client_lib_fake/doc/FakeApi.md | 64 +- .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore_client_lib_fake/doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../petstore_client_lib_fake/doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../dart2/petstore_client_lib_fake/doc/Pet.md | 2 +- .../petstore_client_lib_fake/doc/PetApi.md | 52 +- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../petstore_client_lib_fake/doc/User.md | 6 +- .../lib/api/another_fake_api.dart | 12 +- .../lib/api/fake_api.dart | 98 +- .../lib/api/fake_classname_tags123_api.dart | 12 +- .../lib/api/pet_api.dart | 86 +- .../lib/model/all_of_with_single_ref.dart | 16 +- .../lib/model/animal.dart | 14 +- .../model/array_of_array_of_number_only.dart | 14 +- .../lib/model/array_of_number_only.dart | 14 +- .../lib/model/capitalization.dart | 58 +- .../lib/model/cat.dart | 14 +- .../lib/model/child_with_nullable.dart | 36 +- .../lib/model/dog.dart | 14 +- .../lib/model/enum_class.dart | 6 +- .../lib/model/enum_test.dart | 82 +- .../fake_big_decimal_map200_response.dart | 28 +- .../lib/model/format_test.dart | 16 +- .../lib/model/health_check_result.dart | 16 +- .../lib/model/map_test.dart | 6 +- ...rties_and_additional_properties_class.dart | 16 +- .../lib/model/model_file.dart | 16 +- .../lib/model/number_only.dart | 16 +- .../model/object_with_deprecated_fields.dart | 16 +- .../lib/model/order.dart | 30 +- .../lib/model/parent_with_nullable.dart | 22 +- .../lib/model/pet.dart | 14 +- .../lib/model/special_model_name.dart | 16 +- ...reeform_additional_properties_request.dart | 16 +- .../lib/model/user.dart | 44 +- .../.gitignore | 19 + .../.openapi-generator-ignore | 23 + .../.openapi-generator/FILES | 187 ++ .../.openapi-generator/VERSION | 1 + .../.travis.yml | 14 + .../README.md | 205 ++ .../analysis_options.yaml | 0 .../doc/AdditionalPropertiesClass.md | 16 + .../doc/AllOfWithSingleRef.md | 16 + .../doc/Animal.md | 16 + .../doc/AnotherFakeApi.md | 57 + .../doc/ApiResponse.md | 17 + .../doc/ArrayOfArrayOfNumberOnly.md | 15 + .../doc/ArrayOfNumberOnly.md | 15 + .../doc/ArrayTest.md | 17 + .../doc/Capitalization.md | 20 + .../doc/Cat.md | 17 + .../doc/Category.md | 16 + .../doc/ChildWithNullable.md | 17 + .../doc/ClassModel.md | 15 + .../doc/DefaultApi.md | 51 + .../doc/DeprecatedObject.md | 15 + .../doc/Dog.md | 17 + .../doc/EnumArrays.md | 16 + .../doc/EnumClass.md | 14 + .../doc/EnumTest.md | 22 + .../doc/FakeApi.md | 1034 ++++++++++ .../doc/FakeBigDecimalMap200Response.md | 16 + .../doc/FakeClassnameTags123Api.md | 61 + .../doc/FileSchemaTestClass.md | 16 + .../doc/Foo.md | 15 + .../doc/FooGetDefaultResponse.md | 15 + .../doc/FormatTest.md | 30 + .../doc/HasOnlyReadOnly.md | 16 + .../doc/HealthCheckResult.md | 15 + .../doc/MapTest.md | 18 + ...dPropertiesAndAdditionalPropertiesClass.md | 17 + .../doc/Model200Response.md | 16 + .../doc/ModelClient.md | 15 + .../doc/ModelFile.md | 15 + .../doc/ModelList.md | 15 + .../doc/ModelReturn.md | 15 + .../doc/Name.md | 18 + .../doc/NullableClass.md | 26 + .../doc/NumberOnly.md | 15 + .../doc/ObjectWithDeprecatedFields.md | 18 + .../doc/Order.md | 20 + .../doc/OuterComposite.md | 17 + .../doc/OuterEnum.md | 14 + .../doc/OuterEnumDefaultValue.md | 14 + .../doc/OuterEnumInteger.md | 14 + .../doc/OuterEnumIntegerDefaultValue.md | 14 + .../doc/OuterObjectWithEnumProperty.md | 15 + .../doc/ParentWithNullable.md | 16 + .../doc/Pet.md | 20 + .../doc/PetApi.md | 439 +++++ .../doc/ReadOnlyFirst.md | 16 + .../doc/SingleRefType.md | 14 + .../doc/SpecialModelName.md | 15 + .../doc/StoreApi.md | 188 ++ .../doc/Tag.md | 16 + ...lineFreeformAdditionalPropertiesRequest.md | 15 + .../doc/User.md | 22 + .../doc/UserApi.md | 359 ++++ .../git_push.sh | 57 + .../lib/api.dart | 103 + .../lib/api/another_fake_api.dart | 76 + .../lib/api/default_api.dart | 59 + .../lib/api/fake_api.dart | 1411 ++++++++++++++ .../lib/api/fake_classname_tags123_api.dart | 76 + .../lib/api/pet_api.dart | 601 ++++++ .../lib/api/store_api.dart | 234 +++ .../lib/api/user_api.dart | 442 +++++ .../lib/api_client.dart | 356 ++++ .../lib/api_exception.dart | 33 + .../lib/api_helper.dart | 122 ++ .../lib/auth/api_key_auth.dart | 40 + .../lib/auth/authentication.dart | 17 + .../lib/auth/http_basic_auth.dart | 26 + .../lib/auth/http_bearer_auth.dart | 49 + .../lib/auth/oauth.dart | 24 + .../model/additional_properties_class.dart | 115 ++ .../lib/model/all_of_with_single_ref.dart | 135 ++ .../lib/model/animal.dart | 116 ++ .../lib/model/api_response.dart | 152 ++ .../model/array_of_array_of_number_only.dart | 112 ++ .../lib/model/array_of_number_only.dart | 110 ++ .../lib/model/array_test.dart | 132 ++ .../lib/model/capitalization.dart | 204 ++ .../lib/model/cat.dart | 133 ++ .../lib/model/category.dart | 126 ++ .../lib/model/child_with_nullable.dart | 211 ++ .../lib/model/class_model.dart | 118 ++ .../lib/model/deprecated_object.dart | 118 ++ .../lib/model/dog.dart | 133 ++ .../lib/model/enum_arrays.dart | 267 +++ .../lib/model/enum_class.dart | 88 + .../lib/model/enum_test.dart | 506 +++++ .../fake_big_decimal_map200_response.dart | 125 ++ .../lib/model/file_schema_test_class.dart | 125 ++ .../lib/model/foo.dart | 108 ++ .../lib/model/foo_get_default_response.dart | 118 ++ .../lib/model/format_test.dart | 349 ++++ .../lib/model/has_only_read_only.dart | 135 ++ .../lib/model/health_check_result.dart | 112 ++ .../lib/model/map_test.dart | 203 ++ ...rties_and_additional_properties_class.dart | 142 ++ .../lib/model/model200_response.dart | 135 ++ .../lib/model/model_client.dart | 118 ++ .../lib/model/model_file.dart | 119 ++ .../lib/model/model_list.dart | 118 ++ .../lib/model/model_return.dart | 118 ++ .../lib/model/name.dart | 160 ++ .../lib/model/nullable_class.dart | 227 +++ .../lib/model/number_only.dart | 118 ++ .../model/object_with_deprecated_fields.dart | 161 ++ .../lib/model/order.dart | 265 +++ .../lib/model/outer_composite.dart | 152 ++ .../lib/model/outer_enum.dart | 88 + .../lib/model/outer_enum_default_value.dart | 88 + .../lib/model/outer_enum_integer.dart | 88 + .../outer_enum_integer_default_value.dart | 88 + .../outer_object_with_enum_property.dart | 109 ++ .../lib/model/parent_with_nullable.dart | 194 ++ .../lib/model/pet.dart | 249 +++ .../lib/model/read_only_first.dart | 135 ++ .../lib/model/single_ref_type.dart | 85 + .../lib/model/special_model_name.dart | 118 ++ .../lib/model/tag.dart | 135 ++ ...reeform_additional_properties_request.dart | 118 ++ .../lib/model/user.dart | 238 +++ .../pubspec.yaml | 17 + .../additional_properties_class_test.dart | 32 + .../test/all_of_with_single_ref_test.dart | 32 + .../test/animal_test.dart | 32 + .../test/another_fake_api_test.dart | 30 + .../test/api_response_test.dart | 37 + .../array_of_array_of_number_only_test.dart | 27 + .../test/array_of_number_only_test.dart | 27 + .../test/array_test_test.dart | 37 + .../test/capitalization_test.dart | 53 + .../test/cat_test.dart | 37 + .../test/category_test.dart | 32 + .../test/child_with_nullable_test.dart | 37 + .../test/class_model_test.dart | 27 + .../test/default_api_test.dart | 26 + .../test/deprecated_object_test.dart | 27 + .../test/dog_test.dart | 37 + .../test/enum_arrays_test.dart | 32 + .../test/enum_class_test.dart | 21 + .../test/enum_test_test.dart | 62 + .../test/fake_api_test.dart | 193 ++ ...fake_big_decimal_map200_response_test.dart | 32 + .../test/fake_classname_tags123_api_test.dart | 30 + .../test/file_schema_test_class_test.dart | 32 + .../test/foo_get_default_response_test.dart | 27 + .../test/foo_test.dart | 27 + .../test/format_test_test.dart | 104 + .../test/has_only_read_only_test.dart | 32 + .../test/health_check_result_test.dart | 27 + .../test/map_test_test.dart | 42 + ..._and_additional_properties_class_test.dart | 37 + .../test/model200_response_test.dart | 32 + .../test/model_client_test.dart | 27 + .../test/model_file_test.dart | 28 + .../test/model_list_test.dart | 27 + .../test/model_return_test.dart | 27 + .../test/name_test.dart | 42 + .../test/nullable_class_test.dart | 82 + .../test/number_only_test.dart | 27 + .../object_with_deprecated_fields_test.dart | 42 + .../test/order_test.dart | 53 + .../test/outer_composite_test.dart | 37 + .../test/outer_enum_default_value_test.dart | 21 + ...outer_enum_integer_default_value_test.dart | 21 + .../test/outer_enum_integer_test.dart | 21 + .../test/outer_enum_test.dart | 21 + .../outer_object_with_enum_property_test.dart | 27 + .../test/parent_with_nullable_test.dart | 32 + .../test/pet_api_test.dart | 102 + .../test/pet_test.dart | 53 + .../test/read_only_first_test.dart | 32 + .../test/single_ref_type_test.dart | 21 + .../test/special_model_name_test.dart | 27 + .../test/store_api_test.dart | 57 + .../test/tag_test.dart | 32 + ...rm_additional_properties_request_test.dart | 27 + .../test/user_api_test.dart | 93 + .../test/user_test.dart | 63 + 583 files changed, 32365 insertions(+), 1621 deletions(-) create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.gitignore create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/analysis_options.yaml create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/build.yaml create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Category.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Foo.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MapTest.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelEnumClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelList.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Name.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Tag.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/UserApi.md create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/openapi.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/default_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/store_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/user_api.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/api_key_auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/basic_auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/bearer_auth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/oauth.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/deserialize.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/additional_properties_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/api_response.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/category.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/class_model.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/deprecated_object.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_arrays.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/file_schema_test_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo_get_default_response.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/has_only_read_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/map_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model200_response.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_client.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_list.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_return.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/name.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/nullable_class.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_composite.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_default_value.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer_default_value.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_object_with_enum_property.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/read_only_first.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/single_ref_type.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/tag.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/pubspec.yaml create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/animal_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/cat_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/category_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/dog_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_enum_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/name_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/order_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/tag_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.gitignore create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.travis.yml create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/analysis_options.yaml create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Category.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumClass.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Foo.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MapTest.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelList.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Name.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Tag.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/UserApi.md create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/git_push.sh create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/default_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/store_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/user_api.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_client.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_exception.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_helper.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/api_key_auth.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/authentication.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_basic_auth.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_bearer_auth.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/oauth.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/additional_properties_class.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/api_response.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/category.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/class_model.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/deprecated_object.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_arrays.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/file_schema_test_class.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo_get_default_response.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/has_only_read_only.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/map_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model200_response.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_client.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_list.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_return.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/name.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/nullable_class.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_composite.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_default_value.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer_default_value.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_object_with_enum_property.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/read_only_first.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/single_ref_type.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/tag.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/pubspec.yaml create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/animal_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/cat_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/category_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/dog_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/name_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/order_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/tag_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart create mode 100644 samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_test.dart diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md index 7178005ffbe0..6fb7317f863a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md @@ -49,10 +49,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getBarApi(); -final BarCreate barCreate = ; // BarCreate | +final BarCreate barcreate = ; // BarCreate | try { - final response = await api.createBar(barCreate); + final response = await api.createBar(barcreate); print(response); } catch on DioException (e) { print("Exception when calling BarApi->createBar: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md index 4cccc863a489..6ca4a8971575 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md @@ -9,12 +9,12 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**barPropA** | **String** | | [optional] -**fooPropB** | **String** | | [optional] +**barpropa** | **String** | | [optional] +**foopropb** | **String** | | [optional] **foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional] **href** | **String** | Hyperlink reference | [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] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md index a6f23c00210c..fc31bb2aa1a5 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **createBar** -> Bar createBar(barCreate) +> Bar createBar(barcreate) Create a Bar @@ -22,10 +22,10 @@ Create a Bar import 'package:openapi/api.dart'; final api = Openapi().getBarApi(); -final BarCreate barCreate = ; // BarCreate | +final BarCreate barcreate = ; // BarCreate | try { - final response = api.createBar(barCreate); + final response = api.createBar(barcreate); print(response); } catch on DioException (e) { print('Exception when calling BarApi->createBar: $e\n'); @@ -36,7 +36,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **barCreate** | [**BarCreate**](BarCreate.md)| | + **barcreate** | [**BarCreate**](BarCreate.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md index c0b4ba6edc9a..70a8b1494160 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md @@ -8,13 +8,13 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**barPropA** | **String** | | [optional] -**fooPropB** | **String** | | [optional] +**barpropa** | **String** | | [optional] +**foopropb** | **String** | | [optional] **foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md index cab0e7e57386..ca33215df45b 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md @@ -9,11 +9,11 @@ import 'package:openapi/api.dart'; 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] +**atReferredtype** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md index f88727e11aa8..3b18db86bd48 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md @@ -9,15 +9,15 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | unique identifier | -**barPropA** | **String** | | [optional] -**fooPropB** | **String** | | [optional] +**barpropa** | **String** | | [optional] +**foopropb** | **String** | | [optional] **foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional] **href** | **String** | Hyperlink reference | [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] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **name** | **String** | Name of the related entity. | [optional] -**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] +**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) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md index 5ba2144b44fe..22723a0bf7c7 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md index 80eae55f4145..4cb29d7527a1 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md @@ -9,11 +9,11 @@ import 'package:openapi/api.dart'; 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] +**atReferredtype** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md index 7a781e578ea4..d0e7caf9cf19 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**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] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md index 2627691fefe5..81ffbcbc751d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fooPropA** | **String** | | [optional] -**fooPropB** | **String** | | [optional] +**foopropa** | **String** | | [optional] +**foopropb** | **String** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md index bfa62bd4f54b..009f3cffed25 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md @@ -8,13 +8,13 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**foorefPropA** | **String** | | [optional] +**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] +**atReferredtype** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md index 9bc8dec10571..ce104c12ede0 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md @@ -8,16 +8,16 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fooPropA** | **String** | | [optional] -**fooPropB** | **String** | | [optional] +**foopropa** | **String** | | [optional] +**foopropb** | **String** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | -**foorefPropA** | **String** | | [optional] +**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] +**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) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md index 91c1f1cf9b55..ebba72bb5827 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fruitType** | [**FruitType**](FruitType.md) | | +**fruittype** | [**FruitType**](FruitType.md) | | **seeds** | **int** | | **length** | **int** | | diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md index 034ff420d323..ba936d6869cc 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **vendor** | **String** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md index e4b040a6a79c..0041f71da652 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md @@ -8,11 +8,11 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pizzaSize** | **num** | | [optional] +**pizzasize** | **num** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md index 4e3800773dca..7802c2184f28 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md @@ -9,11 +9,11 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **toppings** | **String** | | [optional] -**pizzaSize** | **num** | | [optional] +**pizzasize** | **num** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart index 50e9bfbc2e9f..805758092035 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart @@ -23,7 +23,7 @@ class BarApi { /// /// /// Parameters: - /// * [barCreate] + /// * [barcreate] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -34,7 +34,7 @@ class BarApi { /// Returns a [Future] containing a [Response] with a [Bar] as data /// Throws [DioException] if API call or serialization fails Future> createBar({ - required BarCreate barCreate, + required BarCreate barcreate, CancelToken? cancelToken, Map? headers, Map? extra, @@ -60,7 +60,7 @@ class BarApi { try { const _type = FullType(BarCreate); - _bodyData = _serializers.serialize(barCreate, specifiedType: _type); + _bodyData = _serializers.serialize(barcreate, specifiedType: _type); } catch(error, stackTrace) { throw DioException( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart index cb769550b4f2..5ee715b3b206 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart @@ -14,23 +14,23 @@ part 'bar.g.dart'; /// /// Properties: /// * [id] -/// * [barPropA] -/// * [fooPropB] +/// * [barpropa] +/// * [foopropb] /// * [foo] /// * [href] - Hyperlink reference -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class Bar implements Entity, Built { @BuiltValueField(wireName: r'foo') FooRefOrValue? get foo; - @BuiltValueField(wireName: r'fooPropB') - String? get fooPropB; - @BuiltValueField(wireName: r'barPropA') - String? get barPropA; + String? get barpropa; + + @BuiltValueField(wireName: r'fooPropB') + String? get foopropb; Bar._(); @@ -55,10 +55,10 @@ class _$BarSerializer implements PrimitiveSerializer { Bar object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } @@ -69,31 +69,38 @@ class _$BarSerializer implements PrimitiveSerializer { specifiedType: const FullType(FooRefOrValue), ); } - if (object.atBaseType != null) { - yield r'@baseType'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atBaseType, + object.href, specifiedType: const FullType(String), ); } - if (object.fooPropB != null) { - yield r'fooPropB'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.fooPropB, + object.id, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.barpropa != null) { + yield r'barPropA'; yield serializers.serialize( - object.href, + object.barpropa, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.foopropb != null) { + yield r'fooPropB'; yield serializers.serialize( - object.id, + object.foopropb, + specifiedType: const FullType(String), + ); + } + if (object.atBasetype != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBasetype, specifiedType: const FullType(String), ); } @@ -102,13 +109,6 @@ class _$BarSerializer implements PrimitiveSerializer { object.atType, specifiedType: const FullType(String), ); - if (object.barPropA != null) { - yield r'barPropA'; - yield serializers.serialize( - object.barPropA, - specifiedType: const FullType(String), - ); - } } @override @@ -137,7 +137,7 @@ class _$BarSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; case r'foo': final valueDes = serializers.deserialize( @@ -146,47 +146,47 @@ class _$BarSerializer implements PrimitiveSerializer { ) as FooRefOrValue; result.foo.replace(valueDes); break; - case r'@baseType': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.href = valueDes; break; - case r'fooPropB': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.fooPropB = valueDes; + result.id = valueDes; break; - case r'href': + case r'barPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.barpropa = valueDes; break; - case r'id': + case r'fooPropB': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.foopropb = valueDes; break; - case r'@type': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atType = valueDes; + result.atBasetype = valueDes; break; - case r'barPropA': + case r'@type': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.barPropA = valueDes; + result.atType = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart index 8942b6433f5e..dd2246bc8fbd 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart @@ -13,24 +13,24 @@ part 'bar_create.g.dart'; /// BarCreate /// /// Properties: -/// * [barPropA] -/// * [fooPropB] +/// * [barpropa] +/// * [foopropb] /// * [foo] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class BarCreate implements Entity, Built { @BuiltValueField(wireName: r'foo') FooRefOrValue? get foo; - @BuiltValueField(wireName: r'fooPropB') - String? get fooPropB; - @BuiltValueField(wireName: r'barPropA') - String? get barPropA; + String? get barpropa; + + @BuiltValueField(wireName: r'fooPropB') + String? get foopropb; BarCreate._(); @@ -55,10 +55,10 @@ class _$BarCreateSerializer implements PrimitiveSerializer { BarCreate object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } @@ -69,31 +69,38 @@ class _$BarCreateSerializer implements PrimitiveSerializer { specifiedType: const FullType(FooRefOrValue), ); } - if (object.atBaseType != null) { - yield r'@baseType'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atBaseType, + object.href, specifiedType: const FullType(String), ); } - if (object.fooPropB != null) { - yield r'fooPropB'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.fooPropB, + object.id, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.barpropa != null) { + yield r'barPropA'; yield serializers.serialize( - object.href, + object.barpropa, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.foopropb != null) { + yield r'fooPropB'; yield serializers.serialize( - object.id, + object.foopropb, + specifiedType: const FullType(String), + ); + } + if (object.atBasetype != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBasetype, specifiedType: const FullType(String), ); } @@ -102,13 +109,6 @@ class _$BarCreateSerializer implements PrimitiveSerializer { object.atType, specifiedType: const FullType(String), ); - if (object.barPropA != null) { - yield r'barPropA'; - yield serializers.serialize( - object.barPropA, - specifiedType: const FullType(String), - ); - } } @override @@ -137,7 +137,7 @@ class _$BarCreateSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; case r'foo': final valueDes = serializers.deserialize( @@ -146,47 +146,47 @@ class _$BarCreateSerializer implements PrimitiveSerializer { ) as FooRefOrValue; result.foo.replace(valueDes); break; - case r'@baseType': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.href = valueDes; break; - case r'fooPropB': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.fooPropB = valueDes; + result.id = valueDes; break; - case r'href': + case r'barPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.barpropa = valueDes; break; - case r'id': + case r'fooPropB': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.foopropb = valueDes; break; - case r'@type': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atType = valueDes; + result.atBasetype = valueDes; break; - case r'barPropA': + case r'@type': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.barPropA = valueDes; + result.atType = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart index 98f0724b35d2..c9e3517665f1 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart @@ -13,11 +13,11 @@ part 'bar_ref.g.dart'; /// /// Properties: /// * [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. /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class BarRef implements EntityRef, Built { @@ -44,17 +44,17 @@ class _$BarRefSerializer implements PrimitiveSerializer { BarRef object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.atReferredType != null) { + if (object.atReferredtype != null) { yield r'@referredType'; yield serializers.serialize( - object.atReferredType, + object.atReferredtype, specifiedType: const FullType(String), ); } @@ -65,13 +65,6 @@ class _$BarRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBaseType, - specifiedType: const FullType(String), - ); - } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -86,6 +79,13 @@ class _$BarRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBasetype != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBasetype, + specifiedType: const FullType(String), + ); + } yield r'@type'; yield serializers.serialize( object.atType, @@ -119,14 +119,14 @@ class _$BarRefSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atReferredType = valueDes; + result.atReferredtype = valueDes; break; case r'name': final valueDes = serializers.deserialize( @@ -135,26 +135,26 @@ class _$BarRefSerializer implements PrimitiveSerializer { ) as String; result.name = valueDes; break; - case r'@baseType': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.href = valueDes; break; - case r'href': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.id = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart index f880cb557955..89f5e4b39cb7 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart @@ -16,15 +16,15 @@ part 'bar_ref_or_value.g.dart'; /// /// Properties: /// * [id] - unique identifier -/// * [barPropA] -/// * [fooPropB] +/// * [barpropa] +/// * [foopropb] /// * [foo] /// * [href] - Hyperlink reference -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [name] - Name of the related entity. -/// * [atReferredType] - The actual type of the target instance when needed for disambiguation. +/// * [atReferredtype] - The actual type of the target instance when needed for disambiguation. @BuiltValue() abstract class BarRefOrValue implements Built { /// One Of [Bar], [BarRef] diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart index 7e27fab47387..ddf9abda5789 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart @@ -21,8 +21,8 @@ part 'entity.g.dart'; /// Properties: /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Entity implements Addressable, Extensible { @@ -100,31 +100,31 @@ class _$EntitySerializer implements PrimitiveSerializer { Entity object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { - yield r'@schemaLocation'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atSchemaLocation, + object.href, specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBaseType, + object.id, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.atSchemalocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.href, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBasetype != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBasetype, specifiedType: const FullType(String), ); } @@ -232,33 +232,33 @@ class _$$EntitySerializer implements PrimitiveSerializer<$Entity> { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'@schemaLocation': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.id = valueDes; break; - case r'href': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atSchemalocation = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart index 7502c94dd7f3..705967fe0068 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart @@ -16,17 +16,17 @@ part 'entity_ref.g.dart'; /// /// Properties: /// * [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. /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class EntityRef implements Addressable, Extensible { /// The actual type of the target instance when needed for disambiguation. @BuiltValueField(wireName: r'@referredType') - String? get atReferredType; + String? get atReferredtype; /// Name of the related entity. @BuiltValueField(wireName: r'name') @@ -78,17 +78,17 @@ class _$EntityRefSerializer implements PrimitiveSerializer { EntityRef object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { - yield r'@schemaLocation'; + if (object.atReferredtype != null) { + yield r'@referredType'; yield serializers.serialize( - object.atSchemaLocation, + object.atReferredtype, specifiedType: const FullType(String), ); } - if (object.atReferredType != null) { - yield r'@referredType'; + if (object.atSchemalocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.atReferredType, + object.atSchemalocation, specifiedType: const FullType(String), ); } @@ -99,13 +99,6 @@ class _$EntityRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBaseType, - specifiedType: const FullType(String), - ); - } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -120,6 +113,13 @@ class _$EntityRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBasetype != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBasetype, + specifiedType: const FullType(String), + ); + } yield r'@type'; yield serializers.serialize( object.atType, @@ -204,19 +204,19 @@ class _$$EntityRefSerializer implements PrimitiveSerializer<$EntityRef> { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'@schemaLocation': + case r'@referredType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atReferredtype = valueDes; break; - case r'@referredType': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atReferredType = valueDes; + result.atSchemalocation = valueDes; break; case r'name': final valueDes = serializers.deserialize( @@ -225,26 +225,26 @@ class _$$EntityRefSerializer implements PrimitiveSerializer<$EntityRef> { ) as String; result.name = valueDes; break; - case r'@baseType': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.href = valueDes; break; - case r'href': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.id = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart index 2423fb276412..ce9bc5ee0d9d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart @@ -11,18 +11,18 @@ part 'extensible.g.dart'; /// Extensible /// /// Properties: -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Extensible { /// A URI to a JSON-Schema file that defines additional attributes and relationships @BuiltValueField(wireName: r'@schemaLocation') - String? get atSchemaLocation; + String? get atSchemalocation; /// When sub-classing, this defines the super-class @BuiltValueField(wireName: r'@baseType') - String? get atBaseType; + String? get atBasetype; /// When sub-classing, this defines the sub-class Extensible name @BuiltValueField(wireName: r'@type') @@ -44,17 +44,17 @@ class _$ExtensibleSerializer implements PrimitiveSerializer { Extensible object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { + if (object.atBasetype != null) { yield r'@baseType'; yield serializers.serialize( - object.atBaseType, + object.atBasetype, specifiedType: const FullType(String), ); } @@ -131,14 +131,14 @@ class _$$ExtensibleSerializer implements PrimitiveSerializer<$Extensible> { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart index d2e1f5817f20..4ca53742c0c0 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart @@ -12,20 +12,20 @@ part 'foo.g.dart'; /// Foo /// /// Properties: -/// * [fooPropA] -/// * [fooPropB] +/// * [foopropa] +/// * [foopropb] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class Foo implements Entity, Built { - @BuiltValueField(wireName: r'fooPropA') - String? get fooPropA; - @BuiltValueField(wireName: r'fooPropB') - String? get fooPropB; + String? get foopropb; + + @BuiltValueField(wireName: r'fooPropA') + String? get foopropa; Foo._(); @@ -50,45 +50,45 @@ class _$FooSerializer implements PrimitiveSerializer { Foo object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.fooPropA != null) { - yield r'fooPropA'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.fooPropA, + object.href, specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBaseType, + object.id, specifiedType: const FullType(String), ); } - if (object.fooPropB != null) { + if (object.foopropb != null) { yield r'fooPropB'; yield serializers.serialize( - object.fooPropB, + object.foopropb, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.foopropa != null) { + yield r'fooPropA'; yield serializers.serialize( - object.href, + object.foopropa, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBasetype != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBasetype, specifiedType: const FullType(String), ); } @@ -125,42 +125,42 @@ class _$FooSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; - case r'fooPropA': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.fooPropA = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.id = valueDes; break; case r'fooPropB': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.fooPropB = valueDes; + result.foopropb = valueDes; break; - case r'href': + case r'fooPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.foopropa = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart index 3f032ee8e08f..8dd4ee834008 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart @@ -12,18 +12,18 @@ part 'foo_ref.g.dart'; /// FooRef /// /// Properties: -/// * [foorefPropA] +/// * [foorefpropa] /// * [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. /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class FooRef implements EntityRef, Built { @BuiltValueField(wireName: r'foorefPropA') - String? get foorefPropA; + String? get foorefpropa; FooRef._(); @@ -48,24 +48,17 @@ class _$FooRefSerializer implements PrimitiveSerializer { FooRef object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.atReferredType != null) { + if (object.atReferredtype != null) { yield r'@referredType'; yield serializers.serialize( - object.atReferredType, - specifiedType: const FullType(String), - ); - } - if (object.foorefPropA != null) { - yield r'foorefPropA'; - yield serializers.serialize( - object.foorefPropA, + object.atReferredtype, specifiedType: const FullType(String), ); } @@ -76,13 +69,6 @@ class _$FooRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBaseType, - specifiedType: const FullType(String), - ); - } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -97,6 +83,20 @@ class _$FooRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.foorefpropa != null) { + yield r'foorefPropA'; + yield serializers.serialize( + object.foorefpropa, + specifiedType: const FullType(String), + ); + } + if (object.atBasetype != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBasetype, + specifiedType: const FullType(String), + ); + } yield r'@type'; yield serializers.serialize( object.atType, @@ -130,49 +130,49 @@ class _$FooRefSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atReferredType = valueDes; + result.atReferredtype = valueDes; break; - case r'foorefPropA': + case r'name': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.foorefPropA = valueDes; + result.name = valueDes; break; - case r'name': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.name = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.id = valueDes; break; - case r'href': + case r'foorefPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.foorefpropa = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart index d8164c5b9073..c5c3710da771 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart @@ -14,16 +14,16 @@ part 'foo_ref_or_value.g.dart'; /// FooRefOrValue /// /// Properties: -/// * [fooPropA] -/// * [fooPropB] +/// * [foopropa] +/// * [foopropb] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name -/// * [foorefPropA] +/// * [foorefpropa] /// * [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() abstract class FooRefOrValue implements Built { /// One Of [Foo], [FooRef] diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart index 31b61361de5e..7f8ec3b4637d 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart @@ -15,14 +15,14 @@ part 'fruit.g.dart'; /// Fruit /// /// Properties: -/// * [fruitType] +/// * [fruittype] /// * [seeds] /// * [length] @BuiltValue() abstract class Fruit implements Built { @BuiltValueField(wireName: r'fruitType') - FruitType get fruitType; - // enum fruitTypeEnum { APPLE, BANANA, }; + FruitType get fruittype; + // enum fruittypeEnum { APPLE, BANANA, }; /// One Of [Apple], [Banana] OneOf get oneOf; @@ -82,7 +82,7 @@ class _$FruitSerializer implements PrimitiveSerializer { }) sync* { yield r'fruitType'; yield serializers.serialize( - object.fruitType, + object.fruittype, specifiedType: const FullType(FruitType), ); } @@ -116,7 +116,7 @@ class _$FruitSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(FruitType), ) as FruitType; - result.fruitType = valueDes; + result.fruittype = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart index 3985f198fd0a..85b674977c15 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart @@ -12,9 +12,9 @@ part 'fruit_type.g.dart'; class FruitType extends EnumClass { @BuiltValueEnumConst(wireName: r'APPLE') - static const FruitType APPLE = _$APPLE; + static const FruitType apple = _$apple; @BuiltValueEnumConst(wireName: r'BANANA') - static const FruitType BANANA = _$BANANA; + static const FruitType banana = _$banana; @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) static const FruitType unknownDefaultOpenApi = _$unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart index e8b1ebdf31ea..4acab0087fd4 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart @@ -15,8 +15,8 @@ part 'pasta.g.dart'; /// * [vendor] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class Pasta implements Entity, Built { @@ -46,31 +46,31 @@ class _$PastaSerializer implements PrimitiveSerializer { Pasta object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { - yield r'@schemaLocation'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atSchemaLocation, + object.href, specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBaseType, + object.id, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.atSchemalocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.href, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBasetype != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBasetype, specifiedType: const FullType(String), ); } @@ -109,33 +109,33 @@ class _$PastaSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'@schemaLocation': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.id = valueDes; break; - case r'href': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atSchemalocation = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart index 14c06db06d7e..3c252a6e9f3a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart @@ -13,16 +13,16 @@ part 'pizza.g.dart'; /// Pizza /// /// Properties: -/// * [pizzaSize] +/// * [pizzasize] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Pizza implements Entity { @BuiltValueField(wireName: r'pizzaSize') - num? get pizzaSize; + num? get pizzasize; static const String discriminatorFieldName = r'@type'; @@ -63,38 +63,38 @@ class _$PizzaSerializer implements PrimitiveSerializer { Pizza object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.pizzaSize != null) { + if (object.pizzasize != null) { yield r'pizzaSize'; yield serializers.serialize( - object.pizzaSize, + object.pizzasize, specifiedType: const FullType(num), ); } - if (object.atSchemaLocation != null) { - yield r'@schemaLocation'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atSchemaLocation, + object.href, specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBaseType, + object.id, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.atSchemalocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.href, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBasetype != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBasetype, specifiedType: const FullType(String), ); } @@ -182,35 +182,35 @@ class _$$PizzaSerializer implements PrimitiveSerializer<$Pizza> { value, specifiedType: const FullType(num), ) as num; - result.pizzaSize = valueDes; + result.pizzasize = valueDes; break; - case r'@schemaLocation': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.id = valueDes; break; - case r'href': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atSchemalocation = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart index 73a2295df9ba..8d47467e1d7c 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart @@ -13,11 +13,11 @@ part 'pizza_speziale.g.dart'; /// /// Properties: /// * [toppings] -/// * [pizzaSize] +/// * [pizzasize] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBaseType] - When sub-classing, this defines the super-class +/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBasetype] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class PizzaSpeziale implements Pizza, Built { @@ -47,17 +47,17 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { PizzaSpeziale object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemaLocation != null) { + if (object.atSchemalocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemaLocation, + object.atSchemalocation, specifiedType: const FullType(String), ); } - if (object.pizzaSize != null) { + if (object.pizzasize != null) { yield r'pizzaSize'; yield serializers.serialize( - object.pizzaSize, + object.pizzasize, specifiedType: const FullType(num), ); } @@ -68,13 +68,6 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBaseType != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBaseType, - specifiedType: const FullType(String), - ); - } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -89,6 +82,13 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBasetype != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBasetype, + specifiedType: const FullType(String), + ); + } yield r'@type'; yield serializers.serialize( object.atType, @@ -122,14 +122,14 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemaLocation = valueDes; + result.atSchemalocation = valueDes; break; case r'pizzaSize': final valueDes = serializers.deserialize( value, specifiedType: const FullType(num), ) as num; - result.pizzaSize = valueDes; + result.pizzasize = valueDes; break; case r'toppings': final valueDes = serializers.deserialize( @@ -138,26 +138,26 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { ) as String; result.toppings = valueDes; break; - case r'@baseType': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBaseType = valueDes; + result.href = valueDes; break; - case r'href': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.id = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBasetype = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md index 5a5211d271a0..d8a08b3c2a79 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md @@ -49,10 +49,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = await api.call123testSpecialTags(modelClient); + final response = await api.call123testSpecialTags(modelclient); print(response); } catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md index 4c6f3ab2fe11..151142162f62 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singlereftype** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md index 415b56e9bc2e..570de2e45be3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md index 36a94e6bb703..1ed2cb04d8f3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelClient) +> ModelClient call123testSpecialTags(modelclient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = api.call123testSpecialTags(modelClient); + final response = api.call123testSpecialTags(modelclient); print(response); } catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md index e5b9d669a436..a1c3e86e055e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayArrayNumber** | [**List<List<num>>**](List.md) | | [optional] +**arrayarraynumber** | [**List<List<num>>**](List.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md index fe8e071eb45c..184bc6962f85 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayNumber** | **List<num>** | | [optional] +**arraynumber** | **List<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md index 4a07b4eb820d..e673e7baef4b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] +**smallcamel** | **String** | | [optional] +**capitalcamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +**scaEthFlowPoints** | **String** | | [optional] +**attName** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md index 6552eea4b435..9c557ac9082a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md index 770494fcf4cc..54b310b0f58d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] -**otherProperty** | **String** | | [optional] +**nullableproperty** | **String** | | [optional] +**otherproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md index d36439b767bb..b2ba3dfcef59 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md index 7c24fe2347b4..f1b0758b868e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md index 1b5e1ca297c8..14e13ea83e5f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outerComposite) +> OuterComposite fakeOuterCompositeSerialize(outercomposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body +final OuterComposite outercomposite = ; // OuterComposite | Input composite as post body try { - final response = api.fakeOuterCompositeSerialize(outerComposite); + final response = api.fakeOuterCompositeSerialize(outercomposite); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body +final OuterObjectWithEnumProperty outerobjectwithenumproperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + final response = api.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileSchemaTestClass) +> testBodyWithFileSchema(fileschematestclass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | +final FileSchemaTestClass fileschematestclass = ; // FileSchemaTestClass | try { - api.testBodyWithFileSchema(fileSchemaTestClass); + api.testBodyWithFileSchema(fileschematestclass); } catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelClient) +> ModelClient testClientModel(modelclient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = api.testClientModel(modelClient); + final response = api.testClientModel(modelclient); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final double float = 3.4; // double | None final String string = string_example; // String | None final MultipartFile binary = BINARY_DATA_HERE; // MultipartFile | None final DateTime date = 2013-10-20; // DateTime | None -final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None +final DateTime datetime = 2013-10-20T19:20:30+01:00; // DateTime | None final String password = password_example; // String | None final String callback = callback_example; // String | None try { - api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); } catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **MultipartFile**| None | [optional] **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **datetime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -803,7 +803,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) +> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) test inline free-form additionalProperties @@ -814,10 +814,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body +final TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); + api.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); } catch on DioException (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -827,7 +827,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -889,7 +889,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childWithNullable) +> testNullable(childwithnullable) test nullable parent property @@ -900,10 +900,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body +final ChildWithNullable childwithnullable = ; // ChildWithNullable | request body try { - api.testNullable(childWithNullable); + api.testNullable(childwithnullable); } catch on DioException (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -913,7 +913,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -931,7 +931,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) @@ -947,11 +947,11 @@ final List ioutil = ; // List | final List http = ; // List | final List url = ; // List | final List context = ; // List | -final String allowEmpty = allowEmpty_example; // String | +final String allowempty = allowempty_example; // String | final Map language = ; // Map | try { - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); } catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -966,7 +966,7 @@ Name | Type | Description | Notes **http** | [**List<String>**](String.md)| | **url** | [**List<String>**](String.md)| | **context** | [**List<String>**](String.md)| | - **allowEmpty** | **String**| | + **allowempty** | **String**| | **language** | [**Map<String, String>**](String.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md index 281dfc44fd8c..d01fd4973470 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someId** | **num** | | [optional] -**someMap** | **Map<String, num>** | | [optional] +**someid** | **num** | | [optional] +**somemap** | **Map<String, 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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md index 645aebf399f0..88a70afff0f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelClient) +> ModelClient testClassname(modelclient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api = Openapi().getFakeClassnameTags123Api(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = api.testClassname(modelClient); + final response = api.testClassname(modelclient); print(response); } catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md index 83b60545eb61..a25a61c53343 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | -**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md index 4d6aeb75d965..c912fb2e08f4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] +**nullablemessage** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md index 66d0d39c42be..e9a76c258000 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**Map<String, Animal>**](Animal.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md index 4be260e93f6e..d54b1bbbea04 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +**sourceuri** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md index d8096a3db37a..f5fac6f8a17c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justNumber** | **num** | | [optional] +**justnumber** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md index dda2836d8d54..9ba7fdf6634f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **List<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md index bde5ffe51a2c..08914a83f300 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petId** | **int** | | [optional] +**petid** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] +**shipdate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md index 17aa5ca02941..435464987052 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] +**nullableproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md index 3cd230bfb213..c6183f8d49d1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photoUrls** | **Set<String>** | | +**photourls** | **Set<String>** | | **tags** | [**List<Tag>**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md index 5fc7fbd2657f..3dc820b749b5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petId, apiKey) +> deletePet(petid, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | Pet id to delete +final int petid = 789; // int | Pet id to delete final String apiKey = apiKey_example; // String | try { - api.deletePet(petId, apiKey); + api.deletePet(petid, apiKey); } catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| Pet id to delete | + **petid** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petId) +> Pet getPetById(petid) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to return +final int petid = 789; // int | ID of pet to return try { - final response = api.getPetById(petId); + final response = api.getPetById(petid); print(response); } catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to return | + **petid** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petId, name, status) +> updatePetWithForm(petid, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet that needs to be updated +final int petid = 789; // int | ID of pet that needs to be updated final String name = name_example; // String | Updated name of the pet final String status = status_example; // String | Updated status of the pet try { - api.updatePetWithForm(petId, name, status); + api.updatePetWithForm(petid, name, status); } catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet that needs to be updated | + **petid** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petId, additionalMetadata, file) +> ApiResponse uploadFile(petid, additionalmetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to update -final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final int petid = 789; // int | ID of pet to update +final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final response = api.uploadFile(petId, additionalMetadata, file); + final response = api.uploadFile(petid, additionalmetadata, file); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) +> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to update -final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload -final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final int petid = 789; // int | ID of pet to update +final MultipartFile requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server try { - final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + final response = api.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **requiredFile** | **MultipartFile**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **requiredfile** | **MultipartFile**| file to upload | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md index 5fcfa98e0b36..04697c8e6225 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [optional] +**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md index e2b2f1fd4468..894a3e60ee31 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProperty** | **String** | | [optional] +**someproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md index fa87e64d8595..37aa8c50230e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] +**firstname** | **String** | | [optional] +**lastname** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userStatus** | **int** | User Status | [optional] +**userstatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart index d98f3c23f4f7..4ffb898ab952 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart @@ -21,7 +21,7 @@ class AnotherFakeApi { /// To test special tags and operation ID starting with number /// /// Parameters: - /// * [modelClient] - client model + /// * [modelclient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -32,7 +32,7 @@ class AnotherFakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ - required ModelClient modelClient, + required ModelClient modelclient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -57,7 +57,7 @@ class AnotherFakeApi { dynamic _bodyData; try { -_bodyData=jsonEncode(modelClient); +_bodyData=jsonEncode(modelclient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart index 06486358eda5..e4d673a4a32a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart @@ -340,7 +340,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// Test serialization of object with outer number type /// /// Parameters: - /// * [outerComposite] - Input composite as post body + /// * [outercomposite] - Input composite as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -351,7 +351,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ - OuterComposite? outerComposite, + OuterComposite? outercomposite, CancelToken? cancelToken, Map? headers, Map? extra, @@ -376,7 +376,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' dynamic _bodyData; try { -_bodyData=jsonEncode(outerComposite); +_bodyData=jsonEncode(outercomposite); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -607,7 +607,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// Test serialization of enum (int) properties with examples /// /// Parameters: - /// * [outerObjectWithEnumProperty] - Input enum (int) as post body + /// * [outerobjectwithenumproperty] - Input enum (int) as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -618,7 +618,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ - required OuterObjectWithEnumProperty outerObjectWithEnumProperty, + required OuterObjectWithEnumProperty outerobjectwithenumproperty, CancelToken? cancelToken, Map? headers, Map? extra, @@ -643,7 +643,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S dynamic _bodyData; try { -_bodyData=jsonEncode(outerObjectWithEnumProperty); +_bodyData=jsonEncode(outerobjectwithenumproperty); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -826,7 +826,7 @@ _bodyData=jsonEncode(body); /// For this test, the body for this request must reference a schema named `File`. /// /// Parameters: - /// * [fileSchemaTestClass] + /// * [fileschematestclass] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -837,7 +837,7 @@ _bodyData=jsonEncode(body); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testBodyWithFileSchema({ - required FileSchemaTestClass fileSchemaTestClass, + required FileSchemaTestClass fileschematestclass, CancelToken? cancelToken, Map? headers, Map? extra, @@ -862,7 +862,7 @@ _bodyData=jsonEncode(body); dynamic _bodyData; try { -_bodyData=jsonEncode(fileSchemaTestClass); +_bodyData=jsonEncode(fileschematestclass); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -964,7 +964,7 @@ _bodyData=jsonEncode(user); /// To test \"client\" model /// /// Parameters: - /// * [modelClient] - client model + /// * [modelclient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -975,7 +975,7 @@ _bodyData=jsonEncode(user); /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClientModel({ - required ModelClient modelClient, + required ModelClient modelclient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1000,7 +1000,7 @@ _bodyData=jsonEncode(user); dynamic _bodyData; try { -_bodyData=jsonEncode(modelClient); +_bodyData=jsonEncode(modelclient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1064,7 +1064,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [string] - None /// * [binary] - None /// * [date] - None - /// * [dateTime] - None + /// * [datetime] - None /// * [password] - None /// * [callback] - None /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -1088,7 +1088,7 @@ _responseData = rawData == null ? null : deserialize(r String? string, MultipartFile? binary, DateTime? date, - DateTime? dateTime, + DateTime? datetime, String? password, String? callback, CancelToken? cancelToken, @@ -1381,7 +1381,7 @@ _bodyData=jsonEncode(requestBody); /// /// /// Parameters: - /// * [testInlineFreeformAdditionalPropertiesRequest] - request body + /// * [testinlinefreeformadditionalpropertiesrequest] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1392,7 +1392,7 @@ _bodyData=jsonEncode(requestBody); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testInlineFreeformAdditionalProperties({ - required TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, + required TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1417,7 +1417,7 @@ _bodyData=jsonEncode(requestBody); dynamic _bodyData; try { -_bodyData=jsonEncode(testInlineFreeformAdditionalPropertiesRequest); +_bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1513,7 +1513,7 @@ _bodyData=jsonEncode(testInlineFreeformAdditionalPropertiesRequest); /// /// /// Parameters: - /// * [childWithNullable] - request body + /// * [childwithnullable] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1524,7 +1524,7 @@ _bodyData=jsonEncode(testInlineFreeformAdditionalPropertiesRequest); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testNullable({ - required ChildWithNullable childWithNullable, + required ChildWithNullable childwithnullable, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1549,7 +1549,7 @@ _bodyData=jsonEncode(testInlineFreeformAdditionalPropertiesRequest); dynamic _bodyData; try { -_bodyData=jsonEncode(childWithNullable); +_bodyData=jsonEncode(childwithnullable); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1583,7 +1583,7 @@ _bodyData=jsonEncode(childWithNullable); /// * [http] /// * [url] /// * [context] - /// * [allowEmpty] + /// * [allowempty] /// * [language] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -1600,7 +1600,7 @@ _bodyData=jsonEncode(childWithNullable); required List http, required List url, required List context, - required String allowEmpty, + required String allowempty, Map? language, CancelToken? cancelToken, Map? headers, @@ -1629,7 +1629,7 @@ _bodyData=jsonEncode(childWithNullable); r'url': url, r'context': context, if (language != null) r'language': language, - r'allowEmpty': allowEmpty, + r'allowEmpty': allowempty, }; final _response = await _dio.request( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart index 56ec33f1cace..7f1524c2f188 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart @@ -21,7 +21,7 @@ class FakeClassnameTags123Api { /// To test class name in snake case /// /// Parameters: - /// * [modelClient] - client model + /// * [modelclient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -32,7 +32,7 @@ class FakeClassnameTags123Api { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClassname({ - required ModelClient modelClient, + required ModelClient modelclient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -64,7 +64,7 @@ class FakeClassnameTags123Api { dynamic _bodyData; try { -_bodyData=jsonEncode(modelClient); +_bodyData=jsonEncode(modelclient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart index ec20128ee1e3..54e619b596f1 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart @@ -92,7 +92,7 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petId] - Pet id to delete + /// * [petid] - Pet id to delete /// * [apiKey] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -104,7 +104,7 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> deletePet({ - required int petId, + required int petid, String? apiKey, CancelToken? cancelToken, Map? headers, @@ -113,7 +113,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); final _options = Options( method: r'DELETE', headers: { @@ -310,7 +310,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// Returns a single pet /// /// Parameters: - /// * [petId] - ID of pet to return + /// * [petid] - ID of pet to return /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -321,7 +321,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// Returns a [Future] containing a [Response] with a [Pet] as data /// Throws [DioException] if API call or serialization fails Future> getPetById({ - required int petId, + required int petid, CancelToken? cancelToken, Map? headers, Map? extra, @@ -329,7 +329,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); final _options = Options( method: r'GET', headers: { @@ -458,7 +458,7 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petId] - ID of pet that needs to be updated + /// * [petid] - ID of pet that needs to be updated /// * [name] - Updated name of the pet /// * [status] - Updated status of the pet /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -471,7 +471,7 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ - required int petId, + required int petid, String? name, String? status, CancelToken? cancelToken, @@ -481,7 +481,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); final _options = Options( method: r'POST', headers: { @@ -532,8 +532,8 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petId] - ID of pet to update - /// * [additionalMetadata] - Additional data to pass to server + /// * [petid] - ID of pet to update + /// * [additionalmetadata] - Additional data to pass to server /// * [file] - file to upload /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -545,8 +545,8 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFile({ - required int petId, - String? additionalMetadata, + required int petid, + String? additionalmetadata, MultipartFile? file, CancelToken? cancelToken, Map? headers, @@ -555,7 +555,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petid.toString()); final _options = Options( method: r'POST', headers: { @@ -630,9 +630,9 @@ _responseData = rawData == null ? null : deserialize(r /// /// /// Parameters: - /// * [petId] - ID of pet to update - /// * [requiredFile] - file to upload - /// * [additionalMetadata] - Additional data to pass to server + /// * [petid] - ID of pet to update + /// * [requiredfile] - file to upload + /// * [additionalmetadata] - Additional data to pass to server /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -643,9 +643,9 @@ _responseData = rawData == null ? null : deserialize(r /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ - required int petId, - required MultipartFile requiredFile, - String? additionalMetadata, + required int petid, + required MultipartFile requiredfile, + String? additionalmetadata, CancelToken? cancelToken, Map? headers, Map? extra, @@ -653,7 +653,7 @@ _responseData = rawData == null ? null : deserialize(r ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petid.toString()); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart index c196447ea5e4..126a3cbaf671 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart @@ -21,7 +21,7 @@ class AllOfWithSingleRef { this.username, - this.singleRefType, + this.singlereftype, }); @JsonKey( @@ -45,7 +45,7 @@ class AllOfWithSingleRef { ) - final SingleRefType? singleRefType; + final SingleRefType? singlereftype; @@ -54,12 +54,12 @@ class AllOfWithSingleRef { @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && other.username == username && - other.singleRefType == singleRefType; + other.singlereftype == singlereftype; @override int get hashCode => username.hashCode + - singleRefType.hashCode; + singlereftype.hashCode; factory AllOfWithSingleRef.fromJson(Map json) => _$AllOfWithSingleRefFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart index 732326357226..11efc809e240 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart @@ -18,7 +18,7 @@ class Animal { /// Returns a new [Animal] instance. Animal({ - required this.className, + required this.classname, this.color = 'red', }); @@ -31,7 +31,7 @@ class Animal { ) - final String className; + final String classname; @@ -51,12 +51,12 @@ class Animal { @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.className == className && + other.classname == classname && other.color == color; @override int get hashCode => - className.hashCode + + classname.hashCode + color.hashCode; factory Animal.fromJson(Map json) => _$AnimalFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart index da8de0169296..2ba4f0c19286 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart @@ -18,7 +18,7 @@ class ArrayOfArrayOfNumberOnly { /// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayArrayNumber, + this.arrayarraynumber, }); @JsonKey( @@ -29,7 +29,7 @@ class ArrayOfArrayOfNumberOnly { ) - final List>? arrayArrayNumber; + final List>? arrayarraynumber; @@ -37,11 +37,11 @@ class ArrayOfArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - other.arrayArrayNumber == arrayArrayNumber; + other.arrayarraynumber == arrayarraynumber; @override int get hashCode => - arrayArrayNumber.hashCode; + arrayarraynumber.hashCode; factory ArrayOfArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfArrayOfNumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart index 4ead761e76f7..e058704c51af 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart @@ -18,7 +18,7 @@ class ArrayOfNumberOnly { /// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arrayNumber, + this.arraynumber, }); @JsonKey( @@ -29,7 +29,7 @@ class ArrayOfNumberOnly { ) - final List? arrayNumber; + final List? arraynumber; @@ -37,11 +37,11 @@ class ArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - other.arrayNumber == arrayNumber; + other.arraynumber == arraynumber; @override int get hashCode => - arrayNumber.hashCode; + arraynumber.hashCode; factory ArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfNumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart index d2bc40f33836..c248b9c52192 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart @@ -18,17 +18,17 @@ class Capitalization { /// Returns a new [Capitalization] instance. Capitalization({ - this.smallCamel, + this.smallcamel, - this.capitalCamel, + this.capitalcamel, this.smallSnake, this.capitalSnake, - this.sCAETHFlowPoints, + this.scaEthFlowPoints, - this.ATT_NAME, + this.attName, }); @JsonKey( @@ -39,7 +39,7 @@ class Capitalization { ) - final String? smallCamel; + final String? smallcamel; @@ -51,7 +51,7 @@ class Capitalization { ) - final String? capitalCamel; + final String? capitalcamel; @@ -87,7 +87,7 @@ class Capitalization { ) - final String? sCAETHFlowPoints; + final String? scaEthFlowPoints; @@ -100,7 +100,7 @@ class Capitalization { ) - final String? ATT_NAME; + final String? attName; @@ -108,21 +108,21 @@ class Capitalization { @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallCamel == smallCamel && - other.capitalCamel == capitalCamel && + other.smallcamel == smallcamel && + other.capitalcamel == capitalcamel && other.smallSnake == smallSnake && other.capitalSnake == capitalSnake && - other.sCAETHFlowPoints == sCAETHFlowPoints && - other.ATT_NAME == ATT_NAME; + other.scaEthFlowPoints == scaEthFlowPoints && + other.attName == attName; @override int get hashCode => - smallCamel.hashCode + - capitalCamel.hashCode + + smallcamel.hashCode + + capitalcamel.hashCode + smallSnake.hashCode + capitalSnake.hashCode + - sCAETHFlowPoints.hashCode + - ATT_NAME.hashCode; + scaEthFlowPoints.hashCode + + attName.hashCode; factory Capitalization.fromJson(Map json) => _$CapitalizationFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart index e2df6f2cc557..d783b29bfebe 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart @@ -21,7 +21,7 @@ class Cat { /// Returns a new [Cat] instance. Cat({ - required this.className, + required this.classname, this.color = 'red', @@ -36,7 +36,7 @@ class Cat { ) - final String className; + final String classname; @@ -68,13 +68,13 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.className == className && + other.classname == classname && other.color == color && other.declawed == declawed; @override int get hashCode => - className.hashCode + + classname.hashCode + color.hashCode + declawed.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart index dcda6f93ba6a..24e56c0a068d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart @@ -23,9 +23,9 @@ class ChildWithNullable { this.type, - this.nullableProperty, + this.nullableproperty, - this.otherProperty, + this.otherproperty, }); @JsonKey( @@ -49,7 +49,7 @@ class ChildWithNullable { ) - final String? nullableProperty; + final String? nullableproperty; @@ -61,7 +61,7 @@ class ChildWithNullable { ) - final String? otherProperty; + final String? otherproperty; @@ -70,14 +70,14 @@ class ChildWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && other.type == type && - other.nullableProperty == nullableProperty && - other.otherProperty == otherProperty; + other.nullableproperty == nullableproperty && + other.otherproperty == otherproperty; @override int get hashCode => type.hashCode + - (nullableProperty == null ? 0 : nullableProperty.hashCode) + - otherProperty.hashCode; + (nullableproperty == null ? 0 : nullableproperty.hashCode) + + otherproperty.hashCode; factory ChildWithNullable.fromJson(Map json) => _$ChildWithNullableFromJson(json); @@ -93,7 +93,7 @@ class ChildWithNullable { enum ChildWithNullableTypeEnum { @JsonValue(r'ChildWithNullable') -childWithNullable(r'ChildWithNullable'), +childwithnullable(r'ChildWithNullable'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart index deb271b6dc3b..871df64ab699 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart @@ -21,7 +21,7 @@ class Dog { /// Returns a new [Dog] instance. Dog({ - required this.className, + required this.classname, this.color = 'red', @@ -36,7 +36,7 @@ class Dog { ) - final String className; + final String classname; @@ -68,13 +68,13 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.className == className && + other.classname == classname && other.color == color && other.breed == breed; @override int get hashCode => - className.hashCode + + classname.hashCode + color.hashCode + breed.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart index 563f7038b97f..0051b7a6da14 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart @@ -30,13 +30,13 @@ class EnumTest { this.enumNumber, - this.outerEnum, + this.outerenum, - this.outerEnumInteger, + this.outerenuminteger, - this.outerEnumDefaultValue, + this.outerenumdefaultvalue, - this.outerEnumIntegerDefaultValue, + this.outerenumintegerdefaultvalue, }); @JsonKey( @@ -100,7 +100,7 @@ class EnumTest { ) - final OuterEnum? outerEnum; + final OuterEnum? outerenum; @@ -113,7 +113,7 @@ class EnumTest { ) - final OuterEnumInteger? outerEnumInteger; + final OuterEnumInteger? outerenuminteger; @@ -126,7 +126,7 @@ class EnumTest { ) - final OuterEnumDefaultValue? outerEnumDefaultValue; + final OuterEnumDefaultValue? outerenumdefaultvalue; @@ -139,7 +139,7 @@ class EnumTest { ) - final OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; + final OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; @@ -151,10 +151,10 @@ class EnumTest { other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && other.enumNumber == enumNumber && - other.outerEnum == outerEnum && - other.outerEnumInteger == outerEnumInteger && - other.outerEnumDefaultValue == outerEnumDefaultValue && - other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; + other.outerenum == outerenum && + other.outerenuminteger == outerenuminteger && + other.outerenumdefaultvalue == outerenumdefaultvalue && + other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; @override int get hashCode => @@ -162,10 +162,10 @@ class EnumTest { enumStringRequired.hashCode + enumInteger.hashCode + enumNumber.hashCode + - (outerEnum == null ? 0 : outerEnum.hashCode) + - outerEnumInteger.hashCode + - outerEnumDefaultValue.hashCode + - outerEnumIntegerDefaultValue.hashCode; + (outerenum == null ? 0 : outerenum.hashCode) + + outerenuminteger.hashCode + + outerenumdefaultvalue.hashCode + + outerenumintegerdefaultvalue.hashCode; factory EnumTest.fromJson(Map json) => _$EnumTestFromJson(json); @@ -181,7 +181,7 @@ class EnumTest { enum EnumTestEnumStringEnum { @JsonValue(r'UPPER') -UPPER(r'UPPER'), +upper(r'UPPER'), @JsonValue(r'lower') lower(r'lower'), @JsonValue(r'') @@ -201,7 +201,7 @@ String toString() => value; enum EnumTestEnumStringRequiredEnum { @JsonValue(r'UPPER') -UPPER(r'UPPER'), +upper(r'UPPER'), @JsonValue(r'lower') lower(r'lower'), @JsonValue(r'') @@ -239,9 +239,9 @@ String toString() => value; enum EnumTestEnumNumberEnum { @JsonValue('1.1') -number1Period1(''1.1''), +number1period1(''1.1''), @JsonValue('-1.2') -numberNegative1Period2(''-1.2''), +numberNegative1period2(''-1.2''), @JsonValue('11184809') unknownDefaultOpenApi(''11184809''); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart index 1f0f2950a71c..9c994771886c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart @@ -18,9 +18,9 @@ class FakeBigDecimalMap200Response { /// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someId, + this.someid, - this.someMap, + this.somemap, }); @JsonKey( @@ -31,7 +31,7 @@ class FakeBigDecimalMap200Response { ) - final num? someId; + final num? someid; @@ -43,7 +43,7 @@ class FakeBigDecimalMap200Response { ) - final Map? someMap; + final Map? somemap; @@ -51,13 +51,13 @@ class FakeBigDecimalMap200Response { @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someId == someId && - other.someMap == someMap; + other.someid == someid && + other.somemap == somemap; @override int get hashCode => - someId.hashCode + - someMap.hashCode; + someid.hashCode + + somemap.hashCode; factory FakeBigDecimalMap200Response.fromJson(Map json) => _$FakeBigDecimalMap200ResponseFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart index a20ba417fa54..b724503e4ae2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart @@ -41,7 +41,7 @@ class FormatTest { required this.date, - this.dateTime, + this.datetime, this.uuid, @@ -197,7 +197,7 @@ class FormatTest { ) - final DateTime? dateTime; + final DateTime? datetime; @@ -266,7 +266,7 @@ class FormatTest { other.byte == byte && other.binary == binary && other.date == date && - other.dateTime == dateTime && + other.datetime == datetime && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -285,7 +285,7 @@ class FormatTest { byte.hashCode + binary.hashCode + date.hashCode + - dateTime.hashCode + + datetime.hashCode + uuid.hashCode + password.hashCode + patternWithDigits.hashCode + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart index 6fd362cdf351..fdacbc440a0b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart @@ -18,7 +18,7 @@ class HealthCheckResult { /// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullableMessage, + this.nullablemessage, }); @JsonKey( @@ -29,7 +29,7 @@ class HealthCheckResult { ) - final String? nullableMessage; + final String? nullablemessage; @@ -37,11 +37,11 @@ class HealthCheckResult { @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullableMessage == nullableMessage; + other.nullablemessage == nullablemessage; @override int get hashCode => - (nullableMessage == null ? 0 : nullableMessage.hashCode); + (nullablemessage == null ? 0 : nullablemessage.hashCode); factory HealthCheckResult.fromJson(Map json) => _$HealthCheckResultFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart index 59f9377d253a..d87a07d10357 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart @@ -106,7 +106,7 @@ class MapTest { enum MapTestMapOfEnumStringEnum { @JsonValue(r'UPPER') -UPPER(r'UPPER'), +upper(r'UPPER'), @JsonValue(r'lower') lower(r'lower'), @JsonValue(r'unknown_default_open_api') diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart index 458d2bd0534b..960e16bba37a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -21,7 +21,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { this.uuid, - this.dateTime, + this.datetime, this.map, }); @@ -46,7 +46,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { ) - final DateTime? dateTime; + final DateTime? datetime; @@ -67,13 +67,13 @@ class MixedPropertiesAndAdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && other.uuid == uuid && - other.dateTime == dateTime && + other.datetime == datetime && other.map == map; @override int get hashCode => uuid.hashCode + - dateTime.hashCode + + datetime.hashCode + map.hashCode; factory MixedPropertiesAndAdditionalPropertiesClass.fromJson(Map json) => _$MixedPropertiesAndAdditionalPropertiesClassFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart index 7ff6301e9edf..602fdc18d607 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart @@ -12,7 +12,7 @@ enum ModelEnumClass { @JsonValue(r'-efg') efg(r'-efg'), @JsonValue(r'(xyz)') - leftParenthesisXyzRightParenthesis(r'(xyz)'), + leftParenthesisXyzrightParenthesis(r'(xyz)'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart index cccca0412f46..85a43bd2a46d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart @@ -18,7 +18,7 @@ class ModelFile { /// Returns a new [ModelFile] instance. ModelFile({ - this.sourceURI, + this.sourceuri, }); /// Test capitalization @@ -30,7 +30,7 @@ class ModelFile { ) - final String? sourceURI; + final String? sourceuri; @@ -38,11 +38,11 @@ class ModelFile { @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceURI == sourceURI; + other.sourceuri == sourceuri; @override int get hashCode => - sourceURI.hashCode; + sourceuri.hashCode; factory ModelFile.fromJson(Map json) => _$ModelFileFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart index 44e9d41a189d..c511946d665e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart @@ -18,7 +18,7 @@ class NumberOnly { /// Returns a new [NumberOnly] instance. NumberOnly({ - this.justNumber, + this.justnumber, }); @JsonKey( @@ -29,7 +29,7 @@ class NumberOnly { ) - final num? justNumber; + final num? justnumber; @@ -37,11 +37,11 @@ class NumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justNumber == justNumber; + other.justnumber == justnumber; @override int get hashCode => - justNumber.hashCode; + justnumber.hashCode; factory NumberOnly.fromJson(Map json) => _$NumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart index 5a36ffb5147e..2c060a1ecfc8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart @@ -23,7 +23,7 @@ class ObjectWithDeprecatedFields { this.id, - this.deprecatedRef, + this.deprecatedref, this.bars, }); @@ -53,7 +53,7 @@ class ObjectWithDeprecatedFields { - @Deprecated('deprecatedRef has been deprecated') + @Deprecated('deprecatedref has been deprecated') @JsonKey( name: r'deprecatedRef', @@ -62,7 +62,7 @@ class ObjectWithDeprecatedFields { ) - final DeprecatedObject? deprecatedRef; + final DeprecatedObject? deprecatedref; @@ -85,14 +85,14 @@ class ObjectWithDeprecatedFields { bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && other.uuid == uuid && other.id == id && - other.deprecatedRef == deprecatedRef && + other.deprecatedref == deprecatedref && other.bars == bars; @override int get hashCode => uuid.hashCode + id.hashCode + - deprecatedRef.hashCode + + deprecatedref.hashCode + bars.hashCode; factory ObjectWithDeprecatedFields.fromJson(Map json) => _$ObjectWithDeprecatedFieldsFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart index dfbc4f5c5e41..a554ecc6311b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart @@ -20,11 +20,11 @@ class Order { this.id, - this.petId, + this.petid, this.quantity, - this.shipDate, + this.shipdate, this.status, @@ -51,7 +51,7 @@ class Order { ) - final int? petId; + final int? petid; @@ -75,7 +75,7 @@ class Order { ) - final DateTime? shipDate; + final DateTime? shipdate; @@ -110,18 +110,18 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petId == petId && + other.petid == petid && other.quantity == quantity && - other.shipDate == shipDate && + other.shipdate == shipdate && other.status == status && other.complete == complete; @override int get hashCode => id.hashCode + - petId.hashCode + + petid.hashCode + quantity.hashCode + - shipDate.hashCode + + shipdate.hashCode + status.hashCode + complete.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart index bda5847df5ad..6a0edc0716fe 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart @@ -20,7 +20,7 @@ class ParentWithNullable { this.type, - this.nullableProperty, + this.nullableproperty, }); @JsonKey( @@ -44,7 +44,7 @@ class ParentWithNullable { ) - final String? nullableProperty; + final String? nullableproperty; @@ -53,12 +53,12 @@ class ParentWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && other.type == type && - other.nullableProperty == nullableProperty; + other.nullableproperty == nullableproperty; @override int get hashCode => type.hashCode + - (nullableProperty == null ? 0 : nullableProperty.hashCode); + (nullableproperty == null ? 0 : nullableproperty.hashCode); factory ParentWithNullable.fromJson(Map json) => _$ParentWithNullableFromJson(json); @@ -74,7 +74,7 @@ class ParentWithNullable { enum ParentWithNullableTypeEnum { @JsonValue(r'ChildWithNullable') -childWithNullable(r'ChildWithNullable'), +childwithnullable(r'ChildWithNullable'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart index fdb70f9ce89a..6d41a485b6c4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart @@ -26,7 +26,7 @@ class Pet { required this.name, - required this.photoUrls, + required this.photourls, this.tags, @@ -77,7 +77,7 @@ class Pet { ) - final Set photoUrls; + final Set photourls; @@ -114,7 +114,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - other.photoUrls == photoUrls && + other.photourls == photourls && other.tags == tags && other.status == status; @@ -123,7 +123,7 @@ class Pet { id.hashCode + category.hashCode + name.hashCode + - photoUrls.hashCode + + photourls.hashCode + tags.hashCode + status.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart index 175b6fb274ce..30d3bc67b80d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart @@ -18,7 +18,7 @@ class SpecialModelName { /// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, + this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, }); @JsonKey( @@ -29,7 +29,7 @@ class SpecialModelName { ) - final int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + final int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; @@ -37,11 +37,11 @@ class SpecialModelName { @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; @override int get hashCode => - dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket.hashCode; + dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket.hashCode; factory SpecialModelName.fromJson(Map json) => _$SpecialModelNameFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart index 5eda7d48b384..c2f51d310a23 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -18,7 +18,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someProperty, + this.someproperty, }); @JsonKey( @@ -29,7 +29,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { ) - final String? someProperty; + final String? someproperty; @@ -37,11 +37,11 @@ class TestInlineFreeformAdditionalPropertiesRequest { @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && - other.someProperty == someProperty; + other.someproperty == someproperty; @override int get hashCode => - someProperty.hashCode; + someproperty.hashCode; factory TestInlineFreeformAdditionalPropertiesRequest.fromJson(Map json) => _$TestInlineFreeformAdditionalPropertiesRequestFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart index 56c95cb75f15..0e2de7c18785 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart @@ -22,9 +22,9 @@ class User { this.username, - this.firstName, + this.firstname, - this.lastName, + this.lastname, this.email, @@ -32,7 +32,7 @@ class User { this.phone, - this.userStatus, + this.userstatus, }); @JsonKey( @@ -67,7 +67,7 @@ class User { ) - final String? firstName; + final String? firstname; @@ -79,7 +79,7 @@ class User { ) - final String? lastName; + final String? lastname; @@ -128,7 +128,7 @@ class User { ) - final int? userStatus; + final int? userstatus; @@ -138,23 +138,23 @@ class User { bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstName == firstName && - other.lastName == lastName && + other.firstname == firstname && + other.lastname == lastname && other.email == email && other.password == password && other.phone == phone && - other.userStatus == userStatus; + other.userstatus == userstatus; @override int get hashCode => id.hashCode + username.hashCode + - firstName.hashCode + - lastName.hashCode + + firstname.hashCode + + lastname.hashCode + email.hashCode + password.hashCode + phone.hashCode + - userStatus.hashCode; + userstatus.hashCode; factory User.fromJson(Map json) => _$UserFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md index ecde40a0ade4..79de3b511b9a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md @@ -48,10 +48,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = await api.call123testSpecialTags(modelClient); + final response = await api.call123testSpecialTags(modelclient); print(response); } catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md index 4c6f3ab2fe11..151142162f62 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singlereftype** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md index 415b56e9bc2e..570de2e45be3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md index 36a94e6bb703..1ed2cb04d8f3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelClient) +> ModelClient call123testSpecialTags(modelclient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = api.call123testSpecialTags(modelClient); + final response = api.call123testSpecialTags(modelclient); print(response); } catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md index d1a272ab6023..0fa36a7fdaaf 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayArrayNumber** | [**BuiltList<BuiltList<num>>**](BuiltList.md) | | [optional] +**arrayarraynumber** | [**BuiltList<BuiltList<num>>**](BuiltList.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md index 94b60f272fd4..11eab0b6dc40 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayNumber** | **BuiltList<num>** | | [optional] +**arraynumber** | **BuiltList<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md index 4a07b4eb820d..e673e7baef4b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] +**smallcamel** | **String** | | [optional] +**capitalcamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +**scaEthFlowPoints** | **String** | | [optional] +**attName** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md index 6552eea4b435..9c557ac9082a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md index 770494fcf4cc..54b310b0f58d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] -**otherProperty** | **String** | | [optional] +**nullableproperty** | **String** | | [optional] +**otherproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md index d36439b767bb..b2ba3dfcef59 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md index 7c24fe2347b4..f1b0758b868e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md index d9ba061a46e0..987edf55dfcb 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outerComposite) +> OuterComposite fakeOuterCompositeSerialize(outercomposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body +final OuterComposite outercomposite = ; // OuterComposite | Input composite as post body try { - final response = api.fakeOuterCompositeSerialize(outerComposite); + final response = api.fakeOuterCompositeSerialize(outercomposite); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body +final OuterObjectWithEnumProperty outerobjectwithenumproperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + final response = api.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileSchemaTestClass) +> testBodyWithFileSchema(fileschematestclass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | +final FileSchemaTestClass fileschematestclass = ; // FileSchemaTestClass | try { - api.testBodyWithFileSchema(fileSchemaTestClass); + api.testBodyWithFileSchema(fileschematestclass); } catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelClient) +> ModelClient testClientModel(modelclient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = api.testClientModel(modelClient); + final response = api.testClientModel(modelclient); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final double float = 3.4; // double | None final String string = string_example; // String | None final Uint8List binary = BINARY_DATA_HERE; // Uint8List | None final Date date = 2013-10-20; // Date | None -final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None +final DateTime datetime = 2013-10-20T19:20:30+01:00; // DateTime | None final String password = password_example; // String | None final String callback = callback_example; // String | None try { - api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); } catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **Uint8List**| None | [optional] **date** | **Date**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **datetime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -803,7 +803,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) +> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) test inline free-form additionalProperties @@ -814,10 +814,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body +final TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); + api.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); } catch on DioException (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -827,7 +827,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -889,7 +889,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childWithNullable) +> testNullable(childwithnullable) test nullable parent property @@ -900,10 +900,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body +final ChildWithNullable childwithnullable = ; // ChildWithNullable | request body try { - api.testNullable(childWithNullable); + api.testNullable(childwithnullable); } catch on DioException (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -913,7 +913,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -931,7 +931,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) @@ -947,11 +947,11 @@ final BuiltList ioutil = ; // BuiltList | final BuiltList http = ; // BuiltList | final BuiltList url = ; // BuiltList | final BuiltList context = ; // BuiltList | -final String allowEmpty = allowEmpty_example; // String | +final String allowempty = allowempty_example; // String | final BuiltMap language = ; // BuiltMap | try { - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); } catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -966,7 +966,7 @@ Name | Type | Description | Notes **http** | [**BuiltList<String>**](String.md)| | **url** | [**BuiltList<String>**](String.md)| | **context** | [**BuiltList<String>**](String.md)| | - **allowEmpty** | **String**| | + **allowempty** | **String**| | **language** | [**BuiltMap<String, String>**](String.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md index cedb487c954d..87733576b776 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someId** | **num** | | [optional] -**someMap** | **BuiltMap<String, num>** | | [optional] +**someid** | **num** | | [optional] +**somemap** | **BuiltMap<String, 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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index 645aebf399f0..88a70afff0f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelClient) +> ModelClient testClassname(modelclient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api = Openapi().getFakeClassnameTags123Api(); -final ModelClient modelClient = ; // ModelClient | client model +final ModelClient modelclient = ; // ModelClient | client model try { - final response = api.testClassname(modelClient); + final response = api.testClassname(modelclient); print(response); } catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md index f811264ca2ba..e6b4ee4a6a95 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**Uint8List**](Uint8List.md) | | [optional] **date** | [**Date**](Date.md) | | -**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md index 4d6aeb75d965..c912fb2e08f4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] +**nullablemessage** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md index b1a4c4ccc401..cda3d76a20ab 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**BuiltMap<String, Animal>**](Animal.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md index 4be260e93f6e..d54b1bbbea04 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +**sourceuri** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md index d8096a3db37a..f5fac6f8a17c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justNumber** | **num** | | [optional] +**justnumber** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md index 3e7848d382c2..b96040b7ec27 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **BuiltList<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md index bde5ffe51a2c..08914a83f300 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petId** | **int** | | [optional] +**petid** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] +**shipdate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md index 17aa5ca02941..435464987052 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] +**nullableproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md index 08e0aeedd784..dc8144baf071 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photoUrls** | **BuiltSet<String>** | | +**photourls** | **BuiltSet<String>** | | **tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md index 2b7766eb60d4..f7744bcc832a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petId, apiKey) +> deletePet(petid, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | Pet id to delete +final int petid = 789; // int | Pet id to delete final String apiKey = apiKey_example; // String | try { - api.deletePet(petId, apiKey); + api.deletePet(petid, apiKey); } catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| Pet id to delete | + **petid** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petId) +> Pet getPetById(petid) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to return +final int petid = 789; // int | ID of pet to return try { - final response = api.getPetById(petId); + final response = api.getPetById(petid); print(response); } catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to return | + **petid** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petId, name, status) +> updatePetWithForm(petid, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet that needs to be updated +final int petid = 789; // int | ID of pet that needs to be updated final String name = name_example; // String | Updated name of the pet final String status = status_example; // String | Updated status of the pet try { - api.updatePetWithForm(petId, name, status); + api.updatePetWithForm(petid, name, status); } catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet that needs to be updated | + **petid** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petId, additionalMetadata, file) +> ApiResponse uploadFile(petid, additionalmetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to update -final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final int petid = 789; // int | ID of pet to update +final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final response = api.uploadFile(petId, additionalMetadata, file); + final response = api.uploadFile(petid, additionalmetadata, file); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) +> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petId = 789; // int | ID of pet to update -final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload -final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final int petid = 789; // int | ID of pet to update +final MultipartFile requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server try { - final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + final response = api.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **requiredFile** | **MultipartFile**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **requiredfile** | **MultipartFile**| file to upload | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md index 5fcfa98e0b36..04697c8e6225 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [optional] +**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md index e2b2f1fd4468..894a3e60ee31 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProperty** | **String** | | [optional] +**someproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md index fa87e64d8595..37aa8c50230e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] +**firstname** | **String** | | [optional] +**lastname** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userStatus** | **int** | User Status | [optional] +**userstatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart index 5d2876183070..15199a7d2f23 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart @@ -22,7 +22,7 @@ class AnotherFakeApi { /// To test special tags and operation ID starting with number /// /// Parameters: - /// * [modelClient] - client model + /// * [modelclient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -33,7 +33,7 @@ class AnotherFakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ - required ModelClient modelClient, + required ModelClient modelclient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -59,7 +59,7 @@ class AnotherFakeApi { try { const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); + _bodyData = _serializers.serialize(modelclient, specifiedType: _type); } catch(error, stackTrace) { throw DioException( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index 1cfaf9712ad4..756b1fe22f62 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -358,7 +358,7 @@ class FakeApi { /// Test serialization of object with outer number type /// /// Parameters: - /// * [outerComposite] - Input composite as post body + /// * [outercomposite] - Input composite as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -369,7 +369,7 @@ class FakeApi { /// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ - OuterComposite? outerComposite, + OuterComposite? outercomposite, CancelToken? cancelToken, Map? headers, Map? extra, @@ -395,7 +395,7 @@ class FakeApi { try { const _type = FullType(OuterComposite); - _bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type); + _bodyData = outercomposite == null ? null : _serializers.serialize(outercomposite, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -635,7 +635,7 @@ class FakeApi { /// Test serialization of enum (int) properties with examples /// /// Parameters: - /// * [outerObjectWithEnumProperty] - Input enum (int) as post body + /// * [outerobjectwithenumproperty] - Input enum (int) as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -646,7 +646,7 @@ class FakeApi { /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ - required OuterObjectWithEnumProperty outerObjectWithEnumProperty, + required OuterObjectWithEnumProperty outerobjectwithenumproperty, CancelToken? cancelToken, Map? headers, Map? extra, @@ -672,7 +672,7 @@ class FakeApi { try { const _type = FullType(OuterObjectWithEnumProperty); - _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); + _bodyData = _serializers.serialize(outerobjectwithenumproperty, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -863,7 +863,7 @@ class FakeApi { /// For this test, the body for this request must reference a schema named `File`. /// /// Parameters: - /// * [fileSchemaTestClass] + /// * [fileschematestclass] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -874,7 +874,7 @@ class FakeApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testBodyWithFileSchema({ - required FileSchemaTestClass fileSchemaTestClass, + required FileSchemaTestClass fileschematestclass, CancelToken? cancelToken, Map? headers, Map? extra, @@ -900,7 +900,7 @@ class FakeApi { try { const _type = FullType(FileSchemaTestClass); - _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); + _bodyData = _serializers.serialize(fileschematestclass, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1005,7 +1005,7 @@ class FakeApi { /// To test \"client\" model /// /// Parameters: - /// * [modelClient] - client model + /// * [modelclient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1016,7 +1016,7 @@ class FakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClientModel({ - required ModelClient modelClient, + required ModelClient modelclient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1042,7 +1042,7 @@ class FakeApi { try { const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); + _bodyData = _serializers.serialize(modelclient, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1111,7 +1111,7 @@ class FakeApi { /// * [string] - None /// * [binary] - None /// * [date] - None - /// * [dateTime] - None + /// * [datetime] - None /// * [password] - None /// * [callback] - None /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -1135,7 +1135,7 @@ class FakeApi { String? string, Uint8List? binary, Date? date, - DateTime? dateTime, + DateTime? datetime, String? password, String? callback, CancelToken? cancelToken, @@ -1180,7 +1180,7 @@ class FakeApi { r'byte': encodeQueryParameter(_serializers, byte, const FullType(String)), if (binary != null) r'binary': encodeQueryParameter(_serializers, binary, const FullType(Uint8List)), if (date != null) r'date': encodeQueryParameter(_serializers, date, const FullType(Date)), - if (dateTime != null) r'dateTime': encodeQueryParameter(_serializers, dateTime, const FullType(DateTime)), + if (datetime != null) r'dateTime': encodeQueryParameter(_serializers, datetime, const FullType(DateTime)), if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)), if (callback != null) r'callback': encodeQueryParameter(_serializers, callback, const FullType(String)), }; @@ -1450,7 +1450,7 @@ class FakeApi { /// /// /// Parameters: - /// * [testInlineFreeformAdditionalPropertiesRequest] - request body + /// * [testinlinefreeformadditionalpropertiesrequest] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1461,7 +1461,7 @@ class FakeApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testInlineFreeformAdditionalProperties({ - required TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, + required TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1487,7 +1487,7 @@ class FakeApi { try { const _type = FullType(TestInlineFreeformAdditionalPropertiesRequest); - _bodyData = _serializers.serialize(testInlineFreeformAdditionalPropertiesRequest, specifiedType: _type); + _bodyData = _serializers.serialize(testinlinefreeformadditionalpropertiesrequest, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1588,7 +1588,7 @@ class FakeApi { /// /// /// Parameters: - /// * [childWithNullable] - request body + /// * [childwithnullable] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1599,7 +1599,7 @@ class FakeApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testNullable({ - required ChildWithNullable childWithNullable, + required ChildWithNullable childwithnullable, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1625,7 +1625,7 @@ class FakeApi { try { const _type = FullType(ChildWithNullable); - _bodyData = _serializers.serialize(childWithNullable, specifiedType: _type); + _bodyData = _serializers.serialize(childwithnullable, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1660,7 +1660,7 @@ class FakeApi { /// * [http] /// * [url] /// * [context] - /// * [allowEmpty] + /// * [allowempty] /// * [language] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -1677,7 +1677,7 @@ class FakeApi { required BuiltList http, required BuiltList url, required BuiltList context, - required String allowEmpty, + required String allowempty, BuiltMap? language, CancelToken? cancelToken, Map? headers, @@ -1706,7 +1706,7 @@ class FakeApi { r'url': encodeCollectionQueryParameter(_serializers, url, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), r'context': encodeCollectionQueryParameter(_serializers, context, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), if (language != null) r'language': encodeQueryParameter(_serializers, language, const FullType(BuiltMap, [FullType(String), FullType(String)]), ), - r'allowEmpty': encodeQueryParameter(_serializers, allowEmpty, const FullType(String)), + r'allowEmpty': encodeQueryParameter(_serializers, allowempty, const FullType(String)), }; final _response = await _dio.request( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart index 671ec766ab47..7f9ec576afe4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart @@ -22,7 +22,7 @@ class FakeClassnameTags123Api { /// To test class name in snake case /// /// Parameters: - /// * [modelClient] - client model + /// * [modelclient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -33,7 +33,7 @@ class FakeClassnameTags123Api { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClassname({ - required ModelClient modelClient, + required ModelClient modelclient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -66,7 +66,7 @@ class FakeClassnameTags123Api { try { const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelClient, specifiedType: _type); + _bodyData = _serializers.serialize(modelclient, specifiedType: _type); } catch(error, stackTrace) { throw DioException( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index a4da1c5ff6db..9507fb043079 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -97,7 +97,7 @@ class PetApi { /// /// /// Parameters: - /// * [petId] - Pet id to delete + /// * [petid] - Pet id to delete /// * [apiKey] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -109,7 +109,7 @@ class PetApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> deletePet({ - required int petId, + required int petid, String? apiKey, CancelToken? cancelToken, Map? headers, @@ -118,7 +118,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -323,7 +323,7 @@ class PetApi { /// Returns a single pet /// /// Parameters: - /// * [petId] - ID of pet to return + /// * [petid] - ID of pet to return /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -334,7 +334,7 @@ class PetApi { /// Returns a [Future] containing a [Response] with a [Pet] as data /// Throws [DioException] if API call or serialization fails Future> getPetById({ - required int petId, + required int petid, CancelToken? cancelToken, Map? headers, Map? extra, @@ -342,7 +342,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); final _options = Options( method: r'GET', headers: { @@ -477,7 +477,7 @@ class PetApi { /// /// /// Parameters: - /// * [petId] - ID of pet that needs to be updated + /// * [petid] - ID of pet that needs to be updated /// * [name] - Updated name of the pet /// * [status] - Updated status of the pet /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -490,7 +490,7 @@ class PetApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ - required int petId, + required int petid, String? name, String? status, CancelToken? cancelToken, @@ -500,7 +500,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); final _options = Options( method: r'POST', headers: { @@ -555,8 +555,8 @@ class PetApi { /// /// /// Parameters: - /// * [petId] - ID of pet to update - /// * [additionalMetadata] - Additional data to pass to server + /// * [petid] - ID of pet to update + /// * [additionalmetadata] - Additional data to pass to server /// * [file] - file to upload /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -568,8 +568,8 @@ class PetApi { /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFile({ - required int petId, - String? additionalMetadata, + required int petid, + String? additionalmetadata, MultipartFile? file, CancelToken? cancelToken, Map? headers, @@ -578,7 +578,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); final _options = Options( method: r'POST', headers: { @@ -601,7 +601,7 @@ class PetApi { try { _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), + if (additionalmetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalmetadata, const FullType(String)), if (file != null) r'file': file, }); @@ -661,9 +661,9 @@ class PetApi { /// /// /// Parameters: - /// * [petId] - ID of pet to update - /// * [requiredFile] - file to upload - /// * [additionalMetadata] - Additional data to pass to server + /// * [petid] - ID of pet to update + /// * [requiredfile] - file to upload + /// * [additionalmetadata] - Additional data to pass to server /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -674,9 +674,9 @@ class PetApi { /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ - required int petId, - required MultipartFile requiredFile, - String? additionalMetadata, + required int petid, + required MultipartFile requiredfile, + String? additionalmetadata, CancelToken? cancelToken, Map? headers, Map? extra, @@ -684,7 +684,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); final _options = Options( method: r'POST', headers: { @@ -707,8 +707,8 @@ class PetApi { try { _bodyData = FormData.fromMap({ - if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), - r'requiredFile': requiredFile, + if (additionalmetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalmetadata, const FullType(String)), + r'requiredFile': requiredfile, }); } catch(error, stackTrace) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart index 5bcd7d9dee8a..15e316036e0a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart @@ -13,15 +13,15 @@ part 'all_of_with_single_ref.g.dart'; /// /// Properties: /// * [username] -/// * [singleRefType] +/// * [singlereftype] @BuiltValue() abstract class AllOfWithSingleRef implements Built { @BuiltValueField(wireName: r'username') String? get username; @BuiltValueField(wireName: r'SingleRefType') - SingleRefType? get singleRefType; - // enum singleRefTypeEnum { admin, user, }; + SingleRefType? get singlereftype; + // enum singlereftypeEnum { admin, user, }; AllOfWithSingleRef._(); @@ -53,10 +53,10 @@ class _$AllOfWithSingleRefSerializer implements PrimitiveSerializer { }) sync* { yield r'className'; yield serializers.serialize( - object.className, + object.classname, specifiedType: const FullType(String), ); if (object.color != null) { @@ -165,7 +165,7 @@ class _$$AnimalSerializer implements PrimitiveSerializer<$Animal> { value, specifiedType: const FullType(String), ) as String; - result.className = valueDes; + result.classname = valueDes; break; case r'color': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart index 5bc0982b8ab0..8a571b40fb91 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart @@ -12,11 +12,11 @@ part 'array_of_array_of_number_only.g.dart'; /// ArrayOfArrayOfNumberOnly /// /// Properties: -/// * [arrayArrayNumber] +/// * [arrayarraynumber] @BuiltValue() abstract class ArrayOfArrayOfNumberOnly implements Built { @BuiltValueField(wireName: r'ArrayArrayNumber') - BuiltList>? get arrayArrayNumber; + BuiltList>? get arrayarraynumber; ArrayOfArrayOfNumberOnly._(); @@ -41,10 +41,10 @@ class _$ArrayOfArrayOfNumberOnlySerializer implements PrimitiveSerializer>; - result.arrayArrayNumber.replace(valueDes); + result.arrayarraynumber.replace(valueDes); break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart index 72239924f5ec..a2925f243ca3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart @@ -12,11 +12,11 @@ part 'array_of_number_only.g.dart'; /// ArrayOfNumberOnly /// /// Properties: -/// * [arrayNumber] +/// * [arraynumber] @BuiltValue() abstract class ArrayOfNumberOnly implements Built { @BuiltValueField(wireName: r'ArrayNumber') - BuiltList? get arrayNumber; + BuiltList? get arraynumber; ArrayOfNumberOnly._(); @@ -41,10 +41,10 @@ class _$ArrayOfNumberOnlySerializer implements PrimitiveSerializer; - result.arrayNumber.replace(valueDes); + result.arraynumber.replace(valueDes); break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart index 75827b9a429e..985611a9cf23 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart @@ -11,19 +11,19 @@ part 'capitalization.g.dart'; /// Capitalization /// /// Properties: -/// * [smallCamel] -/// * [capitalCamel] +/// * [smallcamel] +/// * [capitalcamel] /// * [smallSnake] /// * [capitalSnake] -/// * [sCAETHFlowPoints] -/// * [ATT_NAME] - Name of the pet +/// * [scaEthFlowPoints] +/// * [attName] - Name of the pet @BuiltValue() abstract class Capitalization implements Built { @BuiltValueField(wireName: r'smallCamel') - String? get smallCamel; + String? get smallcamel; @BuiltValueField(wireName: r'CapitalCamel') - String? get capitalCamel; + String? get capitalcamel; @BuiltValueField(wireName: r'small_Snake') String? get smallSnake; @@ -32,11 +32,11 @@ abstract class Capitalization implements Built Capitalization object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.smallCamel != null) { + if (object.smallcamel != null) { yield r'smallCamel'; yield serializers.serialize( - object.smallCamel, + object.smallcamel, specifiedType: const FullType(String), ); } - if (object.capitalCamel != null) { + if (object.capitalcamel != null) { yield r'CapitalCamel'; yield serializers.serialize( - object.capitalCamel, + object.capitalcamel, specifiedType: const FullType(String), ); } @@ -89,17 +89,17 @@ class _$CapitalizationSerializer implements PrimitiveSerializer specifiedType: const FullType(String), ); } - if (object.sCAETHFlowPoints != null) { + if (object.scaEthFlowPoints != null) { yield r'SCA_ETH_Flow_Points'; yield serializers.serialize( - object.sCAETHFlowPoints, + object.scaEthFlowPoints, specifiedType: const FullType(String), ); } - if (object.ATT_NAME != null) { + if (object.attName != null) { yield r'ATT_NAME'; yield serializers.serialize( - object.ATT_NAME, + object.attName, specifiedType: const FullType(String), ); } @@ -131,14 +131,14 @@ class _$CapitalizationSerializer implements PrimitiveSerializer value, specifiedType: const FullType(String), ) as String; - result.smallCamel = valueDes; + result.smallcamel = valueDes; break; case r'CapitalCamel': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.capitalCamel = valueDes; + result.capitalcamel = valueDes; break; case r'small_Snake': final valueDes = serializers.deserialize( @@ -159,14 +159,14 @@ class _$CapitalizationSerializer implements PrimitiveSerializer value, specifiedType: const FullType(String), ) as String; - result.sCAETHFlowPoints = valueDes; + result.scaEthFlowPoints = valueDes; break; case r'ATT_NAME': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.ATT_NAME = valueDes; + result.attName = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart index af1faeef25cd..5b7162354b4e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart @@ -12,7 +12,7 @@ part 'cat.g.dart'; /// Cat /// /// Properties: -/// * [className] +/// * [classname] /// * [color] /// * [declawed] @BuiltValue() @@ -25,7 +25,7 @@ abstract class Cat implements Animal, Built { factory Cat([void updates(CatBuilder b)]) = _$Cat; @BuiltValueHook(initializeBuilder: true) - static void _defaults(CatBuilder b) => b..className=b.discriminatorValue + static void _defaults(CatBuilder b) => b..classname=b.discriminatorValue ..color = 'red'; @BuiltValueSerializer(custom: true) @@ -44,6 +44,11 @@ class _$CatSerializer implements PrimitiveSerializer { Cat object, { FullType specifiedType = FullType.unspecified, }) sync* { + yield r'className'; + yield serializers.serialize( + object.classname, + specifiedType: const FullType(String), + ); if (object.color != null) { yield r'color'; yield serializers.serialize( @@ -58,11 +63,6 @@ class _$CatSerializer implements PrimitiveSerializer { specifiedType: const FullType(bool), ); } - yield r'className'; - yield serializers.serialize( - object.className, - specifiedType: const FullType(String), - ); } @override @@ -86,6 +86,13 @@ class _$CatSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { + case r'className': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.classname = valueDes; + break; case r'color': final valueDes = serializers.deserialize( value, @@ -100,13 +107,6 @@ class _$CatSerializer implements PrimitiveSerializer { ) as bool; result.declawed = valueDes; break; - case r'className': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.className = valueDes; - break; default: unhandled.add(key); unhandled.add(value); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart index 8e40eb1d2371..39de46a560ec 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart @@ -14,12 +14,12 @@ part 'child_with_nullable.g.dart'; /// /// Properties: /// * [type] -/// * [nullableProperty] -/// * [otherProperty] +/// * [nullableproperty] +/// * [otherproperty] @BuiltValue() abstract class ChildWithNullable implements ParentWithNullable, Built { @BuiltValueField(wireName: r'otherProperty') - String? get otherProperty; + String? get otherproperty; ChildWithNullable._(); @@ -44,6 +44,13 @@ class _$ChildWithNullableSerializer implements PrimitiveSerializer { factory Dog([void updates(DogBuilder b)]) = _$Dog; @BuiltValueHook(initializeBuilder: true) - static void _defaults(DogBuilder b) => b..className=b.discriminatorValue + static void _defaults(DogBuilder b) => b..classname=b.discriminatorValue ..color = 'red'; @BuiltValueSerializer(custom: true) @@ -44,6 +44,11 @@ class _$DogSerializer implements PrimitiveSerializer { Dog object, { FullType specifiedType = FullType.unspecified, }) sync* { + yield r'className'; + yield serializers.serialize( + object.classname, + specifiedType: const FullType(String), + ); if (object.color != null) { yield r'color'; yield serializers.serialize( @@ -58,11 +63,6 @@ class _$DogSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - yield r'className'; - yield serializers.serialize( - object.className, - specifiedType: const FullType(String), - ); } @override @@ -86,26 +86,26 @@ class _$DogSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'color': + case r'className': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.color = valueDes; + result.classname = valueDes; break; - case r'breed': + case r'color': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.breed = valueDes; + result.color = valueDes; break; - case r'className': + case r'breed': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.className = valueDes; + result.breed = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart index 831f5b9d6d2d..c88058c10a63 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -20,10 +20,10 @@ part 'enum_test.g.dart'; /// * [enumStringRequired] /// * [enumInteger] /// * [enumNumber] -/// * [outerEnum] -/// * [outerEnumInteger] -/// * [outerEnumDefaultValue] -/// * [outerEnumIntegerDefaultValue] +/// * [outerenum] +/// * [outerenuminteger] +/// * [outerenumdefaultvalue] +/// * [outerenumintegerdefaultvalue] @BuiltValue() abstract class EnumTest implements Built { @BuiltValueField(wireName: r'enum_string') @@ -43,20 +43,20 @@ abstract class EnumTest implements Built { // enum enumNumberEnum { 1.1, -1.2, }; @BuiltValueField(wireName: r'outerEnum') - OuterEnum? get outerEnum; - // enum outerEnumEnum { placed, approved, delivered, }; + OuterEnum? get outerenum; + // enum outerenumEnum { placed, approved, delivered, }; @BuiltValueField(wireName: r'outerEnumInteger') - OuterEnumInteger? get outerEnumInteger; - // enum outerEnumIntegerEnum { 0, 1, 2, }; + OuterEnumInteger? get outerenuminteger; + // enum outerenumintegerEnum { 0, 1, 2, }; @BuiltValueField(wireName: r'outerEnumDefaultValue') - OuterEnumDefaultValue? get outerEnumDefaultValue; - // enum outerEnumDefaultValueEnum { placed, approved, delivered, }; + OuterEnumDefaultValue? get outerenumdefaultvalue; + // enum outerenumdefaultvalueEnum { placed, approved, delivered, }; @BuiltValueField(wireName: r'outerEnumIntegerDefaultValue') - OuterEnumIntegerDefaultValue? get outerEnumIntegerDefaultValue; - // enum outerEnumIntegerDefaultValueEnum { 0, 1, 2, }; + OuterEnumIntegerDefaultValue? get outerenumintegerdefaultvalue; + // enum outerenumintegerdefaultvalueEnum { 0, 1, 2, }; EnumTest._(); @@ -107,31 +107,31 @@ class _$EnumTestSerializer implements PrimitiveSerializer { specifiedType: const FullType(EnumTestEnumNumberEnum), ); } - if (object.outerEnum != null) { + if (object.outerenum != null) { yield r'outerEnum'; yield serializers.serialize( - object.outerEnum, + object.outerenum, specifiedType: const FullType.nullable(OuterEnum), ); } - if (object.outerEnumInteger != null) { + if (object.outerenuminteger != null) { yield r'outerEnumInteger'; yield serializers.serialize( - object.outerEnumInteger, + object.outerenuminteger, specifiedType: const FullType(OuterEnumInteger), ); } - if (object.outerEnumDefaultValue != null) { + if (object.outerenumdefaultvalue != null) { yield r'outerEnumDefaultValue'; yield serializers.serialize( - object.outerEnumDefaultValue, + object.outerenumdefaultvalue, specifiedType: const FullType(OuterEnumDefaultValue), ); } - if (object.outerEnumIntegerDefaultValue != null) { + if (object.outerenumintegerdefaultvalue != null) { yield r'outerEnumIntegerDefaultValue'; yield serializers.serialize( - object.outerEnumIntegerDefaultValue, + object.outerenumintegerdefaultvalue, specifiedType: const FullType(OuterEnumIntegerDefaultValue), ); } @@ -192,28 +192,28 @@ class _$EnumTestSerializer implements PrimitiveSerializer { specifiedType: const FullType.nullable(OuterEnum), ) as OuterEnum?; if (valueDes == null) continue; - result.outerEnum = valueDes; + result.outerenum = valueDes; break; case r'outerEnumInteger': final valueDes = serializers.deserialize( value, specifiedType: const FullType(OuterEnumInteger), ) as OuterEnumInteger; - result.outerEnumInteger = valueDes; + result.outerenuminteger = valueDes; break; case r'outerEnumDefaultValue': final valueDes = serializers.deserialize( value, specifiedType: const FullType(OuterEnumDefaultValue), ) as OuterEnumDefaultValue; - result.outerEnumDefaultValue = valueDes; + result.outerenumdefaultvalue = valueDes; break; case r'outerEnumIntegerDefaultValue': final valueDes = serializers.deserialize( value, specifiedType: const FullType(OuterEnumIntegerDefaultValue), ) as OuterEnumIntegerDefaultValue; - result.outerEnumIntegerDefaultValue = valueDes; + result.outerenumintegerdefaultvalue = valueDes; break; default: unhandled.add(key); @@ -247,7 +247,7 @@ class _$EnumTestSerializer implements PrimitiveSerializer { class EnumTestEnumStringEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringEnum UPPER = _$enumTestEnumStringEnum_UPPER; + static const EnumTestEnumStringEnum upper = _$enumTestEnumStringEnum_upper; @BuiltValueEnumConst(wireName: r'lower') static const EnumTestEnumStringEnum lower = _$enumTestEnumStringEnum_lower; @BuiltValueEnumConst(wireName: r'') @@ -266,7 +266,7 @@ class EnumTestEnumStringEnum extends EnumClass { class EnumTestEnumStringRequiredEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringRequiredEnum UPPER = _$enumTestEnumStringRequiredEnum_UPPER; + static const EnumTestEnumStringRequiredEnum upper = _$enumTestEnumStringRequiredEnum_upper; @BuiltValueEnumConst(wireName: r'lower') static const EnumTestEnumStringRequiredEnum lower = _$enumTestEnumStringRequiredEnum_lower; @BuiltValueEnumConst(wireName: r'') @@ -302,9 +302,9 @@ class EnumTestEnumIntegerEnum extends EnumClass { class EnumTestEnumNumberEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'1.1') - static const EnumTestEnumNumberEnum number1Period1 = _$enumTestEnumNumberEnum_number1Period1; + static const EnumTestEnumNumberEnum number1period1 = _$enumTestEnumNumberEnum_number1period1; @BuiltValueEnumConst(wireName: r'-1.2') - static const EnumTestEnumNumberEnum numberNegative1Period2 = _$enumTestEnumNumberEnum_numberNegative1Period2; + static const EnumTestEnumNumberEnum numberNegative1period2 = _$enumTestEnumNumberEnum_numberNegative1period2; @BuiltValueEnumConst(wireName: r'11184809', fallback: true) static const EnumTestEnumNumberEnum unknownDefaultOpenApi = _$enumTestEnumNumberEnum_unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart index ddfab9d2b56b..ce10b09df986 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart @@ -12,15 +12,15 @@ part 'fake_big_decimal_map200_response.g.dart'; /// FakeBigDecimalMap200Response /// /// Properties: -/// * [someId] -/// * [someMap] +/// * [someid] +/// * [somemap] @BuiltValue() abstract class FakeBigDecimalMap200Response implements Built { @BuiltValueField(wireName: r'someId') - num? get someId; + num? get someid; @BuiltValueField(wireName: r'someMap') - BuiltMap? get someMap; + BuiltMap? get somemap; FakeBigDecimalMap200Response._(); @@ -45,17 +45,17 @@ class _$FakeBigDecimalMap200ResponseSerializer implements PrimitiveSerializer; - result.someMap.replace(valueDes); + result.somemap.replace(valueDes); break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart index 33775231476e..72d0e1020623 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart @@ -24,7 +24,7 @@ part 'format_test.g.dart'; /// * [byte] /// * [binary] /// * [date] -/// * [dateTime] +/// * [datetime] /// * [uuid] /// * [password] /// * [patternWithDigits] - A string that is a 10 digit number. Can have leading zeros. @@ -65,7 +65,7 @@ abstract class FormatTest implements Built { Date get date; @BuiltValueField(wireName: r'dateTime') - DateTime? get dateTime; + DateTime? get datetime; @BuiltValueField(wireName: r'uuid') String? get uuid; @@ -175,10 +175,10 @@ class _$FormatTestSerializer implements PrimitiveSerializer { object.date, specifiedType: const FullType(Date), ); - if (object.dateTime != null) { + if (object.datetime != null) { yield r'dateTime'; yield serializers.serialize( - object.dateTime, + object.datetime, specifiedType: const FullType(DateTime), ); } @@ -313,7 +313,7 @@ class _$FormatTestSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(DateTime), ) as DateTime; - result.dateTime = valueDes; + result.datetime = valueDes; break; case r'uuid': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart index c092a535f2fc..f84095e35b3f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart @@ -11,11 +11,11 @@ part 'health_check_result.g.dart'; /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// /// Properties: -/// * [nullableMessage] +/// * [nullablemessage] @BuiltValue() abstract class HealthCheckResult implements Built { @BuiltValueField(wireName: r'NullableMessage') - String? get nullableMessage; + String? get nullablemessage; HealthCheckResult._(); @@ -40,10 +40,10 @@ class _$HealthCheckResultSerializer implements PrimitiveSerializer { class MapTestMapOfEnumStringEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'UPPER') - static const MapTestMapOfEnumStringEnum UPPER = _$mapTestMapOfEnumStringEnum_UPPER; + static const MapTestMapOfEnumStringEnum upper = _$mapTestMapOfEnumStringEnum_upper; @BuiltValueEnumConst(wireName: r'lower') static const MapTestMapOfEnumStringEnum lower = _$mapTestMapOfEnumStringEnum_lower; @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart index 76b5933ae5a7..8c2c2a93b4d7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -14,7 +14,7 @@ part 'mixed_properties_and_additional_properties_class.g.dart'; /// /// Properties: /// * [uuid] -/// * [dateTime] +/// * [datetime] /// * [map] @BuiltValue() abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built { @@ -22,7 +22,7 @@ abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built? get map; @@ -57,10 +57,10 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti specifiedType: const FullType(String), ); } - if (object.dateTime != null) { + if (object.datetime != null) { yield r'dateTime'; yield serializers.serialize( - object.dateTime, + object.datetime, specifiedType: const FullType(DateTime), ); } @@ -106,7 +106,7 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti value, specifiedType: const FullType(DateTime), ) as DateTime; - result.dateTime = valueDes; + result.datetime = valueDes; break; case r'map': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart index ac609bfd15ad..82bad309aa27 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart @@ -16,7 +16,7 @@ class ModelEnumClass extends EnumClass { @BuiltValueEnumConst(wireName: r'-efg') static const ModelEnumClass efg = _$efg; @BuiltValueEnumConst(wireName: r'(xyz)') - static const ModelEnumClass leftParenthesisXyzRightParenthesis = _$leftParenthesisXyzRightParenthesis; + static const ModelEnumClass leftParenthesisXyzrightParenthesis = _$leftParenthesisXyzrightParenthesis; @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) static const ModelEnumClass unknownDefaultOpenApi = _$unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart index 2702c21d36f2..1e77f54615ee 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart @@ -11,12 +11,12 @@ part 'model_file.g.dart'; /// Must be named `File` for test. /// /// Properties: -/// * [sourceURI] - Test capitalization +/// * [sourceuri] - Test capitalization @BuiltValue() abstract class ModelFile implements Built { /// Test capitalization @BuiltValueField(wireName: r'sourceURI') - String? get sourceURI; + String? get sourceuri; ModelFile._(); @@ -41,10 +41,10 @@ class _$ModelFileSerializer implements PrimitiveSerializer { ModelFile object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.sourceURI != null) { + if (object.sourceuri != null) { yield r'sourceURI'; yield serializers.serialize( - object.sourceURI, + object.sourceuri, specifiedType: const FullType(String), ); } @@ -76,7 +76,7 @@ class _$ModelFileSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.sourceURI = valueDes; + result.sourceuri = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart index 482a95f3e521..7913cd563683 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart @@ -11,11 +11,11 @@ part 'number_only.g.dart'; /// NumberOnly /// /// Properties: -/// * [justNumber] +/// * [justnumber] @BuiltValue() abstract class NumberOnly implements Built { @BuiltValueField(wireName: r'JustNumber') - num? get justNumber; + num? get justnumber; NumberOnly._(); @@ -40,10 +40,10 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { NumberOnly object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.justNumber != null) { + if (object.justnumber != null) { yield r'JustNumber'; yield serializers.serialize( - object.justNumber, + object.justnumber, specifiedType: const FullType(num), ); } @@ -75,7 +75,7 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { value, specifiedType: const FullType(num), ) as num; - result.justNumber = valueDes; + result.justnumber = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart index 4e0ae04ae50d..c48d40715241 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart @@ -15,7 +15,7 @@ part 'object_with_deprecated_fields.g.dart'; /// Properties: /// * [uuid] /// * [id] -/// * [deprecatedRef] +/// * [deprecatedref] /// * [bars] @BuiltValue() abstract class ObjectWithDeprecatedFields implements Built { @@ -26,9 +26,9 @@ abstract class ObjectWithDeprecatedFields implements Built { int? get id; @BuiltValueField(wireName: r'petId') - int? get petId; + int? get petid; @BuiltValueField(wireName: r'quantity') int? get quantity; @BuiltValueField(wireName: r'shipDate') - DateTime? get shipDate; + DateTime? get shipdate; /// Order Status @BuiltValueField(wireName: r'status') @@ -71,10 +71,10 @@ class _$OrderSerializer implements PrimitiveSerializer { specifiedType: const FullType(int), ); } - if (object.petId != null) { + if (object.petid != null) { yield r'petId'; yield serializers.serialize( - object.petId, + object.petid, specifiedType: const FullType(int), ); } @@ -85,10 +85,10 @@ class _$OrderSerializer implements PrimitiveSerializer { specifiedType: const FullType(int), ); } - if (object.shipDate != null) { + if (object.shipdate != null) { yield r'shipDate'; yield serializers.serialize( - object.shipDate, + object.shipdate, specifiedType: const FullType(DateTime), ); } @@ -141,7 +141,7 @@ class _$OrderSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(int), ) as int; - result.petId = valueDes; + result.petid = valueDes; break; case r'quantity': final valueDes = serializers.deserialize( @@ -155,7 +155,7 @@ class _$OrderSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(DateTime), ) as DateTime; - result.shipDate = valueDes; + result.shipdate = valueDes; break; case r'status': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart index bf1252135cd9..4c15298b89b4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart @@ -14,7 +14,7 @@ part 'parent_with_nullable.g.dart'; /// /// Properties: /// * [type] -/// * [nullableProperty] +/// * [nullableproperty] @BuiltValue(instantiable: false) abstract class ParentWithNullable { @BuiltValueField(wireName: r'type') @@ -22,7 +22,7 @@ abstract class ParentWithNullable { // enum typeEnum { ChildWithNullable, }; @BuiltValueField(wireName: r'nullableProperty') - String? get nullableProperty; + String? get nullableproperty; static const String discriminatorFieldName = r'type'; @@ -70,10 +70,10 @@ class _$ParentWithNullableSerializer implements PrimitiveSerializer { String get name; @BuiltValueField(wireName: r'photoUrls') - BuiltSet get photoUrls; + BuiltSet get photourls; @BuiltValueField(wireName: r'tags') BuiltList? get tags; @@ -86,7 +86,7 @@ class _$PetSerializer implements PrimitiveSerializer { ); yield r'photoUrls'; yield serializers.serialize( - object.photoUrls, + object.photourls, specifiedType: const FullType(BuiltSet, [FullType(String)]), ); if (object.tags != null) { @@ -152,7 +152,7 @@ class _$PetSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(BuiltSet, [FullType(String)]), ) as BuiltSet; - result.photoUrls.replace(valueDes); + result.photourls.replace(valueDes); break; case r'tags': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart index fa860056b45d..23d062c575e8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart @@ -11,11 +11,11 @@ part 'special_model_name.g.dart'; /// SpecialModelName /// /// Properties: -/// * [dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket] +/// * [dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket] @BuiltValue() abstract class SpecialModelName implements Built { @BuiltValueField(wireName: r'$special[property.name]') - int? get dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + int? get dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; SpecialModelName._(); @@ -40,10 +40,10 @@ class _$SpecialModelNameSerializer implements PrimitiveSerializer { @BuiltValueField(wireName: r'someProperty') - String? get someProperty; + String? get someproperty; TestInlineFreeformAdditionalPropertiesRequest._(); @@ -42,10 +42,10 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi TestInlineFreeformAdditionalPropertiesRequest object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.someProperty != null) { + if (object.someproperty != null) { yield r'someProperty'; yield serializers.serialize( - object.someProperty, + object.someproperty, specifiedType: const FullType(String), ); } @@ -77,7 +77,7 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi value, specifiedType: const FullType(String), ) as String; - result.someProperty = valueDes; + result.someproperty = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart index f7577d7e1ee9..70b9cfe546af 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart @@ -13,12 +13,12 @@ part 'user.g.dart'; /// Properties: /// * [id] /// * [username] -/// * [firstName] -/// * [lastName] +/// * [firstname] +/// * [lastname] /// * [email] /// * [password] /// * [phone] -/// * [userStatus] - User Status +/// * [userstatus] - User Status @BuiltValue() abstract class User implements Built { @BuiltValueField(wireName: r'id') @@ -28,10 +28,10 @@ abstract class User implements Built { String? get username; @BuiltValueField(wireName: r'firstName') - String? get firstName; + String? get firstname; @BuiltValueField(wireName: r'lastName') - String? get lastName; + String? get lastname; @BuiltValueField(wireName: r'email') String? get email; @@ -44,7 +44,7 @@ abstract class User implements Built { /// User Status @BuiltValueField(wireName: r'userStatus') - int? get userStatus; + int? get userstatus; User._(); @@ -83,17 +83,17 @@ class _$UserSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.firstName != null) { + if (object.firstname != null) { yield r'firstName'; yield serializers.serialize( - object.firstName, + object.firstname, specifiedType: const FullType(String), ); } - if (object.lastName != null) { + if (object.lastname != null) { yield r'lastName'; yield serializers.serialize( - object.lastName, + object.lastname, specifiedType: const FullType(String), ); } @@ -118,10 +118,10 @@ class _$UserSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.userStatus != null) { + if (object.userstatus != null) { yield r'userStatus'; yield serializers.serialize( - object.userStatus, + object.userstatus, specifiedType: const FullType(int), ); } @@ -167,14 +167,14 @@ class _$UserSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.firstName = valueDes; + result.firstname = valueDes; break; case r'lastName': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.lastName = valueDes; + result.lastname = valueDes; break; case r'email': final valueDes = serializers.deserialize( @@ -202,7 +202,7 @@ class _$UserSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(int), ) as int; - result.userStatus = valueDes; + result.userstatus = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.gitignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.gitignore new file mode 100644 index 000000000000..4298cdcbd1a2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.gitignore @@ -0,0 +1,41 @@ +# See https://dart.dev/guides/libraries/private-files + +# Files and directories created by pub +.dart_tool/ +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock + +# Don’t commit files and directories created by other development environments. +# For example, if your development environment creates any of the following files, +# consider putting them in a global ignore file: + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES new file mode 100644 index 000000000000..fe0cc70c0731 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES @@ -0,0 +1,185 @@ +.gitignore +.openapi-generator-ignore +README.md +analysis_options.yaml +build.yaml +doc/AdditionalPropertiesClass.md +doc/AllOfWithSingleRef.md +doc/Animal.md +doc/AnotherFakeApi.md +doc/ApiResponse.md +doc/ArrayOfArrayOfNumberOnly.md +doc/ArrayOfNumberOnly.md +doc/ArrayTest.md +doc/Capitalization.md +doc/Cat.md +doc/Category.md +doc/ChildWithNullable.md +doc/ClassModel.md +doc/DefaultApi.md +doc/DeprecatedObject.md +doc/Dog.md +doc/EnumArrays.md +doc/EnumTest.md +doc/FakeApi.md +doc/FakeBigDecimalMap200Response.md +doc/FakeClassnameTags123Api.md +doc/FileSchemaTestClass.md +doc/Foo.md +doc/FooGetDefaultResponse.md +doc/FormatTest.md +doc/HasOnlyReadOnly.md +doc/HealthCheckResult.md +doc/MapTest.md +doc/MixedPropertiesAndAdditionalPropertiesClass.md +doc/Model200Response.md +doc/ModelClient.md +doc/ModelEnumClass.md +doc/ModelFile.md +doc/ModelList.md +doc/ModelReturn.md +doc/Name.md +doc/NullableClass.md +doc/NumberOnly.md +doc/ObjectWithDeprecatedFields.md +doc/Order.md +doc/OuterComposite.md +doc/OuterEnum.md +doc/OuterEnumDefaultValue.md +doc/OuterEnumInteger.md +doc/OuterEnumIntegerDefaultValue.md +doc/OuterObjectWithEnumProperty.md +doc/ParentWithNullable.md +doc/Pet.md +doc/PetApi.md +doc/ReadOnlyFirst.md +doc/SingleRefType.md +doc/SpecialModelName.md +doc/StoreApi.md +doc/Tag.md +doc/TestInlineFreeformAdditionalPropertiesRequest.md +doc/User.md +doc/UserApi.md +lib/openapi.dart +lib/src/api.dart +lib/src/api/another_fake_api.dart +lib/src/api/default_api.dart +lib/src/api/fake_api.dart +lib/src/api/fake_classname_tags123_api.dart +lib/src/api/pet_api.dart +lib/src/api/store_api.dart +lib/src/api/user_api.dart +lib/src/auth/api_key_auth.dart +lib/src/auth/auth.dart +lib/src/auth/basic_auth.dart +lib/src/auth/bearer_auth.dart +lib/src/auth/oauth.dart +lib/src/deserialize.dart +lib/src/model/additional_properties_class.dart +lib/src/model/all_of_with_single_ref.dart +lib/src/model/animal.dart +lib/src/model/api_response.dart +lib/src/model/array_of_array_of_number_only.dart +lib/src/model/array_of_number_only.dart +lib/src/model/array_test.dart +lib/src/model/capitalization.dart +lib/src/model/cat.dart +lib/src/model/category.dart +lib/src/model/child_with_nullable.dart +lib/src/model/class_model.dart +lib/src/model/deprecated_object.dart +lib/src/model/dog.dart +lib/src/model/enum_arrays.dart +lib/src/model/enum_test.dart +lib/src/model/fake_big_decimal_map200_response.dart +lib/src/model/file_schema_test_class.dart +lib/src/model/foo.dart +lib/src/model/foo_get_default_response.dart +lib/src/model/format_test.dart +lib/src/model/has_only_read_only.dart +lib/src/model/health_check_result.dart +lib/src/model/map_test.dart +lib/src/model/mixed_properties_and_additional_properties_class.dart +lib/src/model/model200_response.dart +lib/src/model/model_client.dart +lib/src/model/model_enum_class.dart +lib/src/model/model_file.dart +lib/src/model/model_list.dart +lib/src/model/model_return.dart +lib/src/model/name.dart +lib/src/model/nullable_class.dart +lib/src/model/number_only.dart +lib/src/model/object_with_deprecated_fields.dart +lib/src/model/order.dart +lib/src/model/outer_composite.dart +lib/src/model/outer_enum.dart +lib/src/model/outer_enum_default_value.dart +lib/src/model/outer_enum_integer.dart +lib/src/model/outer_enum_integer_default_value.dart +lib/src/model/outer_object_with_enum_property.dart +lib/src/model/parent_with_nullable.dart +lib/src/model/pet.dart +lib/src/model/read_only_first.dart +lib/src/model/single_ref_type.dart +lib/src/model/special_model_name.dart +lib/src/model/tag.dart +lib/src/model/test_inline_freeform_additional_properties_request.dart +lib/src/model/user.dart +pubspec.yaml +test/additional_properties_class_test.dart +test/all_of_with_single_ref_test.dart +test/animal_test.dart +test/another_fake_api_test.dart +test/api_response_test.dart +test/array_of_array_of_number_only_test.dart +test/array_of_number_only_test.dart +test/array_test_test.dart +test/capitalization_test.dart +test/cat_test.dart +test/category_test.dart +test/child_with_nullable_test.dart +test/class_model_test.dart +test/default_api_test.dart +test/deprecated_object_test.dart +test/dog_test.dart +test/enum_arrays_test.dart +test/enum_test_test.dart +test/fake_api_test.dart +test/fake_big_decimal_map200_response_test.dart +test/fake_classname_tags123_api_test.dart +test/file_schema_test_class_test.dart +test/foo_get_default_response_test.dart +test/foo_test.dart +test/format_test_test.dart +test/has_only_read_only_test.dart +test/health_check_result_test.dart +test/map_test_test.dart +test/mixed_properties_and_additional_properties_class_test.dart +test/model200_response_test.dart +test/model_client_test.dart +test/model_enum_class_test.dart +test/model_file_test.dart +test/model_list_test.dart +test/model_return_test.dart +test/name_test.dart +test/nullable_class_test.dart +test/number_only_test.dart +test/object_with_deprecated_fields_test.dart +test/order_test.dart +test/outer_composite_test.dart +test/outer_enum_default_value_test.dart +test/outer_enum_integer_default_value_test.dart +test/outer_enum_integer_test.dart +test/outer_enum_test.dart +test/outer_object_with_enum_property_test.dart +test/parent_with_nullable_test.dart +test/pet_api_test.dart +test/pet_test.dart +test/read_only_first_test.dart +test/single_ref_type_test.dart +test/special_model_name_test.dart +test/store_api_test.dart +test/tag_test.dart +test/test_inline_freeform_additional_properties_request_test.dart +test/user_api_test.dart +test/user_test.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION new file mode 100644 index 000000000000..4c631cf217a2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0-SNAPSHOT diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md new file mode 100644 index 000000000000..d8a08b3c2a79 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md @@ -0,0 +1,212 @@ +# openapi (EXPERIMENTAL) +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Generator version: 7.14.0-SNAPSHOT +- Build package: org.openapitools.codegen.languages.DartDioClientCodegen + +## Requirements + +* Dart 2.15.0+ or Flutter 2.8.0+ +* Dio 5.0.0+ (https://pub.dev/packages/dio) +* JSON Serializable 6.1.5+ (https://pub.dev/packages/json_serializable) + +## Installation & Usage + +### pub.dev +To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml +```yaml +dependencies: + openapi: 1.0.0 +``` + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +```yaml +dependencies: + openapi: + git: + url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + #ref: main +``` + +### Local development +To use the package from your local drive, please include the following in pubspec.yaml +```yaml +dependencies: + openapi: + path: /path/to/openapi +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/openapi.dart'; + + +final api = Openapi().getAnotherFakeApi(); +final ModelClient modelclient = ; // ModelClient | client model + +try { + final response = await api.call123testSpecialTags(modelclient); + print(response); +} catch on DioException (e) { + print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +[*AnotherFakeApi*](doc/AnotherFakeApi.md) | [**call123testSpecialTags**](doc/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +[*DefaultApi*](doc/DefaultApi.md) | [**fooGet**](doc/DefaultApi.md#fooget) | **GET** /foo | +[*FakeApi*](doc/FakeApi.md) | [**fakeBigDecimalMap**](doc/FakeApi.md#fakebigdecimalmap) | **GET** /fake/BigDecimalMap | +[*FakeApi*](doc/FakeApi.md) | [**fakeHealthGet**](doc/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +[*FakeApi*](doc/FakeApi.md) | [**fakeHttpSignatureTest**](doc/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterBooleanSerialize**](doc/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterCompositeSerialize**](doc/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterNumberSerialize**](doc/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[*FakeApi*](doc/FakeApi.md) | [**fakeOuterStringSerialize**](doc/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[*FakeApi*](doc/FakeApi.md) | [**fakePropertyEnumIntegerSerialize**](doc/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +[*FakeApi*](doc/FakeApi.md) | [**testAdditionalPropertiesReference**](doc/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties +[*FakeApi*](doc/FakeApi.md) | [**testBodyWithBinary**](doc/FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | +[*FakeApi*](doc/FakeApi.md) | [**testBodyWithFileSchema**](doc/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[*FakeApi*](doc/FakeApi.md) | [**testBodyWithQueryParams**](doc/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[*FakeApi*](doc/FakeApi.md) | [**testClientModel**](doc/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[*FakeApi*](doc/FakeApi.md) | [**testEndpointParameters**](doc/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[*FakeApi*](doc/FakeApi.md) | [**testEnumParameters**](doc/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +[*FakeApi*](doc/FakeApi.md) | [**testGroupParameters**](doc/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[*FakeApi*](doc/FakeApi.md) | [**testInlineAdditionalProperties**](doc/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[*FakeApi*](doc/FakeApi.md) | [**testInlineFreeformAdditionalProperties**](doc/FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties +[*FakeApi*](doc/FakeApi.md) | [**testJsonFormData**](doc/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[*FakeApi*](doc/FakeApi.md) | [**testNullable**](doc/FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property +[*FakeApi*](doc/FakeApi.md) | [**testQueryParameterCollectionFormat**](doc/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | +[*FakeApi*](doc/FakeApi.md) | [**testStringMapReference**](doc/FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map +[*FakeClassnameTags123Api*](doc/FakeClassnameTags123Api.md) | [**testClassname**](doc/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +[*PetApi*](doc/PetApi.md) | [**addPet**](doc/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +[*PetApi*](doc/PetApi.md) | [**deletePet**](doc/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[*PetApi*](doc/PetApi.md) | [**findPetsByStatus**](doc/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[*PetApi*](doc/PetApi.md) | [**findPetsByTags**](doc/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[*PetApi*](doc/PetApi.md) | [**getPetById**](doc/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[*PetApi*](doc/PetApi.md) | [**updatePet**](doc/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +[*PetApi*](doc/PetApi.md) | [**updatePetWithForm**](doc/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[*PetApi*](doc/PetApi.md) | [**uploadFile**](doc/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[*PetApi*](doc/PetApi.md) | [**uploadFileWithRequiredFile**](doc/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +[*StoreApi*](doc/StoreApi.md) | [**deleteOrder**](doc/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[*StoreApi*](doc/StoreApi.md) | [**getInventory**](doc/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[*StoreApi*](doc/StoreApi.md) | [**getOrderById**](doc/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[*StoreApi*](doc/StoreApi.md) | [**placeOrder**](doc/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | Create user +[*UserApi*](doc/UserApi.md) | [**createUsersWithArrayInput**](doc/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[*UserApi*](doc/UserApi.md) | [**createUsersWithListInput**](doc/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +[*UserApi*](doc/UserApi.md) | [**getUserByName**](doc/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[*UserApi*](doc/UserApi.md) | [**loginUser**](doc/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +[*UserApi*](doc/UserApi.md) | [**logoutUser**](doc/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](doc/AdditionalPropertiesClass.md) + - [AllOfWithSingleRef](doc/AllOfWithSingleRef.md) + - [Animal](doc/Animal.md) + - [ApiResponse](doc/ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc/ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc/ArrayOfNumberOnly.md) + - [ArrayTest](doc/ArrayTest.md) + - [Capitalization](doc/Capitalization.md) + - [Cat](doc/Cat.md) + - [Category](doc/Category.md) + - [ChildWithNullable](doc/ChildWithNullable.md) + - [ClassModel](doc/ClassModel.md) + - [DeprecatedObject](doc/DeprecatedObject.md) + - [Dog](doc/Dog.md) + - [EnumArrays](doc/EnumArrays.md) + - [EnumTest](doc/EnumTest.md) + - [FakeBigDecimalMap200Response](doc/FakeBigDecimalMap200Response.md) + - [FileSchemaTestClass](doc/FileSchemaTestClass.md) + - [Foo](doc/Foo.md) + - [FooGetDefaultResponse](doc/FooGetDefaultResponse.md) + - [FormatTest](doc/FormatTest.md) + - [HasOnlyReadOnly](doc/HasOnlyReadOnly.md) + - [HealthCheckResult](doc/HealthCheckResult.md) + - [MapTest](doc/MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc/MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc/Model200Response.md) + - [ModelClient](doc/ModelClient.md) + - [ModelEnumClass](doc/ModelEnumClass.md) + - [ModelFile](doc/ModelFile.md) + - [ModelList](doc/ModelList.md) + - [ModelReturn](doc/ModelReturn.md) + - [Name](doc/Name.md) + - [NullableClass](doc/NullableClass.md) + - [NumberOnly](doc/NumberOnly.md) + - [ObjectWithDeprecatedFields](doc/ObjectWithDeprecatedFields.md) + - [Order](doc/Order.md) + - [OuterComposite](doc/OuterComposite.md) + - [OuterEnum](doc/OuterEnum.md) + - [OuterEnumDefaultValue](doc/OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc/OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc/OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc/OuterObjectWithEnumProperty.md) + - [ParentWithNullable](doc/ParentWithNullable.md) + - [Pet](doc/Pet.md) + - [ReadOnlyFirst](doc/ReadOnlyFirst.md) + - [SingleRefType](doc/SingleRefType.md) + - [SpecialModelName](doc/SpecialModelName.md) + - [Tag](doc/Tag.md) + - [TestInlineFreeformAdditionalPropertiesRequest](doc/TestInlineFreeformAdditionalPropertiesRequest.md) + - [User](doc/User.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +### http_basic_test + +- **Type**: HTTP basic authentication + +### bearer_test + +- **Type**: HTTP Bearer Token authentication (JWT) + +### http_signature_test + +- **Type**: HTTP signature authentication + + +## Author + + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/analysis_options.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/analysis_options.yaml new file mode 100644 index 000000000000..70524126e3fe --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/analysis_options.yaml @@ -0,0 +1,10 @@ +analyzer: + language: + strict-inference: true + strict-raw-types: true + strict-casts: false + exclude: + - test/*.dart + - lib/src/model/*.g.dart + errors: + deprecated_member_use_from_same_package: ignore diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/build.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/build.yaml new file mode 100644 index 000000000000..89a4dd6e1c2e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/build.yaml @@ -0,0 +1,18 @@ +targets: + $default: + builders: + json_serializable: + options: + # Options configure how source code is generated for every + # `@JsonSerializable`-annotated class in the package. + # + # The default value for each is listed. + any_map: false + checked: true + create_factory: true + create_to_json: true + disallow_unrecognized_keys: true + explicit_to_json: true + field_rename: none + ignore_unannotated: false + include_if_null: false diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..863b8503db83 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md @@ -0,0 +1,16 @@ +# openapi.model.AdditionalPropertiesClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapProperty** | **Map<String, String>** | | [optional] +**mapOfMapProperty** | [**Map<String, Map<String, String>>**](Map.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md new file mode 100644 index 000000000000..151142162f62 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md @@ -0,0 +1,16 @@ +# openapi.model.AllOfWithSingleRef + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | [optional] +**singlereftype** | [**SingleRefType**](SingleRefType.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md new file mode 100644 index 000000000000..570de2e45be3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md @@ -0,0 +1,16 @@ +# openapi.model.Animal + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classname** | **String** | | +**color** | **String** | | [optional] [default to 'red'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md new file mode 100644 index 000000000000..1ed2cb04d8f3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md @@ -0,0 +1,57 @@ +# openapi.api.AnotherFakeApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +> ModelClient call123testSpecialTags(modelclient) + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getAnotherFakeApi(); +final ModelClient modelclient = ; // ModelClient | client model + +try { + final response = api.call123testSpecialTags(modelclient); + print(response); +} catch on DioException (e) { + print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelclient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md new file mode 100644 index 000000000000..7ad5da0f89e4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**type** | **String** | | [optional] +**message** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..a1c3e86e055e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.ArrayOfArrayOfNumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayarraynumber** | [**List<List<num>>**](List.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..184bc6962f85 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.ArrayOfNumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arraynumber** | **List<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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md new file mode 100644 index 000000000000..8ae11de10022 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md @@ -0,0 +1,17 @@ +# openapi.model.ArrayTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **List<String>** | | [optional] +**arrayArrayOfInteger** | [**List<List<int>>**](List.md) | | [optional] +**arrayArrayOfModel** | [**List<List<ReadOnlyFirst>>**](List.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md new file mode 100644 index 000000000000..e673e7baef4b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md @@ -0,0 +1,20 @@ +# openapi.model.Capitalization + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallcamel** | **String** | | [optional] +**capitalcamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**scaEthFlowPoints** | **String** | | [optional] +**attName** | **String** | Name of the pet | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md new file mode 100644 index 000000000000..9c557ac9082a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md @@ -0,0 +1,17 @@ +# openapi.model.Cat + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classname** | **String** | | +**color** | **String** | | [optional] [default to 'red'] +**declawed** | **bool** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Category.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Category.md new file mode 100644 index 000000000000..ae6bc52e89d8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **String** | | [default to 'default-name'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md new file mode 100644 index 000000000000..54b310b0f58d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md @@ -0,0 +1,17 @@ +# openapi.model.ChildWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableproperty** | **String** | | [optional] +**otherproperty** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md new file mode 100644 index 000000000000..13ae5d3a4708 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md @@ -0,0 +1,15 @@ +# openapi.model.ClassModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**class_** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md new file mode 100644 index 000000000000..6abd2b44f9c4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md @@ -0,0 +1,51 @@ +# openapi.api.DefaultApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fooGet**](DefaultApi.md#fooget) | **GET** /foo | + + +# **fooGet** +> FooGetDefaultResponse fooGet() + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getDefaultApi(); + +try { + final response = api.fooGet(); + print(response); +} catch on DioException (e) { + print('Exception when calling DefaultApi->fooGet: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md new file mode 100644 index 000000000000..bf2ef67a26fc --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md @@ -0,0 +1,15 @@ +# openapi.model.DeprecatedObject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md new file mode 100644 index 000000000000..b2ba3dfcef59 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md @@ -0,0 +1,17 @@ +# openapi.model.Dog + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classname** | **String** | | +**color** | **String** | | [optional] [default to 'red'] +**breed** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md new file mode 100644 index 000000000000..1d4fd1363b59 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md @@ -0,0 +1,16 @@ +# openapi.model.EnumArrays + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **List<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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md new file mode 100644 index 000000000000..f1b0758b868e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md @@ -0,0 +1,22 @@ +# openapi.model.EnumTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **int** | | [optional] +**enumNumber** | **double** | | [optional] +**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md new file mode 100644 index 000000000000..14e13ea83e5f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md @@ -0,0 +1,1028 @@ +# openapi.api.FakeApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeBigDecimalMap**](FakeApi.md#fakebigdecimalmap) | **GET** /fake/BigDecimalMap | +[**fakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +[**fakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +[**testAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties +[**testBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | +[**testBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties +[**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**testNullable**](FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property +[**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | +[**testStringMapReference**](FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map + + +# **fakeBigDecimalMap** +> FakeBigDecimalMap200Response fakeBigDecimalMap() + + + +for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); + +try { + final response = api.fakeBigDecimalMap(); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeHealthGet** +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); + +try { + final response = api.fakeHealthGet(); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeHealthGet: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeHttpSignatureTest** +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final Pet pet = ; // Pet | Pet object that needs to be added to the store +final String query1 = query1_example; // String | query parameter +final String header1 = header1_example; // String | header parameter + +try { + api.fakeHttpSignatureTest(pet, query1, header1); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **query1** | **String**| query parameter | [optional] + **header1** | **String**| header parameter | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterBooleanSerialize** +> bool fakeOuterBooleanSerialize(body) + + + +Test serialization of outer boolean types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final bool body = true; // bool | Input boolean as post body + +try { + final response = api.fakeOuterBooleanSerialize(body); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **bool**| Input boolean as post body | [optional] + +### Return type + +**bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +> OuterComposite fakeOuterCompositeSerialize(outercomposite) + + + +Test serialization of object with outer number type + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final OuterComposite outercomposite = ; // OuterComposite | Input composite as post body + +try { + final response = api.fakeOuterCompositeSerialize(outercomposite); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +> num fakeOuterNumberSerialize(body) + + + +Test serialization of outer number types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final num body = 8.14; // num | Input number as post body + +try { + final response = api.fakeOuterNumberSerialize(body); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **num**| Input number as post body | [optional] + +### Return type + +**num** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +> String fakeOuterStringSerialize(body) + + + +Test serialization of outer string types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final String body = body_example; // String | Input string as post body + +try { + final response = api.fakeOuterStringSerialize(body); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String**| Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakePropertyEnumIntegerSerialize** +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) + + + +Test serialization of enum (int) properties with examples + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final OuterObjectWithEnumProperty outerobjectwithenumproperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body + +try { + final response = api.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testAdditionalPropertiesReference** +> testAdditionalPropertiesReference(requestBody) + +test referenced additionalProperties + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final Map requestBody = Object; // Map | request body + +try { + api.testAdditionalPropertiesReference(requestBody); +} catch on DioException (e) { + print('Exception when calling FakeApi->testAdditionalPropertiesReference: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Map<String, Object>**](Object.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithBinary** +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final MultipartFile body = BINARY_DATA_HERE; // MultipartFile | image to upload + +try { + api.testBodyWithBinary(body); +} catch on DioException (e) { + print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MultipartFile**| image to upload | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: image/png + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +> testBodyWithFileSchema(fileschematestclass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final FileSchemaTestClass fileschematestclass = ; // FileSchemaTestClass | + +try { + api.testBodyWithFileSchema(fileschematestclass); +} catch on DioException (e) { + print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +> testBodyWithQueryParams(query, user) + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final String query = query_example; // String | +final User user = ; // User | + +try { + api.testBodyWithQueryParams(query, user); +} catch on DioException (e) { + print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String**| | + **user** | [**User**](User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +> ModelClient testClientModel(modelclient) + +To test \"client\" model + +To test \"client\" model + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final ModelClient modelclient = ; // ModelClient | client model + +try { + final response = api.testClientModel(modelclient); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeApi->testClientModel: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelclient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: http_basic_test +//defaultApiClient.getAuthentication('http_basic_test').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('http_basic_test').password = 'YOUR_PASSWORD'; + +final api = Openapi().getFakeApi(); +final num number = 8.14; // num | None +final double double_ = 1.2; // double | None +final String patternWithoutDelimiter = patternWithoutDelimiter_example; // String | None +final String byte = BYTE_ARRAY_DATA_HERE; // String | None +final int integer = 56; // int | None +final int int32 = 56; // int | None +final int int64 = 789; // int | None +final double float = 3.4; // double | None +final String string = string_example; // String | None +final MultipartFile binary = BINARY_DATA_HERE; // MultipartFile | None +final DateTime date = 2013-10-20; // DateTime | None +final DateTime datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final String password = password_example; // String | None +final String callback = callback_example; // String | None + +try { + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); +} catch on DioException (e) { + print('Exception when calling FakeApi->testEndpointParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **num**| None | + **double_** | **double**| None | + **patternWithoutDelimiter** | **String**| None | + **byte** | **String**| None | + **integer** | **int**| None | [optional] + **int32** | **int**| None | [optional] + **int64** | **int**| None | [optional] + **float** | **double**| None | [optional] + **string** | **String**| None | [optional] + **binary** | **MultipartFile**| None | [optional] + **date** | **DateTime**| None | [optional] + **datetime** | **DateTime**| None | [optional] + **password** | **String**| None | [optional] + **callback** | **String**| None | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) + +To test enum parameters + +To test enum parameters + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final List enumHeaderStringArray = ; // List | Header parameter enum test (string array) +final String enumHeaderString = enumHeaderString_example; // String | Header parameter enum test (string) +final List enumQueryStringArray = ; // List | Query parameter enum test (string array) +final String enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) +final int enumQueryInteger = 56; // int | Query parameter enum test (double) +final double enumQueryDouble = 1.2; // double | Query parameter enum test (double) +final List enumQueryModelArray = ; // List | +final List enumFormStringArray = ; // List | Form parameter enum test (string array) +final String enumFormString = enumFormString_example; // String | Form parameter enum test (string) + +try { + api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); +} catch on DioException (e) { + print('Exception when calling FakeApi->testEnumParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] + **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] + **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**List<ModelEnumClass>**](ModelEnumClass.md)| | [optional] + **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] + **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final int requiredStringGroup = 56; // int | Required String in group parameters +final bool requiredBooleanGroup = true; // bool | Required Boolean in group parameters +final int requiredInt64Group = 789; // int | Required Integer in group parameters +final int stringGroup = 56; // int | String in group parameters +final bool booleanGroup = true; // bool | Boolean in group parameters +final int int64Group = 789; // int | Integer in group parameters + +try { + api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); +} catch on DioException (e) { + print('Exception when calling FakeApi->testGroupParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **int**| Required String in group parameters | + **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | + **requiredInt64Group** | **int**| Required Integer in group parameters | + **stringGroup** | **int**| String in group parameters | [optional] + **booleanGroup** | **bool**| Boolean in group parameters | [optional] + **int64Group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +> testInlineAdditionalProperties(requestBody) + +test inline additionalProperties + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final Map requestBody = ; // Map | request body + +try { + api.testInlineAdditionalProperties(requestBody); +} catch on DioException (e) { + print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Map<String, String>**](String.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineFreeformAdditionalProperties** +> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) + +test inline free-form additionalProperties + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body + +try { + api.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); +} catch on DioException (e) { + print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +> testJsonFormData(param, param2) + +test json serialization of form data + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final String param = param_example; // String | field1 +final String param2 = param2_example; // String | field2 + +try { + api.testJsonFormData(param, param2); +} catch on DioException (e) { + print('Exception when calling FakeApi->testJsonFormData: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String**| field1 | + **param2** | **String**| field2 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testNullable** +> testNullable(childwithnullable) + +test nullable parent property + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final ChildWithNullable childwithnullable = ; // ChildWithNullable | request body + +try { + api.testNullable(childwithnullable); +} catch on DioException (e) { + print('Exception when calling FakeApi->testNullable: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testQueryParameterCollectionFormat** +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) + + + +To test the collection format in query parameters + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final List pipe = ; // List | +final List ioutil = ; // List | +final List http = ; // List | +final List url = ; // List | +final List context = ; // List | +final String allowempty = allowempty_example; // String | +final Map language = ; // Map | + +try { + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); +} catch on DioException (e) { + print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List<String>**](String.md)| | + **ioutil** | [**List<String>**](String.md)| | + **http** | [**List<String>**](String.md)| | + **url** | [**List<String>**](String.md)| | + **context** | [**List<String>**](String.md)| | + **allowempty** | **String**| | + **language** | [**Map<String, String>**](String.md)| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testStringMapReference** +> testStringMapReference(requestBody) + +test referenced string map + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getFakeApi(); +final Map requestBody = ; // Map | request body + +try { + api.testStringMapReference(requestBody); +} catch on DioException (e) { + print('Exception when calling FakeApi->testStringMapReference: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Map<String, String>**](String.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md new file mode 100644 index 000000000000..d01fd4973470 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md @@ -0,0 +1,16 @@ +# openapi.model.FakeBigDecimalMap200Response + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**someid** | **num** | | [optional] +**somemap** | **Map<String, 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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md new file mode 100644 index 000000000000..88a70afff0f0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md @@ -0,0 +1,61 @@ +# openapi.api.FakeClassnameTags123Api + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +> ModelClient testClassname(modelclient) + +To test class name in snake case + +To test class name in snake case + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key_query +//defaultApiClient.getAuthentication('api_key_query').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; + +final api = Openapi().getFakeClassnameTags123Api(); +final ModelClient modelclient = ; // ModelClient | client model + +try { + final response = api.testClassname(modelclient); + print(response); +} catch on DioException (e) { + print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelclient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md new file mode 100644 index 000000000000..d14ac319d294 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md @@ -0,0 +1,16 @@ +# openapi.model.FileSchemaTestClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**ModelFile**](ModelFile.md) | | [optional] +**files** | [**List<ModelFile>**](ModelFile.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Foo.md new file mode 100644 index 000000000000..185b76e3f5b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Foo.md @@ -0,0 +1,15 @@ +# openapi.model.Foo + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [default to 'bar'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md new file mode 100644 index 000000000000..10d0133abd95 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md @@ -0,0 +1,15 @@ +# openapi.model.FooGetDefaultResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md new file mode 100644 index 000000000000..a25a61c53343 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md @@ -0,0 +1,30 @@ +# openapi.model.FormatTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **int** | | [optional] +**int32** | **int** | | [optional] +**int64** | **int** | | [optional] +**number** | **num** | | +**float** | **double** | | [optional] +**double_** | **double** | | [optional] +**decimal** | **double** | | [optional] +**string** | **String** | | [optional] +**byte** | **String** | | +**binary** | [**MultipartFile**](MultipartFile.md) | | [optional] +**date** | [**DateTime**](DateTime.md) | | +**datetime** | [**DateTime**](DateTime.md) | | [optional] +**uuid** | **String** | | [optional] +**password** | **String** | | +**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md new file mode 100644 index 000000000000..32cae937155d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md @@ -0,0 +1,16 @@ +# openapi.model.HasOnlyReadOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**foo** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md new file mode 100644 index 000000000000..c912fb2e08f4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md @@ -0,0 +1,15 @@ +# openapi.model.HealthCheckResult + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nullablemessage** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MapTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MapTest.md new file mode 100644 index 000000000000..197fe780a25a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MapTest.md @@ -0,0 +1,18 @@ +# openapi.model.MapTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [**Map<String, Map<String, String>>**](Map.md) | | [optional] +**mapOfEnumString** | **Map<String, String>** | | [optional] +**directMap** | **Map<String, bool>** | | [optional] +**indirectMap** | **Map<String, bool>** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..e9a76c258000 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,17 @@ +# openapi.model.MixedPropertiesAndAdditionalPropertiesClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] +**map** | [**Map<String, Animal>**](Animal.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md new file mode 100644 index 000000000000..5aa3fb97c32e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md @@ -0,0 +1,16 @@ +# openapi.model.Model200Response + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**class_** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md new file mode 100644 index 000000000000..f7b922f4a398 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md @@ -0,0 +1,15 @@ +# openapi.model.ModelClient + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelEnumClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelEnumClass.md new file mode 100644 index 000000000000..ebaafb44c7f7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelEnumClass.md @@ -0,0 +1,14 @@ +# openapi.model.ModelEnumClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md new file mode 100644 index 000000000000..d54b1bbbea04 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md @@ -0,0 +1,15 @@ +# openapi.model.ModelFile + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceuri** | **String** | Test capitalization | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelList.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelList.md new file mode 100644 index 000000000000..283aa1f6b711 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelList.md @@ -0,0 +1,15 @@ +# openapi.model.ModelList + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**n123list** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md new file mode 100644 index 000000000000..bc02df7a3692 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md @@ -0,0 +1,15 @@ +# openapi.model.ModelReturn + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return_** | **int** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Name.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Name.md new file mode 100644 index 000000000000..25f49ea946b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Name.md @@ -0,0 +1,18 @@ +# openapi.model.Name + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | +**snakeCase** | **int** | | [optional] +**property** | **String** | | [optional] +**n123number** | **int** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md new file mode 100644 index 000000000000..70ac1091d417 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md @@ -0,0 +1,26 @@ +# openapi.model.NullableClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integerProp** | **int** | | [optional] +**numberProp** | **num** | | [optional] +**booleanProp** | **bool** | | [optional] +**stringProp** | **String** | | [optional] +**dateProp** | [**DateTime**](DateTime.md) | | [optional] +**datetimeProp** | [**DateTime**](DateTime.md) | | [optional] +**arrayNullableProp** | **List<Object>** | | [optional] +**arrayAndItemsNullableProp** | **List<Object>** | | [optional] +**arrayItemsNullable** | **List<Object>** | | [optional] +**objectNullableProp** | **Map<String, Object>** | | [optional] +**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] +**objectItemsNullable** | **Map<String, Object>** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md new file mode 100644 index 000000000000..f5fac6f8a17c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.NumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justnumber** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md new file mode 100644 index 000000000000..9ba7fdf6634f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md @@ -0,0 +1,18 @@ +# openapi.model.ObjectWithDeprecatedFields + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**id** | **num** | | [optional] +**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**bars** | **List<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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md new file mode 100644 index 000000000000..08914a83f300 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**petid** | **int** | | [optional] +**quantity** | **int** | | [optional] +**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md new file mode 100644 index 000000000000..04bab7eff5d1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md @@ -0,0 +1,17 @@ +# openapi.model.OuterComposite + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **num** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **bool** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md new file mode 100644 index 000000000000..af62ad87ab2e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnum + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md new file mode 100644 index 000000000000..c1bf8b0dec44 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumDefaultValue + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md new file mode 100644 index 000000000000..8c80a9e5c85f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumInteger + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md new file mode 100644 index 000000000000..eb8b55d70249 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumIntegerDefaultValue + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md new file mode 100644 index 000000000000..eab2ae8f66b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md @@ -0,0 +1,15 @@ +# openapi.model.OuterObjectWithEnumProperty + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**OuterEnumInteger**](OuterEnumInteger.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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md new file mode 100644 index 000000000000..435464987052 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md @@ -0,0 +1,16 @@ +# openapi.model.ParentWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableproperty** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md new file mode 100644 index 000000000000..c6183f8d49d1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photourls** | **Set<String>** | | +**tags** | [**List<Tag>**](Tag.md) | | [optional] +**status** | **String** | pet status in the store | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md new file mode 100644 index 000000000000..3dc820b749b5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md @@ -0,0 +1,439 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +> addPet(pet) + +Add a new pet to the store + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final Pet pet = ; // Pet | Pet object that needs to be added to the store + +try { + api.addPet(pet); +} catch on DioException (e) { + print('Exception when calling PetApi->addPet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petid, apiKey) + +Deletes a pet + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petid = 789; // int | Pet id to delete +final String apiKey = apiKey_example; // String | + +try { + api.deletePet(petid, apiKey); +} catch on DioException (e) { + print('Exception when calling PetApi->deletePet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final List status = ; // List | Status values that need to be considered for filter + +try { + final response = api.findPetsByStatus(status); + print(response); +} catch on DioException (e) { + print('Exception when calling PetApi->findPetsByStatus: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | + +### Return type + +[**List<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> Set findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final Set tags = ; // Set | Tags to filter by + +try { + final response = api.findPetsByTags(tags); + print(response); +} catch on DioException (e) { + print('Exception when calling PetApi->findPetsByTags: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**Set<String>**](String.md)| Tags to filter by | + +### Return type + +[**Set<Pet>**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petid) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +final api = Openapi().getPetApi(); +final int petid = 789; // int | ID of pet to return + +try { + final response = api.getPetById(petid); + print(response); +} catch on DioException (e) { + print('Exception when calling PetApi->getPetById: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(pet) + +Update an existing pet + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final Pet pet = ; // Pet | Pet object that needs to be added to the store + +try { + api.updatePet(pet); +} catch on DioException (e) { + print('Exception when calling PetApi->updatePet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petid, name, status) + +Updates a pet in the store with form data + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petid = 789; // int | ID of pet that needs to be updated +final String name = name_example; // String | Updated name of the pet +final String status = status_example; // String | Updated status of the pet + +try { + api.updatePetWithForm(petid, name, status); +} catch on DioException (e) { + print('Exception when calling PetApi->updatePetWithForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petid, additionalmetadata, file) + +uploads an image + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petid = 789; // int | ID of pet to update +final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload + +try { + final response = api.uploadFile(petid, additionalmetadata, file); + print(response); +} catch on DioException (e) { + print('Exception when calling PetApi->uploadFile: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet to update | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **file** | **MultipartFile**| file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) + +uploads an image (required) + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api = Openapi().getPetApi(); +final int petid = 789; // int | ID of pet to update +final MultipartFile requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server + +try { + final response = api.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + print(response); +} catch on DioException (e) { + print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet to update | + **requiredfile** | **MultipartFile**| file to upload | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md new file mode 100644 index 000000000000..8f612e8ba19f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md @@ -0,0 +1,16 @@ +# openapi.model.ReadOnlyFirst + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] +**baz** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md new file mode 100644 index 000000000000..0dc93840cd7f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md @@ -0,0 +1,14 @@ +# openapi.model.SingleRefType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md new file mode 100644 index 000000000000..04697c8e6225 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md @@ -0,0 +1,15 @@ +# openapi.model.SpecialModelName + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md new file mode 100644 index 000000000000..42028947229f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md @@ -0,0 +1,188 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getStoreApi(); +final String orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api.deleteOrder(orderId); +} catch on DioException (e) { + print('Exception when calling StoreApi->deleteOrder: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +final api = Openapi().getStoreApi(); + +try { + final response = api.getInventory(); + print(response); +} catch on DioException (e) { + print('Exception when calling StoreApi->getInventory: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map<String, int>** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getStoreApi(); +final int orderId = 789; // int | ID of pet that needs to be fetched + +try { + final response = api.getOrderById(orderId); + print(response); +} catch on DioException (e) { + print('Exception when calling StoreApi->getOrderById: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(order) + +Place an order for a pet + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getStoreApi(); +final Order order = ; // Order | order placed for purchasing the pet + +try { + final response = api.placeOrder(order); + print(response); +} catch on DioException (e) { + print('Exception when calling StoreApi->placeOrder: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Tag.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Tag.md new file mode 100644 index 000000000000..c219f987c19c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md new file mode 100644 index 000000000000..894a3e60ee31 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -0,0 +1,15 @@ +# openapi.model.TestInlineFreeformAdditionalPropertiesRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**someproperty** | **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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md new file mode 100644 index 000000000000..37aa8c50230e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**username** | **String** | | [optional] +**firstname** | **String** | | [optional] +**lastname** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userstatus** | **int** | User Status | [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) + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/UserApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/UserApi.md new file mode 100644 index 000000000000..49b79d76b8a1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/UserApi.md @@ -0,0 +1,359 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final User user = ; // User | Created user object + +try { + api.createUser(user); +} catch on DioException (e) { + print('Exception when calling UserApi->createUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final List user = ; // List | List of user object + +try { + api.createUsersWithArrayInput(user); +} catch on DioException (e) { + print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final List user = ; // List | List of user object + +try { + api.createUsersWithListInput(user); +} catch on DioException (e) { + print('Exception when calling UserApi->createUsersWithListInput: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List<User>**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | The name that needs to be deleted + +try { + api.deleteUser(username); +} catch on DioException (e) { + print('Exception when calling UserApi->deleteUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + final response = api.getUserByName(username); + print(response); +} catch on DioException (e) { + print('Exception when calling UserApi->getUserByName: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | The user name for login +final String password = password_example; // String | The password for login in clear text + +try { + final response = api.loginUser(username, password); + print(response); +} catch on DioException (e) { + print('Exception when calling UserApi->loginUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); + +try { + api.logoutUser(); +} catch on DioException (e) { + print('Exception when calling UserApi->logoutUser: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api = Openapi().getUserApi(); +final String username = username_example; // String | name that need to be deleted +final User user = ; // User | Updated user object + +try { + api.updateUser(username, user); +} catch on DioException (e) { + print('Exception when calling UserApi->updateUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **user** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/openapi.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/openapi.dart new file mode 100644 index 000000000000..a462009ebf73 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/openapi.dart @@ -0,0 +1,70 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +export 'package:openapi/src/api.dart'; +export 'package:openapi/src/auth/api_key_auth.dart'; +export 'package:openapi/src/auth/basic_auth.dart'; +export 'package:openapi/src/auth/bearer_auth.dart'; +export 'package:openapi/src/auth/oauth.dart'; + + +export 'package:openapi/src/api/another_fake_api.dart'; +export 'package:openapi/src/api/default_api.dart'; +export 'package:openapi/src/api/fake_api.dart'; +export 'package:openapi/src/api/fake_classname_tags123_api.dart'; +export 'package:openapi/src/api/pet_api.dart'; +export 'package:openapi/src/api/store_api.dart'; +export 'package:openapi/src/api/user_api.dart'; + +export 'package:openapi/src/model/additional_properties_class.dart'; +export 'package:openapi/src/model/all_of_with_single_ref.dart'; +export 'package:openapi/src/model/animal.dart'; +export 'package:openapi/src/model/api_response.dart'; +export 'package:openapi/src/model/array_of_array_of_number_only.dart'; +export 'package:openapi/src/model/array_of_number_only.dart'; +export 'package:openapi/src/model/array_test.dart'; +export 'package:openapi/src/model/capitalization.dart'; +export 'package:openapi/src/model/cat.dart'; +export 'package:openapi/src/model/category.dart'; +export 'package:openapi/src/model/child_with_nullable.dart'; +export 'package:openapi/src/model/class_model.dart'; +export 'package:openapi/src/model/deprecated_object.dart'; +export 'package:openapi/src/model/dog.dart'; +export 'package:openapi/src/model/enum_arrays.dart'; +export 'package:openapi/src/model/enum_test.dart'; +export 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; +export 'package:openapi/src/model/file_schema_test_class.dart'; +export 'package:openapi/src/model/foo.dart'; +export 'package:openapi/src/model/foo_get_default_response.dart'; +export 'package:openapi/src/model/format_test.dart'; +export 'package:openapi/src/model/has_only_read_only.dart'; +export 'package:openapi/src/model/health_check_result.dart'; +export 'package:openapi/src/model/map_test.dart'; +export 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart'; +export 'package:openapi/src/model/model200_response.dart'; +export 'package:openapi/src/model/model_client.dart'; +export 'package:openapi/src/model/model_enum_class.dart'; +export 'package:openapi/src/model/model_file.dart'; +export 'package:openapi/src/model/model_list.dart'; +export 'package:openapi/src/model/model_return.dart'; +export 'package:openapi/src/model/name.dart'; +export 'package:openapi/src/model/nullable_class.dart'; +export 'package:openapi/src/model/number_only.dart'; +export 'package:openapi/src/model/object_with_deprecated_fields.dart'; +export 'package:openapi/src/model/order.dart'; +export 'package:openapi/src/model/outer_composite.dart'; +export 'package:openapi/src/model/outer_enum.dart'; +export 'package:openapi/src/model/outer_enum_default_value.dart'; +export 'package:openapi/src/model/outer_enum_integer.dart'; +export 'package:openapi/src/model/outer_enum_integer_default_value.dart'; +export 'package:openapi/src/model/outer_object_with_enum_property.dart'; +export 'package:openapi/src/model/parent_with_nullable.dart'; +export 'package:openapi/src/model/pet.dart'; +export 'package:openapi/src/model/read_only_first.dart'; +export 'package:openapi/src/model/single_ref_type.dart'; +export 'package:openapi/src/model/special_model_name.dart'; +export 'package:openapi/src/model/tag.dart'; +export 'package:openapi/src/model/test_inline_freeform_additional_properties_request.dart'; +export 'package:openapi/src/model/user.dart'; + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api.dart new file mode 100644 index 000000000000..835b76584b2d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/api_key_auth.dart'; +import 'package:openapi/src/auth/basic_auth.dart'; +import 'package:openapi/src/auth/bearer_auth.dart'; +import 'package:openapi/src/auth/oauth.dart'; +import 'package:openapi/src/api/another_fake_api.dart'; +import 'package:openapi/src/api/default_api.dart'; +import 'package:openapi/src/api/fake_api.dart'; +import 'package:openapi/src/api/fake_classname_tags123_api.dart'; +import 'package:openapi/src/api/pet_api.dart'; +import 'package:openapi/src/api/store_api.dart'; +import 'package:openapi/src/api/user_api.dart'; + +class Openapi { + static const String basePath = r'http://petstore.swagger.io:80/v2'; + + final Dio dio; + Openapi({ + Dio? dio, + String? basePathOverride, + List? interceptors, + }) : + this.dio = dio ?? + Dio(BaseOptions( + baseUrl: basePathOverride ?? basePath, + connectTimeout: const Duration(milliseconds: 5000), + receiveTimeout: const Duration(milliseconds: 3000), + )) { + if (interceptors == null) { + this.dio.interceptors.addAll([ + OAuthInterceptor(), + BasicAuthInterceptor(), + BearerAuthInterceptor(), + ApiKeyAuthInterceptor(), + ]); + } else { + this.dio.interceptors.addAll(interceptors); + } + } + + void setOAuthToken(String name, String token) { + if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token; + } + } + + void setBearerAuth(String name, String token) { + if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token; + } + } + + void setBasicAuth(String name, String username, String password) { + if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); + } + } + + void setApiKey(String name, String apiKey) { + if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) { + (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; + } + } + + /// Get AnotherFakeApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + AnotherFakeApi getAnotherFakeApi() { + return AnotherFakeApi(dio); + } + + /// Get DefaultApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + DefaultApi getDefaultApi() { + return DefaultApi(dio); + } + + /// Get FakeApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + FakeApi getFakeApi() { + return FakeApi(dio); + } + + /// Get FakeClassnameTags123Api instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + FakeClassnameTags123Api getFakeClassnameTags123Api() { + return FakeClassnameTags123Api(dio); + } + + /// Get PetApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + PetApi getPetApi() { + return PetApi(dio); + } + + /// Get StoreApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + StoreApi getStoreApi() { + return StoreApi(dio); + } + + /// Get UserApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + UserApi getUserApi() { + return UserApi(dio); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart new file mode 100644 index 000000000000..4ffb898ab952 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/model_client.dart'; + +class AnotherFakeApi { + + final Dio _dio; + + const AnotherFakeApi(this._dio); + + /// To test special tags + /// To test special tags and operation ID starting with number + /// + /// Parameters: + /// * [modelclient] - client model + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ModelClient] as data + /// Throws [DioException] if API call or serialization fails + Future> call123testSpecialTags({ + required ModelClient modelclient, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/another-fake/dummy'; + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(modelclient); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ModelClient? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'ModelClient', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/default_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/default_api.dart new file mode 100644 index 000000000000..e9efb7b5b194 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/default_api.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/foo_get_default_response.dart'; + +class DefaultApi { + + final Dio _dio; + + const DefaultApi(this._dio); + + /// fooGet + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [FooGetDefaultResponse] as data + /// Throws [DioException] if API call or serialization fails + Future> fooGet({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/foo'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + FooGetDefaultResponse? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'FooGetDefaultResponse', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart new file mode 100644 index 000000000000..e4d673a4a32a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart @@ -0,0 +1,1712 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/child_with_nullable.dart'; +import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; +import 'package:openapi/src/model/file_schema_test_class.dart'; +import 'package:openapi/src/model/health_check_result.dart'; +import 'package:openapi/src/model/model_client.dart'; +import 'package:openapi/src/model/model_enum_class.dart'; +import 'package:openapi/src/model/outer_composite.dart'; +import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/pet.dart'; +import 'package:openapi/src/model/test_inline_freeform_additional_properties_request.dart'; +import 'package:openapi/src/model/user.dart'; + +class FakeApi { + + final Dio _dio; + + const FakeApi(this._dio); + + /// fakeBigDecimalMap + /// for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [FakeBigDecimalMap200Response] as data + /// Throws [DioException] if API call or serialization fails + Future> fakeBigDecimalMap({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/BigDecimalMap'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + FakeBigDecimalMap200Response? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'FakeBigDecimalMap200Response', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Health check endpoint + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [HealthCheckResult] as data + /// Throws [DioException] if API call or serialization fails + Future> fakeHealthGet({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/health'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + HealthCheckResult? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'HealthCheckResult', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// test http signature authentication + /// + /// + /// Parameters: + /// * [pet] - Pet object that needs to be added to the store + /// * [query1] - query parameter + /// * [header1] - header parameter + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> fakeHttpSignatureTest({ + required Pet pet, + String? query1, + String? header1, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/http-signature-test'; + final _options = Options( + method: r'GET', + headers: { + if (header1 != null) r'header_1': header1, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'signature', + 'name': 'http_signature_test', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (query1 != null) r'query_1': query1, + }; + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(pet); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// fakeOuterBooleanSerialize + /// Test serialization of outer boolean types + /// + /// Parameters: + /// * [body] - Input boolean as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [bool] as data + /// Throws [DioException] if API call or serialization fails + Future> fakeOuterBooleanSerialize({ + bool? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/boolean'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(body); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + bool? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'bool', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakeOuterCompositeSerialize + /// Test serialization of object with outer number type + /// + /// Parameters: + /// * [outercomposite] - Input composite as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [OuterComposite] as data + /// Throws [DioException] if API call or serialization fails + Future> fakeOuterCompositeSerialize({ + OuterComposite? outercomposite, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/composite'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(outercomposite); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OuterComposite? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'OuterComposite', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakeOuterNumberSerialize + /// Test serialization of outer number types + /// + /// Parameters: + /// * [body] - Input number as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [num] as data + /// Throws [DioException] if API call or serialization fails + Future> fakeOuterNumberSerialize({ + num? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/number'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(body); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + num? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'num', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakeOuterStringSerialize + /// Test serialization of outer string types + /// + /// Parameters: + /// * [body] - Input string as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [String] as data + /// Throws [DioException] if API call or serialization fails + Future> fakeOuterStringSerialize({ + String? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/outer/string'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(body); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + String? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'String', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// fakePropertyEnumIntegerSerialize + /// Test serialization of enum (int) properties with examples + /// + /// Parameters: + /// * [outerobjectwithenumproperty] - Input enum (int) as post body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data + /// Throws [DioException] if API call or serialization fails + Future> fakePropertyEnumIntegerSerialize({ + required OuterObjectWithEnumProperty outerobjectwithenumproperty, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/property/enum-int'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(outerobjectwithenumproperty); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OuterObjectWithEnumProperty? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'OuterObjectWithEnumProperty', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// test referenced additionalProperties + /// + /// + /// Parameters: + /// * [requestBody] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testAdditionalPropertiesReference({ + required Map requestBody, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/additionalProperties-reference'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(requestBody); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testBodyWithBinary + /// For this test, the body has to be a binary file. + /// + /// Parameters: + /// * [body] - image to upload + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testBodyWithBinary({ + MultipartFile? body, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/body-with-binary'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'image/png', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(body); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testBodyWithFileSchema + /// For this test, the body for this request must reference a schema named `File`. + /// + /// Parameters: + /// * [fileschematestclass] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testBodyWithFileSchema({ + required FileSchemaTestClass fileschematestclass, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/body-with-file-schema'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(fileschematestclass); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testBodyWithQueryParams + /// + /// + /// Parameters: + /// * [query] + /// * [user] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testBodyWithQueryParams({ + required String query, + required User user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/body-with-query-params'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'query': query, + }; + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(user); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// To test \"client\" model + /// To test \"client\" model + /// + /// Parameters: + /// * [modelclient] - client model + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ModelClient] as data + /// Throws [DioException] if API call or serialization fails + Future> testClientModel({ + required ModelClient modelclient, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(modelclient); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ModelClient? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'ModelClient', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Parameters: + /// * [number] - None + /// * [double_] - None + /// * [patternWithoutDelimiter] - None + /// * [byte] - None + /// * [integer] - None + /// * [int32] - None + /// * [int64] - None + /// * [float] - None + /// * [string] - None + /// * [binary] - None + /// * [date] - None + /// * [datetime] - None + /// * [password] - None + /// * [callback] - None + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testEndpointParameters({ + required num number, + required double double_, + required String patternWithoutDelimiter, + required String byte, + int? integer, + int? int32, + int? int64, + double? float, + String? string, + MultipartFile? binary, + DateTime? date, + DateTime? datetime, + String? password, + String? callback, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'basic', + 'name': 'http_basic_test', + }, + ], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// To test enum parameters + /// To test enum parameters + /// + /// Parameters: + /// * [enumHeaderStringArray] - Header parameter enum test (string array) + /// * [enumHeaderString] - Header parameter enum test (string) + /// * [enumQueryStringArray] - Query parameter enum test (string array) + /// * [enumQueryString] - Query parameter enum test (string) + /// * [enumQueryInteger] - Query parameter enum test (double) + /// * [enumQueryDouble] - Query parameter enum test (double) + /// * [enumQueryModelArray] + /// * [enumFormStringArray] - Form parameter enum test (string array) + /// * [enumFormString] - Form parameter enum test (string) + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testEnumParameters({ + List? enumHeaderStringArray, + String? enumHeaderString = '-efg', + List? enumQueryStringArray, + String? enumQueryString = '-efg', + int? enumQueryInteger, + double? enumQueryDouble, + List? enumQueryModelArray, + List? enumFormStringArray, + String? enumFormString, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'GET', + headers: { + if (enumHeaderStringArray != null) r'enum_header_string_array': enumHeaderStringArray, + if (enumHeaderString != null) r'enum_header_string': enumHeaderString, + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (enumQueryStringArray != null) r'enum_query_string_array': enumQueryStringArray, + if (enumQueryString != null) r'enum_query_string': enumQueryString, + if (enumQueryInteger != null) r'enum_query_integer': enumQueryInteger, + if (enumQueryDouble != null) r'enum_query_double': enumQueryDouble, + if (enumQueryModelArray != null) r'enum_query_model_array': enumQueryModelArray, + }; + + dynamic _bodyData; + + try { + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Fake endpoint to test group parameters (optional) + /// Fake endpoint to test group parameters (optional) + /// + /// Parameters: + /// * [requiredStringGroup] - Required String in group parameters + /// * [requiredBooleanGroup] - Required Boolean in group parameters + /// * [requiredInt64Group] - Required Integer in group parameters + /// * [stringGroup] - String in group parameters + /// * [booleanGroup] - Boolean in group parameters + /// * [int64Group] - Integer in group parameters + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testGroupParameters({ + required int requiredStringGroup, + required bool requiredBooleanGroup, + required int requiredInt64Group, + int? stringGroup, + bool? booleanGroup, + int? int64Group, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake'; + final _options = Options( + method: r'DELETE', + headers: { + r'required_boolean_group': requiredBooleanGroup, + if (booleanGroup != null) r'boolean_group': booleanGroup, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'http', + 'scheme': 'bearer', + 'name': 'bearer_test', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'required_string_group': requiredStringGroup, + r'required_int64_group': requiredInt64Group, + if (stringGroup != null) r'string_group': stringGroup, + if (int64Group != null) r'int64_group': int64Group, + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test inline additionalProperties + /// + /// + /// Parameters: + /// * [requestBody] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testInlineAdditionalProperties({ + required Map requestBody, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/inline-additionalProperties'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(requestBody); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test inline free-form additionalProperties + /// + /// + /// Parameters: + /// * [testinlinefreeformadditionalpropertiesrequest] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testInlineFreeformAdditionalProperties({ + required TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/inline-freeform-additionalProperties'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test json serialization of form data + /// + /// + /// Parameters: + /// * [param] - field1 + /// * [param2] - field2 + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testJsonFormData({ + required String param, + required String param2, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/jsonFormData'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test nullable parent property + /// + /// + /// Parameters: + /// * [childwithnullable] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testNullable({ + required ChildWithNullable childwithnullable, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/nullable'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(childwithnullable); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// testQueryParameterCollectionFormat + /// To test the collection format in query parameters + /// + /// Parameters: + /// * [pipe] + /// * [ioutil] + /// * [http] + /// * [url] + /// * [context] + /// * [allowempty] + /// * [language] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testQueryParameterCollectionFormat({ + required List pipe, + required List ioutil, + required List http, + required List url, + required List context, + required String allowempty, + Map? language, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/test-query-parameters'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'pipe': pipe, + r'ioutil': ioutil, + r'http': http, + r'url': url, + r'context': context, + if (language != null) r'language': language, + r'allowEmpty': allowempty, + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// test referenced string map + /// + /// + /// Parameters: + /// * [requestBody] - request body + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> testStringMapReference({ + required Map requestBody, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/stringMap-reference'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(requestBody); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart new file mode 100644 index 000000000000..7f1524c2f188 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart @@ -0,0 +1,116 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/model_client.dart'; + +class FakeClassnameTags123Api { + + final Dio _dio; + + const FakeClassnameTags123Api(this._dio); + + /// To test class name in snake case + /// To test class name in snake case + /// + /// Parameters: + /// * [modelclient] - client model + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ModelClient] as data + /// Throws [DioException] if API call or serialization fails + Future> testClassname({ + required ModelClient modelclient, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake_classname_test'; + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'api_key_query', + 'keyName': 'api_key_query', + 'where': 'query', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(modelclient); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ModelClient? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'ModelClient', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart new file mode 100644 index 000000000000..54e619b596f1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart @@ -0,0 +1,727 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/api_response.dart'; +import 'package:openapi/src/model/pet.dart'; + +class PetApi { + + final Dio _dio; + + const PetApi(this._dio); + + /// Add a new pet to the store + /// + /// + /// Parameters: + /// * [pet] - Pet object that needs to be added to the store + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> addPet({ + required Pet pet, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(pet); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Deletes a pet + /// + /// + /// Parameters: + /// * [petid] - Pet id to delete + /// * [apiKey] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deletePet({ + required int petid, + String? apiKey, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _options = Options( + method: r'DELETE', + headers: { + if (apiKey != null) r'api_key': apiKey, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Finds Pets by status + /// Multiple status values can be provided with comma separated strings + /// + /// Parameters: + /// * [status] - Status values that need to be considered for filter + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [List] as data + /// Throws [DioException] if API call or serialization fails + Future>> findPetsByStatus({ + @Deprecated('status is deprecated') required List status, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/findByStatus'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'status': status, + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + List? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize, Pet>(rawData, 'List', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Finds Pets by tags + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Parameters: + /// * [tags] - Tags to filter by + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Set] as data + /// Throws [DioException] if API call or serialization fails + @Deprecated('This operation has been deprecated') + Future>> findPetsByTags({ + required Set tags, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/findByTags'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'tags': tags, + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Set? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Set', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Find pet by ID + /// Returns a single pet + /// + /// Parameters: + /// * [petid] - ID of pet to return + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Pet] as data + /// Throws [DioException] if API call or serialization fails + Future> getPetById({ + required int petid, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'api_key', + 'where': 'header', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Pet? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'Pet', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Update an existing pet + /// + /// + /// Parameters: + /// * [pet] - Pet object that needs to be added to the store + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> updatePet({ + required Pet pet, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(pet); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Updates a pet in the store with form data + /// + /// + /// Parameters: + /// * [petid] - ID of pet that needs to be updated + /// * [name] - Updated name of the pet + /// * [status] - Updated status of the pet + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> updatePetWithForm({ + required int petid, + String? name, + String? status, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'application/x-www-form-urlencoded', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// uploads an image + /// + /// + /// Parameters: + /// * [petid] - ID of pet to update + /// * [additionalmetadata] - Additional data to pass to server + /// * [file] - file to upload + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ApiResponse] as data + /// Throws [DioException] if API call or serialization fails + Future> uploadFile({ + required int petid, + String? additionalmetadata, + MultipartFile? file, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petid.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'multipart/form-data', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ApiResponse? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'ApiResponse', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// uploads an image (required) + /// + /// + /// Parameters: + /// * [petid] - ID of pet to update + /// * [requiredfile] - file to upload + /// * [additionalmetadata] - Additional data to pass to server + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ApiResponse] as data + /// Throws [DioException] if API call or serialization fails + Future> uploadFileWithRequiredFile({ + required int petid, + required MultipartFile requiredfile, + String? additionalmetadata, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petid.toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'oauth2', + 'name': 'petstore_auth', + }, + ], + ...?extra, + }, + contentType: 'multipart/form-data', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ApiResponse? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'ApiResponse', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/store_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/store_api.dart new file mode 100644 index 000000000000..23e8deceaea8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/store_api.dart @@ -0,0 +1,303 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/order.dart'; + +class StoreApi { + + final Dio _dio; + + const StoreApi(this._dio); + + /// Delete purchase order by ID + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Parameters: + /// * [orderId] - ID of the order that needs to be deleted + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteOrder({ + required String orderId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Returns pet inventories by status + /// Returns a map of status codes to quantities + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Map] as data + /// Throws [DioException] if API call or serialization fails + Future>> getInventory({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/inventory'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'api_key', + 'where': 'header', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Map? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize, int>(rawData, 'Map', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Find purchase order by ID + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + /// + /// Parameters: + /// * [orderId] - ID of pet that needs to be fetched + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Order] as data + /// Throws [DioException] if API call or serialization fails + Future> getOrderById({ + required int orderId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/order/{order_id}'.replaceAll('{' r'order_id' '}', orderId.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Order? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'Order', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Place an order for a pet + /// + /// + /// Parameters: + /// * [order] - order placed for purchasing the pet + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Order] as data + /// Throws [DioException] if API call or serialization fails + Future> placeOrder({ + required Order order, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/store/order'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(order); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Order? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'Order', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/user_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/user_api.dart new file mode 100644 index 000000000000..24bbeb48f746 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/user_api.dart @@ -0,0 +1,524 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +// ignore: unused_import +import 'dart:convert'; +import 'package:openapi/src/deserialize.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/user.dart'; + +class UserApi { + + final Dio _dio; + + const UserApi(this._dio); + + /// Create user + /// This can only be done by the logged in user. + /// + /// Parameters: + /// * [user] - Created user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> createUser({ + required User user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(user); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Creates list of users with given input array + /// + /// + /// Parameters: + /// * [user] - List of user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> createUsersWithArrayInput({ + required List user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/createWithArray'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(user); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Creates list of users with given input array + /// + /// + /// Parameters: + /// * [user] - List of user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> createUsersWithListInput({ + required List user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/createWithList'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(user); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Delete user + /// This can only be done by the logged in user. + /// + /// Parameters: + /// * [username] - The name that needs to be deleted + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteUser({ + required String username, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Get user by user name + /// + /// + /// Parameters: + /// * [username] - The name that needs to be fetched. Use user1 for testing. + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [User] as data + /// Throws [DioException] if API call or serialization fails + Future> getUserByName({ + required String username, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + User? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'User', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Logs user into the system + /// + /// + /// Parameters: + /// * [username] - The user name for login + /// * [password] - The password for login in clear text + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [String] as data + /// Throws [DioException] if API call or serialization fails + Future> loginUser({ + required String username, + required String password, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/login'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'username': username, + r'password': password, + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + String? _responseData; + + try { +final rawData = _response.data; +_responseData = rawData == null ? null : deserialize(rawData, 'String', growable: true); + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// Logs out current logged in user session + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> logoutUser({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/logout'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// Updated user + /// This can only be done by the logged in user. + /// + /// Parameters: + /// * [username] - name that need to be deleted + /// * [user] - Updated user object + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> updateUser({ + required String username, + required User user, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{username}'.replaceAll('{' r'username' '}', username.toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { +_bodyData=jsonEncode(user); + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/api_key_auth.dart new file mode 100644 index 000000000000..ee16e3f0f92f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/api_key_auth.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class ApiKeyAuthInterceptor extends AuthInterceptor { + final Map apiKeys = {}; + + @override + void onRequest(RequestOptions options, RequestInterceptorHandler handler) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'apiKey'); + for (final info in authInfo) { + final authName = info['name'] as String; + final authKeyName = info['keyName'] as String; + final authWhere = info['where'] as String; + final apiKey = apiKeys[authName]; + if (apiKey != null) { + if (authWhere == 'query') { + options.queryParameters[authKeyName] = apiKey; + } else { + options.headers[authKeyName] = apiKey; + } + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/auth.dart new file mode 100644 index 000000000000..f7ae9bf3f11e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/auth.dart @@ -0,0 +1,18 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; + +abstract class AuthInterceptor extends Interceptor { + /// Get auth information on given route for the given type. + /// Can return an empty list if type is not present on auth data or + /// if route doesn't need authentication. + List> getAuthInfo(RequestOptions route, bool Function(Map secure) handles) { + if (route.extra.containsKey('secure')) { + final auth = route.extra['secure'] as List>; + return auth.where((secure) => handles(secure)).toList(); + } + return []; + } +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/basic_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/basic_auth.dart new file mode 100644 index 000000000000..b65ccb5b71f7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/basic_auth.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class BasicAuthInfo { + final String username; + final String password; + + const BasicAuthInfo(this.username, this.password); +} + +class BasicAuthInterceptor extends AuthInterceptor { + final Map authInfo = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme']?.toLowerCase() == 'basic') || secure['type'] == 'basic'); + for (final info in metadataAuthInfo) { + final authName = info['name'] as String; + final basicAuthInfo = authInfo[authName]; + if (basicAuthInfo != null) { + final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}'; + options.headers['Authorization'] = basicAuth; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/bearer_auth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/bearer_auth.dart new file mode 100644 index 000000000000..8f46678761b2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/bearer_auth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class BearerAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme']?.toLowerCase() == 'bearer'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/oauth.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/oauth.dart new file mode 100644 index 000000000000..337cf762b0ce --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/auth/oauth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class OAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/deserialize.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/deserialize.dart new file mode 100644 index 000000000000..af74c7ee5e41 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/deserialize.dart @@ -0,0 +1,195 @@ +import 'package:openapi/src/model/additional_properties_class.dart'; +import 'package:openapi/src/model/all_of_with_single_ref.dart'; +import 'package:openapi/src/model/animal.dart'; +import 'package:openapi/src/model/api_response.dart'; +import 'package:openapi/src/model/array_of_array_of_number_only.dart'; +import 'package:openapi/src/model/array_of_number_only.dart'; +import 'package:openapi/src/model/array_test.dart'; +import 'package:openapi/src/model/capitalization.dart'; +import 'package:openapi/src/model/cat.dart'; +import 'package:openapi/src/model/category.dart'; +import 'package:openapi/src/model/child_with_nullable.dart'; +import 'package:openapi/src/model/class_model.dart'; +import 'package:openapi/src/model/deprecated_object.dart'; +import 'package:openapi/src/model/dog.dart'; +import 'package:openapi/src/model/enum_arrays.dart'; +import 'package:openapi/src/model/enum_test.dart'; +import 'package:openapi/src/model/fake_big_decimal_map200_response.dart'; +import 'package:openapi/src/model/file_schema_test_class.dart'; +import 'package:openapi/src/model/foo.dart'; +import 'package:openapi/src/model/foo_get_default_response.dart'; +import 'package:openapi/src/model/format_test.dart'; +import 'package:openapi/src/model/has_only_read_only.dart'; +import 'package:openapi/src/model/health_check_result.dart'; +import 'package:openapi/src/model/map_test.dart'; +import 'package:openapi/src/model/mixed_properties_and_additional_properties_class.dart'; +import 'package:openapi/src/model/model200_response.dart'; +import 'package:openapi/src/model/model_client.dart'; +import 'package:openapi/src/model/model_file.dart'; +import 'package:openapi/src/model/model_list.dart'; +import 'package:openapi/src/model/model_return.dart'; +import 'package:openapi/src/model/name.dart'; +import 'package:openapi/src/model/nullable_class.dart'; +import 'package:openapi/src/model/number_only.dart'; +import 'package:openapi/src/model/object_with_deprecated_fields.dart'; +import 'package:openapi/src/model/order.dart'; +import 'package:openapi/src/model/outer_composite.dart'; +import 'package:openapi/src/model/outer_object_with_enum_property.dart'; +import 'package:openapi/src/model/parent_with_nullable.dart'; +import 'package:openapi/src/model/pet.dart'; +import 'package:openapi/src/model/read_only_first.dart'; +import 'package:openapi/src/model/special_model_name.dart'; +import 'package:openapi/src/model/tag.dart'; +import 'package:openapi/src/model/test_inline_freeform_additional_properties_request.dart'; +import 'package:openapi/src/model/user.dart'; + +final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); +final _regMap = RegExp(r'^Map$'); + + ReturnType deserialize(dynamic value, String targetType, {bool growable= true}) { + switch (targetType) { + case 'String': + return '$value' as ReturnType; + case 'int': + return (value is int ? value : int.parse('$value')) as ReturnType; + case 'bool': + if (value is bool) { + return value as ReturnType; + } + final valueString = '$value'.toLowerCase(); + return (valueString == 'true' || valueString == '1') as ReturnType; + case 'double': + return (value is double ? value : double.parse('$value')) as ReturnType; + case 'AdditionalPropertiesClass': + return AdditionalPropertiesClass.fromJson(value as Map) as ReturnType; + case 'AllOfWithSingleRef': + return AllOfWithSingleRef.fromJson(value as Map) as ReturnType; + case 'Animal': + return Animal.fromJson(value as Map) as ReturnType; + case 'ApiResponse': + return ApiResponse.fromJson(value as Map) as ReturnType; + case 'ArrayOfArrayOfNumberOnly': + return ArrayOfArrayOfNumberOnly.fromJson(value as Map) as ReturnType; + case 'ArrayOfNumberOnly': + return ArrayOfNumberOnly.fromJson(value as Map) as ReturnType; + case 'ArrayTest': + return ArrayTest.fromJson(value as Map) as ReturnType; + case 'Capitalization': + return Capitalization.fromJson(value as Map) as ReturnType; + case 'Cat': + return Cat.fromJson(value as Map) as ReturnType; + case 'Category': + return Category.fromJson(value as Map) as ReturnType; + case 'ChildWithNullable': + return ChildWithNullable.fromJson(value as Map) as ReturnType; + case 'ClassModel': + return ClassModel.fromJson(value as Map) as ReturnType; + case 'DeprecatedObject': + return DeprecatedObject.fromJson(value as Map) as ReturnType; + case 'Dog': + return Dog.fromJson(value as Map) as ReturnType; + case 'EnumArrays': + return EnumArrays.fromJson(value as Map) as ReturnType; + case 'EnumTest': + return EnumTest.fromJson(value as Map) as ReturnType; + case 'FakeBigDecimalMap200Response': + return FakeBigDecimalMap200Response.fromJson(value as Map) as ReturnType; + case 'FileSchemaTestClass': + return FileSchemaTestClass.fromJson(value as Map) as ReturnType; + case 'Foo': + return Foo.fromJson(value as Map) as ReturnType; + case 'FooGetDefaultResponse': + return FooGetDefaultResponse.fromJson(value as Map) as ReturnType; + case 'FormatTest': + return FormatTest.fromJson(value as Map) as ReturnType; + case 'HasOnlyReadOnly': + return HasOnlyReadOnly.fromJson(value as Map) as ReturnType; + case 'HealthCheckResult': + return HealthCheckResult.fromJson(value as Map) as ReturnType; + case 'MapTest': + return MapTest.fromJson(value as Map) as ReturnType; + case 'MixedPropertiesAndAdditionalPropertiesClass': + return MixedPropertiesAndAdditionalPropertiesClass.fromJson(value as Map) as ReturnType; + case 'Model200Response': + return Model200Response.fromJson(value as Map) as ReturnType; + case 'ModelClient': + return ModelClient.fromJson(value as Map) as ReturnType; + case 'ModelEnumClass': + + + case 'ModelFile': + return ModelFile.fromJson(value as Map) as ReturnType; + case 'ModelList': + return ModelList.fromJson(value as Map) as ReturnType; + case 'ModelReturn': + return ModelReturn.fromJson(value as Map) as ReturnType; + case 'Name': + return Name.fromJson(value as Map) as ReturnType; + case 'NullableClass': + return NullableClass.fromJson(value as Map) as ReturnType; + case 'NumberOnly': + return NumberOnly.fromJson(value as Map) as ReturnType; + case 'ObjectWithDeprecatedFields': + return ObjectWithDeprecatedFields.fromJson(value as Map) as ReturnType; + case 'Order': + return Order.fromJson(value as Map) as ReturnType; + case 'OuterComposite': + return OuterComposite.fromJson(value as Map) as ReturnType; + case 'OuterEnum': + + + case 'OuterEnumDefaultValue': + + + case 'OuterEnumInteger': + + + case 'OuterEnumIntegerDefaultValue': + + + case 'OuterObjectWithEnumProperty': + return OuterObjectWithEnumProperty.fromJson(value as Map) as ReturnType; + case 'ParentWithNullable': + return ParentWithNullable.fromJson(value as Map) as ReturnType; + case 'Pet': + return Pet.fromJson(value as Map) as ReturnType; + case 'ReadOnlyFirst': + return ReadOnlyFirst.fromJson(value as Map) as ReturnType; + case 'SingleRefType': + + + case 'SpecialModelName': + return SpecialModelName.fromJson(value as Map) as ReturnType; + case 'Tag': + return Tag.fromJson(value as Map) as ReturnType; + case 'TestInlineFreeformAdditionalPropertiesRequest': + return TestInlineFreeformAdditionalPropertiesRequest.fromJson(value as Map) as ReturnType; + case 'User': + return User.fromJson(value as Map) as ReturnType; + default: + RegExpMatch? match; + + if (value is List && (match = _regList.firstMatch(targetType)) != null) { + targetType = match![1]!; // ignore: parameter_assignments + return value + .map((dynamic v) => deserialize(v, targetType, growable: growable)) + .toList(growable: growable) as ReturnType; + } + if (value is Set && (match = _regSet.firstMatch(targetType)) != null) { + targetType = match![1]!; // ignore: parameter_assignments + return value + .map((dynamic v) => deserialize(v, targetType, growable: growable)) + .toSet() as ReturnType; + } + if (value is Map && (match = _regMap.firstMatch(targetType)) != null) { + targetType = match![1]!.trim(); // ignore: parameter_assignments + return Map.fromIterables( + value.keys as Iterable, + value.values.map((dynamic v) => deserialize(v, targetType, growable: growable)), + ) as ReturnType; + } + break; + } + throw Exception('Cannot deserialize'); + } \ No newline at end of file diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/additional_properties_class.dart new file mode 100644 index 000000000000..8a187d3dc3c0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/additional_properties_class.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'additional_properties_class.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class AdditionalPropertiesClass { + /// Returns a new [AdditionalPropertiesClass] instance. + AdditionalPropertiesClass({ + + this.mapProperty, + + this.mapOfMapProperty, + }); + + @JsonKey( + + name: r'map_property', + required: false, + includeIfNull: false, + ) + + + final Map? mapProperty; + + + + @JsonKey( + + name: r'map_of_map_property', + required: false, + includeIfNull: false, + ) + + + final Map>? mapOfMapProperty; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is AdditionalPropertiesClass && + other.mapProperty == mapProperty && + other.mapOfMapProperty == mapOfMapProperty; + + @override + int get hashCode => + mapProperty.hashCode + + mapOfMapProperty.hashCode; + + factory AdditionalPropertiesClass.fromJson(Map json) => _$AdditionalPropertiesClassFromJson(json); + + Map toJson() => _$AdditionalPropertiesClassToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart new file mode 100644 index 000000000000..126a3cbaf671 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart @@ -0,0 +1,74 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/single_ref_type.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'all_of_with_single_ref.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class AllOfWithSingleRef { + /// Returns a new [AllOfWithSingleRef] instance. + AllOfWithSingleRef({ + + this.username, + + this.singlereftype, + }); + + @JsonKey( + + name: r'username', + required: false, + includeIfNull: false, + ) + + + final String? username; + + + + @JsonKey( + + name: r'SingleRefType', + required: false, + includeIfNull: false, + unknownEnumValue: SingleRefType.unknownDefaultOpenApi, + ) + + + final SingleRefType? singlereftype; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && + other.username == username && + other.singlereftype == singlereftype; + + @override + int get hashCode => + username.hashCode + + singlereftype.hashCode; + + factory AllOfWithSingleRef.fromJson(Map json) => _$AllOfWithSingleRefFromJson(json); + + Map toJson() => _$AllOfWithSingleRefToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart new file mode 100644 index 000000000000..11efc809e240 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'animal.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Animal { + /// Returns a new [Animal] instance. + Animal({ + + required this.classname, + + this.color = 'red', + }); + + @JsonKey( + + name: r'className', + required: true, + includeIfNull: false, + ) + + + final String classname; + + + + @JsonKey( + defaultValue: 'red', + name: r'color', + required: false, + includeIfNull: false, + ) + + + final String? color; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Animal && + other.classname == classname && + other.color == color; + + @override + int get hashCode => + classname.hashCode + + color.hashCode; + + factory Animal.fromJson(Map json) => _$AnimalFromJson(json); + + Map toJson() => _$AnimalToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/api_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/api_response.dart new file mode 100644 index 000000000000..207cea16eabe --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/api_response.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'api_response.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ApiResponse { + /// Returns a new [ApiResponse] instance. + ApiResponse({ + + this.code, + + this.type, + + this.message, + }); + + @JsonKey( + + name: r'code', + required: false, + includeIfNull: false, + ) + + + final int? code; + + + + @JsonKey( + + name: r'type', + required: false, + includeIfNull: false, + ) + + + final String? type; + + + + @JsonKey( + + name: r'message', + required: false, + includeIfNull: false, + ) + + + final String? message; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ApiResponse && + other.code == code && + other.type == type && + other.message == message; + + @override + int get hashCode => + code.hashCode + + type.hashCode + + message.hashCode; + + factory ApiResponse.fromJson(Map json) => _$ApiResponseFromJson(json); + + Map toJson() => _$ApiResponseToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart new file mode 100644 index 000000000000..2ba4f0c19286 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'array_of_array_of_number_only.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ArrayOfArrayOfNumberOnly { + /// Returns a new [ArrayOfArrayOfNumberOnly] instance. + ArrayOfArrayOfNumberOnly({ + + this.arrayarraynumber, + }); + + @JsonKey( + + name: r'ArrayArrayNumber', + required: false, + includeIfNull: false, + ) + + + final List>? arrayarraynumber; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && + other.arrayarraynumber == arrayarraynumber; + + @override + int get hashCode => + arrayarraynumber.hashCode; + + factory ArrayOfArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfArrayOfNumberOnlyFromJson(json); + + Map toJson() => _$ArrayOfArrayOfNumberOnlyToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart new file mode 100644 index 000000000000..e058704c51af --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'array_of_number_only.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ArrayOfNumberOnly { + /// Returns a new [ArrayOfNumberOnly] instance. + ArrayOfNumberOnly({ + + this.arraynumber, + }); + + @JsonKey( + + name: r'ArrayNumber', + required: false, + includeIfNull: false, + ) + + + final List? arraynumber; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && + other.arraynumber == arraynumber; + + @override + int get hashCode => + arraynumber.hashCode; + + factory ArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfNumberOnlyFromJson(json); + + Map toJson() => _$ArrayOfNumberOnlyToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_test.dart new file mode 100644 index 000000000000..0968d4b12986 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_test.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/read_only_first.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'array_test.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ArrayTest { + /// Returns a new [ArrayTest] instance. + ArrayTest({ + + this.arrayOfString, + + this.arrayArrayOfInteger, + + this.arrayArrayOfModel, + }); + + @JsonKey( + + name: r'array_of_string', + required: false, + includeIfNull: false, + ) + + + final List? arrayOfString; + + + + @JsonKey( + + name: r'array_array_of_integer', + required: false, + includeIfNull: false, + ) + + + final List>? arrayArrayOfInteger; + + + + @JsonKey( + + name: r'array_array_of_model', + required: false, + includeIfNull: false, + ) + + + final List>? arrayArrayOfModel; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ArrayTest && + other.arrayOfString == arrayOfString && + other.arrayArrayOfInteger == arrayArrayOfInteger && + other.arrayArrayOfModel == arrayArrayOfModel; + + @override + int get hashCode => + arrayOfString.hashCode + + arrayArrayOfInteger.hashCode + + arrayArrayOfModel.hashCode; + + factory ArrayTest.fromJson(Map json) => _$ArrayTestFromJson(json); + + Map toJson() => _$ArrayTestToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart new file mode 100644 index 000000000000..c248b9c52192 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart @@ -0,0 +1,137 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'capitalization.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Capitalization { + /// Returns a new [Capitalization] instance. + Capitalization({ + + this.smallcamel, + + this.capitalcamel, + + this.smallSnake, + + this.capitalSnake, + + this.scaEthFlowPoints, + + this.attName, + }); + + @JsonKey( + + name: r'smallCamel', + required: false, + includeIfNull: false, + ) + + + final String? smallcamel; + + + + @JsonKey( + + name: r'CapitalCamel', + required: false, + includeIfNull: false, + ) + + + final String? capitalcamel; + + + + @JsonKey( + + name: r'small_Snake', + required: false, + includeIfNull: false, + ) + + + final String? smallSnake; + + + + @JsonKey( + + name: r'Capital_Snake', + required: false, + includeIfNull: false, + ) + + + final String? capitalSnake; + + + + @JsonKey( + + name: r'SCA_ETH_Flow_Points', + required: false, + includeIfNull: false, + ) + + + final String? scaEthFlowPoints; + + + + /// Name of the pet + @JsonKey( + + name: r'ATT_NAME', + required: false, + includeIfNull: false, + ) + + + final String? attName; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Capitalization && + other.smallcamel == smallcamel && + other.capitalcamel == capitalcamel && + other.smallSnake == smallSnake && + other.capitalSnake == capitalSnake && + other.scaEthFlowPoints == scaEthFlowPoints && + other.attName == attName; + + @override + int get hashCode => + smallcamel.hashCode + + capitalcamel.hashCode + + smallSnake.hashCode + + capitalSnake.hashCode + + scaEthFlowPoints.hashCode + + attName.hashCode; + + factory Capitalization.fromJson(Map json) => _$CapitalizationFromJson(json); + + Map toJson() => _$CapitalizationToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart new file mode 100644 index 000000000000..d783b29bfebe --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart @@ -0,0 +1,91 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/animal.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'cat.g.dart'; + +// ignore_for_file: unused_import + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Cat { + /// Returns a new [Cat] instance. + Cat({ + + required this.classname, + + this.color = 'red', + + this.declawed, + }); + + @JsonKey( + + name: r'className', + required: true, + includeIfNull: false, + ) + + + final String classname; + + + + @JsonKey( + defaultValue: 'red', + name: r'color', + required: false, + includeIfNull: false, + ) + + + final String? color; + + + + @JsonKey( + + name: r'declawed', + required: false, + includeIfNull: false, + ) + + + final bool? declawed; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Cat && + other.classname == classname && + other.color == color && + other.declawed == declawed; + + @override + int get hashCode => + classname.hashCode + + color.hashCode + + declawed.hashCode; + + factory Cat.fromJson(Map json) => _$CatFromJson(json); + + Map toJson() => _$CatToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/category.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/category.dart new file mode 100644 index 000000000000..6d078b06ae20 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/category.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'category.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Category { + /// Returns a new [Category] instance. + Category({ + + this.id, + + this.name = 'default-name', + }); + + @JsonKey( + + name: r'id', + required: false, + includeIfNull: false, + ) + + + final int? id; + + + + @JsonKey( + defaultValue: 'default-name', + name: r'name', + required: true, + includeIfNull: false, + ) + + + final String name; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Category && + other.id == id && + other.name == name; + + @override + int get hashCode => + id.hashCode + + name.hashCode; + + factory Category.fromJson(Map json) => _$CategoryFromJson(json); + + Map toJson() => _$CategoryToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart new file mode 100644 index 000000000000..24e56c0a068d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/parent_with_nullable.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'child_with_nullable.g.dart'; + +// ignore_for_file: unused_import + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ChildWithNullable { + /// Returns a new [ChildWithNullable] instance. + ChildWithNullable({ + + this.type, + + this.nullableproperty, + + this.otherproperty, + }); + + @JsonKey( + + name: r'type', + required: false, + includeIfNull: false, + unknownEnumValue: ChildWithNullableTypeEnum.unknownDefaultOpenApi, + ) + + + final ChildWithNullableTypeEnum? type; + + + + @JsonKey( + + name: r'nullableProperty', + required: false, + includeIfNull: false, + ) + + + final String? nullableproperty; + + + + @JsonKey( + + name: r'otherProperty', + required: false, + includeIfNull: false, + ) + + + final String? otherproperty; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && + other.type == type && + other.nullableproperty == nullableproperty && + other.otherproperty == otherproperty; + + @override + int get hashCode => + type.hashCode + + (nullableproperty == null ? 0 : nullableproperty.hashCode) + + otherproperty.hashCode; + + factory ChildWithNullable.fromJson(Map json) => _$ChildWithNullableFromJson(json); + + Map toJson() => _$ChildWithNullableToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum ChildWithNullableTypeEnum { +@JsonValue(r'ChildWithNullable') +childwithnullable(r'ChildWithNullable'), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const ChildWithNullableTypeEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/class_model.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/class_model.dart new file mode 100644 index 000000000000..40b6b45ac3c4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/class_model.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'class_model.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ClassModel { + /// Returns a new [ClassModel] instance. + ClassModel({ + + this.class_, + }); + + @JsonKey( + + name: r'_class', + required: false, + includeIfNull: false, + ) + + + final String? class_; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ClassModel && + other.class_ == class_; + + @override + int get hashCode => + class_.hashCode; + + factory ClassModel.fromJson(Map json) => _$ClassModelFromJson(json); + + Map toJson() => _$ClassModelToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/deprecated_object.dart new file mode 100644 index 000000000000..68d1df4016c1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/deprecated_object.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'deprecated_object.g.dart'; + + +@Deprecated('DeprecatedObject has been deprecated') +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class DeprecatedObject { + /// Returns a new [DeprecatedObject] instance. + DeprecatedObject({ + + this.name, + }); + + @JsonKey( + + name: r'name', + required: false, + includeIfNull: false, + ) + + + final String? name; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject && + other.name == name; + + @override + int get hashCode => + name.hashCode; + + factory DeprecatedObject.fromJson(Map json) => _$DeprecatedObjectFromJson(json); + + Map toJson() => _$DeprecatedObjectToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart new file mode 100644 index 000000000000..871df64ab699 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart @@ -0,0 +1,91 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/animal.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'dog.g.dart'; + +// ignore_for_file: unused_import + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Dog { + /// Returns a new [Dog] instance. + Dog({ + + required this.classname, + + this.color = 'red', + + this.breed, + }); + + @JsonKey( + + name: r'className', + required: true, + includeIfNull: false, + ) + + + final String classname; + + + + @JsonKey( + defaultValue: 'red', + name: r'color', + required: false, + includeIfNull: false, + ) + + + final String? color; + + + + @JsonKey( + + name: r'breed', + required: false, + includeIfNull: false, + ) + + + final String? breed; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Dog && + other.classname == classname && + other.color == color && + other.breed == breed; + + @override + int get hashCode => + classname.hashCode + + color.hashCode + + breed.hashCode; + + factory Dog.fromJson(Map json) => _$DogFromJson(json); + + Map toJson() => _$DogToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_arrays.dart new file mode 100644 index 000000000000..632fd933d6e8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_arrays.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'enum_arrays.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class EnumArrays { + /// Returns a new [EnumArrays] instance. + EnumArrays({ + + this.justSymbol, + + this.arrayEnum, + }); + + @JsonKey( + + name: r'just_symbol', + required: false, + includeIfNull: false, + unknownEnumValue: EnumArraysJustSymbolEnum.unknownDefaultOpenApi, + ) + + + final EnumArraysJustSymbolEnum? justSymbol; + + + + @JsonKey( + + name: r'array_enum', + required: false, + includeIfNull: false, + unknownEnumValue: List.unknownDefaultOpenApi, + ) + + + final List? arrayEnum; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is EnumArrays && + other.justSymbol == justSymbol && + other.arrayEnum == arrayEnum; + + @override + int get hashCode => + justSymbol.hashCode + + arrayEnum.hashCode; + + factory EnumArrays.fromJson(Map json) => _$EnumArraysFromJson(json); + + Map toJson() => _$EnumArraysToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum EnumArraysJustSymbolEnum { +@JsonValue(r'>=') +greaterThanEqual(r'>='), +@JsonValue(r'$') +dollar(r'$'), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const EnumArraysJustSymbolEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + + +enum EnumArraysArrayEnumEnum { +@JsonValue(r'fish') +fish(r'fish'), +@JsonValue(r'crab') +crab(r'crab'), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const EnumArraysArrayEnumEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart new file mode 100644 index 000000000000..0051b7a6da14 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart @@ -0,0 +1,256 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/outer_enum.dart'; +import 'package:openapi/src/model/outer_enum_default_value.dart'; +import 'package:openapi/src/model/outer_enum_integer.dart'; +import 'package:openapi/src/model/outer_enum_integer_default_value.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'enum_test.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class EnumTest { + /// Returns a new [EnumTest] instance. + EnumTest({ + + this.enumString, + + required this.enumStringRequired, + + this.enumInteger, + + this.enumNumber, + + this.outerenum, + + this.outerenuminteger, + + this.outerenumdefaultvalue, + + this.outerenumintegerdefaultvalue, + }); + + @JsonKey( + + name: r'enum_string', + required: false, + includeIfNull: false, + unknownEnumValue: EnumTestEnumStringEnum.unknownDefaultOpenApi, + ) + + + final EnumTestEnumStringEnum? enumString; + + + + @JsonKey( + + name: r'enum_string_required', + required: true, + includeIfNull: false, + unknownEnumValue: EnumTestEnumStringRequiredEnum.unknownDefaultOpenApi, + ) + + + final EnumTestEnumStringRequiredEnum enumStringRequired; + + + + @JsonKey( + + name: r'enum_integer', + required: false, + includeIfNull: false, + unknownEnumValue: EnumTestEnumIntegerEnum.unknownDefaultOpenApi, + ) + + + final EnumTestEnumIntegerEnum? enumInteger; + + + + @JsonKey( + + name: r'enum_number', + required: false, + includeIfNull: false, + unknownEnumValue: EnumTestEnumNumberEnum.unknownDefaultOpenApi, + ) + + + final EnumTestEnumNumberEnum? enumNumber; + + + + @JsonKey( + + name: r'outerEnum', + required: false, + includeIfNull: false, + unknownEnumValue: OuterEnum.unknownDefaultOpenApi, + ) + + + final OuterEnum? outerenum; + + + + @JsonKey( + + name: r'outerEnumInteger', + required: false, + includeIfNull: false, + unknownEnumValue: OuterEnumInteger.unknownDefaultOpenApi, + ) + + + final OuterEnumInteger? outerenuminteger; + + + + @JsonKey( + + name: r'outerEnumDefaultValue', + required: false, + includeIfNull: false, + unknownEnumValue: OuterEnumDefaultValue.unknownDefaultOpenApi, + ) + + + final OuterEnumDefaultValue? outerenumdefaultvalue; + + + + @JsonKey( + + name: r'outerEnumIntegerDefaultValue', + required: false, + includeIfNull: false, + unknownEnumValue: OuterEnumIntegerDefaultValue.unknownDefaultOpenApi, + ) + + + final OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is EnumTest && + other.enumString == enumString && + other.enumStringRequired == enumStringRequired && + other.enumInteger == enumInteger && + other.enumNumber == enumNumber && + other.outerenum == outerenum && + other.outerenuminteger == outerenuminteger && + other.outerenumdefaultvalue == outerenumdefaultvalue && + other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; + + @override + int get hashCode => + enumString.hashCode + + enumStringRequired.hashCode + + enumInteger.hashCode + + enumNumber.hashCode + + (outerenum == null ? 0 : outerenum.hashCode) + + outerenuminteger.hashCode + + outerenumdefaultvalue.hashCode + + outerenumintegerdefaultvalue.hashCode; + + factory EnumTest.fromJson(Map json) => _$EnumTestFromJson(json); + + Map toJson() => _$EnumTestToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum EnumTestEnumStringEnum { +@JsonValue(r'UPPER') +upper(r'UPPER'), +@JsonValue(r'lower') +lower(r'lower'), +@JsonValue(r'') +empty(r''), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const EnumTestEnumStringEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + + +enum EnumTestEnumStringRequiredEnum { +@JsonValue(r'UPPER') +upper(r'UPPER'), +@JsonValue(r'lower') +lower(r'lower'), +@JsonValue(r'') +empty(r''), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const EnumTestEnumStringRequiredEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + + +enum EnumTestEnumIntegerEnum { +@JsonValue(1) +number1('1'), +@JsonValue(-1) +numberNegative1('-1'), +@JsonValue(11184809) +unknownDefaultOpenApi('11184809'); + +const EnumTestEnumIntegerEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + + +enum EnumTestEnumNumberEnum { +@JsonValue('1.1') +number1period1(''1.1''), +@JsonValue('-1.2') +numberNegative1period2(''-1.2''), +@JsonValue('11184809') +unknownDefaultOpenApi(''11184809''); + +const EnumTestEnumNumberEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart new file mode 100644 index 000000000000..9c994771886c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'fake_big_decimal_map200_response.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class FakeBigDecimalMap200Response { + /// Returns a new [FakeBigDecimalMap200Response] instance. + FakeBigDecimalMap200Response({ + + this.someid, + + this.somemap, + }); + + @JsonKey( + + name: r'someId', + required: false, + includeIfNull: false, + ) + + + final num? someid; + + + + @JsonKey( + + name: r'someMap', + required: false, + includeIfNull: false, + ) + + + final Map? somemap; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && + other.someid == someid && + other.somemap == somemap; + + @override + int get hashCode => + someid.hashCode + + somemap.hashCode; + + factory FakeBigDecimalMap200Response.fromJson(Map json) => _$FakeBigDecimalMap200ResponseFromJson(json); + + Map toJson() => _$FakeBigDecimalMap200ResponseToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/file_schema_test_class.dart new file mode 100644 index 000000000000..cde81139a620 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/file_schema_test_class.dart @@ -0,0 +1,73 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/model_file.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'file_schema_test_class.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class FileSchemaTestClass { + /// Returns a new [FileSchemaTestClass] instance. + FileSchemaTestClass({ + + this.file, + + this.files, + }); + + @JsonKey( + + name: r'file', + required: false, + includeIfNull: false, + ) + + + final ModelFile? file; + + + + @JsonKey( + + name: r'files', + required: false, + includeIfNull: false, + ) + + + final List? files; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is FileSchemaTestClass && + other.file == file && + other.files == files; + + @override + int get hashCode => + file.hashCode + + files.hashCode; + + factory FileSchemaTestClass.fromJson(Map json) => _$FileSchemaTestClassFromJson(json); + + Map toJson() => _$FileSchemaTestClassToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo.dart new file mode 100644 index 000000000000..13d38bc30f0d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'foo.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Foo { + /// Returns a new [Foo] instance. + Foo({ + + this.bar = 'bar', + }); + + @JsonKey( + defaultValue: 'bar', + name: r'bar', + required: false, + includeIfNull: false, + ) + + + final String? bar; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Foo && + other.bar == bar; + + @override + int get hashCode => + bar.hashCode; + + factory Foo.fromJson(Map json) => _$FooFromJson(json); + + Map toJson() => _$FooToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo_get_default_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo_get_default_response.dart new file mode 100644 index 000000000000..e153e16cce1a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/foo_get_default_response.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/foo.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'foo_get_default_response.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class FooGetDefaultResponse { + /// Returns a new [FooGetDefaultResponse] instance. + FooGetDefaultResponse({ + + this.string, + }); + + @JsonKey( + + name: r'string', + required: false, + includeIfNull: false, + ) + + + final Foo? string; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is FooGetDefaultResponse && + other.string == string; + + @override + int get hashCode => + string.hashCode; + + factory FooGetDefaultResponse.fromJson(Map json) => _$FooGetDefaultResponseFromJson(json); + + Map toJson() => _$FooGetDefaultResponseToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart new file mode 100644 index 000000000000..b724503e4ae2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart @@ -0,0 +1,304 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:dio/dio.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'format_test.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class FormatTest { + /// Returns a new [FormatTest] instance. + FormatTest({ + + this.integer, + + this.int32, + + this.int64, + + required this.number, + + this.float, + + this.double_, + + this.decimal, + + this.string, + + required this.byte, + + this.binary, + + required this.date, + + this.datetime, + + this.uuid, + + required this.password, + + this.patternWithDigits, + + this.patternWithDigitsAndDelimiter, + }); + + // minimum: 10 + // maximum: 100 + @JsonKey( + + name: r'integer', + required: false, + includeIfNull: false, + ) + + + final int? integer; + + + + // minimum: 20 + // maximum: 200 + @JsonKey( + + name: r'int32', + required: false, + includeIfNull: false, + ) + + + final int? int32; + + + + @JsonKey( + + name: r'int64', + required: false, + includeIfNull: false, + ) + + + final int? int64; + + + + // minimum: 32.1 + // maximum: 543.2 + @JsonKey( + + name: r'number', + required: true, + includeIfNull: false, + ) + + + final num number; + + + + // minimum: 54.3 + // maximum: 987.6 + @JsonKey( + + name: r'float', + required: false, + includeIfNull: false, + ) + + + final double? float; + + + + // minimum: 67.8 + // maximum: 123.4 + @JsonKey( + + name: r'double', + required: false, + includeIfNull: false, + ) + + + final double? double_; + + + + @JsonKey( + + name: r'decimal', + required: false, + includeIfNull: false, + ) + + + final double? decimal; + + + + @JsonKey( + + name: r'string', + required: false, + includeIfNull: false, + ) + + + final String? string; + + + + @JsonKey( + + name: r'byte', + required: true, + includeIfNull: false, + ) + + + final String byte; + + + + @JsonKey(ignore: true) + + + final MultipartFile? binary; + + + + @JsonKey( + + name: r'date', + required: true, + includeIfNull: false, + ) + + + final DateTime date; + + + + @JsonKey( + + name: r'dateTime', + required: false, + includeIfNull: false, + ) + + + final DateTime? datetime; + + + + @JsonKey( + + name: r'uuid', + required: false, + includeIfNull: false, + ) + + + final String? uuid; + + + + @JsonKey( + + name: r'password', + required: true, + includeIfNull: false, + ) + + + final String password; + + + + /// A string that is a 10 digit number. Can have leading zeros. + @JsonKey( + + name: r'pattern_with_digits', + required: false, + includeIfNull: false, + ) + + + final String? patternWithDigits; + + + + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + @JsonKey( + + name: r'pattern_with_digits_and_delimiter', + required: false, + includeIfNull: false, + ) + + + final String? patternWithDigitsAndDelimiter; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is FormatTest && + other.integer == integer && + other.int32 == int32 && + other.int64 == int64 && + other.number == number && + other.float == float && + other.double_ == double_ && + other.decimal == decimal && + other.string == string && + other.byte == byte && + other.binary == binary && + other.date == date && + other.datetime == datetime && + other.uuid == uuid && + other.password == password && + other.patternWithDigits == patternWithDigits && + other.patternWithDigitsAndDelimiter == patternWithDigitsAndDelimiter; + + @override + int get hashCode => + integer.hashCode + + int32.hashCode + + int64.hashCode + + number.hashCode + + float.hashCode + + double_.hashCode + + decimal.hashCode + + string.hashCode + + byte.hashCode + + binary.hashCode + + date.hashCode + + datetime.hashCode + + uuid.hashCode + + password.hashCode + + patternWithDigits.hashCode + + patternWithDigitsAndDelimiter.hashCode; + + factory FormatTest.fromJson(Map json) => _$FormatTestFromJson(json); + + Map toJson() => _$FormatTestToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/has_only_read_only.dart new file mode 100644 index 000000000000..ef63a2980c30 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/has_only_read_only.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'has_only_read_only.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class HasOnlyReadOnly { + /// Returns a new [HasOnlyReadOnly] instance. + HasOnlyReadOnly({ + + this.bar, + + this.foo, + }); + + @JsonKey( + + name: r'bar', + required: false, + includeIfNull: false, + ) + + + final String? bar; + + + + @JsonKey( + + name: r'foo', + required: false, + includeIfNull: false, + ) + + + final String? foo; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is HasOnlyReadOnly && + other.bar == bar && + other.foo == foo; + + @override + int get hashCode => + bar.hashCode + + foo.hashCode; + + factory HasOnlyReadOnly.fromJson(Map json) => _$HasOnlyReadOnlyFromJson(json); + + Map toJson() => _$HasOnlyReadOnlyToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart new file mode 100644 index 000000000000..fdacbc440a0b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'health_check_result.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class HealthCheckResult { + /// Returns a new [HealthCheckResult] instance. + HealthCheckResult({ + + this.nullablemessage, + }); + + @JsonKey( + + name: r'NullableMessage', + required: false, + includeIfNull: false, + ) + + + final String? nullablemessage; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && + other.nullablemessage == nullablemessage; + + @override + int get hashCode => + (nullablemessage == null ? 0 : nullablemessage.hashCode); + + factory HealthCheckResult.fromJson(Map json) => _$HealthCheckResultFromJson(json); + + Map toJson() => _$HealthCheckResultToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/map_test.dart new file mode 100644 index 000000000000..d87a07d10357 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/map_test.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'map_test.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class MapTest { + /// Returns a new [MapTest] instance. + MapTest({ + + this.mapMapOfString, + + this.mapOfEnumString, + + this.directMap, + + this.indirectMap, + }); + + @JsonKey( + + name: r'map_map_of_string', + required: false, + includeIfNull: false, + ) + + + final Map>? mapMapOfString; + + + + @JsonKey( + + name: r'map_of_enum_string', + required: false, + includeIfNull: false, + unknownEnumValue: Map.unknownDefaultOpenApi, + ) + + + final Map? mapOfEnumString; + + + + @JsonKey( + + name: r'direct_map', + required: false, + includeIfNull: false, + ) + + + final Map? directMap; + + + + @JsonKey( + + name: r'indirect_map', + required: false, + includeIfNull: false, + ) + + + final Map? indirectMap; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is MapTest && + other.mapMapOfString == mapMapOfString && + other.mapOfEnumString == mapOfEnumString && + other.directMap == directMap && + other.indirectMap == indirectMap; + + @override + int get hashCode => + mapMapOfString.hashCode + + mapOfEnumString.hashCode + + directMap.hashCode + + indirectMap.hashCode; + + factory MapTest.fromJson(Map json) => _$MapTestFromJson(json); + + Map toJson() => _$MapTestToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum MapTestMapOfEnumStringEnum { +@JsonValue(r'UPPER') +upper(r'UPPER'), +@JsonValue(r'lower') +lower(r'lower'), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const MapTestMapOfEnumStringEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart new file mode 100644 index 000000000000..960e16bba37a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/animal.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'mixed_properties_and_additional_properties_class.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class MixedPropertiesAndAdditionalPropertiesClass { + /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. + MixedPropertiesAndAdditionalPropertiesClass({ + + this.uuid, + + this.datetime, + + this.map, + }); + + @JsonKey( + + name: r'uuid', + required: false, + includeIfNull: false, + ) + + + final String? uuid; + + + + @JsonKey( + + name: r'dateTime', + required: false, + includeIfNull: false, + ) + + + final DateTime? datetime; + + + + @JsonKey( + + name: r'map', + required: false, + includeIfNull: false, + ) + + + final Map? map; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && + other.uuid == uuid && + other.datetime == datetime && + other.map == map; + + @override + int get hashCode => + uuid.hashCode + + datetime.hashCode + + map.hashCode; + + factory MixedPropertiesAndAdditionalPropertiesClass.fromJson(Map json) => _$MixedPropertiesAndAdditionalPropertiesClassFromJson(json); + + Map toJson() => _$MixedPropertiesAndAdditionalPropertiesClassToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model200_response.dart new file mode 100644 index 000000000000..47609c700da2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model200_response.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'model200_response.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Model200Response { + /// Returns a new [Model200Response] instance. + Model200Response({ + + this.name, + + this.class_, + }); + + @JsonKey( + + name: r'name', + required: false, + includeIfNull: false, + ) + + + final int? name; + + + + @JsonKey( + + name: r'class', + required: false, + includeIfNull: false, + ) + + + final String? class_; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Model200Response && + other.name == name && + other.class_ == class_; + + @override + int get hashCode => + name.hashCode + + class_.hashCode; + + factory Model200Response.fromJson(Map json) => _$Model200ResponseFromJson(json); + + Map toJson() => _$Model200ResponseToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_client.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_client.dart new file mode 100644 index 000000000000..8ff470611f22 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_client.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'model_client.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ModelClient { + /// Returns a new [ModelClient] instance. + ModelClient({ + + this.client, + }); + + @JsonKey( + + name: r'client', + required: false, + includeIfNull: false, + ) + + + final String? client; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelClient && + other.client == client; + + @override + int get hashCode => + client.hashCode; + + factory ModelClient.fromJson(Map json) => _$ModelClientFromJson(json); + + Map toJson() => _$ModelClientToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart new file mode 100644 index 000000000000..602fdc18d607 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart @@ -0,0 +1,25 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + + +enum ModelEnumClass { + @JsonValue(r'_abc') + abc(r'_abc'), + @JsonValue(r'-efg') + efg(r'-efg'), + @JsonValue(r'(xyz)') + leftParenthesisXyzrightParenthesis(r'(xyz)'), + @JsonValue(r'unknown_default_open_api') + unknownDefaultOpenApi(r'unknown_default_open_api'); + + const ModelEnumClass(this.value); + + final String value; + + @override + String toString() => value; +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart new file mode 100644 index 000000000000..85a43bd2a46d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'model_file.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ModelFile { + /// Returns a new [ModelFile] instance. + ModelFile({ + + this.sourceuri, + }); + + /// Test capitalization + @JsonKey( + + name: r'sourceURI', + required: false, + includeIfNull: false, + ) + + + final String? sourceuri; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelFile && + other.sourceuri == sourceuri; + + @override + int get hashCode => + sourceuri.hashCode; + + factory ModelFile.fromJson(Map json) => _$ModelFileFromJson(json); + + Map toJson() => _$ModelFileToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_list.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_list.dart new file mode 100644 index 000000000000..11421881ae57 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_list.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'model_list.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ModelList { + /// Returns a new [ModelList] instance. + ModelList({ + + this.n123list, + }); + + @JsonKey( + + name: r'123-list', + required: false, + includeIfNull: false, + ) + + + final String? n123list; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelList && + other.n123list == n123list; + + @override + int get hashCode => + n123list.hashCode; + + factory ModelList.fromJson(Map json) => _$ModelListFromJson(json); + + Map toJson() => _$ModelListToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_return.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_return.dart new file mode 100644 index 000000000000..ea5427115232 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_return.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'model_return.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ModelReturn { + /// Returns a new [ModelReturn] instance. + ModelReturn({ + + this.return_, + }); + + @JsonKey( + + name: r'return', + required: false, + includeIfNull: false, + ) + + + final int? return_; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelReturn && + other.return_ == return_; + + @override + int get hashCode => + return_.hashCode; + + factory ModelReturn.fromJson(Map json) => _$ModelReturnFromJson(json); + + Map toJson() => _$ModelReturnToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/name.dart new file mode 100644 index 000000000000..3d16d98780b3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/name.dart @@ -0,0 +1,104 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'name.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Name { + /// Returns a new [Name] instance. + Name({ + + required this.name, + + this.snakeCase, + + this.property, + + this.n123number, + }); + + @JsonKey( + + name: r'name', + required: true, + includeIfNull: false, + ) + + + final int name; + + + + @JsonKey( + + name: r'snake_case', + required: false, + includeIfNull: false, + ) + + + final int? snakeCase; + + + + @JsonKey( + + name: r'property', + required: false, + includeIfNull: false, + ) + + + final String? property; + + + + @JsonKey( + + name: r'123Number', + required: false, + includeIfNull: false, + ) + + + final int? n123number; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Name && + other.name == name && + other.snakeCase == snakeCase && + other.property == property && + other.n123number == n123number; + + @override + int get hashCode => + name.hashCode + + snakeCase.hashCode + + property.hashCode + + n123number.hashCode; + + factory Name.fromJson(Map json) => _$NameFromJson(json); + + Map toJson() => _$NameToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/nullable_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/nullable_class.dart new file mode 100644 index 000000000000..6f6a484551e4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/nullable_class.dart @@ -0,0 +1,232 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'nullable_class.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class NullableClass { + /// Returns a new [NullableClass] instance. + NullableClass({ + + this.integerProp, + + this.numberProp, + + this.booleanProp, + + this.stringProp, + + this.dateProp, + + this.datetimeProp, + + this.arrayNullableProp, + + this.arrayAndItemsNullableProp, + + this.arrayItemsNullable, + + this.objectNullableProp, + + this.objectAndItemsNullableProp, + + this.objectItemsNullable, + }); + + @JsonKey( + + name: r'integer_prop', + required: false, + includeIfNull: false, + ) + + + final int? integerProp; + + + + @JsonKey( + + name: r'number_prop', + required: false, + includeIfNull: false, + ) + + + final num? numberProp; + + + + @JsonKey( + + name: r'boolean_prop', + required: false, + includeIfNull: false, + ) + + + final bool? booleanProp; + + + + @JsonKey( + + name: r'string_prop', + required: false, + includeIfNull: false, + ) + + + final String? stringProp; + + + + @JsonKey( + + name: r'date_prop', + required: false, + includeIfNull: false, + ) + + + final DateTime? dateProp; + + + + @JsonKey( + + name: r'datetime_prop', + required: false, + includeIfNull: false, + ) + + + final DateTime? datetimeProp; + + + + @JsonKey( + + name: r'array_nullable_prop', + required: false, + includeIfNull: false, + ) + + + final List? arrayNullableProp; + + + + @JsonKey( + + name: r'array_and_items_nullable_prop', + required: false, + includeIfNull: false, + ) + + + final List? arrayAndItemsNullableProp; + + + + @JsonKey( + + name: r'array_items_nullable', + required: false, + includeIfNull: false, + ) + + + final List? arrayItemsNullable; + + + + @JsonKey( + + name: r'object_nullable_prop', + required: false, + includeIfNull: false, + ) + + + final Map? objectNullableProp; + + + + @JsonKey( + + name: r'object_and_items_nullable_prop', + required: false, + includeIfNull: false, + ) + + + final Map? objectAndItemsNullableProp; + + + + @JsonKey( + + name: r'object_items_nullable', + required: false, + includeIfNull: false, + ) + + + final Map? objectItemsNullable; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is NullableClass && + other.integerProp == integerProp && + other.numberProp == numberProp && + other.booleanProp == booleanProp && + other.stringProp == stringProp && + other.dateProp == dateProp && + other.datetimeProp == datetimeProp && + other.arrayNullableProp == arrayNullableProp && + other.arrayAndItemsNullableProp == arrayAndItemsNullableProp && + other.arrayItemsNullable == arrayItemsNullable && + other.objectNullableProp == objectNullableProp && + other.objectAndItemsNullableProp == objectAndItemsNullableProp && + other.objectItemsNullable == objectItemsNullable; + + @override + int get hashCode => + (integerProp == null ? 0 : integerProp.hashCode) + + (numberProp == null ? 0 : numberProp.hashCode) + + (booleanProp == null ? 0 : booleanProp.hashCode) + + (stringProp == null ? 0 : stringProp.hashCode) + + (dateProp == null ? 0 : dateProp.hashCode) + + (datetimeProp == null ? 0 : datetimeProp.hashCode) + + (arrayNullableProp == null ? 0 : arrayNullableProp.hashCode) + + (arrayAndItemsNullableProp == null ? 0 : arrayAndItemsNullableProp.hashCode) + + arrayItemsNullable.hashCode + + (objectNullableProp == null ? 0 : objectNullableProp.hashCode) + + (objectAndItemsNullableProp == null ? 0 : objectAndItemsNullableProp.hashCode) + + objectItemsNullable.hashCode; + + factory NullableClass.fromJson(Map json) => _$NullableClassFromJson(json); + + Map toJson() => _$NullableClassToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart new file mode 100644 index 000000000000..c511946d665e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'number_only.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class NumberOnly { + /// Returns a new [NumberOnly] instance. + NumberOnly({ + + this.justnumber, + }); + + @JsonKey( + + name: r'JustNumber', + required: false, + includeIfNull: false, + ) + + + final num? justnumber; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is NumberOnly && + other.justnumber == justnumber; + + @override + int get hashCode => + justnumber.hashCode; + + factory NumberOnly.fromJson(Map json) => _$NumberOnlyFromJson(json); + + Map toJson() => _$NumberOnlyToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart new file mode 100644 index 000000000000..2c060a1ecfc8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/deprecated_object.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'object_with_deprecated_fields.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ObjectWithDeprecatedFields { + /// Returns a new [ObjectWithDeprecatedFields] instance. + ObjectWithDeprecatedFields({ + + this.uuid, + + this.id, + + this.deprecatedref, + + this.bars, + }); + + @JsonKey( + + name: r'uuid', + required: false, + includeIfNull: false, + ) + + + final String? uuid; + + + + @Deprecated('id has been deprecated') + @JsonKey( + + name: r'id', + required: false, + includeIfNull: false, + ) + + + final num? id; + + + + @Deprecated('deprecatedref has been deprecated') + @JsonKey( + + name: r'deprecatedRef', + required: false, + includeIfNull: false, + ) + + + final DeprecatedObject? deprecatedref; + + + + @Deprecated('bars has been deprecated') + @JsonKey( + + name: r'bars', + required: false, + includeIfNull: false, + ) + + + final List? bars; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && + other.uuid == uuid && + other.id == id && + other.deprecatedref == deprecatedref && + other.bars == bars; + + @override + int get hashCode => + uuid.hashCode + + id.hashCode + + deprecatedref.hashCode + + bars.hashCode; + + factory ObjectWithDeprecatedFields.fromJson(Map json) => _$ObjectWithDeprecatedFieldsFromJson(json); + + Map toJson() => _$ObjectWithDeprecatedFieldsToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart new file mode 100644 index 000000000000..a554ecc6311b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart @@ -0,0 +1,162 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'order.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Order { + /// Returns a new [Order] instance. + Order({ + + this.id, + + this.petid, + + this.quantity, + + this.shipdate, + + this.status, + + this.complete = false, + }); + + @JsonKey( + + name: r'id', + required: false, + includeIfNull: false, + ) + + + final int? id; + + + + @JsonKey( + + name: r'petId', + required: false, + includeIfNull: false, + ) + + + final int? petid; + + + + @JsonKey( + + name: r'quantity', + required: false, + includeIfNull: false, + ) + + + final int? quantity; + + + + @JsonKey( + + name: r'shipDate', + required: false, + includeIfNull: false, + ) + + + final DateTime? shipdate; + + + + /// Order Status + @JsonKey( + + name: r'status', + required: false, + includeIfNull: false, + unknownEnumValue: OrderStatusEnum.unknownDefaultOpenApi, + ) + + + final OrderStatusEnum? status; + + + + @JsonKey( + defaultValue: false, + name: r'complete', + required: false, + includeIfNull: false, + ) + + + final bool? complete; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Order && + other.id == id && + other.petid == petid && + other.quantity == quantity && + other.shipdate == shipdate && + other.status == status && + other.complete == complete; + + @override + int get hashCode => + id.hashCode + + petid.hashCode + + quantity.hashCode + + shipdate.hashCode + + status.hashCode + + complete.hashCode; + + factory Order.fromJson(Map json) => _$OrderFromJson(json); + + Map toJson() => _$OrderToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + +/// Order Status +enum OrderStatusEnum { + /// Order Status +@JsonValue(r'placed') +placed(r'placed'), + /// Order Status +@JsonValue(r'approved') +approved(r'approved'), + /// Order Status +@JsonValue(r'delivered') +delivered(r'delivered'), + /// Order Status +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const OrderStatusEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_composite.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_composite.dart new file mode 100644 index 000000000000..a4df9cc62544 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_composite.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'outer_composite.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class OuterComposite { + /// Returns a new [OuterComposite] instance. + OuterComposite({ + + this.myNumber, + + this.myString, + + this.myBoolean, + }); + + @JsonKey( + + name: r'my_number', + required: false, + includeIfNull: false, + ) + + + final num? myNumber; + + + + @JsonKey( + + name: r'my_string', + required: false, + includeIfNull: false, + ) + + + final String? myString; + + + + @JsonKey( + + name: r'my_boolean', + required: false, + includeIfNull: false, + ) + + + final bool? myBoolean; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is OuterComposite && + other.myNumber == myNumber && + other.myString == myString && + other.myBoolean == myBoolean; + + @override + int get hashCode => + myNumber.hashCode + + myString.hashCode + + myBoolean.hashCode; + + factory OuterComposite.fromJson(Map json) => _$OuterCompositeFromJson(json); + + Map toJson() => _$OuterCompositeToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum.dart new file mode 100644 index 000000000000..e7687f47c55b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum.dart @@ -0,0 +1,25 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + + +enum OuterEnum { + @JsonValue(r'placed') + placed(r'placed'), + @JsonValue(r'approved') + approved(r'approved'), + @JsonValue(r'delivered') + delivered(r'delivered'), + @JsonValue(r'unknown_default_open_api') + unknownDefaultOpenApi(r'unknown_default_open_api'); + + const OuterEnum(this.value); + + final String value; + + @override + String toString() => value; +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_default_value.dart new file mode 100644 index 000000000000..e232c230492f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_default_value.dart @@ -0,0 +1,25 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + + +enum OuterEnumDefaultValue { + @JsonValue(r'placed') + placed(r'placed'), + @JsonValue(r'approved') + approved(r'approved'), + @JsonValue(r'delivered') + delivered(r'delivered'), + @JsonValue(r'unknown_default_open_api') + unknownDefaultOpenApi(r'unknown_default_open_api'); + + const OuterEnumDefaultValue(this.value); + + final String value; + + @override + String toString() => value; +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer.dart new file mode 100644 index 000000000000..304ecf5f51ff --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer.dart @@ -0,0 +1,25 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + + +enum OuterEnumInteger { + @JsonValue(0) + number0('0'), + @JsonValue(1) + number1('1'), + @JsonValue(2) + number2('2'), + @JsonValue(11184809) + unknownDefaultOpenApi('11184809'); + + const OuterEnumInteger(this.value); + + final String value; + + @override + String toString() => value; +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer_default_value.dart new file mode 100644 index 000000000000..6483e0b837fe --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_enum_integer_default_value.dart @@ -0,0 +1,25 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + + +enum OuterEnumIntegerDefaultValue { + @JsonValue(0) + number0('0'), + @JsonValue(1) + number1('1'), + @JsonValue(2) + number2('2'), + @JsonValue(11184809) + unknownDefaultOpenApi('11184809'); + + const OuterEnumIntegerDefaultValue(this.value); + + final String value; + + @override + String toString() => value; +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_object_with_enum_property.dart new file mode 100644 index 000000000000..f78d6b5c8b3d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/outer_object_with_enum_property.dart @@ -0,0 +1,58 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/outer_enum_integer.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'outer_object_with_enum_property.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class OuterObjectWithEnumProperty { + /// Returns a new [OuterObjectWithEnumProperty] instance. + OuterObjectWithEnumProperty({ + + required this.value, + }); + + @JsonKey( + + name: r'value', + required: true, + includeIfNull: false, + unknownEnumValue: OuterEnumInteger.unknownDefaultOpenApi, + ) + + + final OuterEnumInteger value; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is OuterObjectWithEnumProperty && + other.value == value; + + @override + int get hashCode => + value.hashCode; + + factory OuterObjectWithEnumProperty.fromJson(Map json) => _$OuterObjectWithEnumPropertyFromJson(json); + + Map toJson() => _$OuterObjectWithEnumPropertyToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart new file mode 100644 index 000000000000..6a0edc0716fe --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart @@ -0,0 +1,89 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'parent_with_nullable.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ParentWithNullable { + /// Returns a new [ParentWithNullable] instance. + ParentWithNullable({ + + this.type, + + this.nullableproperty, + }); + + @JsonKey( + + name: r'type', + required: false, + includeIfNull: false, + unknownEnumValue: ParentWithNullableTypeEnum.unknownDefaultOpenApi, + ) + + + final ParentWithNullableTypeEnum? type; + + + + @JsonKey( + + name: r'nullableProperty', + required: false, + includeIfNull: false, + ) + + + final String? nullableproperty; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && + other.type == type && + other.nullableproperty == nullableproperty; + + @override + int get hashCode => + type.hashCode + + (nullableproperty == null ? 0 : nullableproperty.hashCode); + + factory ParentWithNullable.fromJson(Map json) => _$ParentWithNullableFromJson(json); + + Map toJson() => _$ParentWithNullableToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + + +enum ParentWithNullableTypeEnum { +@JsonValue(r'ChildWithNullable') +childwithnullable(r'ChildWithNullable'), +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const ParentWithNullableTypeEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart new file mode 100644 index 000000000000..6d41a485b6c4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart @@ -0,0 +1,164 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/category.dart'; +import 'package:openapi/src/model/tag.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'pet.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Pet { + /// Returns a new [Pet] instance. + Pet({ + + this.id, + + this.category, + + required this.name, + + required this.photourls, + + this.tags, + + this.status, + }); + + @JsonKey( + + name: r'id', + required: false, + includeIfNull: false, + ) + + + final int? id; + + + + @JsonKey( + + name: r'category', + required: false, + includeIfNull: false, + ) + + + final Category? category; + + + + @JsonKey( + + name: r'name', + required: true, + includeIfNull: false, + ) + + + final String name; + + + + @JsonKey( + + name: r'photoUrls', + required: true, + includeIfNull: false, + ) + + + final Set photourls; + + + + @JsonKey( + + name: r'tags', + required: false, + includeIfNull: false, + ) + + + final List? tags; + + + + /// pet status in the store + @JsonKey( + + name: r'status', + required: false, + includeIfNull: false, + unknownEnumValue: PetStatusEnum.unknownDefaultOpenApi, + ) + + + final PetStatusEnum? status; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Pet && + other.id == id && + other.category == category && + other.name == name && + other.photourls == photourls && + other.tags == tags && + other.status == status; + + @override + int get hashCode => + id.hashCode + + category.hashCode + + name.hashCode + + photourls.hashCode + + tags.hashCode + + status.hashCode; + + factory Pet.fromJson(Map json) => _$PetFromJson(json); + + Map toJson() => _$PetToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + +/// pet status in the store +enum PetStatusEnum { + /// pet status in the store +@JsonValue(r'available') +available(r'available'), + /// pet status in the store +@JsonValue(r'pending') +pending(r'pending'), + /// pet status in the store +@JsonValue(r'sold') +sold(r'sold'), + /// pet status in the store +@JsonValue(r'unknown_default_open_api') +unknownDefaultOpenApi(r'unknown_default_open_api'); + +const PetStatusEnum(this.value); + +final String value; + +@override +String toString() => value; +} + + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/read_only_first.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/read_only_first.dart new file mode 100644 index 000000000000..0ec8a7710c60 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/read_only_first.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'read_only_first.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class ReadOnlyFirst { + /// Returns a new [ReadOnlyFirst] instance. + ReadOnlyFirst({ + + this.bar, + + this.baz, + }); + + @JsonKey( + + name: r'bar', + required: false, + includeIfNull: false, + ) + + + final String? bar; + + + + @JsonKey( + + name: r'baz', + required: false, + includeIfNull: false, + ) + + + final String? baz; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is ReadOnlyFirst && + other.bar == bar && + other.baz == baz; + + @override + int get hashCode => + bar.hashCode + + baz.hashCode; + + factory ReadOnlyFirst.fromJson(Map json) => _$ReadOnlyFirstFromJson(json); + + Map toJson() => _$ReadOnlyFirstToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/single_ref_type.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/single_ref_type.dart new file mode 100644 index 000000000000..3ea636c76a1e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/single_ref_type.dart @@ -0,0 +1,23 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + + +enum SingleRefType { + @JsonValue(r'admin') + admin(r'admin'), + @JsonValue(r'user') + user(r'user'), + @JsonValue(r'unknown_default_open_api') + unknownDefaultOpenApi(r'unknown_default_open_api'); + + const SingleRefType(this.value); + + final String value; + + @override + String toString() => value; +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart new file mode 100644 index 000000000000..30d3bc67b80d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'special_model_name.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class SpecialModelName { + /// Returns a new [SpecialModelName] instance. + SpecialModelName({ + + this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, + }); + + @JsonKey( + + name: r'$special[property.name]', + required: false, + includeIfNull: false, + ) + + + final int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && + other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + + @override + int get hashCode => + dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket.hashCode; + + factory SpecialModelName.fromJson(Map json) => _$SpecialModelNameFromJson(json); + + Map toJson() => _$SpecialModelNameToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/tag.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/tag.dart new file mode 100644 index 000000000000..abe588b27d6f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/tag.dart @@ -0,0 +1,72 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'tag.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class Tag { + /// Returns a new [Tag] instance. + Tag({ + + this.id, + + this.name, + }); + + @JsonKey( + + name: r'id', + required: false, + includeIfNull: false, + ) + + + final int? id; + + + + @JsonKey( + + name: r'name', + required: false, + includeIfNull: false, + ) + + + final String? name; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is Tag && + other.id == id && + other.name == name; + + @override + int get hashCode => + id.hashCode + + name.hashCode; + + factory Tag.fromJson(Map json) => _$TagFromJson(json); + + Map toJson() => _$TagToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart new file mode 100644 index 000000000000..c2f51d310a23 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -0,0 +1,56 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'test_inline_freeform_additional_properties_request.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class TestInlineFreeformAdditionalPropertiesRequest { + /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. + TestInlineFreeformAdditionalPropertiesRequest({ + + this.someproperty, + }); + + @JsonKey( + + name: r'someProperty', + required: false, + includeIfNull: false, + ) + + + final String? someproperty; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && + other.someproperty == someproperty; + + @override + int get hashCode => + someproperty.hashCode; + + factory TestInlineFreeformAdditionalPropertiesRequest.fromJson(Map json) => _$TestInlineFreeformAdditionalPropertiesRequestFromJson(json); + + Map toJson() => _$TestInlineFreeformAdditionalPropertiesRequestToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart new file mode 100644 index 000000000000..0e2de7c18785 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart @@ -0,0 +1,169 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:json_annotation/json_annotation.dart'; + +part 'user.g.dart'; + + +@JsonSerializable( + checked: true, + createToJson: true, + disallowUnrecognizedKeys: false, + explicitToJson: true, +) +class User { + /// Returns a new [User] instance. + User({ + + this.id, + + this.username, + + this.firstname, + + this.lastname, + + this.email, + + this.password, + + this.phone, + + this.userstatus, + }); + + @JsonKey( + + name: r'id', + required: false, + includeIfNull: false, + ) + + + final int? id; + + + + @JsonKey( + + name: r'username', + required: false, + includeIfNull: false, + ) + + + final String? username; + + + + @JsonKey( + + name: r'firstName', + required: false, + includeIfNull: false, + ) + + + final String? firstname; + + + + @JsonKey( + + name: r'lastName', + required: false, + includeIfNull: false, + ) + + + final String? lastname; + + + + @JsonKey( + + name: r'email', + required: false, + includeIfNull: false, + ) + + + final String? email; + + + + @JsonKey( + + name: r'password', + required: false, + includeIfNull: false, + ) + + + final String? password; + + + + @JsonKey( + + name: r'phone', + required: false, + includeIfNull: false, + ) + + + final String? phone; + + + + /// User Status + @JsonKey( + + name: r'userStatus', + required: false, + includeIfNull: false, + ) + + + final int? userstatus; + + + + + + @override + bool operator ==(Object other) => identical(this, other) || other is User && + other.id == id && + other.username == username && + other.firstname == firstname && + other.lastname == lastname && + other.email == email && + other.password == password && + other.phone == phone && + other.userstatus == userstatus; + + @override + int get hashCode => + id.hashCode + + username.hashCode + + firstname.hashCode + + lastname.hashCode + + email.hashCode + + password.hashCode + + phone.hashCode + + userstatus.hashCode; + + factory User.fromJson(Map json) => _$UserFromJson(json); + + Map toJson() => _$UserToJson(this); + + @override + String toString() { + return toJson().toString(); + } + +} + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/pubspec.yaml b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/pubspec.yaml new file mode 100644 index 000000000000..cbfddf172a6c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/pubspec.yaml @@ -0,0 +1,17 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +homepage: homepage + + +environment: + sdk: '>=3.5.0 <4.0.0' + +dependencies: + dio: '^5.7.0' + json_annotation: '^4.9.0' + +dev_dependencies: + build_runner: any + json_serializable: '^6.9.3' + test: '^1.16.0' diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart new file mode 100644 index 000000000000..fd8299fb998f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for AdditionalPropertiesClass +void main() { + final AdditionalPropertiesClass? instance = /* AdditionalPropertiesClass(...) */ null; + // TODO add properties to the entity + + group(AdditionalPropertiesClass, () { + // Map mapProperty + test('to test the property `mapProperty`', () async { + // TODO + }); + + // Map> mapOfMapProperty + test('to test the property `mapOfMapProperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart new file mode 100644 index 000000000000..942dce5f1a73 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for AllOfWithSingleRef +void main() { + final AllOfWithSingleRef? instance = /* AllOfWithSingleRef(...) */ null; + // TODO add properties to the entity + + group(AllOfWithSingleRef, () { + // String username + test('to test the property `username`', () async { + // TODO + }); + + // SingleRefType singlereftype + test('to test the property `singlereftype`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/animal_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/animal_test.dart new file mode 100644 index 000000000000..822f19607ab1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/animal_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Animal +void main() { + final Animal? instance = /* Animal(...) */ null; + // TODO add properties to the entity + + group(Animal, () { + // String classname + test('to test the property `classname`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart new file mode 100644 index 000000000000..a55048c12e73 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart @@ -0,0 +1,20 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for AnotherFakeApi +void main() { + final instance = Openapi().getAnotherFakeApi(); + + group(AnotherFakeApi, () { + // To test special tags + // + // To test special tags and operation ID starting with number + // + //Future call123testSpecialTags(ModelClient modelclient) async + test('test call123testSpecialTags', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart new file mode 100644 index 000000000000..9487afd7f58c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ApiResponse +void main() { + final ApiResponse? instance = /* ApiResponse(...) */ null; + // TODO add properties to the entity + + group(ApiResponse, () { + // int code + test('to test the property `code`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String message + test('to test the property `message`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart new file mode 100644 index 000000000000..1c0903ca7a6b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ArrayOfArrayOfNumberOnly +void main() { + final ArrayOfArrayOfNumberOnly? instance = /* ArrayOfArrayOfNumberOnly(...) */ null; + // TODO add properties to the entity + + group(ArrayOfArrayOfNumberOnly, () { + // List> arrayarraynumber + test('to test the property `arrayarraynumber`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart new file mode 100644 index 000000000000..da172c44024c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ArrayOfNumberOnly +void main() { + final ArrayOfNumberOnly? instance = /* ArrayOfNumberOnly(...) */ null; + // TODO add properties to the entity + + group(ArrayOfNumberOnly, () { + // List arraynumber + test('to test the property `arraynumber`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart new file mode 100644 index 000000000000..bfe7c84fd122 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ArrayTest +void main() { + final ArrayTest? instance = /* ArrayTest(...) */ null; + // TODO add properties to the entity + + group(ArrayTest, () { + // List arrayOfString + test('to test the property `arrayOfString`', () async { + // TODO + }); + + // List> arrayArrayOfInteger + test('to test the property `arrayArrayOfInteger`', () async { + // TODO + }); + + // List> arrayArrayOfModel + test('to test the property `arrayArrayOfModel`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart new file mode 100644 index 000000000000..56d5d65c9cdb --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart @@ -0,0 +1,42 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Capitalization +void main() { + final Capitalization? instance = /* Capitalization(...) */ null; + // TODO add properties to the entity + + group(Capitalization, () { + // String smallcamel + test('to test the property `smallcamel`', () async { + // TODO + }); + + // String capitalcamel + test('to test the property `capitalcamel`', () async { + // TODO + }); + + // String smallSnake + test('to test the property `smallSnake`', () async { + // TODO + }); + + // String capitalSnake + test('to test the property `capitalSnake`', () async { + // TODO + }); + + // String scaEthFlowPoints + test('to test the property `scaEthFlowPoints`', () async { + // TODO + }); + + // Name of the pet + // String attName + test('to test the property `attName`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/cat_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/cat_test.dart new file mode 100644 index 000000000000..0f0cb8c7f036 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/cat_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Cat +void main() { + final Cat? instance = /* Cat(...) */ null; + // TODO add properties to the entity + + group(Cat, () { + // String classname + test('to test the property `classname`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + // bool declawed + test('to test the property `declawed`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/category_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/category_test.dart new file mode 100644 index 000000000000..0ed6921ae7fc --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/category_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Category +void main() { + final Category? instance = /* Category(...) */ null; + // TODO add properties to the entity + + group(Category, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String name (default value: 'default-name') + test('to test the property `name`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart new file mode 100644 index 000000000000..e46cb7f088c8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ChildWithNullable +void main() { + final ChildWithNullable? instance = /* ChildWithNullable(...) */ null; + // TODO add properties to the entity + + group(ChildWithNullable, () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableproperty + test('to test the property `nullableproperty`', () async { + // TODO + }); + + // String otherproperty + test('to test the property `otherproperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart new file mode 100644 index 000000000000..e2dda7bab74e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ClassModel +void main() { + final ClassModel? instance = /* ClassModel(...) */ null; + // TODO add properties to the entity + + group(ClassModel, () { + // String class_ + test('to test the property `class_`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart new file mode 100644 index 000000000000..f079565f9785 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for DefaultApi +void main() { + final instance = Openapi().getDefaultApi(); + + group(DefaultApi, () { + //Future fooGet() async + test('test fooGet', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart new file mode 100644 index 000000000000..1b2214668577 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for DeprecatedObject +void main() { + final DeprecatedObject? instance = /* DeprecatedObject(...) */ null; + // TODO add properties to the entity + + group(DeprecatedObject, () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/dog_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/dog_test.dart new file mode 100644 index 000000000000..334507603f2f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/dog_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Dog +void main() { + final Dog? instance = /* Dog(...) */ null; + // TODO add properties to the entity + + group(Dog, () { + // String classname + test('to test the property `classname`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + // String breed + test('to test the property `breed`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart new file mode 100644 index 000000000000..30d12204ba17 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for EnumArrays +void main() { + final EnumArrays? instance = /* EnumArrays(...) */ null; + // TODO add properties to the entity + + group(EnumArrays, () { + // String justSymbol + test('to test the property `justSymbol`', () async { + // TODO + }); + + // List arrayEnum + test('to test the property `arrayEnum`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart new file mode 100644 index 000000000000..1f0b3d7aab11 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart @@ -0,0 +1,51 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for EnumTest +void main() { + final EnumTest? instance = /* EnumTest(...) */ null; + // TODO add properties to the entity + + group(EnumTest, () { + // String enumString + test('to test the property `enumString`', () async { + // TODO + }); + + // String enumStringRequired + test('to test the property `enumStringRequired`', () async { + // TODO + }); + + // int enumInteger + test('to test the property `enumInteger`', () async { + // TODO + }); + + // double enumNumber + test('to test the property `enumNumber`', () async { + // TODO + }); + + // OuterEnum outerenum + test('to test the property `outerenum`', () async { + // TODO + }); + + // OuterEnumInteger outerenuminteger + test('to test the property `outerenuminteger`', () async { + // TODO + }); + + // OuterEnumDefaultValue outerenumdefaultvalue + test('to test the property `outerenumdefaultvalue`', () async { + // TODO + }); + + // OuterEnumIntegerDefaultValue outerenumintegerdefaultvalue + test('to test the property `outerenumintegerdefaultvalue`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart new file mode 100644 index 000000000000..2e343b405587 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart @@ -0,0 +1,183 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for FakeApi +void main() { + final instance = Openapi().getFakeApi(); + + group(FakeApi, () { + // for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + // + //Future fakeBigDecimalMap() async + test('test fakeBigDecimalMap', () async { + // TODO + }); + + // Health check endpoint + // + //Future fakeHealthGet() async + test('test fakeHealthGet', () async { + // TODO + }); + + // test http signature authentication + // + //Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async + test('test fakeHttpSignatureTest', () async { + // TODO + }); + + // Test serialization of outer boolean types + // + //Future fakeOuterBooleanSerialize({ bool body }) async + test('test fakeOuterBooleanSerialize', () async { + // TODO + }); + + // Test serialization of object with outer number type + // + //Future fakeOuterCompositeSerialize({ OuterComposite outercomposite }) async + test('test fakeOuterCompositeSerialize', () async { + // TODO + }); + + // Test serialization of outer number types + // + //Future fakeOuterNumberSerialize({ num body }) async + test('test fakeOuterNumberSerialize', () async { + // TODO + }); + + // Test serialization of outer string types + // + //Future fakeOuterStringSerialize({ String body }) async + test('test fakeOuterStringSerialize', () async { + // TODO + }); + + // Test serialization of enum (int) properties with examples + // + //Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerobjectwithenumproperty) async + test('test fakePropertyEnumIntegerSerialize', () async { + // TODO + }); + + // test referenced additionalProperties + // + // + // + //Future testAdditionalPropertiesReference(Map requestBody) async + test('test testAdditionalPropertiesReference', () async { + // TODO + }); + + // For this test, the body has to be a binary file. + // + //Future testBodyWithBinary(MultipartFile body) async + test('test testBodyWithBinary', () async { + // TODO + }); + + // For this test, the body for this request must reference a schema named `File`. + // + //Future testBodyWithFileSchema(FileSchemaTestClass fileschematestclass) async + test('test testBodyWithFileSchema', () async { + // TODO + }); + + //Future testBodyWithQueryParams(String query, User user) async + test('test testBodyWithQueryParams', () async { + // TODO + }); + + // To test \"client\" model + // + // To test \"client\" model + // + //Future testClientModel(ModelClient modelclient) async + test('test testClientModel', () async { + // TODO + }); + + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // + //Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime datetime, String password, String callback }) async + test('test testEndpointParameters', () async { + // TODO + }); + + // To test enum parameters + // + // To test enum parameters + // + //Future testEnumParameters({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString }) async + test('test testEnumParameters', () async { + // TODO + }); + + // Fake endpoint to test group parameters (optional) + // + // Fake endpoint to test group parameters (optional) + // + //Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async + test('test testGroupParameters', () async { + // TODO + }); + + // test inline additionalProperties + // + // + // + //Future testInlineAdditionalProperties(Map requestBody) async + test('test testInlineAdditionalProperties', () async { + // TODO + }); + + // test inline free-form additionalProperties + // + // + // + //Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest) async + test('test testInlineFreeformAdditionalProperties', () async { + // TODO + }); + + // test json serialization of form data + // + // + // + //Future testJsonFormData(String param, String param2) async + test('test testJsonFormData', () async { + // TODO + }); + + // test nullable parent property + // + // + // + //Future testNullable(ChildWithNullable childwithnullable) async + test('test testNullable', () async { + // TODO + }); + + // To test the collection format in query parameters + // + //Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map language }) async + test('test testQueryParameterCollectionFormat', () async { + // TODO + }); + + // test referenced string map + // + // + // + //Future testStringMapReference(Map requestBody) async + test('test testStringMapReference', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart new file mode 100644 index 000000000000..2889fce8cdaa --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for FakeBigDecimalMap200Response +void main() { + final FakeBigDecimalMap200Response? instance = /* FakeBigDecimalMap200Response(...) */ null; + // TODO add properties to the entity + + group(FakeBigDecimalMap200Response, () { + // num someid + test('to test the property `someid`', () async { + // TODO + }); + + // Map somemap + test('to test the property `somemap`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart new file mode 100644 index 000000000000..c81f9cf0db45 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart @@ -0,0 +1,20 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for FakeClassnameTags123Api +void main() { + final instance = Openapi().getFakeClassnameTags123Api(); + + group(FakeClassnameTags123Api, () { + // To test class name in snake case + // + // To test class name in snake case + // + //Future testClassname(ModelClient modelclient) async + test('test testClassname', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart new file mode 100644 index 000000000000..2ccd0d450ce7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for FileSchemaTestClass +void main() { + final FileSchemaTestClass? instance = /* FileSchemaTestClass(...) */ null; + // TODO add properties to the entity + + group(FileSchemaTestClass, () { + // ModelFile file + test('to test the property `file`', () async { + // TODO + }); + + // List files + test('to test the property `files`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart new file mode 100644 index 000000000000..4282326fe61f --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for FooGetDefaultResponse +void main() { + final FooGetDefaultResponse? instance = /* FooGetDefaultResponse(...) */ null; + // TODO add properties to the entity + + group(FooGetDefaultResponse, () { + // Foo string + test('to test the property `string`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_test.dart new file mode 100644 index 000000000000..28ae9a5b5e13 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/foo_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Foo +void main() { + final Foo? instance = /* Foo(...) */ null; + // TODO add properties to the entity + + group(Foo, () { + // String bar (default value: 'bar') + test('to test the property `bar`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart new file mode 100644 index 000000000000..424f668640a6 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart @@ -0,0 +1,93 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for FormatTest +void main() { + final FormatTest? instance = /* FormatTest(...) */ null; + // TODO add properties to the entity + + group(FormatTest, () { + // int integer + test('to test the property `integer`', () async { + // TODO + }); + + // int int32 + test('to test the property `int32`', () async { + // TODO + }); + + // int int64 + test('to test the property `int64`', () async { + // TODO + }); + + // num number + test('to test the property `number`', () async { + // TODO + }); + + // double float + test('to test the property `float`', () async { + // TODO + }); + + // double double_ + test('to test the property `double_`', () async { + // TODO + }); + + // double decimal + test('to test the property `decimal`', () async { + // TODO + }); + + // String string + test('to test the property `string`', () async { + // TODO + }); + + // String byte + test('to test the property `byte`', () async { + // TODO + }); + + // MultipartFile binary + test('to test the property `binary`', () async { + // TODO + }); + + // DateTime date + test('to test the property `date`', () async { + // TODO + }); + + // DateTime datetime + test('to test the property `datetime`', () async { + // TODO + }); + + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // String password + test('to test the property `password`', () async { + // TODO + }); + + // A string that is a 10 digit number. Can have leading zeros. + // String patternWithDigits + test('to test the property `patternWithDigits`', () async { + // TODO + }); + + // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + // String patternWithDigitsAndDelimiter + test('to test the property `patternWithDigitsAndDelimiter`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart new file mode 100644 index 000000000000..d72429a31bb5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for HasOnlyReadOnly +void main() { + final HasOnlyReadOnly? instance = /* HasOnlyReadOnly(...) */ null; + // TODO add properties to the entity + + group(HasOnlyReadOnly, () { + // String bar + test('to test the property `bar`', () async { + // TODO + }); + + // String foo + test('to test the property `foo`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart new file mode 100644 index 000000000000..6e227376da00 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for HealthCheckResult +void main() { + final HealthCheckResult? instance = /* HealthCheckResult(...) */ null; + // TODO add properties to the entity + + group(HealthCheckResult, () { + // String nullablemessage + test('to test the property `nullablemessage`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart new file mode 100644 index 000000000000..909415df7540 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart @@ -0,0 +1,31 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for MapTest +void main() { + final MapTest? instance = /* MapTest(...) */ null; + // TODO add properties to the entity + + group(MapTest, () { + // Map> mapMapOfString + test('to test the property `mapMapOfString`', () async { + // TODO + }); + + // Map mapOfEnumString + test('to test the property `mapOfEnumString`', () async { + // TODO + }); + + // Map directMap + test('to test the property `directMap`', () async { + // TODO + }); + + // Map indirectMap + test('to test the property `indirectMap`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart new file mode 100644 index 000000000000..b4c5162189e7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for MixedPropertiesAndAdditionalPropertiesClass +void main() { + final MixedPropertiesAndAdditionalPropertiesClass? instance = /* MixedPropertiesAndAdditionalPropertiesClass(...) */ null; + // TODO add properties to the entity + + group(MixedPropertiesAndAdditionalPropertiesClass, () { + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // DateTime datetime + test('to test the property `datetime`', () async { + // TODO + }); + + // Map map + test('to test the property `map`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart new file mode 100644 index 000000000000..de8cf3037b6b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Model200Response +void main() { + final Model200Response? instance = /* Model200Response(...) */ null; + // TODO add properties to the entity + + group(Model200Response, () { + // int name + test('to test the property `name`', () async { + // TODO + }); + + // String class_ + test('to test the property `class_`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart new file mode 100644 index 000000000000..44faf62f15b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelClient +void main() { + final ModelClient? instance = /* ModelClient(...) */ null; + // TODO add properties to the entity + + group(ModelClient, () { + // String client + test('to test the property `client`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_enum_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_enum_class_test.dart new file mode 100644 index 000000000000..03e5855bf004 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_enum_class_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelEnumClass +void main() { + + group(ModelEnumClass, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart new file mode 100644 index 000000000000..2f6c1687e7a7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart @@ -0,0 +1,17 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelFile +void main() { + final ModelFile? instance = /* ModelFile(...) */ null; + // TODO add properties to the entity + + group(ModelFile, () { + // Test capitalization + // String sourceuri + test('to test the property `sourceuri`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart new file mode 100644 index 000000000000..f748eee993ac --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelList +void main() { + final ModelList? instance = /* ModelList(...) */ null; + // TODO add properties to the entity + + group(ModelList, () { + // String n123list + test('to test the property `n123list`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart new file mode 100644 index 000000000000..cfc17807c151 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ModelReturn +void main() { + final ModelReturn? instance = /* ModelReturn(...) */ null; + // TODO add properties to the entity + + group(ModelReturn, () { + // int return_ + test('to test the property `return_`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/name_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/name_test.dart new file mode 100644 index 000000000000..4f3f7f633728 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/name_test.dart @@ -0,0 +1,31 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Name +void main() { + final Name? instance = /* Name(...) */ null; + // TODO add properties to the entity + + group(Name, () { + // int name + test('to test the property `name`', () async { + // TODO + }); + + // int snakeCase + test('to test the property `snakeCase`', () async { + // TODO + }); + + // String property + test('to test the property `property`', () async { + // TODO + }); + + // int n123number + test('to test the property `n123number`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart new file mode 100644 index 000000000000..0ab76167983b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart @@ -0,0 +1,71 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for NullableClass +void main() { + final NullableClass? instance = /* NullableClass(...) */ null; + // TODO add properties to the entity + + group(NullableClass, () { + // int integerProp + test('to test the property `integerProp`', () async { + // TODO + }); + + // num numberProp + test('to test the property `numberProp`', () async { + // TODO + }); + + // bool booleanProp + test('to test the property `booleanProp`', () async { + // TODO + }); + + // String stringProp + test('to test the property `stringProp`', () async { + // TODO + }); + + // DateTime dateProp + test('to test the property `dateProp`', () async { + // TODO + }); + + // DateTime datetimeProp + test('to test the property `datetimeProp`', () async { + // TODO + }); + + // List arrayNullableProp + test('to test the property `arrayNullableProp`', () async { + // TODO + }); + + // List arrayAndItemsNullableProp + test('to test the property `arrayAndItemsNullableProp`', () async { + // TODO + }); + + // List arrayItemsNullable + test('to test the property `arrayItemsNullable`', () async { + // TODO + }); + + // Map objectNullableProp + test('to test the property `objectNullableProp`', () async { + // TODO + }); + + // Map objectAndItemsNullableProp + test('to test the property `objectAndItemsNullableProp`', () async { + // TODO + }); + + // Map objectItemsNullable + test('to test the property `objectItemsNullable`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart new file mode 100644 index 000000000000..92ec051454c3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for NumberOnly +void main() { + final NumberOnly? instance = /* NumberOnly(...) */ null; + // TODO add properties to the entity + + group(NumberOnly, () { + // num justnumber + test('to test the property `justnumber`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart new file mode 100644 index 000000000000..d58af9e3e093 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart @@ -0,0 +1,31 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ObjectWithDeprecatedFields +void main() { + final ObjectWithDeprecatedFields? instance = /* ObjectWithDeprecatedFields(...) */ null; + // TODO add properties to the entity + + group(ObjectWithDeprecatedFields, () { + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // num id + test('to test the property `id`', () async { + // TODO + }); + + // DeprecatedObject deprecatedref + test('to test the property `deprecatedref`', () async { + // TODO + }); + + // List bars + test('to test the property `bars`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/order_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/order_test.dart new file mode 100644 index 000000000000..dda808fc14dd --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/order_test.dart @@ -0,0 +1,42 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Order +void main() { + final Order? instance = /* Order(...) */ null; + // TODO add properties to the entity + + group(Order, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // int petid + test('to test the property `petid`', () async { + // TODO + }); + + // int quantity + test('to test the property `quantity`', () async { + // TODO + }); + + // DateTime shipdate + test('to test the property `shipdate`', () async { + // TODO + }); + + // Order Status + // String status + test('to test the property `status`', () async { + // TODO + }); + + // bool complete (default value: false) + test('to test the property `complete`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart new file mode 100644 index 000000000000..a5f0172ba21c --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart @@ -0,0 +1,26 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterComposite +void main() { + final OuterComposite? instance = /* OuterComposite(...) */ null; + // TODO add properties to the entity + + group(OuterComposite, () { + // num myNumber + test('to test the property `myNumber`', () async { + // TODO + }); + + // String myString + test('to test the property `myString`', () async { + // TODO + }); + + // bool myBoolean + test('to test the property `myBoolean`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart new file mode 100644 index 000000000000..502c8326be58 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnumDefaultValue +void main() { + + group(OuterEnumDefaultValue, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart new file mode 100644 index 000000000000..c535fe8ac354 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnumIntegerDefaultValue +void main() { + + group(OuterEnumIntegerDefaultValue, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart new file mode 100644 index 000000000000..d945bc8c489d --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnumInteger +void main() { + + group(OuterEnumInteger, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart new file mode 100644 index 000000000000..8e11eb02fb8a --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterEnum +void main() { + + group(OuterEnum, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart new file mode 100644 index 000000000000..3d72c6188e17 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for OuterObjectWithEnumProperty +void main() { + final OuterObjectWithEnumProperty? instance = /* OuterObjectWithEnumProperty(...) */ null; + // TODO add properties to the entity + + group(OuterObjectWithEnumProperty, () { + // OuterEnumInteger value + test('to test the property `value`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart new file mode 100644 index 000000000000..b1b208e5f610 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ParentWithNullable +void main() { + final ParentWithNullable? instance = /* ParentWithNullable(...) */ null; + // TODO add properties to the entity + + group(ParentWithNullable, () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableproperty + test('to test the property `nullableproperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart new file mode 100644 index 000000000000..0b2a5e75b1c7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart @@ -0,0 +1,92 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for PetApi +void main() { + final instance = Openapi().getPetApi(); + + group(PetApi, () { + // Add a new pet to the store + // + // + // + //Future addPet(Pet pet) async + test('test addPet', () async { + // TODO + }); + + // Deletes a pet + // + // + // + //Future deletePet(int petid, { String apiKey }) async + test('test deletePet', () async { + // TODO + }); + + // Finds Pets by status + // + // Multiple status values can be provided with comma separated strings + // + //Future> findPetsByStatus(List status) async + test('test findPetsByStatus', () async { + // TODO + }); + + // Finds Pets by tags + // + // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + // + //Future> findPetsByTags(Set tags) async + test('test findPetsByTags', () async { + // TODO + }); + + // Find pet by ID + // + // Returns a single pet + // + //Future getPetById(int petid) async + test('test getPetById', () async { + // TODO + }); + + // Update an existing pet + // + // + // + //Future updatePet(Pet pet) async + test('test updatePet', () async { + // TODO + }); + + // Updates a pet in the store with form data + // + // + // + //Future updatePetWithForm(int petid, { String name, String status }) async + test('test updatePetWithForm', () async { + // TODO + }); + + // uploads an image + // + // + // + //Future uploadFile(int petid, { String additionalmetadata, MultipartFile file }) async + test('test uploadFile', () async { + // TODO + }); + + // uploads an image (required) + // + // + // + //Future uploadFileWithRequiredFile(int petid, MultipartFile requiredfile, { String additionalmetadata }) async + test('test uploadFileWithRequiredFile', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_test.dart new file mode 100644 index 000000000000..9bdf6ba520e7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/pet_test.dart @@ -0,0 +1,42 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Pet +void main() { + final Pet? instance = /* Pet(...) */ null; + // TODO add properties to the entity + + group(Pet, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Category category + test('to test the property `category`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + // Set photourls + test('to test the property `photourls`', () async { + // TODO + }); + + // List tags + test('to test the property `tags`', () async { + // TODO + }); + + // pet status in the store + // String status + test('to test the property `status`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart new file mode 100644 index 000000000000..bcefd75befb6 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for ReadOnlyFirst +void main() { + final ReadOnlyFirst? instance = /* ReadOnlyFirst(...) */ null; + // TODO add properties to the entity + + group(ReadOnlyFirst, () { + // String bar + test('to test the property `bar`', () async { + // TODO + }); + + // String baz + test('to test the property `baz`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart new file mode 100644 index 000000000000..5cd85add393e --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart @@ -0,0 +1,9 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for SingleRefType +void main() { + + group(SingleRefType, () { + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart new file mode 100644 index 000000000000..64de795ef175 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for SpecialModelName +void main() { + final SpecialModelName? instance = /* SpecialModelName(...) */ null; + // TODO add properties to the entity + + group(SpecialModelName, () { + // int dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket + test('to test the property `dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart new file mode 100644 index 000000000000..08f7f738043b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart @@ -0,0 +1,47 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for StoreApi +void main() { + final instance = Openapi().getStoreApi(); + + group(StoreApi, () { + // Delete purchase order by ID + // + // For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + // + //Future deleteOrder(String orderId) async + test('test deleteOrder', () async { + // TODO + }); + + // Returns pet inventories by status + // + // Returns a map of status codes to quantities + // + //Future> getInventory() async + test('test getInventory', () async { + // TODO + }); + + // Find purchase order by ID + // + // For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + // + //Future getOrderById(int orderId) async + test('test getOrderById', () async { + // TODO + }); + + // Place an order for a pet + // + // + // + //Future placeOrder(Order order) async + test('test placeOrder', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/tag_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/tag_test.dart new file mode 100644 index 000000000000..ffe49b3179c3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/tag_test.dart @@ -0,0 +1,21 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for Tag +void main() { + final Tag? instance = /* Tag(...) */ null; + // TODO add properties to the entity + + group(Tag, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart new file mode 100644 index 000000000000..c4e0cb7ef1f2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart @@ -0,0 +1,16 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for TestInlineFreeformAdditionalPropertiesRequest +void main() { + final TestInlineFreeformAdditionalPropertiesRequest? instance = /* TestInlineFreeformAdditionalPropertiesRequest(...) */ null; + // TODO add properties to the entity + + group(TestInlineFreeformAdditionalPropertiesRequest, () { + // String someproperty + test('to test the property `someproperty`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart new file mode 100644 index 000000000000..4bf28b67623b --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart @@ -0,0 +1,83 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + + +/// tests for UserApi +void main() { + final instance = Openapi().getUserApi(); + + group(UserApi, () { + // Create user + // + // This can only be done by the logged in user. + // + //Future createUser(User user) async + test('test createUser', () async { + // TODO + }); + + // Creates list of users with given input array + // + // + // + //Future createUsersWithArrayInput(List user) async + test('test createUsersWithArrayInput', () async { + // TODO + }); + + // Creates list of users with given input array + // + // + // + //Future createUsersWithListInput(List user) async + test('test createUsersWithListInput', () async { + // TODO + }); + + // Delete user + // + // This can only be done by the logged in user. + // + //Future deleteUser(String username) async + test('test deleteUser', () async { + // TODO + }); + + // Get user by user name + // + // + // + //Future getUserByName(String username) async + test('test getUserByName', () async { + // TODO + }); + + // Logs user into the system + // + // + // + //Future loginUser(String username, String password) async + test('test loginUser', () async { + // TODO + }); + + // Logs out current logged in user session + // + // + // + //Future logoutUser() async + test('test logoutUser', () async { + // TODO + }); + + // Updated user + // + // This can only be done by the logged in user. + // + //Future updateUser(String username, User user) async + test('test updateUser', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_test.dart new file mode 100644 index 000000000000..9c5d4fec87f7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/test/user_test.dart @@ -0,0 +1,52 @@ +import 'package:test/test.dart'; +import 'package:openapi/openapi.dart'; + +// tests for User +void main() { + final User? instance = /* User(...) */ null; + // TODO add properties to the entity + + group(User, () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String username + test('to test the property `username`', () async { + // TODO + }); + + // String firstname + test('to test the property `firstname`', () async { + // TODO + }); + + // String lastname + test('to test the property `lastname`', () async { + // TODO + }); + + // String email + test('to test the property `email`', () async { + // TODO + }); + + // String password + test('to test the property `password`', () async { + // TODO + }); + + // String phone + test('to test the property `phone`', () async { + // TODO + }); + + // User Status + // int userstatus + test('to test the property `userstatus`', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md index bde5ffe51a2c..08914a83f300 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petId** | **int** | | [optional] +**petid** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] +**shipdate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md index 88512ee37035..a6acc8ba01ec 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photoUrls** | **List** | | [default to const []] +**photourls** | **List** | | [default to const []] **tags** | [**List**](Tag.md) | | [optional] [default to const []] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md index 267b97755bef..12637767ba2d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md @@ -65,7 +65,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petId, apiKey) +> deletePet(petid, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | Pet id to delete +final petid = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | try { - api_instance.deletePet(petId, apiKey); + api_instance.deletePet(petid, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| Pet id to delete | + **petid** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petId) +> Pet getPetById(petid) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet to return +final petid = 789; // int | ID of pet to return try { - final result = api_instance.getPetById(petId); + final result = api_instance.getPetById(petid); print(result); } catch (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to return | + **petid** | **int**| ID of pet to return | ### Return type @@ -293,7 +293,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petId, name, status) +> updatePetWithForm(petid, name, status) Updates a pet in the store with form data @@ -306,12 +306,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet that needs to be updated +final petid = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet try { - api_instance.updatePetWithForm(petId, name, status); + api_instance.updatePetWithForm(petid, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -321,7 +321,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet that needs to be updated | + **petid** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -341,7 +341,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petId, additionalMetadata, file) +> ApiResponse uploadFile(petid, additionalmetadata, file) uploads an image @@ -354,12 +354,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet to update -final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final petid = 789; // int | ID of pet to update +final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final result = api_instance.uploadFile(petId, additionalMetadata, file); + final result = api_instance.uploadFile(petid, additionalmetadata, file); print(result); } catch (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -370,8 +370,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md index e52308617644..68e96b35dc5b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **deleteOrder** -> deleteOrder(orderId) +> deleteOrder(orderid) Delete purchase order by ID @@ -27,10 +27,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non import 'package:openapi/api.dart'; final api_instance = StoreApi(); -final orderId = orderId_example; // String | ID of the order that needs to be deleted +final orderid = orderid_example; // String | ID of the order that needs to be deleted try { - api_instance.deleteOrder(orderId); + api_instance.deleteOrder(orderid); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); } @@ -40,7 +40,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orderId** | **String**| ID of the order that needs to be deleted | + **orderid** | **String**| ID of the order that needs to be deleted | ### Return type @@ -101,7 +101,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getOrderById** -> Order getOrderById(orderId) +> Order getOrderById(orderid) Find purchase order by ID @@ -112,10 +112,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge import 'package:openapi/api.dart'; final api_instance = StoreApi(); -final orderId = 789; // int | ID of pet that needs to be fetched +final orderid = 789; // int | ID of pet that needs to be fetched try { - final result = api_instance.getOrderById(orderId); + final result = api_instance.getOrderById(orderid); print(result); } catch (e) { print('Exception when calling StoreApi->getOrderById: $e\n'); @@ -126,7 +126,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orderId** | **int**| ID of pet that needs to be fetched | + **orderid** | **int**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md index fa87e64d8595..37aa8c50230e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] +**firstname** | **String** | | [optional] +**lastname** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userStatus** | **int** | User Status | [optional] +**userstatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index f6cb28f6cc2a..39de05487f74 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -82,14 +82,14 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { + Future deletePetWithHttpInfo(int petid, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -122,12 +122,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String? apiKey, }) async { - final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); + Future deletePet(int petid, { String? apiKey, }) async { + final response = await deletePetWithHttpInfo(petid, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -267,12 +267,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to return - Future getPetByIdWithHttpInfo(int petId,) async { + Future getPetByIdWithHttpInfo(int petid,) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -301,10 +301,10 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to return - Future getPetById(int petId,) async { - final response = await getPetByIdWithHttpInfo(petId,); + Future getPetById(int petid,) async { + final response = await getPetByIdWithHttpInfo(petid,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -384,7 +384,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -392,10 +392,10 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { + Future updatePetWithFormWithHttpInfo(int petid, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -430,7 +430,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -438,8 +438,8 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String? name, String? status, }) async { - final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); + Future updatePetWithForm(int petid, { String? name, String? status, }) async { + final response = await updatePetWithFormWithHttpInfo(petid, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -453,18 +453,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to update /// - /// * [String] additionalMetadata: + /// * [String] additionalmetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { + Future uploadFileWithHttpInfo(int petid, { String? additionalmetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -477,9 +477,9 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalMetadata != null) { + if (additionalmetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); } if (file != null) { hasFields = true; @@ -507,16 +507,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to update /// - /// * [String] additionalMetadata: + /// * [String] additionalmetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { - final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); + Future uploadFile(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + final response = await uploadFileWithHttpInfo(petid, additionalmetadata: additionalmetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index e27c2b04cb8b..cd20ddd4366f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -24,12 +24,12 @@ class StoreApi { /// /// Parameters: /// - /// * [String] orderId (required): + /// * [String] orderid (required): /// ID of the order that needs to be deleted - Future deleteOrderWithHttpInfo(String orderId,) async { + Future deleteOrderWithHttpInfo(String orderid,) async { // ignore: prefer_const_declarations final path = r'/store/order/{orderId}' - .replaceAll('{orderId}', orderId); + .replaceAll('{orderId}', orderid); // ignore: prefer_final_locals Object? postBody; @@ -58,10 +58,10 @@ class StoreApi { /// /// Parameters: /// - /// * [String] orderId (required): + /// * [String] orderid (required): /// ID of the order that needs to be deleted - Future deleteOrder(String orderId,) async { - final response = await deleteOrderWithHttpInfo(orderId,); + Future deleteOrder(String orderid,) async { + final response = await deleteOrderWithHttpInfo(orderid,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -123,12 +123,12 @@ class StoreApi { /// /// Parameters: /// - /// * [int] orderId (required): + /// * [int] orderid (required): /// ID of pet that needs to be fetched - Future getOrderByIdWithHttpInfo(int orderId,) async { + Future getOrderByIdWithHttpInfo(int orderid,) async { // ignore: prefer_const_declarations final path = r'/store/order/{orderId}' - .replaceAll('{orderId}', orderId.toString()); + .replaceAll('{orderId}', orderid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -157,10 +157,10 @@ class StoreApi { /// /// Parameters: /// - /// * [int] orderId (required): + /// * [int] orderid (required): /// ID of pet that needs to be fetched - Future getOrderById(int orderId,) async { - final response = await getOrderByIdWithHttpInfo(orderId,); + Future getOrderById(int orderid,) async { + final response = await getOrderByIdWithHttpInfo(orderid,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart index 88a37f9c5fcb..0ee88f1fd8a4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart @@ -14,9 +14,9 @@ class Order { /// Returns a new [Order] instance. Order({ this.id, - this.petId, + this.petid, this.quantity, - this.shipDate, + this.shipdate, this.status, this.complete = false, }); @@ -35,7 +35,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? petId; + int? petid; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -51,7 +51,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? shipDate; + DateTime? shipdate; /// Order Status OrderStatusEnum? status; @@ -61,9 +61,9 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petId == petId && + other.petid == petid && other.quantity == quantity && - other.shipDate == shipDate && + other.shipdate == shipdate && other.status == status && other.complete == complete; @@ -71,14 +71,14 @@ class Order { int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + - (petId == null ? 0 : petId!.hashCode) + + (petid == null ? 0 : petid!.hashCode) + (quantity == null ? 0 : quantity!.hashCode) + - (shipDate == null ? 0 : shipDate!.hashCode) + + (shipdate == null ? 0 : shipdate!.hashCode) + (status == null ? 0 : status!.hashCode) + (complete.hashCode); @override - String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; + String toString() => 'Order[id=$id, petid=$petid, quantity=$quantity, shipdate=$shipdate, status=$status, complete=$complete]'; Map toJson() { final json = {}; @@ -87,8 +87,8 @@ class Order { } else { json[r'id'] = null; } - if (this.petId != null) { - json[r'petId'] = this.petId; + if (this.petid != null) { + json[r'petId'] = this.petid; } else { json[r'petId'] = null; } @@ -97,8 +97,8 @@ class Order { } else { json[r'quantity'] = null; } - if (this.shipDate != null) { - json[r'shipDate'] = this.shipDate!.toUtc().toIso8601String(); + if (this.shipdate != null) { + json[r'shipDate'] = this.shipdate!.toUtc().toIso8601String(); } else { json[r'shipDate'] = null; } @@ -131,9 +131,9 @@ class Order { return Order( id: mapValueOfType(json, r'id'), - petId: mapValueOfType(json, r'petId'), + petid: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), - shipDate: mapDateTime(json, r'shipDate', r''), + shipdate: mapDateTime(json, r'shipDate', r''), status: OrderStatusEnum.fromJson(json[r'status']), complete: mapValueOfType(json, r'complete') ?? false, ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart index 9b79b4e1c571..3c986470aedc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart @@ -16,7 +16,7 @@ class Pet { this.id, this.category, required this.name, - this.photoUrls = const [], + this.photourls = const [], this.tags = const [], this.status, }); @@ -39,7 +39,7 @@ class Pet { String name; - List photoUrls; + List photourls; List tags; @@ -51,7 +51,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - _deepEquality.equals(other.photoUrls, photoUrls) && + _deepEquality.equals(other.photourls, photourls) && _deepEquality.equals(other.tags, tags) && other.status == status; @@ -61,12 +61,12 @@ class Pet { (id == null ? 0 : id!.hashCode) + (category == null ? 0 : category!.hashCode) + (name.hashCode) + - (photoUrls.hashCode) + + (photourls.hashCode) + (tags.hashCode) + (status == null ? 0 : status!.hashCode); @override - String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; + String toString() => 'Pet[id=$id, category=$category, name=$name, photourls=$photourls, tags=$tags, status=$status]'; Map toJson() { final json = {}; @@ -81,7 +81,7 @@ class Pet { json[r'category'] = null; } json[r'name'] = this.name; - json[r'photoUrls'] = this.photoUrls; + json[r'photoUrls'] = this.photourls; json[r'tags'] = this.tags; if (this.status != null) { json[r'status'] = this.status; @@ -113,7 +113,7 @@ class Pet { id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), name: mapValueOfType(json, r'name')!, - photoUrls: json[r'photoUrls'] is Iterable + photourls: json[r'photoUrls'] is Iterable ? (json[r'photoUrls'] as Iterable).cast().toList(growable: false) : const [], tags: Tag.listFromJson(json[r'tags']), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart index 395f9e38e043..b6be541d49f9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart @@ -15,12 +15,12 @@ class User { User({ this.id, this.username, - this.firstName, - this.lastName, + this.firstname, + this.lastname, this.email, this.password, this.phone, - this.userStatus, + this.userstatus, }); /// @@ -45,7 +45,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? firstName; + String? firstname; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -53,7 +53,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? lastName; + String? lastname; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -86,33 +86,33 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? userStatus; + int? userstatus; @override bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstName == firstName && - other.lastName == lastName && + other.firstname == firstname && + other.lastname == lastname && other.email == email && other.password == password && other.phone == phone && - other.userStatus == userStatus; + other.userstatus == userstatus; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (username == null ? 0 : username!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode) + + (firstname == null ? 0 : firstname!.hashCode) + + (lastname == null ? 0 : lastname!.hashCode) + (email == null ? 0 : email!.hashCode) + (password == null ? 0 : password!.hashCode) + (phone == null ? 0 : phone!.hashCode) + - (userStatus == null ? 0 : userStatus!.hashCode); + (userstatus == null ? 0 : userstatus!.hashCode); @override - String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; + String toString() => 'User[id=$id, username=$username, firstname=$firstname, lastname=$lastname, email=$email, password=$password, phone=$phone, userstatus=$userstatus]'; Map toJson() { final json = {}; @@ -126,13 +126,13 @@ class User { } else { json[r'username'] = null; } - if (this.firstName != null) { - json[r'firstName'] = this.firstName; + if (this.firstname != null) { + json[r'firstName'] = this.firstname; } else { json[r'firstName'] = null; } - if (this.lastName != null) { - json[r'lastName'] = this.lastName; + if (this.lastname != null) { + json[r'lastName'] = this.lastname; } else { json[r'lastName'] = null; } @@ -151,8 +151,8 @@ class User { } else { json[r'phone'] = null; } - if (this.userStatus != null) { - json[r'userStatus'] = this.userStatus; + if (this.userstatus != null) { + json[r'userStatus'] = this.userstatus; } else { json[r'userStatus'] = null; } @@ -180,12 +180,12 @@ class User { return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), - firstName: mapValueOfType(json, r'firstName'), - lastName: mapValueOfType(json, r'lastName'), + firstname: mapValueOfType(json, r'firstName'), + lastname: mapValueOfType(json, r'lastName'), email: mapValueOfType(json, r'email'), password: mapValueOfType(json, r'password'), phone: mapValueOfType(json, r'phone'), - userStatus: mapValueOfType(json, r'userStatus'), + userstatus: mapValueOfType(json, r'userStatus'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index 5a8c345c8de3..85818103b4d9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -42,10 +42,10 @@ import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); -final modelClient = ModelClient(); // ModelClient | client model +final modelclient = ModelClient(); // ModelClient | client model try { - final result = api_instance.call123testSpecialTags(modelClient); + final result = api_instance.call123testSpecialTags(modelclient); print(result); } catch (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md index 4c6f3ab2fe11..151142162f62 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singlereftype** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md index 415b56e9bc2e..570de2e45be3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md index 241c82e575d4..c2ae77848227 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelClient) +> ModelClient call123testSpecialTags(modelclient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); -final modelClient = ModelClient(); // ModelClient | client model +final modelclient = ModelClient(); // ModelClient | client model try { - final result = api_instance.call123testSpecialTags(modelClient); + final result = api_instance.call123testSpecialTags(modelclient); print(result); } catch (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md index 0a0dc2a7b752..84f21164e7b4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayArrayNumber** | [**List>**](List.md) | | [optional] [default to const []] +**arrayarraynumber** | [**List>**](List.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md index 01b6f58870ff..fa8e9caffce8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayNumber** | **List** | | [optional] [default to const []] +**arraynumber** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md index 4a07b4eb820d..e673e7baef4b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallCamel** | **String** | | [optional] -**capitalCamel** | **String** | | [optional] +**smallcamel** | **String** | | [optional] +**capitalcamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**sCAETHFlowPoints** | **String** | | [optional] -**ATT_NAME** | **String** | Name of the pet | [optional] +**scaEthFlowPoints** | **String** | | [optional] +**attName** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md index 6552eea4b435..9c557ac9082a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md index 770494fcf4cc..54b310b0f58d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] -**otherProperty** | **String** | | [optional] +**nullableproperty** | **String** | | [optional] +**otherproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md index d36439b767bb..b2ba3dfcef59 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**className** | **String** | | +**classname** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md index 7c24fe2347b4..f1b0758b868e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md index e5c71555c9a8..cf92b84aa2cf 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outerComposite) +> OuterComposite fakeOuterCompositeSerialize(outercomposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final outerComposite = OuterComposite(); // OuterComposite | Input composite as post body +final outercomposite = OuterComposite(); // OuterComposite | Input composite as post body try { - final result = api_instance.fakeOuterCompositeSerialize(outerComposite); + final result = api_instance.fakeOuterCompositeSerialize(outercomposite); print(result); } catch (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final outerObjectWithEnumProperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body +final outerobjectwithenumproperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); + final result = api_instance.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); print(result); } catch (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileSchemaTestClass) +> testBodyWithFileSchema(fileschematestclass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final fileSchemaTestClass = FileSchemaTestClass(); // FileSchemaTestClass | +final fileschematestclass = FileSchemaTestClass(); // FileSchemaTestClass | try { - api_instance.testBodyWithFileSchema(fileSchemaTestClass); + api_instance.testBodyWithFileSchema(fileschematestclass); } catch (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelClient) +> ModelClient testClientModel(modelclient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final modelClient = ModelClient(); // ModelClient | client model +final modelclient = ModelClient(); // ModelClient | client model try { - final result = api_instance.testClientModel(modelClient); + final result = api_instance.testClientModel(modelclient); print(result); } catch (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final float = 3.4; // double | None final string = string_example; // String | None final binary = BINARY_DATA_HERE; // MultipartFile | None final date = 2013-10-20; // DateTime | None -final dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None +final datetime = 2013-10-20T19:20:30+01:00; // DateTime | None final password = password_example; // String | None final callback = callback_example; // String | None try { - api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); + api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); } catch (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **MultipartFile**| None | [optional] **date** | **DateTime**| None | [optional] - **dateTime** | **DateTime**| None | [optional] + **datetime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -809,7 +809,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) +> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) test inline free-form additionalProperties @@ -820,10 +820,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final testInlineFreeformAdditionalPropertiesRequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body +final testinlinefreeformadditionalpropertiesrequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api_instance.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); + api_instance.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); } catch (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -833,7 +833,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -895,7 +895,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childWithNullable) +> testNullable(childwithnullable) test nullable parent property @@ -906,10 +906,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final childWithNullable = ChildWithNullable(); // ChildWithNullable | request body +final childwithnullable = ChildWithNullable(); // ChildWithNullable | request body try { - api_instance.testNullable(childWithNullable); + api_instance.testNullable(childwithnullable); } catch (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -919,7 +919,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -937,7 +937,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) @@ -953,11 +953,11 @@ final ioutil = []; // List | final http = []; // List | final url = []; // List | final context = []; // List | -final allowEmpty = allowEmpty_example; // String | +final allowempty = allowempty_example; // String | final language = ; // Map | try { - api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); + api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); } catch (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -972,7 +972,7 @@ Name | Type | Description | Notes **http** | [**List**](String.md)| | [default to const []] **url** | [**List**](String.md)| | [default to const []] **context** | [**List**](String.md)| | [default to const []] - **allowEmpty** | **String**| | + **allowempty** | **String**| | **language** | [**Map**](String.md)| | [optional] [default to const {}] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md index 21ccf6ec012f..f3c0d00337e9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someId** | **num** | | [optional] -**someMap** | **Map** | | [optional] [default to const {}] +**someid** | **num** | | [optional] +**somemap** | **Map** | | [optional] [default to const {}] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index 5518c67403ff..be7a69c1b967 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelClient) +> ModelClient testClassname(modelclient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api_instance = FakeClassnameTags123Api(); -final modelClient = ModelClient(); // ModelClient | client model +final modelclient = ModelClient(); // ModelClient | client model try { - final result = api_instance.testClassname(modelClient); + final result = api_instance.testClassname(modelclient); print(result); } catch (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | + **modelclient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md index 83b60545eb61..a25a61c53343 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | -**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md index 4d6aeb75d965..c912fb2e08f4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullableMessage** | **String** | | [optional] +**nullablemessage** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md index 1f7f66b684fd..3df16ab1a90c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**dateTime** | [**DateTime**](DateTime.md) | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**Map**](Animal.md) | | [optional] [default to const {}] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md index 4be260e93f6e..d54b1bbbea04 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceURI** | **String** | Test capitalization | [optional] +**sourceuri** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md index d8096a3db37a..f5fac6f8a17c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justNumber** | **num** | | [optional] +**justnumber** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md index 566816d8d278..a78891d33014 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md index bde5ffe51a2c..08914a83f300 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petId** | **int** | | [optional] +**petid** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipDate** | [**DateTime**](DateTime.md) | | [optional] +**shipdate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md index 17aa5ca02941..435464987052 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableProperty** | **String** | | [optional] +**nullableproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md index b6fdea5299ba..ceb71740166f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photoUrls** | **Set** | | [default to const {}] +**photourls** | **Set** | | [default to const {}] **tags** | [**List**](Tag.md) | | [optional] [default to const []] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md index 3883a9e96a00..978146e44886 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petId, apiKey) +> deletePet(petid, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | Pet id to delete +final petid = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | try { - api_instance.deletePet(petId, apiKey); + api_instance.deletePet(petid, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| Pet id to delete | + **petid** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petId) +> Pet getPetById(petid) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet to return +final petid = 789; // int | ID of pet to return try { - final result = api_instance.getPetById(petId); + final result = api_instance.getPetById(petid); print(result); } catch (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to return | + **petid** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petId, name, status) +> updatePetWithForm(petid, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet that needs to be updated +final petid = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet try { - api_instance.updatePetWithForm(petId, name, status); + api_instance.updatePetWithForm(petid, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet that needs to be updated | + **petid** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petId, additionalMetadata, file) +> ApiResponse uploadFile(petid, additionalmetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet to update -final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final petid = 789; // int | ID of pet to update +final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final result = api_instance.uploadFile(petId, additionalMetadata, file); + final result = api_instance.uploadFile(petid, additionalmetadata, file); print(result); } catch (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) +> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petId = 789; // int | ID of pet to update -final requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload -final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server +final petid = 789; // int | ID of pet to update +final requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload +final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server try { - final result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + final result = api_instance.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); print(result); } catch (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petId** | **int**| ID of pet to update | - **requiredFile** | **MultipartFile**| file to upload | - **additionalMetadata** | **String**| Additional data to pass to server | [optional] + **petid** | **int**| ID of pet to update | + **requiredfile** | **MultipartFile**| file to upload | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md index 5fcfa98e0b36..04697c8e6225 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [optional] +**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md index e2b2f1fd4468..894a3e60ee31 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someProperty** | **String** | | [optional] +**someproperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md index fa87e64d8595..37aa8c50230e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstName** | **String** | | [optional] -**lastName** | **String** | | [optional] +**firstname** | **String** | | [optional] +**lastname** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userStatus** | **int** | User Status | [optional] +**userstatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart index 81ab2d859dda..3d7ceda6d0cd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -24,14 +24,14 @@ class AnotherFakeApi { /// /// Parameters: /// - /// * [ModelClient] modelClient (required): + /// * [ModelClient] modelclient (required): /// client model - Future call123testSpecialTagsWithHttpInfo(ModelClient modelClient,) async { + Future call123testSpecialTagsWithHttpInfo(ModelClient modelclient,) async { // ignore: prefer_const_declarations final path = r'/another-fake/dummy'; // ignore: prefer_final_locals - Object? postBody = modelClient; + Object? postBody = modelclient; final queryParams = []; final headerParams = {}; @@ -57,10 +57,10 @@ class AnotherFakeApi { /// /// Parameters: /// - /// * [ModelClient] modelClient (required): + /// * [ModelClient] modelclient (required): /// client model - Future call123testSpecialTags(ModelClient modelClient,) async { - final response = await call123testSpecialTagsWithHttpInfo(modelClient,); + Future call123testSpecialTags(ModelClient modelclient,) async { + final response = await call123testSpecialTagsWithHttpInfo(modelclient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index 1fa377f864dd..3674a2e5d66f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -230,14 +230,14 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterComposite] outerComposite: + /// * [OuterComposite] outercomposite: /// Input composite as post body - Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outerComposite, }) async { + Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outercomposite, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/composite'; // ignore: prefer_final_locals - Object? postBody = outerComposite; + Object? postBody = outercomposite; final queryParams = []; final headerParams = {}; @@ -261,10 +261,10 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterComposite] outerComposite: + /// * [OuterComposite] outercomposite: /// Input composite as post body - Future fakeOuterCompositeSerialize({ OuterComposite? outerComposite, }) async { - final response = await fakeOuterCompositeSerializeWithHttpInfo( outerComposite: outerComposite, ); + Future fakeOuterCompositeSerialize({ OuterComposite? outercomposite, }) async { + final response = await fakeOuterCompositeSerializeWithHttpInfo( outercomposite: outercomposite, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -392,14 +392,14 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): + /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { + Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { // ignore: prefer_const_declarations final path = r'/fake/property/enum-int'; // ignore: prefer_final_locals - Object? postBody = outerObjectWithEnumProperty; + Object? postBody = outerobjectwithenumproperty; final queryParams = []; final headerParams = {}; @@ -423,10 +423,10 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): + /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { - final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty,); + Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { + final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerobjectwithenumproperty,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -542,13 +542,13 @@ class FakeApi { /// /// Parameters: /// - /// * [FileSchemaTestClass] fileSchemaTestClass (required): - Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass,) async { + /// * [FileSchemaTestClass] fileschematestclass (required): + Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileschematestclass,) async { // ignore: prefer_const_declarations final path = r'/fake/body-with-file-schema'; // ignore: prefer_final_locals - Object? postBody = fileSchemaTestClass; + Object? postBody = fileschematestclass; final queryParams = []; final headerParams = {}; @@ -572,9 +572,9 @@ class FakeApi { /// /// Parameters: /// - /// * [FileSchemaTestClass] fileSchemaTestClass (required): - Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass,) async { - final response = await testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass,); + /// * [FileSchemaTestClass] fileschematestclass (required): + Future testBodyWithFileSchema(FileSchemaTestClass fileschematestclass,) async { + final response = await testBodyWithFileSchemaWithHttpInfo(fileschematestclass,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -633,14 +633,14 @@ class FakeApi { /// /// Parameters: /// - /// * [ModelClient] modelClient (required): + /// * [ModelClient] modelclient (required): /// client model - Future testClientModelWithHttpInfo(ModelClient modelClient,) async { + Future testClientModelWithHttpInfo(ModelClient modelclient,) async { // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object? postBody = modelClient; + Object? postBody = modelclient; final queryParams = []; final headerParams = {}; @@ -666,10 +666,10 @@ class FakeApi { /// /// Parameters: /// - /// * [ModelClient] modelClient (required): + /// * [ModelClient] modelclient (required): /// client model - Future testClientModel(ModelClient modelClient,) async { - final response = await testClientModelWithHttpInfo(modelClient,); + Future testClientModel(ModelClient modelclient,) async { + final response = await testClientModelWithHttpInfo(modelclient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -724,7 +724,7 @@ class FakeApi { /// * [DateTime] date: /// None /// - /// * [DateTime] dateTime: + /// * [DateTime] datetime: /// None /// /// * [String] password: @@ -732,7 +732,7 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { + Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { // ignore: prefer_const_declarations final path = r'/fake'; @@ -775,8 +775,8 @@ class FakeApi { if (date != null) { formParams[r'date'] = parameterToString(date); } - if (dateTime != null) { - formParams[r'dateTime'] = parameterToString(dateTime); + if (datetime != null) { + formParams[r'dateTime'] = parameterToString(datetime); } if (password != null) { formParams[r'password'] = parameterToString(password); @@ -835,7 +835,7 @@ class FakeApi { /// * [DateTime] date: /// None /// - /// * [DateTime] dateTime: + /// * [DateTime] datetime: /// None /// /// * [String] password: @@ -843,8 +843,8 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { - final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback, ); + Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { + final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, datetime: datetime, password: password, callback: callback, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1127,14 +1127,14 @@ class FakeApi { /// /// Parameters: /// - /// * [TestInlineFreeformAdditionalPropertiesRequest] testInlineFreeformAdditionalPropertiesRequest (required): + /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): /// request body - Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,) async { + Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { // ignore: prefer_const_declarations final path = r'/fake/inline-freeform-additionalProperties'; // ignore: prefer_final_locals - Object? postBody = testInlineFreeformAdditionalPropertiesRequest; + Object? postBody = testinlinefreeformadditionalpropertiesrequest; final queryParams = []; final headerParams = {}; @@ -1160,10 +1160,10 @@ class FakeApi { /// /// Parameters: /// - /// * [TestInlineFreeformAdditionalPropertiesRequest] testInlineFreeformAdditionalPropertiesRequest (required): + /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): /// request body - Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,) async { - final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest,); + Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { + final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testinlinefreeformadditionalpropertiesrequest,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1239,14 +1239,14 @@ class FakeApi { /// /// Parameters: /// - /// * [ChildWithNullable] childWithNullable (required): + /// * [ChildWithNullable] childwithnullable (required): /// request body - Future testNullableWithHttpInfo(ChildWithNullable childWithNullable,) async { + Future testNullableWithHttpInfo(ChildWithNullable childwithnullable,) async { // ignore: prefer_const_declarations final path = r'/fake/nullable'; // ignore: prefer_final_locals - Object? postBody = childWithNullable; + Object? postBody = childwithnullable; final queryParams = []; final headerParams = {}; @@ -1272,10 +1272,10 @@ class FakeApi { /// /// Parameters: /// - /// * [ChildWithNullable] childWithNullable (required): + /// * [ChildWithNullable] childwithnullable (required): /// request body - Future testNullable(ChildWithNullable childWithNullable,) async { - final response = await testNullableWithHttpInfo(childWithNullable,); + Future testNullable(ChildWithNullable childwithnullable,) async { + final response = await testNullableWithHttpInfo(childwithnullable,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1297,10 +1297,10 @@ class FakeApi { /// /// * [List] context (required): /// - /// * [String] allowEmpty (required): + /// * [String] allowempty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { + Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { // ignore: prefer_const_declarations final path = r'/fake/test-query-parameters'; @@ -1319,7 +1319,7 @@ class FakeApi { if (language != null) { queryParams.addAll(_queryParams('', 'language', language)); } - queryParams.addAll(_queryParams('', 'allowEmpty', allowEmpty)); + queryParams.addAll(_queryParams('', 'allowEmpty', allowempty)); const contentTypes = []; @@ -1349,11 +1349,11 @@ class FakeApi { /// /// * [List] context (required): /// - /// * [String] allowEmpty (required): + /// * [String] allowempty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { - final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language: language, ); + Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { + final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowempty, language: language, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 7689f51b6884..8f45d844fd69 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -24,14 +24,14 @@ class FakeClassnameTags123Api { /// /// Parameters: /// - /// * [ModelClient] modelClient (required): + /// * [ModelClient] modelclient (required): /// client model - Future testClassnameWithHttpInfo(ModelClient modelClient,) async { + Future testClassnameWithHttpInfo(ModelClient modelclient,) async { // ignore: prefer_const_declarations final path = r'/fake_classname_test'; // ignore: prefer_final_locals - Object? postBody = modelClient; + Object? postBody = modelclient; final queryParams = []; final headerParams = {}; @@ -57,10 +57,10 @@ class FakeClassnameTags123Api { /// /// Parameters: /// - /// * [ModelClient] modelClient (required): + /// * [ModelClient] modelclient (required): /// client model - Future testClassname(ModelClient modelClient,) async { - final response = await testClassnameWithHttpInfo(modelClient,); + Future testClassname(ModelClient modelclient,) async { + final response = await testClassnameWithHttpInfo(modelclient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart index 61fd1666af49..ea3c0054bd65 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart @@ -74,14 +74,14 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { + Future deletePetWithHttpInfo(int petid, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -114,12 +114,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petId, { String? apiKey, }) async { - final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); + Future deletePet(int petid, { String? apiKey, }) async { + final response = await deletePetWithHttpInfo(petid, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -259,12 +259,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to return - Future getPetByIdWithHttpInfo(int petId,) async { + Future getPetByIdWithHttpInfo(int petid,) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -293,10 +293,10 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to return - Future getPetById(int petId,) async { - final response = await getPetByIdWithHttpInfo(petId,); + Future getPetById(int petid,) async { + final response = await getPetByIdWithHttpInfo(petid,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -368,7 +368,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -376,10 +376,10 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { + Future updatePetWithFormWithHttpInfo(int petid, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -414,7 +414,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -422,8 +422,8 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petId, { String? name, String? status, }) async { - final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); + Future updatePetWithForm(int petid, { String? name, String? status, }) async { + final response = await updatePetWithFormWithHttpInfo(petid, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -437,18 +437,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to update /// - /// * [String] additionalMetadata: + /// * [String] additionalmetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { + Future uploadFileWithHttpInfo(int petid, { String? additionalmetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -461,9 +461,9 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalMetadata != null) { + if (additionalmetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); } if (file != null) { hasFields = true; @@ -491,16 +491,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to update /// - /// * [String] additionalMetadata: + /// * [String] additionalmetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { - final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); + Future uploadFile(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + final response = await uploadFileWithHttpInfo(petid, additionalmetadata: additionalmetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -522,18 +522,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to update /// - /// * [MultipartFile] requiredFile (required): + /// * [MultipartFile] requiredfile (required): /// file to upload /// - /// * [String] additionalMetadata: + /// * [String] additionalmetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFileWithHttpInfo(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { + Future uploadFileWithRequiredFileWithHttpInfo(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { // ignore: prefer_const_declarations final path = r'/fake/{petId}/uploadImageWithRequiredFile' - .replaceAll('{petId}', petId.toString()); + .replaceAll('{petId}', petid.toString()); // ignore: prefer_final_locals Object? postBody; @@ -546,14 +546,14 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalMetadata != null) { + if (additionalmetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); } - if (requiredFile != null) { + if (requiredfile != null) { hasFields = true; - mp.fields[r'requiredFile'] = requiredFile.field; - mp.files.add(requiredFile); + mp.fields[r'requiredFile'] = requiredfile.field; + mp.files.add(requiredfile); } if (hasFields) { postBody = mp; @@ -576,16 +576,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petId (required): + /// * [int] petid (required): /// ID of pet to update /// - /// * [MultipartFile] requiredFile (required): + /// * [MultipartFile] requiredfile (required): /// file to upload /// - /// * [String] additionalMetadata: + /// * [String] additionalmetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { - final response = await uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata: additionalMetadata, ); + Future uploadFileWithRequiredFile(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { + final response = await uploadFileWithRequiredFileWithHttpInfo(petid, requiredfile, additionalmetadata: additionalmetadata, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart index 0411ccc2b7a1..24890cf3f2ed 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart @@ -14,7 +14,7 @@ class AllOfWithSingleRef { /// Returns a new [AllOfWithSingleRef] instance. AllOfWithSingleRef({ this.username, - this.singleRefType, + this.singlereftype, }); /// @@ -31,21 +31,21 @@ class AllOfWithSingleRef { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - SingleRefType? singleRefType; + SingleRefType? singlereftype; @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && other.username == username && - other.singleRefType == singleRefType; + other.singlereftype == singlereftype; @override int get hashCode => // ignore: unnecessary_parenthesis (username == null ? 0 : username!.hashCode) + - (singleRefType == null ? 0 : singleRefType!.hashCode); + (singlereftype == null ? 0 : singlereftype!.hashCode); @override - String toString() => 'AllOfWithSingleRef[username=$username, singleRefType=$singleRefType]'; + String toString() => 'AllOfWithSingleRef[username=$username, singlereftype=$singlereftype]'; Map toJson() { final json = {}; @@ -54,8 +54,8 @@ class AllOfWithSingleRef { } else { json[r'username'] = null; } - if (this.singleRefType != null) { - json[r'SingleRefType'] = this.singleRefType; + if (this.singlereftype != null) { + json[r'SingleRefType'] = this.singlereftype; } else { json[r'SingleRefType'] = null; } @@ -82,7 +82,7 @@ class AllOfWithSingleRef { return AllOfWithSingleRef( username: mapValueOfType(json, r'username'), - singleRefType: SingleRefType.fromJson(json[r'SingleRefType']), + singlereftype: SingleRefType.fromJson(json[r'SingleRefType']), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart index a562a11becce..6259e6082643 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart @@ -13,31 +13,31 @@ part of openapi.api; class Animal { /// Returns a new [Animal] instance. Animal({ - required this.className, + required this.classname, this.color = 'red', }); - String className; + String classname; String color; @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.className == className && + other.classname == classname && other.color == color; @override int get hashCode => // ignore: unnecessary_parenthesis - (className.hashCode) + + (classname.hashCode) + (color.hashCode); @override - String toString() => 'Animal[className=$className, color=$color]'; + String toString() => 'Animal[classname=$classname, color=$color]'; Map toJson() { final json = {}; - json[r'className'] = this.className; + json[r'className'] = this.classname; json[r'color'] = this.color; return json; } @@ -61,7 +61,7 @@ class Animal { }()); return Animal( - className: mapValueOfType(json, r'className')!, + classname: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart index 04a9e99e986f..0dc0ec4c734c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart @@ -13,26 +13,26 @@ part of openapi.api; class ArrayOfArrayOfNumberOnly { /// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayArrayNumber = const [], + this.arrayarraynumber = const [], }); - List> arrayArrayNumber; + List> arrayarraynumber; @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - _deepEquality.equals(other.arrayArrayNumber, arrayArrayNumber); + _deepEquality.equals(other.arrayarraynumber, arrayarraynumber); @override int get hashCode => // ignore: unnecessary_parenthesis - (arrayArrayNumber.hashCode); + (arrayarraynumber.hashCode); @override - String toString() => 'ArrayOfArrayOfNumberOnly[arrayArrayNumber=$arrayArrayNumber]'; + String toString() => 'ArrayOfArrayOfNumberOnly[arrayarraynumber=$arrayarraynumber]'; Map toJson() { final json = {}; - json[r'ArrayArrayNumber'] = this.arrayArrayNumber; + json[r'ArrayArrayNumber'] = this.arrayarraynumber; return json; } @@ -55,7 +55,7 @@ class ArrayOfArrayOfNumberOnly { }()); return ArrayOfArrayOfNumberOnly( - arrayArrayNumber: json[r'ArrayArrayNumber'] is List + arrayarraynumber: json[r'ArrayArrayNumber'] is List ? (json[r'ArrayArrayNumber'] as List).map((e) => e == null ? const [] : (e as List).cast() ).toList() diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart index ccf33088a3e1..6de38929b80b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart @@ -13,26 +13,26 @@ part of openapi.api; class ArrayOfNumberOnly { /// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arrayNumber = const [], + this.arraynumber = const [], }); - List arrayNumber; + List arraynumber; @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - _deepEquality.equals(other.arrayNumber, arrayNumber); + _deepEquality.equals(other.arraynumber, arraynumber); @override int get hashCode => // ignore: unnecessary_parenthesis - (arrayNumber.hashCode); + (arraynumber.hashCode); @override - String toString() => 'ArrayOfNumberOnly[arrayNumber=$arrayNumber]'; + String toString() => 'ArrayOfNumberOnly[arraynumber=$arraynumber]'; Map toJson() { final json = {}; - json[r'ArrayNumber'] = this.arrayNumber; + json[r'ArrayNumber'] = this.arraynumber; return json; } @@ -55,7 +55,7 @@ class ArrayOfNumberOnly { }()); return ArrayOfNumberOnly( - arrayNumber: json[r'ArrayNumber'] is Iterable + arraynumber: json[r'ArrayNumber'] is Iterable ? (json[r'ArrayNumber'] as Iterable).cast().toList(growable: false) : const [], ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart index 0f525b45dd87..4d613ce167d3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart @@ -13,12 +13,12 @@ part of openapi.api; class Capitalization { /// Returns a new [Capitalization] instance. Capitalization({ - this.smallCamel, - this.capitalCamel, + this.smallcamel, + this.capitalcamel, this.smallSnake, this.capitalSnake, - this.sCAETHFlowPoints, - this.ATT_NAME, + this.scaEthFlowPoints, + this.attName, }); /// @@ -27,7 +27,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? smallCamel; + String? smallcamel; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -35,7 +35,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? capitalCamel; + String? capitalcamel; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -59,7 +59,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? sCAETHFlowPoints; + String? scaEthFlowPoints; /// Name of the pet /// @@ -68,39 +68,39 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? ATT_NAME; + String? attName; @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallCamel == smallCamel && - other.capitalCamel == capitalCamel && + other.smallcamel == smallcamel && + other.capitalcamel == capitalcamel && other.smallSnake == smallSnake && other.capitalSnake == capitalSnake && - other.sCAETHFlowPoints == sCAETHFlowPoints && - other.ATT_NAME == ATT_NAME; + other.scaEthFlowPoints == scaEthFlowPoints && + other.attName == attName; @override int get hashCode => // ignore: unnecessary_parenthesis - (smallCamel == null ? 0 : smallCamel!.hashCode) + - (capitalCamel == null ? 0 : capitalCamel!.hashCode) + + (smallcamel == null ? 0 : smallcamel!.hashCode) + + (capitalcamel == null ? 0 : capitalcamel!.hashCode) + (smallSnake == null ? 0 : smallSnake!.hashCode) + (capitalSnake == null ? 0 : capitalSnake!.hashCode) + - (sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints!.hashCode) + - (ATT_NAME == null ? 0 : ATT_NAME!.hashCode); + (scaEthFlowPoints == null ? 0 : scaEthFlowPoints!.hashCode) + + (attName == null ? 0 : attName!.hashCode); @override - String toString() => 'Capitalization[smallCamel=$smallCamel, capitalCamel=$capitalCamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, sCAETHFlowPoints=$sCAETHFlowPoints, ATT_NAME=$ATT_NAME]'; + String toString() => 'Capitalization[smallcamel=$smallcamel, capitalcamel=$capitalcamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, scaEthFlowPoints=$scaEthFlowPoints, attName=$attName]'; Map toJson() { final json = {}; - if (this.smallCamel != null) { - json[r'smallCamel'] = this.smallCamel; + if (this.smallcamel != null) { + json[r'smallCamel'] = this.smallcamel; } else { json[r'smallCamel'] = null; } - if (this.capitalCamel != null) { - json[r'CapitalCamel'] = this.capitalCamel; + if (this.capitalcamel != null) { + json[r'CapitalCamel'] = this.capitalcamel; } else { json[r'CapitalCamel'] = null; } @@ -114,13 +114,13 @@ class Capitalization { } else { json[r'Capital_Snake'] = null; } - if (this.sCAETHFlowPoints != null) { - json[r'SCA_ETH_Flow_Points'] = this.sCAETHFlowPoints; + if (this.scaEthFlowPoints != null) { + json[r'SCA_ETH_Flow_Points'] = this.scaEthFlowPoints; } else { json[r'SCA_ETH_Flow_Points'] = null; } - if (this.ATT_NAME != null) { - json[r'ATT_NAME'] = this.ATT_NAME; + if (this.attName != null) { + json[r'ATT_NAME'] = this.attName; } else { json[r'ATT_NAME'] = null; } @@ -146,12 +146,12 @@ class Capitalization { }()); return Capitalization( - smallCamel: mapValueOfType(json, r'smallCamel'), - capitalCamel: mapValueOfType(json, r'CapitalCamel'), + smallcamel: mapValueOfType(json, r'smallCamel'), + capitalcamel: mapValueOfType(json, r'CapitalCamel'), smallSnake: mapValueOfType(json, r'small_Snake'), capitalSnake: mapValueOfType(json, r'Capital_Snake'), - sCAETHFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), - ATT_NAME: mapValueOfType(json, r'ATT_NAME'), + scaEthFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), + attName: mapValueOfType(json, r'ATT_NAME'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart index 398fd8525280..ed6fb49e1a98 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart @@ -13,12 +13,12 @@ part of openapi.api; class Cat { /// Returns a new [Cat] instance. Cat({ - required this.className, + required this.classname, this.color = 'red', this.declawed, }); - String className; + String classname; String color; @@ -32,23 +32,23 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.className == className && + other.classname == classname && other.color == color && other.declawed == declawed; @override int get hashCode => // ignore: unnecessary_parenthesis - (className.hashCode) + + (classname.hashCode) + (color.hashCode) + (declawed == null ? 0 : declawed!.hashCode); @override - String toString() => 'Cat[className=$className, color=$color, declawed=$declawed]'; + String toString() => 'Cat[classname=$classname, color=$color, declawed=$declawed]'; Map toJson() { final json = {}; - json[r'className'] = this.className; + json[r'className'] = this.classname; json[r'color'] = this.color; if (this.declawed != null) { json[r'declawed'] = this.declawed; @@ -77,7 +77,7 @@ class Cat { }()); return Cat( - className: mapValueOfType(json, r'className')!, + classname: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', declawed: mapValueOfType(json, r'declawed'), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart index 2092b2c76845..8d1041dac9d5 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart @@ -14,13 +14,13 @@ class ChildWithNullable { /// Returns a new [ChildWithNullable] instance. ChildWithNullable({ this.type, - this.nullableProperty, - this.otherProperty, + this.nullableproperty, + this.otherproperty, }); ChildWithNullableTypeEnum? type; - String? nullableProperty; + String? nullableproperty; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -28,23 +28,23 @@ class ChildWithNullable { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? otherProperty; + String? otherproperty; @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && other.type == type && - other.nullableProperty == nullableProperty && - other.otherProperty == otherProperty; + other.nullableproperty == nullableproperty && + other.otherproperty == otherproperty; @override int get hashCode => // ignore: unnecessary_parenthesis (type == null ? 0 : type!.hashCode) + - (nullableProperty == null ? 0 : nullableProperty!.hashCode) + - (otherProperty == null ? 0 : otherProperty!.hashCode); + (nullableproperty == null ? 0 : nullableproperty!.hashCode) + + (otherproperty == null ? 0 : otherproperty!.hashCode); @override - String toString() => 'ChildWithNullable[type=$type, nullableProperty=$nullableProperty, otherProperty=$otherProperty]'; + String toString() => 'ChildWithNullable[type=$type, nullableproperty=$nullableproperty, otherproperty=$otherproperty]'; Map toJson() { final json = {}; @@ -53,13 +53,13 @@ class ChildWithNullable { } else { json[r'type'] = null; } - if (this.nullableProperty != null) { - json[r'nullableProperty'] = this.nullableProperty; + if (this.nullableproperty != null) { + json[r'nullableProperty'] = this.nullableproperty; } else { json[r'nullableProperty'] = null; } - if (this.otherProperty != null) { - json[r'otherProperty'] = this.otherProperty; + if (this.otherproperty != null) { + json[r'otherProperty'] = this.otherproperty; } else { json[r'otherProperty'] = null; } @@ -86,8 +86,8 @@ class ChildWithNullable { return ChildWithNullable( type: ChildWithNullableTypeEnum.fromJson(json[r'type']), - nullableProperty: mapValueOfType(json, r'nullableProperty'), - otherProperty: mapValueOfType(json, r'otherProperty'), + nullableproperty: mapValueOfType(json, r'nullableProperty'), + otherproperty: mapValueOfType(json, r'otherProperty'), ); } return null; @@ -151,11 +151,11 @@ class ChildWithNullableTypeEnum { String toJson() => value; - static const childWithNullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); + static const childwithnullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); /// List of all possible values in this [enum][ChildWithNullableTypeEnum]. static const values = [ - childWithNullable, + childwithnullable, ]; static ChildWithNullableTypeEnum? fromJson(dynamic value) => ChildWithNullableTypeEnumTypeTransformer().decode(value); @@ -194,7 +194,7 @@ class ChildWithNullableTypeEnumTypeTransformer { ChildWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'ChildWithNullable': return ChildWithNullableTypeEnum.childWithNullable; + case r'ChildWithNullable': return ChildWithNullableTypeEnum.childwithnullable; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart index d7677510b91c..227bd1b55772 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart @@ -13,12 +13,12 @@ part of openapi.api; class Dog { /// Returns a new [Dog] instance. Dog({ - required this.className, + required this.classname, this.color = 'red', this.breed, }); - String className; + String classname; String color; @@ -32,23 +32,23 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.className == className && + other.classname == classname && other.color == color && other.breed == breed; @override int get hashCode => // ignore: unnecessary_parenthesis - (className.hashCode) + + (classname.hashCode) + (color.hashCode) + (breed == null ? 0 : breed!.hashCode); @override - String toString() => 'Dog[className=$className, color=$color, breed=$breed]'; + String toString() => 'Dog[classname=$classname, color=$color, breed=$breed]'; Map toJson() { final json = {}; - json[r'className'] = this.className; + json[r'className'] = this.classname; json[r'color'] = this.color; if (this.breed != null) { json[r'breed'] = this.breed; @@ -77,7 +77,7 @@ class Dog { }()); return Dog( - className: mapValueOfType(json, r'className')!, + classname: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', breed: mapValueOfType(json, r'breed'), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart index 71872cf0165f..898da969de8b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart @@ -25,13 +25,13 @@ class EnumClass { static const abc = EnumClass._(r'_abc'); static const efg = EnumClass._(r'-efg'); - static const leftParenthesisXyzRightParenthesis = EnumClass._(r'(xyz)'); + static const leftParenthesisXyzrightParenthesis = EnumClass._(r'(xyz)'); /// List of all possible values in this [enum][EnumClass]. static const values = [ abc, efg, - leftParenthesisXyzRightParenthesis, + leftParenthesisXyzrightParenthesis, ]; static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value); @@ -72,7 +72,7 @@ class EnumClassTypeTransformer { switch (data) { case r'_abc': return EnumClass.abc; case r'-efg': return EnumClass.efg; - case r'(xyz)': return EnumClass.leftParenthesisXyzRightParenthesis; + case r'(xyz)': return EnumClass.leftParenthesisXyzrightParenthesis; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index 04ee7808fc0d..898fae87bffa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -17,10 +17,10 @@ class EnumTest { required this.enumStringRequired, this.enumInteger, this.enumNumber, - this.outerEnum, - this.outerEnumInteger, - this.outerEnumDefaultValue, - this.outerEnumIntegerDefaultValue, + this.outerenum, + this.outerenuminteger, + this.outerenumdefaultvalue, + this.outerenumintegerdefaultvalue, }); EnumTestEnumStringEnum? enumString; @@ -31,7 +31,7 @@ class EnumTest { EnumTestEnumNumberEnum? enumNumber; - OuterEnum? outerEnum; + OuterEnum? outerenum; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -39,7 +39,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumInteger? outerEnumInteger; + OuterEnumInteger? outerenuminteger; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -47,7 +47,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumDefaultValue? outerEnumDefaultValue; + OuterEnumDefaultValue? outerenumdefaultvalue; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -55,7 +55,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; + OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; @override bool operator ==(Object other) => identical(this, other) || other is EnumTest && @@ -63,10 +63,10 @@ class EnumTest { other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && other.enumNumber == enumNumber && - other.outerEnum == outerEnum && - other.outerEnumInteger == outerEnumInteger && - other.outerEnumDefaultValue == outerEnumDefaultValue && - other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; + other.outerenum == outerenum && + other.outerenuminteger == outerenuminteger && + other.outerenumdefaultvalue == outerenumdefaultvalue && + other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; @override int get hashCode => @@ -75,13 +75,13 @@ class EnumTest { (enumStringRequired.hashCode) + (enumInteger == null ? 0 : enumInteger!.hashCode) + (enumNumber == null ? 0 : enumNumber!.hashCode) + - (outerEnum == null ? 0 : outerEnum!.hashCode) + - (outerEnumInteger == null ? 0 : outerEnumInteger!.hashCode) + - (outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue!.hashCode) + - (outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue!.hashCode); + (outerenum == null ? 0 : outerenum!.hashCode) + + (outerenuminteger == null ? 0 : outerenuminteger!.hashCode) + + (outerenumdefaultvalue == null ? 0 : outerenumdefaultvalue!.hashCode) + + (outerenumintegerdefaultvalue == null ? 0 : outerenumintegerdefaultvalue!.hashCode); @override - String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerEnum=$outerEnum, outerEnumInteger=$outerEnumInteger, outerEnumDefaultValue=$outerEnumDefaultValue, outerEnumIntegerDefaultValue=$outerEnumIntegerDefaultValue]'; + String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerenum=$outerenum, outerenuminteger=$outerenuminteger, outerenumdefaultvalue=$outerenumdefaultvalue, outerenumintegerdefaultvalue=$outerenumintegerdefaultvalue]'; Map toJson() { final json = {}; @@ -101,23 +101,23 @@ class EnumTest { } else { json[r'enum_number'] = null; } - if (this.outerEnum != null) { - json[r'outerEnum'] = this.outerEnum; + if (this.outerenum != null) { + json[r'outerEnum'] = this.outerenum; } else { json[r'outerEnum'] = null; } - if (this.outerEnumInteger != null) { - json[r'outerEnumInteger'] = this.outerEnumInteger; + if (this.outerenuminteger != null) { + json[r'outerEnumInteger'] = this.outerenuminteger; } else { json[r'outerEnumInteger'] = null; } - if (this.outerEnumDefaultValue != null) { - json[r'outerEnumDefaultValue'] = this.outerEnumDefaultValue; + if (this.outerenumdefaultvalue != null) { + json[r'outerEnumDefaultValue'] = this.outerenumdefaultvalue; } else { json[r'outerEnumDefaultValue'] = null; } - if (this.outerEnumIntegerDefaultValue != null) { - json[r'outerEnumIntegerDefaultValue'] = this.outerEnumIntegerDefaultValue; + if (this.outerenumintegerdefaultvalue != null) { + json[r'outerEnumIntegerDefaultValue'] = this.outerenumintegerdefaultvalue; } else { json[r'outerEnumIntegerDefaultValue'] = null; } @@ -147,10 +147,10 @@ class EnumTest { enumStringRequired: EnumTestEnumStringRequiredEnum.fromJson(json[r'enum_string_required'])!, enumInteger: EnumTestEnumIntegerEnum.fromJson(json[r'enum_integer']), enumNumber: EnumTestEnumNumberEnum.fromJson(json[r'enum_number']), - outerEnum: OuterEnum.fromJson(json[r'outerEnum']), - outerEnumInteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), - outerEnumDefaultValue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), - outerEnumIntegerDefaultValue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), + outerenum: OuterEnum.fromJson(json[r'outerEnum']), + outerenuminteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), + outerenumdefaultvalue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), + outerenumintegerdefaultvalue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), ); } return null; @@ -215,13 +215,13 @@ class EnumTestEnumStringEnum { String toJson() => value; - static const UPPER = EnumTestEnumStringEnum._(r'UPPER'); + static const upper = EnumTestEnumStringEnum._(r'UPPER'); static const lower = EnumTestEnumStringEnum._(r'lower'); static const empty = EnumTestEnumStringEnum._(r''); /// List of all possible values in this [enum][EnumTestEnumStringEnum]. static const values = [ - UPPER, + upper, lower, empty, ]; @@ -262,7 +262,7 @@ class EnumTestEnumStringEnumTypeTransformer { EnumTestEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'UPPER': return EnumTestEnumStringEnum.UPPER; + case r'UPPER': return EnumTestEnumStringEnum.upper; case r'lower': return EnumTestEnumStringEnum.lower; case r'': return EnumTestEnumStringEnum.empty; default: @@ -292,13 +292,13 @@ class EnumTestEnumStringRequiredEnum { String toJson() => value; - static const UPPER = EnumTestEnumStringRequiredEnum._(r'UPPER'); + static const upper = EnumTestEnumStringRequiredEnum._(r'UPPER'); static const lower = EnumTestEnumStringRequiredEnum._(r'lower'); static const empty = EnumTestEnumStringRequiredEnum._(r''); /// List of all possible values in this [enum][EnumTestEnumStringRequiredEnum]. static const values = [ - UPPER, + upper, lower, empty, ]; @@ -339,7 +339,7 @@ class EnumTestEnumStringRequiredEnumTypeTransformer { EnumTestEnumStringRequiredEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'UPPER': return EnumTestEnumStringRequiredEnum.UPPER; + case r'UPPER': return EnumTestEnumStringRequiredEnum.upper; case r'lower': return EnumTestEnumStringRequiredEnum.lower; case r'': return EnumTestEnumStringRequiredEnum.empty; default: @@ -443,13 +443,13 @@ class EnumTestEnumNumberEnum { double toJson() => value; - static const number1Period1 = EnumTestEnumNumberEnum._('1.1'); - static const numberNegative1Period2 = EnumTestEnumNumberEnum._('-1.2'); + static const number1period1 = EnumTestEnumNumberEnum._('1.1'); + static const numberNegative1period2 = EnumTestEnumNumberEnum._('-1.2'); /// List of all possible values in this [enum][EnumTestEnumNumberEnum]. static const values = [ - number1Period1, - numberNegative1Period2, + number1period1, + numberNegative1period2, ]; static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value); @@ -488,8 +488,8 @@ class EnumTestEnumNumberEnumTypeTransformer { EnumTestEnumNumberEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case '1.1': return EnumTestEnumNumberEnum.number1Period1; - case '-1.2': return EnumTestEnumNumberEnum.numberNegative1Period2; + case '1.1': return EnumTestEnumNumberEnum.number1period1; + case '-1.2': return EnumTestEnumNumberEnum.numberNegative1period2; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart index 55de1b12e981..249f9c2401d7 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart @@ -13,8 +13,8 @@ part of openapi.api; class FakeBigDecimalMap200Response { /// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someId, - this.someMap = const {}, + this.someid, + this.somemap = const {}, }); /// @@ -23,32 +23,32 @@ class FakeBigDecimalMap200Response { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - num? someId; + num? someid; - Map someMap; + Map somemap; @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someId == someId && - _deepEquality.equals(other.someMap, someMap); + other.someid == someid && + _deepEquality.equals(other.somemap, somemap); @override int get hashCode => // ignore: unnecessary_parenthesis - (someId == null ? 0 : someId!.hashCode) + - (someMap.hashCode); + (someid == null ? 0 : someid!.hashCode) + + (somemap.hashCode); @override - String toString() => 'FakeBigDecimalMap200Response[someId=$someId, someMap=$someMap]'; + String toString() => 'FakeBigDecimalMap200Response[someid=$someid, somemap=$somemap]'; Map toJson() { final json = {}; - if (this.someId != null) { - json[r'someId'] = this.someId; + if (this.someid != null) { + json[r'someId'] = this.someid; } else { json[r'someId'] = null; } - json[r'someMap'] = this.someMap; + json[r'someMap'] = this.somemap; return json; } @@ -71,8 +71,8 @@ class FakeBigDecimalMap200Response { }()); return FakeBigDecimalMap200Response( - someId: num.parse('${json[r'someId']}'), - someMap: mapCastOfType(json, r'someMap') ?? const {}, + someid: num.parse('${json[r'someId']}'), + somemap: mapCastOfType(json, r'someMap') ?? const {}, ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart index b0edc2e38e14..957a6b7c0415 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart @@ -24,7 +24,7 @@ class FormatTest { required this.byte, this.binary, required this.date, - this.dateTime, + this.datetime, this.uuid, required this.password, this.patternWithDigits, @@ -117,7 +117,7 @@ class FormatTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? dateTime; + DateTime? datetime; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -160,7 +160,7 @@ class FormatTest { other.byte == byte && other.binary == binary && other.date == date && - other.dateTime == dateTime && + other.datetime == datetime && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -180,14 +180,14 @@ class FormatTest { (byte.hashCode) + (binary == null ? 0 : binary!.hashCode) + (date.hashCode) + - (dateTime == null ? 0 : dateTime!.hashCode) + + (datetime == null ? 0 : datetime!.hashCode) + (uuid == null ? 0 : uuid!.hashCode) + (password.hashCode) + (patternWithDigits == null ? 0 : patternWithDigits!.hashCode) + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter!.hashCode); @override - String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; + String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, datetime=$datetime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; Map toJson() { final json = {}; @@ -234,8 +234,8 @@ class FormatTest { json[r'binary'] = null; } json[r'date'] = _dateFormatter.format(this.date.toUtc()); - if (this.dateTime != null) { - json[r'dateTime'] = this.dateTime!.toUtc().toIso8601String(); + if (this.datetime != null) { + json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); } else { json[r'dateTime'] = null; } @@ -288,7 +288,7 @@ class FormatTest { byte: mapValueOfType(json, r'byte')!, binary: null, // No support for decoding binary content from JSON date: mapDateTime(json, r'date', r'')!, - dateTime: mapDateTime(json, r'dateTime', r''), + datetime: mapDateTime(json, r'dateTime', r''), uuid: mapValueOfType(json, r'uuid'), password: mapValueOfType(json, r'password')!, patternWithDigits: mapValueOfType(json, r'pattern_with_digits'), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart index b3a3f7cb8e0f..bf69f5c13600 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart @@ -13,27 +13,27 @@ part of openapi.api; class HealthCheckResult { /// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullableMessage, + this.nullablemessage, }); - String? nullableMessage; + String? nullablemessage; @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullableMessage == nullableMessage; + other.nullablemessage == nullablemessage; @override int get hashCode => // ignore: unnecessary_parenthesis - (nullableMessage == null ? 0 : nullableMessage!.hashCode); + (nullablemessage == null ? 0 : nullablemessage!.hashCode); @override - String toString() => 'HealthCheckResult[nullableMessage=$nullableMessage]'; + String toString() => 'HealthCheckResult[nullablemessage=$nullablemessage]'; Map toJson() { final json = {}; - if (this.nullableMessage != null) { - json[r'NullableMessage'] = this.nullableMessage; + if (this.nullablemessage != null) { + json[r'NullableMessage'] = this.nullablemessage; } else { json[r'NullableMessage'] = null; } @@ -59,7 +59,7 @@ class HealthCheckResult { }()); return HealthCheckResult( - nullableMessage: mapValueOfType(json, r'NullableMessage'), + nullablemessage: mapValueOfType(json, r'NullableMessage'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart index e55aa93d9056..a0a7241e6889 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart @@ -140,12 +140,12 @@ class MapTestMapOfEnumStringEnum { String toJson() => value; - static const UPPER = MapTestMapOfEnumStringEnum._(r'UPPER'); + static const upper = MapTestMapOfEnumStringEnum._(r'UPPER'); static const lower = MapTestMapOfEnumStringEnum._(r'lower'); /// List of all possible values in this [enum][MapTestMapOfEnumStringEnum]. static const values = [ - UPPER, + upper, lower, ]; @@ -185,7 +185,7 @@ class MapTestMapOfEnumStringEnumTypeTransformer { MapTestMapOfEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'UPPER': return MapTestMapOfEnumStringEnum.UPPER; + case r'UPPER': return MapTestMapOfEnumStringEnum.upper; case r'lower': return MapTestMapOfEnumStringEnum.lower; default: if (!allowNull) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart index edc224b79248..7a5b5ad0b058 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart @@ -14,7 +14,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. MixedPropertiesAndAdditionalPropertiesClass({ this.uuid, - this.dateTime, + this.datetime, this.map = const {}, }); @@ -32,25 +32,25 @@ class MixedPropertiesAndAdditionalPropertiesClass { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? dateTime; + DateTime? datetime; Map map; @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && other.uuid == uuid && - other.dateTime == dateTime && + other.datetime == datetime && _deepEquality.equals(other.map, map); @override int get hashCode => // ignore: unnecessary_parenthesis (uuid == null ? 0 : uuid!.hashCode) + - (dateTime == null ? 0 : dateTime!.hashCode) + + (datetime == null ? 0 : datetime!.hashCode) + (map.hashCode); @override - String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, dateTime=$dateTime, map=$map]'; + String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, datetime=$datetime, map=$map]'; Map toJson() { final json = {}; @@ -59,8 +59,8 @@ class MixedPropertiesAndAdditionalPropertiesClass { } else { json[r'uuid'] = null; } - if (this.dateTime != null) { - json[r'dateTime'] = this.dateTime!.toUtc().toIso8601String(); + if (this.datetime != null) { + json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); } else { json[r'dateTime'] = null; } @@ -88,7 +88,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { return MixedPropertiesAndAdditionalPropertiesClass( uuid: mapValueOfType(json, r'uuid'), - dateTime: mapDateTime(json, r'dateTime', r''), + datetime: mapDateTime(json, r'dateTime', r''), map: Animal.mapFromJson(json[r'map']), ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart index 5183e0f98e49..c93f3d57f55d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart @@ -13,7 +13,7 @@ part of openapi.api; class ModelFile { /// Returns a new [ModelFile] instance. ModelFile({ - this.sourceURI, + this.sourceuri, }); /// Test capitalization @@ -23,24 +23,24 @@ class ModelFile { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? sourceURI; + String? sourceuri; @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceURI == sourceURI; + other.sourceuri == sourceuri; @override int get hashCode => // ignore: unnecessary_parenthesis - (sourceURI == null ? 0 : sourceURI!.hashCode); + (sourceuri == null ? 0 : sourceuri!.hashCode); @override - String toString() => 'ModelFile[sourceURI=$sourceURI]'; + String toString() => 'ModelFile[sourceuri=$sourceuri]'; Map toJson() { final json = {}; - if (this.sourceURI != null) { - json[r'sourceURI'] = this.sourceURI; + if (this.sourceuri != null) { + json[r'sourceURI'] = this.sourceuri; } else { json[r'sourceURI'] = null; } @@ -66,7 +66,7 @@ class ModelFile { }()); return ModelFile( - sourceURI: mapValueOfType(json, r'sourceURI'), + sourceuri: mapValueOfType(json, r'sourceURI'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart index a27a5682533e..c3942c6fdc82 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart @@ -13,7 +13,7 @@ part of openapi.api; class NumberOnly { /// Returns a new [NumberOnly] instance. NumberOnly({ - this.justNumber, + this.justnumber, }); /// @@ -22,24 +22,24 @@ class NumberOnly { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - num? justNumber; + num? justnumber; @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justNumber == justNumber; + other.justnumber == justnumber; @override int get hashCode => // ignore: unnecessary_parenthesis - (justNumber == null ? 0 : justNumber!.hashCode); + (justnumber == null ? 0 : justnumber!.hashCode); @override - String toString() => 'NumberOnly[justNumber=$justNumber]'; + String toString() => 'NumberOnly[justnumber=$justnumber]'; Map toJson() { final json = {}; - if (this.justNumber != null) { - json[r'JustNumber'] = this.justNumber; + if (this.justnumber != null) { + json[r'JustNumber'] = this.justnumber; } else { json[r'JustNumber'] = null; } @@ -65,7 +65,7 @@ class NumberOnly { }()); return NumberOnly( - justNumber: num.parse('${json[r'JustNumber']}'), + justnumber: num.parse('${json[r'JustNumber']}'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart index 5c7386821aa3..7e2c588d7fec 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart @@ -15,7 +15,7 @@ class ObjectWithDeprecatedFields { ObjectWithDeprecatedFields({ this.uuid, this.id, - this.deprecatedRef, + this.deprecatedref, this.bars = const [], }); @@ -41,7 +41,7 @@ class ObjectWithDeprecatedFields { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DeprecatedObject? deprecatedRef; + DeprecatedObject? deprecatedref; List bars; @@ -49,7 +49,7 @@ class ObjectWithDeprecatedFields { bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && other.uuid == uuid && other.id == id && - other.deprecatedRef == deprecatedRef && + other.deprecatedref == deprecatedref && _deepEquality.equals(other.bars, bars); @override @@ -57,11 +57,11 @@ class ObjectWithDeprecatedFields { // ignore: unnecessary_parenthesis (uuid == null ? 0 : uuid!.hashCode) + (id == null ? 0 : id!.hashCode) + - (deprecatedRef == null ? 0 : deprecatedRef!.hashCode) + + (deprecatedref == null ? 0 : deprecatedref!.hashCode) + (bars.hashCode); @override - String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedRef=$deprecatedRef, bars=$bars]'; + String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedref=$deprecatedref, bars=$bars]'; Map toJson() { final json = {}; @@ -75,8 +75,8 @@ class ObjectWithDeprecatedFields { } else { json[r'id'] = null; } - if (this.deprecatedRef != null) { - json[r'deprecatedRef'] = this.deprecatedRef; + if (this.deprecatedref != null) { + json[r'deprecatedRef'] = this.deprecatedref; } else { json[r'deprecatedRef'] = null; } @@ -105,7 +105,7 @@ class ObjectWithDeprecatedFields { return ObjectWithDeprecatedFields( uuid: mapValueOfType(json, r'uuid'), id: num.parse('${json[r'id']}'), - deprecatedRef: DeprecatedObject.fromJson(json[r'deprecatedRef']), + deprecatedref: DeprecatedObject.fromJson(json[r'deprecatedRef']), bars: json[r'bars'] is Iterable ? (json[r'bars'] as Iterable).cast().toList(growable: false) : const [], diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart index bc591de9fab9..d9c4cc9887a0 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart @@ -14,9 +14,9 @@ class Order { /// Returns a new [Order] instance. Order({ this.id, - this.petId, + this.petid, this.quantity, - this.shipDate, + this.shipdate, this.status, this.complete = false, }); @@ -35,7 +35,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? petId; + int? petid; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -51,7 +51,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? shipDate; + DateTime? shipdate; /// Order Status OrderStatusEnum? status; @@ -61,9 +61,9 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petId == petId && + other.petid == petid && other.quantity == quantity && - other.shipDate == shipDate && + other.shipdate == shipdate && other.status == status && other.complete == complete; @@ -71,14 +71,14 @@ class Order { int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + - (petId == null ? 0 : petId!.hashCode) + + (petid == null ? 0 : petid!.hashCode) + (quantity == null ? 0 : quantity!.hashCode) + - (shipDate == null ? 0 : shipDate!.hashCode) + + (shipdate == null ? 0 : shipdate!.hashCode) + (status == null ? 0 : status!.hashCode) + (complete.hashCode); @override - String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; + String toString() => 'Order[id=$id, petid=$petid, quantity=$quantity, shipdate=$shipdate, status=$status, complete=$complete]'; Map toJson() { final json = {}; @@ -87,8 +87,8 @@ class Order { } else { json[r'id'] = null; } - if (this.petId != null) { - json[r'petId'] = this.petId; + if (this.petid != null) { + json[r'petId'] = this.petid; } else { json[r'petId'] = null; } @@ -97,8 +97,8 @@ class Order { } else { json[r'quantity'] = null; } - if (this.shipDate != null) { - json[r'shipDate'] = this.shipDate!.toUtc().toIso8601String(); + if (this.shipdate != null) { + json[r'shipDate'] = this.shipdate!.toUtc().toIso8601String(); } else { json[r'shipDate'] = null; } @@ -131,9 +131,9 @@ class Order { return Order( id: mapValueOfType(json, r'id'), - petId: mapValueOfType(json, r'petId'), + petid: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), - shipDate: mapDateTime(json, r'shipDate', r''), + shipdate: mapDateTime(json, r'shipDate', r''), status: OrderStatusEnum.fromJson(json[r'status']), complete: mapValueOfType(json, r'complete') ?? false, ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart index 219967ad59fa..5fc3c16cd56d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart @@ -14,26 +14,26 @@ class ParentWithNullable { /// Returns a new [ParentWithNullable] instance. ParentWithNullable({ this.type, - this.nullableProperty, + this.nullableproperty, }); ParentWithNullableTypeEnum? type; - String? nullableProperty; + String? nullableproperty; @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && other.type == type && - other.nullableProperty == nullableProperty; + other.nullableproperty == nullableproperty; @override int get hashCode => // ignore: unnecessary_parenthesis (type == null ? 0 : type!.hashCode) + - (nullableProperty == null ? 0 : nullableProperty!.hashCode); + (nullableproperty == null ? 0 : nullableproperty!.hashCode); @override - String toString() => 'ParentWithNullable[type=$type, nullableProperty=$nullableProperty]'; + String toString() => 'ParentWithNullable[type=$type, nullableproperty=$nullableproperty]'; Map toJson() { final json = {}; @@ -42,8 +42,8 @@ class ParentWithNullable { } else { json[r'type'] = null; } - if (this.nullableProperty != null) { - json[r'nullableProperty'] = this.nullableProperty; + if (this.nullableproperty != null) { + json[r'nullableProperty'] = this.nullableproperty; } else { json[r'nullableProperty'] = null; } @@ -70,7 +70,7 @@ class ParentWithNullable { return ParentWithNullable( type: ParentWithNullableTypeEnum.fromJson(json[r'type']), - nullableProperty: mapValueOfType(json, r'nullableProperty'), + nullableproperty: mapValueOfType(json, r'nullableProperty'), ); } return null; @@ -134,11 +134,11 @@ class ParentWithNullableTypeEnum { String toJson() => value; - static const childWithNullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); + static const childwithnullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); /// List of all possible values in this [enum][ParentWithNullableTypeEnum]. static const values = [ - childWithNullable, + childwithnullable, ]; static ParentWithNullableTypeEnum? fromJson(dynamic value) => ParentWithNullableTypeEnumTypeTransformer().decode(value); @@ -177,7 +177,7 @@ class ParentWithNullableTypeEnumTypeTransformer { ParentWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'ChildWithNullable': return ParentWithNullableTypeEnum.childWithNullable; + case r'ChildWithNullable': return ParentWithNullableTypeEnum.childwithnullable; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart index 806f91e41ace..6d44804b9a63 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart @@ -16,7 +16,7 @@ class Pet { this.id, this.category, required this.name, - this.photoUrls = const {}, + this.photourls = const {}, this.tags = const [], this.status, }); @@ -39,7 +39,7 @@ class Pet { String name; - Set photoUrls; + Set photourls; List tags; @@ -51,7 +51,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - _deepEquality.equals(other.photoUrls, photoUrls) && + _deepEquality.equals(other.photourls, photourls) && _deepEquality.equals(other.tags, tags) && other.status == status; @@ -61,12 +61,12 @@ class Pet { (id == null ? 0 : id!.hashCode) + (category == null ? 0 : category!.hashCode) + (name.hashCode) + - (photoUrls.hashCode) + + (photourls.hashCode) + (tags.hashCode) + (status == null ? 0 : status!.hashCode); @override - String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; + String toString() => 'Pet[id=$id, category=$category, name=$name, photourls=$photourls, tags=$tags, status=$status]'; Map toJson() { final json = {}; @@ -81,7 +81,7 @@ class Pet { json[r'category'] = null; } json[r'name'] = this.name; - json[r'photoUrls'] = this.photoUrls.toList(growable: false); + json[r'photoUrls'] = this.photourls.toList(growable: false); json[r'tags'] = this.tags; if (this.status != null) { json[r'status'] = this.status; @@ -113,7 +113,7 @@ class Pet { id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), name: mapValueOfType(json, r'name')!, - photoUrls: json[r'photoUrls'] is Iterable + photourls: json[r'photoUrls'] is Iterable ? (json[r'photoUrls'] as Iterable).cast().toSet() : const {}, tags: Tag.listFromJson(json[r'tags']), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart index aeb25a138f07..ac2f099a4df4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart @@ -13,7 +13,7 @@ part of openapi.api; class SpecialModelName { /// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, + this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, }); /// @@ -22,24 +22,24 @@ class SpecialModelName { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; @override int get hashCode => // ignore: unnecessary_parenthesis - (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket!.hashCode); + (dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == null ? 0 : dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket!.hashCode); @override - String toString() => 'SpecialModelName[dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket=$dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket]'; + String toString() => 'SpecialModelName[dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket=$dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket]'; Map toJson() { final json = {}; - if (this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { - json[r'$special[property.name]'] = this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; + if (this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket != null) { + json[r'$special[property.name]'] = this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; } else { json[r'$special[property.name]'] = null; } @@ -65,7 +65,7 @@ class SpecialModelName { }()); return SpecialModelName( - dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: mapValueOfType(json, r'$special[property.name]'), + dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket: mapValueOfType(json, r'$special[property.name]'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart index 8e2316a619dc..fd81a25bd83d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart @@ -13,7 +13,7 @@ part of openapi.api; class TestInlineFreeformAdditionalPropertiesRequest { /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someProperty, + this.someproperty, }); /// @@ -22,24 +22,24 @@ class TestInlineFreeformAdditionalPropertiesRequest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? someProperty; + String? someproperty; @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && - other.someProperty == someProperty; + other.someproperty == someproperty; @override int get hashCode => // ignore: unnecessary_parenthesis - (someProperty == null ? 0 : someProperty!.hashCode); + (someproperty == null ? 0 : someproperty!.hashCode); @override - String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someProperty=$someProperty]'; + String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someproperty=$someproperty]'; Map toJson() { final json = {}; - if (this.someProperty != null) { - json[r'someProperty'] = this.someProperty; + if (this.someproperty != null) { + json[r'someProperty'] = this.someproperty; } else { json[r'someProperty'] = null; } @@ -65,7 +65,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { }()); return TestInlineFreeformAdditionalPropertiesRequest( - someProperty: mapValueOfType(json, r'someProperty'), + someproperty: mapValueOfType(json, r'someProperty'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart index 395f9e38e043..b6be541d49f9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart @@ -15,12 +15,12 @@ class User { User({ this.id, this.username, - this.firstName, - this.lastName, + this.firstname, + this.lastname, this.email, this.password, this.phone, - this.userStatus, + this.userstatus, }); /// @@ -45,7 +45,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? firstName; + String? firstname; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -53,7 +53,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? lastName; + String? lastname; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -86,33 +86,33 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? userStatus; + int? userstatus; @override bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstName == firstName && - other.lastName == lastName && + other.firstname == firstname && + other.lastname == lastname && other.email == email && other.password == password && other.phone == phone && - other.userStatus == userStatus; + other.userstatus == userstatus; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (username == null ? 0 : username!.hashCode) + - (firstName == null ? 0 : firstName!.hashCode) + - (lastName == null ? 0 : lastName!.hashCode) + + (firstname == null ? 0 : firstname!.hashCode) + + (lastname == null ? 0 : lastname!.hashCode) + (email == null ? 0 : email!.hashCode) + (password == null ? 0 : password!.hashCode) + (phone == null ? 0 : phone!.hashCode) + - (userStatus == null ? 0 : userStatus!.hashCode); + (userstatus == null ? 0 : userstatus!.hashCode); @override - String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; + String toString() => 'User[id=$id, username=$username, firstname=$firstname, lastname=$lastname, email=$email, password=$password, phone=$phone, userstatus=$userstatus]'; Map toJson() { final json = {}; @@ -126,13 +126,13 @@ class User { } else { json[r'username'] = null; } - if (this.firstName != null) { - json[r'firstName'] = this.firstName; + if (this.firstname != null) { + json[r'firstName'] = this.firstname; } else { json[r'firstName'] = null; } - if (this.lastName != null) { - json[r'lastName'] = this.lastName; + if (this.lastname != null) { + json[r'lastName'] = this.lastname; } else { json[r'lastName'] = null; } @@ -151,8 +151,8 @@ class User { } else { json[r'phone'] = null; } - if (this.userStatus != null) { - json[r'userStatus'] = this.userStatus; + if (this.userstatus != null) { + json[r'userStatus'] = this.userstatus; } else { json[r'userStatus'] = null; } @@ -180,12 +180,12 @@ class User { return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), - firstName: mapValueOfType(json, r'firstName'), - lastName: mapValueOfType(json, r'lastName'), + firstname: mapValueOfType(json, r'firstName'), + lastname: mapValueOfType(json, r'lastName'), email: mapValueOfType(json, r'email'), password: mapValueOfType(json, r'password'), phone: mapValueOfType(json, r'phone'), - userStatus: mapValueOfType(json, r'userStatus'), + userstatus: mapValueOfType(json, r'userStatus'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.gitignore b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.gitignore new file mode 100644 index 000000000000..0f74d293b989 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.gitignore @@ -0,0 +1,19 @@ +# See https://dart.dev/guides/libraries/private-files + +.dart_tool/ +.packages +build/ + +# Except for application packages +pubspec.lock + +doc/api/ + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore new file mode 100644 index 000000000000..7484ee590a38 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES new file mode 100644 index 000000000000..a5409bf46a4a --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES @@ -0,0 +1,187 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +analysis_options.yaml +doc/AdditionalPropertiesClass.md +doc/AllOfWithSingleRef.md +doc/Animal.md +doc/AnotherFakeApi.md +doc/ApiResponse.md +doc/ArrayOfArrayOfNumberOnly.md +doc/ArrayOfNumberOnly.md +doc/ArrayTest.md +doc/Capitalization.md +doc/Cat.md +doc/Category.md +doc/ChildWithNullable.md +doc/ClassModel.md +doc/DefaultApi.md +doc/DeprecatedObject.md +doc/Dog.md +doc/EnumArrays.md +doc/EnumClass.md +doc/EnumTest.md +doc/FakeApi.md +doc/FakeBigDecimalMap200Response.md +doc/FakeClassnameTags123Api.md +doc/FileSchemaTestClass.md +doc/Foo.md +doc/FooGetDefaultResponse.md +doc/FormatTest.md +doc/HasOnlyReadOnly.md +doc/HealthCheckResult.md +doc/MapTest.md +doc/MixedPropertiesAndAdditionalPropertiesClass.md +doc/Model200Response.md +doc/ModelClient.md +doc/ModelFile.md +doc/ModelList.md +doc/ModelReturn.md +doc/Name.md +doc/NullableClass.md +doc/NumberOnly.md +doc/ObjectWithDeprecatedFields.md +doc/Order.md +doc/OuterComposite.md +doc/OuterEnum.md +doc/OuterEnumDefaultValue.md +doc/OuterEnumInteger.md +doc/OuterEnumIntegerDefaultValue.md +doc/OuterObjectWithEnumProperty.md +doc/ParentWithNullable.md +doc/Pet.md +doc/PetApi.md +doc/ReadOnlyFirst.md +doc/SingleRefType.md +doc/SpecialModelName.md +doc/StoreApi.md +doc/Tag.md +doc/TestInlineFreeformAdditionalPropertiesRequest.md +doc/User.md +doc/UserApi.md +git_push.sh +lib/api.dart +lib/api/another_fake_api.dart +lib/api/default_api.dart +lib/api/fake_api.dart +lib/api/fake_classname_tags123_api.dart +lib/api/pet_api.dart +lib/api/store_api.dart +lib/api/user_api.dart +lib/api_client.dart +lib/api_exception.dart +lib/api_helper.dart +lib/auth/api_key_auth.dart +lib/auth/authentication.dart +lib/auth/http_basic_auth.dart +lib/auth/http_bearer_auth.dart +lib/auth/oauth.dart +lib/model/additional_properties_class.dart +lib/model/all_of_with_single_ref.dart +lib/model/animal.dart +lib/model/api_response.dart +lib/model/array_of_array_of_number_only.dart +lib/model/array_of_number_only.dart +lib/model/array_test.dart +lib/model/capitalization.dart +lib/model/cat.dart +lib/model/category.dart +lib/model/child_with_nullable.dart +lib/model/class_model.dart +lib/model/deprecated_object.dart +lib/model/dog.dart +lib/model/enum_arrays.dart +lib/model/enum_class.dart +lib/model/enum_test.dart +lib/model/fake_big_decimal_map200_response.dart +lib/model/file_schema_test_class.dart +lib/model/foo.dart +lib/model/foo_get_default_response.dart +lib/model/format_test.dart +lib/model/has_only_read_only.dart +lib/model/health_check_result.dart +lib/model/map_test.dart +lib/model/mixed_properties_and_additional_properties_class.dart +lib/model/model200_response.dart +lib/model/model_client.dart +lib/model/model_file.dart +lib/model/model_list.dart +lib/model/model_return.dart +lib/model/name.dart +lib/model/nullable_class.dart +lib/model/number_only.dart +lib/model/object_with_deprecated_fields.dart +lib/model/order.dart +lib/model/outer_composite.dart +lib/model/outer_enum.dart +lib/model/outer_enum_default_value.dart +lib/model/outer_enum_integer.dart +lib/model/outer_enum_integer_default_value.dart +lib/model/outer_object_with_enum_property.dart +lib/model/parent_with_nullable.dart +lib/model/pet.dart +lib/model/read_only_first.dart +lib/model/single_ref_type.dart +lib/model/special_model_name.dart +lib/model/tag.dart +lib/model/test_inline_freeform_additional_properties_request.dart +lib/model/user.dart +pubspec.yaml +test/additional_properties_class_test.dart +test/all_of_with_single_ref_test.dart +test/animal_test.dart +test/another_fake_api_test.dart +test/api_response_test.dart +test/array_of_array_of_number_only_test.dart +test/array_of_number_only_test.dart +test/array_test_test.dart +test/capitalization_test.dart +test/cat_test.dart +test/category_test.dart +test/child_with_nullable_test.dart +test/class_model_test.dart +test/default_api_test.dart +test/deprecated_object_test.dart +test/dog_test.dart +test/enum_arrays_test.dart +test/enum_class_test.dart +test/enum_test_test.dart +test/fake_api_test.dart +test/fake_big_decimal_map200_response_test.dart +test/fake_classname_tags123_api_test.dart +test/file_schema_test_class_test.dart +test/foo_get_default_response_test.dart +test/foo_test.dart +test/format_test_test.dart +test/has_only_read_only_test.dart +test/health_check_result_test.dart +test/map_test_test.dart +test/mixed_properties_and_additional_properties_class_test.dart +test/model200_response_test.dart +test/model_client_test.dart +test/model_file_test.dart +test/model_list_test.dart +test/model_return_test.dart +test/name_test.dart +test/nullable_class_test.dart +test/number_only_test.dart +test/object_with_deprecated_fields_test.dart +test/order_test.dart +test/outer_composite_test.dart +test/outer_enum_default_value_test.dart +test/outer_enum_integer_default_value_test.dart +test/outer_enum_integer_test.dart +test/outer_enum_test.dart +test/outer_object_with_enum_property_test.dart +test/parent_with_nullable_test.dart +test/pet_api_test.dart +test/pet_test.dart +test/read_only_first_test.dart +test/single_ref_type_test.dart +test/special_model_name_test.dart +test/store_api_test.dart +test/tag_test.dart +test/test_inline_freeform_additional_properties_request_test.dart +test/user_api_test.dart +test/user_test.dart diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION new file mode 100644 index 000000000000..4c631cf217a2 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0-SNAPSHOT diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.travis.yml b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.travis.yml new file mode 100644 index 000000000000..2774ccbba0e9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.travis.yml @@ -0,0 +1,14 @@ +# +# AUTO-GENERATED FILE, DO NOT MODIFY! +# +# https://docs.travis-ci.com/user/languages/dart/ +# +language: dart +dart: +# Install a specific stable release +- "2.12" +install: +- pub get + +script: +- pub run test diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md new file mode 100644 index 000000000000..85818103b4d9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md @@ -0,0 +1,205 @@ +# openapi +This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Generator version: 7.14.0-SNAPSHOT +- Build package: org.openapitools.codegen.languages.DartClientCodegen + +## Requirements + +Dart 2.12 or later + +## Installation & Usage + +### Github +If this Dart package is published to Github, add the following dependency to your pubspec.yaml +``` +dependencies: + openapi: + git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git +``` + +### Local +To use the package in your local drive, add the following dependency to your pubspec.yaml +``` +dependencies: + openapi: + path: /path/to/openapi +``` + +## Tests + +TODO + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/api.dart'; + + +final api_instance = AnotherFakeApi(); +final modelclient = ModelClient(); // ModelClient | client model + +try { + final result = api_instance.call123testSpecialTags(modelclient); + print(result); +} catch (e) { + print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AnotherFakeApi* | [**call123testSpecialTags**](doc//AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags +*DefaultApi* | [**fooGet**](doc//DefaultApi.md#fooget) | **GET** /foo | +*FakeApi* | [**fakeBigDecimalMap**](doc//FakeApi.md#fakebigdecimalmap) | **GET** /fake/BigDecimalMap | +*FakeApi* | [**fakeHealthGet**](doc//FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +*FakeApi* | [**fakeHttpSignatureTest**](doc//FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +*FakeApi* | [**fakeOuterBooleanSerialize**](doc//FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +*FakeApi* | [**fakeOuterCompositeSerialize**](doc//FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +*FakeApi* | [**fakeOuterNumberSerialize**](doc//FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +*FakeApi* | [**fakeOuterStringSerialize**](doc//FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +*FakeApi* | [**fakePropertyEnumIntegerSerialize**](doc//FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +*FakeApi* | [**testAdditionalPropertiesReference**](doc//FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties +*FakeApi* | [**testBodyWithBinary**](doc//FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | +*FakeApi* | [**testBodyWithFileSchema**](doc//FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +*FakeApi* | [**testBodyWithQueryParams**](doc//FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +*FakeApi* | [**testClientModel**](doc//FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +*FakeApi* | [**testEndpointParameters**](doc//FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +*FakeApi* | [**testEnumParameters**](doc//FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +*FakeApi* | [**testGroupParameters**](doc//FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +*FakeApi* | [**testInlineAdditionalProperties**](doc//FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +*FakeApi* | [**testInlineFreeformAdditionalProperties**](doc//FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties +*FakeApi* | [**testJsonFormData**](doc//FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +*FakeApi* | [**testNullable**](doc//FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property +*FakeApi* | [**testQueryParameterCollectionFormat**](doc//FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | +*FakeApi* | [**testStringMapReference**](doc//FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map +*FakeClassnameTags123Api* | [**testClassname**](doc//FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case +*PetApi* | [**addPet**](doc//PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +*PetApi* | [**deletePet**](doc//PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +*PetApi* | [**findPetsByStatus**](doc//PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +*PetApi* | [**findPetsByTags**](doc//PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +*PetApi* | [**getPetById**](doc//PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +*PetApi* | [**updatePet**](doc//PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +*PetApi* | [**updatePetWithForm**](doc//PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +*PetApi* | [**uploadFile**](doc//PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +*PetApi* | [**uploadFileWithRequiredFile**](doc//PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) +*StoreApi* | [**deleteOrder**](doc//StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +*StoreApi* | [**getInventory**](doc//StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +*StoreApi* | [**getOrderById**](doc//StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +*StoreApi* | [**placeOrder**](doc//StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet +*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user | Create user +*UserApi* | [**createUsersWithArrayInput**](doc//UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +*UserApi* | [**createUsersWithListInput**](doc//UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +*UserApi* | [**deleteUser**](doc//UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +*UserApi* | [**getUserByName**](doc//UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +*UserApi* | [**loginUser**](doc//UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +*UserApi* | [**logoutUser**](doc//UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +## Documentation For Models + + - [AdditionalPropertiesClass](doc//AdditionalPropertiesClass.md) + - [AllOfWithSingleRef](doc//AllOfWithSingleRef.md) + - [Animal](doc//Animal.md) + - [ApiResponse](doc//ApiResponse.md) + - [ArrayOfArrayOfNumberOnly](doc//ArrayOfArrayOfNumberOnly.md) + - [ArrayOfNumberOnly](doc//ArrayOfNumberOnly.md) + - [ArrayTest](doc//ArrayTest.md) + - [Capitalization](doc//Capitalization.md) + - [Cat](doc//Cat.md) + - [Category](doc//Category.md) + - [ChildWithNullable](doc//ChildWithNullable.md) + - [ClassModel](doc//ClassModel.md) + - [DeprecatedObject](doc//DeprecatedObject.md) + - [Dog](doc//Dog.md) + - [EnumArrays](doc//EnumArrays.md) + - [EnumClass](doc//EnumClass.md) + - [EnumTest](doc//EnumTest.md) + - [FakeBigDecimalMap200Response](doc//FakeBigDecimalMap200Response.md) + - [FileSchemaTestClass](doc//FileSchemaTestClass.md) + - [Foo](doc//Foo.md) + - [FooGetDefaultResponse](doc//FooGetDefaultResponse.md) + - [FormatTest](doc//FormatTest.md) + - [HasOnlyReadOnly](doc//HasOnlyReadOnly.md) + - [HealthCheckResult](doc//HealthCheckResult.md) + - [MapTest](doc//MapTest.md) + - [MixedPropertiesAndAdditionalPropertiesClass](doc//MixedPropertiesAndAdditionalPropertiesClass.md) + - [Model200Response](doc//Model200Response.md) + - [ModelClient](doc//ModelClient.md) + - [ModelFile](doc//ModelFile.md) + - [ModelList](doc//ModelList.md) + - [ModelReturn](doc//ModelReturn.md) + - [Name](doc//Name.md) + - [NullableClass](doc//NullableClass.md) + - [NumberOnly](doc//NumberOnly.md) + - [ObjectWithDeprecatedFields](doc//ObjectWithDeprecatedFields.md) + - [Order](doc//Order.md) + - [OuterComposite](doc//OuterComposite.md) + - [OuterEnum](doc//OuterEnum.md) + - [OuterEnumDefaultValue](doc//OuterEnumDefaultValue.md) + - [OuterEnumInteger](doc//OuterEnumInteger.md) + - [OuterEnumIntegerDefaultValue](doc//OuterEnumIntegerDefaultValue.md) + - [OuterObjectWithEnumProperty](doc//OuterObjectWithEnumProperty.md) + - [ParentWithNullable](doc//ParentWithNullable.md) + - [Pet](doc//Pet.md) + - [ReadOnlyFirst](doc//ReadOnlyFirst.md) + - [SingleRefType](doc//SingleRefType.md) + - [SpecialModelName](doc//SpecialModelName.md) + - [Tag](doc//Tag.md) + - [TestInlineFreeformAdditionalPropertiesRequest](doc//TestInlineFreeformAdditionalPropertiesRequest.md) + - [User](doc//User.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### petstore_auth + +- **Type**: OAuth +- **Flow**: implicit +- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog +- **Scopes**: + - **write:pets**: modify pets in your account + - **read:pets**: read your pets + +### api_key + +- **Type**: API key +- **API key parameter name**: api_key +- **Location**: HTTP header + +### api_key_query + +- **Type**: API key +- **API key parameter name**: api_key_query +- **Location**: URL query string + +### http_basic_test + +- **Type**: HTTP Basic authentication + +### bearer_test + +- **Type**: HTTP Bearer authentication + +### http_signature_test + +- **Type**: HTTP signature authentication + + +## Author + + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/analysis_options.yaml b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/analysis_options.yaml new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md new file mode 100644 index 000000000000..859d4d0b7a0c --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AdditionalPropertiesClass.md @@ -0,0 +1,16 @@ +# openapi.model.AdditionalPropertiesClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapProperty** | **Map** | | [optional] [default to const {}] +**mapOfMapProperty** | [**Map>**](Map.md) | | [optional] [default to const {}] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md new file mode 100644 index 000000000000..151142162f62 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md @@ -0,0 +1,16 @@ +# openapi.model.AllOfWithSingleRef + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**username** | **String** | | [optional] +**singlereftype** | [**SingleRefType**](SingleRefType.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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md new file mode 100644 index 000000000000..570de2e45be3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md @@ -0,0 +1,16 @@ +# openapi.model.Animal + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classname** | **String** | | +**color** | **String** | | [optional] [default to 'red'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md new file mode 100644 index 000000000000..c2ae77848227 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md @@ -0,0 +1,57 @@ +# openapi.api.AnotherFakeApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**call123testSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags + + +# **call123testSpecialTags** +> ModelClient call123testSpecialTags(modelclient) + +To test special tags + +To test special tags and operation ID starting with number + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = AnotherFakeApi(); +final modelclient = ModelClient(); // ModelClient | client model + +try { + final result = api_instance.call123testSpecialTags(modelclient); + print(result); +} catch (e) { + print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelclient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md new file mode 100644 index 000000000000..7ad5da0f89e4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ApiResponse.md @@ -0,0 +1,17 @@ +# openapi.model.ApiResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | | [optional] +**type** | **String** | | [optional] +**message** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md new file mode 100644 index 000000000000..84f21164e7b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.ArrayOfArrayOfNumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayarraynumber** | [**List>**](List.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md new file mode 100644 index 000000000000..fa8e9caffce8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.ArrayOfNumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arraynumber** | **List** | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md new file mode 100644 index 000000000000..598a895bb209 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayTest.md @@ -0,0 +1,17 @@ +# openapi.model.ArrayTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**arrayOfString** | **List** | | [optional] [default to const []] +**arrayArrayOfInteger** | [**List>**](List.md) | | [optional] [default to const []] +**arrayArrayOfModel** | [**List>**](List.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md new file mode 100644 index 000000000000..e673e7baef4b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md @@ -0,0 +1,20 @@ +# openapi.model.Capitalization + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**smallcamel** | **String** | | [optional] +**capitalcamel** | **String** | | [optional] +**smallSnake** | **String** | | [optional] +**capitalSnake** | **String** | | [optional] +**scaEthFlowPoints** | **String** | | [optional] +**attName** | **String** | Name of the pet | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md new file mode 100644 index 000000000000..9c557ac9082a --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md @@ -0,0 +1,17 @@ +# openapi.model.Cat + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classname** | **String** | | +**color** | **String** | | [optional] [default to 'red'] +**declawed** | **bool** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Category.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Category.md new file mode 100644 index 000000000000..ae6bc52e89d8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Category.md @@ -0,0 +1,16 @@ +# openapi.model.Category + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **String** | | [default to 'default-name'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md new file mode 100644 index 000000000000..54b310b0f58d --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md @@ -0,0 +1,17 @@ +# openapi.model.ChildWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableproperty** | **String** | | [optional] +**otherproperty** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md new file mode 100644 index 000000000000..13ae5d3a4708 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ClassModel.md @@ -0,0 +1,15 @@ +# openapi.model.ClassModel + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**class_** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md new file mode 100644 index 000000000000..1ae3cbc5ef46 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DefaultApi.md @@ -0,0 +1,51 @@ +# openapi.api.DefaultApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fooGet**](DefaultApi.md#fooget) | **GET** /foo | + + +# **fooGet** +> FooGetDefaultResponse fooGet() + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = DefaultApi(); + +try { + final result = api_instance.fooGet(); + print(result); +} catch (e) { + print('Exception when calling DefaultApi->fooGet: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FooGetDefaultResponse**](FooGetDefaultResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md new file mode 100644 index 000000000000..bf2ef67a26fc --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/DeprecatedObject.md @@ -0,0 +1,15 @@ +# openapi.model.DeprecatedObject + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md new file mode 100644 index 000000000000..b2ba3dfcef59 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md @@ -0,0 +1,17 @@ +# openapi.model.Dog + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**classname** | **String** | | +**color** | **String** | | [optional] [default to 'red'] +**breed** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md new file mode 100644 index 000000000000..2c12a0e6168d --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumArrays.md @@ -0,0 +1,16 @@ +# openapi.model.EnumArrays + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justSymbol** | **String** | | [optional] +**arrayEnum** | **List** | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumClass.md new file mode 100644 index 000000000000..a9ed4c1f0c8b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumClass.md @@ -0,0 +1,14 @@ +# openapi.model.EnumClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md new file mode 100644 index 000000000000..f1b0758b868e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md @@ -0,0 +1,22 @@ +# openapi.model.EnumTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enumString** | **String** | | [optional] +**enumStringRequired** | **String** | | +**enumInteger** | **int** | | [optional] +**enumNumber** | **double** | | [optional] +**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md new file mode 100644 index 000000000000..cf92b84aa2cf --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md @@ -0,0 +1,1034 @@ +# openapi.api.FakeApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**fakeBigDecimalMap**](FakeApi.md#fakebigdecimalmap) | **GET** /fake/BigDecimalMap | +[**fakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint +[**fakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication +[**fakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | +[**fakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | +[**fakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | +[**fakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | +[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | +[**testAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties +[**testBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | +[**testBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | +[**testBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | +[**testClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model +[**testEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 +[**testEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters +[**testGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) +[**testInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties +[**testInlineFreeformAdditionalProperties**](FakeApi.md#testinlinefreeformadditionalproperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties +[**testJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data +[**testNullable**](FakeApi.md#testnullable) | **POST** /fake/nullable | test nullable parent property +[**testQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | +[**testStringMapReference**](FakeApi.md#teststringmapreference) | **POST** /fake/stringMap-reference | test referenced string map + + +# **fakeBigDecimalMap** +> FakeBigDecimalMap200Response fakeBigDecimalMap() + + + +for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); + +try { + final result = api_instance.fakeBigDecimalMap(); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakeBigDecimalMap: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeHealthGet** +> HealthCheckResult fakeHealthGet() + +Health check endpoint + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); + +try { + final result = api_instance.fakeHealthGet(); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakeHealthGet: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**HealthCheckResult**](HealthCheckResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeHttpSignatureTest** +> fakeHttpSignatureTest(pet, query1, header1) + +test http signature authentication + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final pet = Pet(); // Pet | Pet object that needs to be added to the store +final query1 = query1_example; // String | query parameter +final header1 = header1_example; // String | header parameter + +try { + api_instance.fakeHttpSignatureTest(pet, query1, header1); +} catch (e) { + print('Exception when calling FakeApi->fakeHttpSignatureTest: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **query1** | **String**| query parameter | [optional] + **header1** | **String**| header parameter | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_signature_test](../README.md#http_signature_test) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterBooleanSerialize** +> bool fakeOuterBooleanSerialize(body) + + + +Test serialization of outer boolean types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final body = bool(); // bool | Input boolean as post body + +try { + final result = api_instance.fakeOuterBooleanSerialize(body); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakeOuterBooleanSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **bool**| Input boolean as post body | [optional] + +### Return type + +**bool** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterCompositeSerialize** +> OuterComposite fakeOuterCompositeSerialize(outercomposite) + + + +Test serialization of object with outer number type + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final outercomposite = OuterComposite(); // OuterComposite | Input composite as post body + +try { + final result = api_instance.fakeOuterCompositeSerialize(outercomposite); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + +### Return type + +[**OuterComposite**](OuterComposite.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterNumberSerialize** +> num fakeOuterNumberSerialize(body) + + + +Test serialization of outer number types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final body = num(); // num | Input number as post body + +try { + final result = api_instance.fakeOuterNumberSerialize(body); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakeOuterNumberSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **num**| Input number as post body | [optional] + +### Return type + +**num** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakeOuterStringSerialize** +> String fakeOuterStringSerialize(body) + + + +Test serialization of outer string types + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final body = String(); // String | Input string as post body + +try { + final result = api_instance.fakeOuterStringSerialize(body); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakeOuterStringSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **String**| Input string as post body | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **fakePropertyEnumIntegerSerialize** +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) + + + +Test serialization of enum (int) properties with examples + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final outerobjectwithenumproperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body + +try { + final result = api_instance.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + print(result); +} catch (e) { + print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + +### Return type + +[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: */* + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testAdditionalPropertiesReference** +> testAdditionalPropertiesReference(requestBody) + +test referenced additionalProperties + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final requestBody = Map(); // Map | request body + +try { + api_instance.testAdditionalPropertiesReference(requestBody); +} catch (e) { + print('Exception when calling FakeApi->testAdditionalPropertiesReference: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Map**](Object.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithBinary** +> testBodyWithBinary(body) + + + +For this test, the body has to be a binary file. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final body = MultipartFile(); // MultipartFile | image to upload + +try { + api_instance.testBodyWithBinary(body); +} catch (e) { + print('Exception when calling FakeApi->testBodyWithBinary: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | **MultipartFile**| image to upload | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: image/png + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithFileSchema** +> testBodyWithFileSchema(fileschematestclass) + + + +For this test, the body for this request must reference a schema named `File`. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final fileschematestclass = FileSchemaTestClass(); // FileSchemaTestClass | + +try { + api_instance.testBodyWithFileSchema(fileschematestclass); +} catch (e) { + print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testBodyWithQueryParams** +> testBodyWithQueryParams(query, user) + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final query = query_example; // String | +final user = User(); // User | + +try { + api_instance.testBodyWithQueryParams(query, user); +} catch (e) { + print('Exception when calling FakeApi->testBodyWithQueryParams: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **query** | **String**| | + **user** | [**User**](User.md)| | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testClientModel** +> ModelClient testClientModel(modelclient) + +To test \"client\" model + +To test \"client\" model + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final modelclient = ModelClient(); // ModelClient | client model + +try { + final result = api_instance.testClientModel(modelclient); + print(result); +} catch (e) { + print('Exception when calling FakeApi->testClientModel: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelclient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEndpointParameters** +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP basic authorization: http_basic_test +//defaultApiClient.getAuthentication('http_basic_test').username = 'YOUR_USERNAME' +//defaultApiClient.getAuthentication('http_basic_test').password = 'YOUR_PASSWORD'; + +final api_instance = FakeApi(); +final number = 8.14; // num | None +final double_ = 1.2; // double | None +final patternWithoutDelimiter = patternWithoutDelimiter_example; // String | None +final byte = BYTE_ARRAY_DATA_HERE; // String | None +final integer = 56; // int | None +final int32 = 56; // int | None +final int64 = 789; // int | None +final float = 3.4; // double | None +final string = string_example; // String | None +final binary = BINARY_DATA_HERE; // MultipartFile | None +final date = 2013-10-20; // DateTime | None +final datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final password = password_example; // String | None +final callback = callback_example; // String | None + +try { + api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); +} catch (e) { + print('Exception when calling FakeApi->testEndpointParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **number** | **num**| None | + **double_** | **double**| None | + **patternWithoutDelimiter** | **String**| None | + **byte** | **String**| None | + **integer** | **int**| None | [optional] + **int32** | **int**| None | [optional] + **int64** | **int**| None | [optional] + **float** | **double**| None | [optional] + **string** | **String**| None | [optional] + **binary** | **MultipartFile**| None | [optional] + **date** | **DateTime**| None | [optional] + **datetime** | **DateTime**| None | [optional] + **password** | **String**| None | [optional] + **callback** | **String**| None | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[http_basic_test](../README.md#http_basic_test) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testEnumParameters** +> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) + +To test enum parameters + +To test enum parameters + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final enumHeaderStringArray = []; // List | Header parameter enum test (string array) +final enumHeaderString = enumHeaderString_example; // String | Header parameter enum test (string) +final enumQueryStringArray = []; // List | Query parameter enum test (string array) +final enumQueryString = enumQueryString_example; // String | Query parameter enum test (string) +final enumQueryInteger = 56; // int | Query parameter enum test (double) +final enumQueryDouble = 1.2; // double | Query parameter enum test (double) +final enumQueryModelArray = []; // List | +final enumFormStringArray = []; // List | Form parameter enum test (string array) +final enumFormString = enumFormString_example; // String | Form parameter enum test (string) + +try { + api_instance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); +} catch (e) { + print('Exception when calling FakeApi->testEnumParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **enumHeaderStringArray** | [**List**](String.md)| Header parameter enum test (string array) | [optional] [default to const []] + **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryStringArray** | [**List**](String.md)| Query parameter enum test (string array) | [optional] [default to const []] + **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to '-efg'] + **enumQueryInteger** | **int**| Query parameter enum test (double) | [optional] + **enumQueryDouble** | **double**| Query parameter enum test (double) | [optional] + **enumQueryModelArray** | [**List**](EnumClass.md)| | [optional] [default to const []] + **enumFormStringArray** | [**List**](String.md)| Form parameter enum test (string array) | [optional] [default to '$'] + **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to '-efg'] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testGroupParameters** +> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) + +Fake endpoint to test group parameters (optional) + +Fake endpoint to test group parameters (optional) + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure HTTP Bearer authorization: bearer_test +// Case 1. Use String Token +//defaultApiClient.getAuthentication('bearer_test').setAccessToken('YOUR_ACCESS_TOKEN'); +// Case 2. Use Function which generate token. +// String yourTokenGeneratorFunction() { ... } +//defaultApiClient.getAuthentication('bearer_test').setAccessToken(yourTokenGeneratorFunction); + +final api_instance = FakeApi(); +final requiredStringGroup = 56; // int | Required String in group parameters +final requiredBooleanGroup = true; // bool | Required Boolean in group parameters +final requiredInt64Group = 789; // int | Required Integer in group parameters +final stringGroup = 56; // int | String in group parameters +final booleanGroup = true; // bool | Boolean in group parameters +final int64Group = 789; // int | Integer in group parameters + +try { + api_instance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); +} catch (e) { + print('Exception when calling FakeApi->testGroupParameters: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requiredStringGroup** | **int**| Required String in group parameters | + **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | + **requiredInt64Group** | **int**| Required Integer in group parameters | + **stringGroup** | **int**| String in group parameters | [optional] + **booleanGroup** | **bool**| Boolean in group parameters | [optional] + **int64Group** | **int**| Integer in group parameters | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[bearer_test](../README.md#bearer_test) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineAdditionalProperties** +> testInlineAdditionalProperties(requestBody) + +test inline additionalProperties + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final requestBody = Map(); // Map | request body + +try { + api_instance.testInlineAdditionalProperties(requestBody); +} catch (e) { + print('Exception when calling FakeApi->testInlineAdditionalProperties: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Map**](String.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testInlineFreeformAdditionalProperties** +> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) + +test inline free-form additionalProperties + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final testinlinefreeformadditionalpropertiesrequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body + +try { + api_instance.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); +} catch (e) { + print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testJsonFormData** +> testJsonFormData(param, param2) + +test json serialization of form data + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final param = param_example; // String | field1 +final param2 = param2_example; // String | field2 + +try { + api_instance.testJsonFormData(param, param2); +} catch (e) { + print('Exception when calling FakeApi->testJsonFormData: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **param** | **String**| field1 | + **param2** | **String**| field2 | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testNullable** +> testNullable(childwithnullable) + +test nullable parent property + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final childwithnullable = ChildWithNullable(); // ChildWithNullable | request body + +try { + api_instance.testNullable(childwithnullable); +} catch (e) { + print('Exception when calling FakeApi->testNullable: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testQueryParameterCollectionFormat** +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) + + + +To test the collection format in query parameters + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final pipe = []; // List | +final ioutil = []; // List | +final http = []; // List | +final url = []; // List | +final context = []; // List | +final allowempty = allowempty_example; // String | +final language = ; // Map | + +try { + api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); +} catch (e) { + print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pipe** | [**List**](String.md)| | [default to const []] + **ioutil** | [**List**](String.md)| | [default to const []] + **http** | [**List**](String.md)| | [default to const []] + **url** | [**List**](String.md)| | [default to const []] + **context** | [**List**](String.md)| | [default to const []] + **allowempty** | **String**| | + **language** | [**Map**](String.md)| | [optional] [default to const {}] + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **testStringMapReference** +> testStringMapReference(requestBody) + +test referenced string map + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = FakeApi(); +final requestBody = Map(); // Map | request body + +try { + api_instance.testStringMapReference(requestBody); +} catch (e) { + print('Exception when calling FakeApi->testStringMapReference: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **requestBody** | [**Map**](String.md)| request body | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md new file mode 100644 index 000000000000..f3c0d00337e9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md @@ -0,0 +1,16 @@ +# openapi.model.FakeBigDecimalMap200Response + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**someid** | **num** | | [optional] +**somemap** | **Map** | | [optional] [default to const {}] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md new file mode 100644 index 000000000000..be7a69c1b967 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md @@ -0,0 +1,61 @@ +# openapi.api.FakeClassnameTags123Api + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**testClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case + + +# **testClassname** +> ModelClient testClassname(modelclient) + +To test class name in snake case + +To test class name in snake case + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key_query +//defaultApiClient.getAuthentication('api_key_query').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; + +final api_instance = FakeClassnameTags123Api(); +final modelclient = ModelClient(); // ModelClient | client model + +try { + final result = api_instance.testClassname(modelclient); + print(result); +} catch (e) { + print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelclient** | [**ModelClient**](ModelClient.md)| client model | + +### Return type + +[**ModelClient**](ModelClient.md) + +### Authorization + +[api_key_query](../README.md#api_key_query) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md new file mode 100644 index 000000000000..eae1dfbe979f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FileSchemaTestClass.md @@ -0,0 +1,16 @@ +# openapi.model.FileSchemaTestClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | [**ModelFile**](ModelFile.md) | | [optional] +**files** | [**List**](ModelFile.md) | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Foo.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Foo.md new file mode 100644 index 000000000000..185b76e3f5b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Foo.md @@ -0,0 +1,15 @@ +# openapi.model.Foo + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [default to 'bar'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md new file mode 100644 index 000000000000..10d0133abd95 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FooGetDefaultResponse.md @@ -0,0 +1,15 @@ +# openapi.model.FooGetDefaultResponse + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**string** | [**Foo**](Foo.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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md new file mode 100644 index 000000000000..a25a61c53343 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md @@ -0,0 +1,30 @@ +# openapi.model.FormatTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **int** | | [optional] +**int32** | **int** | | [optional] +**int64** | **int** | | [optional] +**number** | **num** | | +**float** | **double** | | [optional] +**double_** | **double** | | [optional] +**decimal** | **double** | | [optional] +**string** | **String** | | [optional] +**byte** | **String** | | +**binary** | [**MultipartFile**](MultipartFile.md) | | [optional] +**date** | [**DateTime**](DateTime.md) | | +**datetime** | [**DateTime**](DateTime.md) | | [optional] +**uuid** | **String** | | [optional] +**password** | **String** | | +**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] +**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md new file mode 100644 index 000000000000..f2d30e9fb688 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HasOnlyReadOnly.md @@ -0,0 +1,16 @@ +# openapi.model.HasOnlyReadOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**foo** | **String** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md new file mode 100644 index 000000000000..c912fb2e08f4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md @@ -0,0 +1,15 @@ +# openapi.model.HealthCheckResult + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nullablemessage** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MapTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MapTest.md new file mode 100644 index 000000000000..a1732207bfc9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MapTest.md @@ -0,0 +1,18 @@ +# openapi.model.MapTest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mapMapOfString** | [**Map>**](Map.md) | | [optional] [default to const {}] +**mapOfEnumString** | **Map** | | [optional] [default to const {}] +**directMap** | **Map** | | [optional] [default to const {}] +**indirectMap** | **Map** | | [optional] [default to const {}] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md new file mode 100644 index 000000000000..3df16ab1a90c --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -0,0 +1,17 @@ +# openapi.model.MixedPropertiesAndAdditionalPropertiesClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**datetime** | [**DateTime**](DateTime.md) | | [optional] +**map** | [**Map**](Animal.md) | | [optional] [default to const {}] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md new file mode 100644 index 000000000000..5aa3fb97c32e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Model200Response.md @@ -0,0 +1,16 @@ +# openapi.model.Model200Response + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | [optional] +**class_** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md new file mode 100644 index 000000000000..f7b922f4a398 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelClient.md @@ -0,0 +1,15 @@ +# openapi.model.ModelClient + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**client** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md new file mode 100644 index 000000000000..d54b1bbbea04 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md @@ -0,0 +1,15 @@ +# openapi.model.ModelFile + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sourceuri** | **String** | Test capitalization | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelList.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelList.md new file mode 100644 index 000000000000..283aa1f6b711 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelList.md @@ -0,0 +1,15 @@ +# openapi.model.ModelList + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**n123list** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md new file mode 100644 index 000000000000..bc02df7a3692 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelReturn.md @@ -0,0 +1,15 @@ +# openapi.model.ModelReturn + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**return_** | **int** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Name.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Name.md new file mode 100644 index 000000000000..9da6e75fbf5e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Name.md @@ -0,0 +1,18 @@ +# openapi.model.Name + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **int** | | +**snakeCase** | **int** | | [optional] [readonly] +**property** | **String** | | [optional] +**n123number** | **int** | | [optional] [readonly] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md new file mode 100644 index 000000000000..9b2e46df0a09 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NullableClass.md @@ -0,0 +1,26 @@ +# openapi.model.NullableClass + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integerProp** | **int** | | [optional] +**numberProp** | **num** | | [optional] +**booleanProp** | **bool** | | [optional] +**stringProp** | **String** | | [optional] +**dateProp** | [**DateTime**](DateTime.md) | | [optional] +**datetimeProp** | [**DateTime**](DateTime.md) | | [optional] +**arrayNullableProp** | [**List**](Object.md) | | [optional] [default to const []] +**arrayAndItemsNullableProp** | [**List**](Object.md) | | [optional] [default to const []] +**arrayItemsNullable** | [**List**](Object.md) | | [optional] [default to const []] +**objectNullableProp** | [**Map**](Object.md) | | [optional] [default to const {}] +**objectAndItemsNullableProp** | [**Map**](Object.md) | | [optional] [default to const {}] +**objectItemsNullable** | [**Map**](Object.md) | | [optional] [default to const {}] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md new file mode 100644 index 000000000000..f5fac6f8a17c --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md @@ -0,0 +1,15 @@ +# openapi.model.NumberOnly + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**justnumber** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md new file mode 100644 index 000000000000..a78891d33014 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md @@ -0,0 +1,18 @@ +# openapi.model.ObjectWithDeprecatedFields + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**uuid** | **String** | | [optional] +**id** | **num** | | [optional] +**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**bars** | **List** | | [optional] [default to const []] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md new file mode 100644 index 000000000000..08914a83f300 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md @@ -0,0 +1,20 @@ +# openapi.model.Order + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**petid** | **int** | | [optional] +**quantity** | **int** | | [optional] +**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**status** | **String** | Order Status | [optional] +**complete** | **bool** | | [optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md new file mode 100644 index 000000000000..04bab7eff5d1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterComposite.md @@ -0,0 +1,17 @@ +# openapi.model.OuterComposite + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**myNumber** | **num** | | [optional] +**myString** | **String** | | [optional] +**myBoolean** | **bool** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md new file mode 100644 index 000000000000..af62ad87ab2e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnum.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnum + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md new file mode 100644 index 000000000000..c1bf8b0dec44 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumDefaultValue.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumDefaultValue + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md new file mode 100644 index 000000000000..8c80a9e5c85f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumInteger.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumInteger + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md new file mode 100644 index 000000000000..eb8b55d70249 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterEnumIntegerDefaultValue.md @@ -0,0 +1,14 @@ +# openapi.model.OuterEnumIntegerDefaultValue + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md new file mode 100644 index 000000000000..eab2ae8f66b4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/OuterObjectWithEnumProperty.md @@ -0,0 +1,15 @@ +# openapi.model.OuterObjectWithEnumProperty + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**OuterEnumInteger**](OuterEnumInteger.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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md new file mode 100644 index 000000000000..435464987052 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md @@ -0,0 +1,16 @@ +# openapi.model.ParentWithNullable + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**nullableproperty** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md new file mode 100644 index 000000000000..ceb71740166f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md @@ -0,0 +1,20 @@ +# openapi.model.Pet + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**category** | [**Category**](Category.md) | | [optional] +**name** | **String** | | +**photourls** | **Set** | | [default to const {}] +**tags** | [**List**](Tag.md) | | [optional] [default to const []] +**status** | **String** | pet status in the store | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md new file mode 100644 index 000000000000..978146e44886 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md @@ -0,0 +1,439 @@ +# openapi.api.PetApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store +[**deletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet +[**findPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status +[**findPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags +[**getPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID +[**updatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet +[**updatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data +[**uploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image +[**uploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) + + +# **addPet** +> addPet(pet) + +Add a new pet to the store + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final pet = Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.addPet(pet); +} catch (e) { + print('Exception when calling PetApi->addPet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deletePet** +> deletePet(petid, apiKey) + +Deletes a pet + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final petid = 789; // int | Pet id to delete +final apiKey = apiKey_example; // String | + +try { + api_instance.deletePet(petid, apiKey); +} catch (e) { + print('Exception when calling PetApi->deletePet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| Pet id to delete | + **apiKey** | **String**| | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByStatus** +> List findPetsByStatus(status) + +Finds Pets by status + +Multiple status values can be provided with comma separated strings + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final status = []; // List | Status values that need to be considered for filter + +try { + final result = api_instance.findPetsByStatus(status); + print(result); +} catch (e) { + print('Exception when calling PetApi->findPetsByStatus: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **status** | [**List**](String.md)| Status values that need to be considered for filter | [default to const []] + +### Return type + +[**List**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **findPetsByTags** +> Set findPetsByTags(tags) + +Finds Pets by tags + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final tags = []; // Set | Tags to filter by + +try { + final result = api_instance.findPetsByTags(tags); + print(result); +} catch (e) { + print('Exception when calling PetApi->findPetsByTags: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tags** | [**Set**](String.md)| Tags to filter by | [default to const {}] + +### Return type + +[**Set**](Pet.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getPetById** +> Pet getPetById(petid) + +Find pet by ID + +Returns a single pet + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +final api_instance = PetApi(); +final petid = 789; // int | ID of pet to return + +try { + final result = api_instance.getPetById(petid); + print(result); +} catch (e) { + print('Exception when calling PetApi->getPetById: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet to return | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePet** +> updatePet(pet) + +Update an existing pet + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final pet = Pet(); // Pet | Pet object that needs to be added to the store + +try { + api_instance.updatePet(pet); +} catch (e) { + print('Exception when calling PetApi->updatePet: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updatePetWithForm** +> updatePetWithForm(petid, name, status) + +Updates a pet in the store with form data + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final petid = 789; // int | ID of pet that needs to be updated +final name = name_example; // String | Updated name of the pet +final status = status_example; // String | Updated status of the pet + +try { + api_instance.updatePetWithForm(petid, name, status); +} catch (e) { + print('Exception when calling PetApi->updatePetWithForm: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet that needs to be updated | + **name** | **String**| Updated name of the pet | [optional] + **status** | **String**| Updated status of the pet | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: application/x-www-form-urlencoded + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFile** +> ApiResponse uploadFile(petid, additionalmetadata, file) + +uploads an image + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final petid = 789; // int | ID of pet to update +final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final file = BINARY_DATA_HERE; // MultipartFile | file to upload + +try { + final result = api_instance.uploadFile(petid, additionalmetadata, file); + print(result); +} catch (e) { + print('Exception when calling PetApi->uploadFile: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet to update | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **file** | **MultipartFile**| file to upload | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **uploadFileWithRequiredFile** +> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) + +uploads an image (required) + + + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure OAuth2 access token for authorization: petstore_auth +//defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; + +final api_instance = PetApi(); +final petid = 789; // int | ID of pet to update +final requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload +final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server + +try { + final result = api_instance.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + print(result); +} catch (e) { + print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **petid** | **int**| ID of pet to update | + **requiredfile** | **MultipartFile**| file to upload | + **additionalmetadata** | **String**| Additional data to pass to server | [optional] + +### Return type + +[**ApiResponse**](ApiResponse.md) + +### Authorization + +[petstore_auth](../README.md#petstore_auth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md new file mode 100644 index 000000000000..fa6f9e4305d4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ReadOnlyFirst.md @@ -0,0 +1,16 @@ +# openapi.model.ReadOnlyFirst + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**bar** | **String** | | [optional] [readonly] +**baz** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md new file mode 100644 index 000000000000..0dc93840cd7f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SingleRefType.md @@ -0,0 +1,14 @@ +# openapi.model.SingleRefType + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md new file mode 100644 index 000000000000..04697c8e6225 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md @@ -0,0 +1,15 @@ +# openapi.model.SpecialModelName + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md new file mode 100644 index 000000000000..d91bad051601 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/StoreApi.md @@ -0,0 +1,188 @@ +# openapi.api.StoreApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID +[**getInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status +[**getOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID +[**placeOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet + + +# **deleteOrder** +> deleteOrder(orderId) + +Delete purchase order by ID + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = StoreApi(); +final orderId = orderId_example; // String | ID of the order that needs to be deleted + +try { + api_instance.deleteOrder(orderId); +} catch (e) { + print('Exception when calling StoreApi->deleteOrder: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **String**| ID of the order that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getInventory** +> Map getInventory() + +Returns pet inventories by status + +Returns a map of status codes to quantities + +### Example +```dart +import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; + +final api_instance = StoreApi(); + +try { + final result = api_instance.getInventory(); + print(result); +} catch (e) { + print('Exception when calling StoreApi->getInventory: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**Map** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getOrderById** +> Order getOrderById(orderId) + +Find purchase order by ID + +For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = StoreApi(); +final orderId = 789; // int | ID of pet that needs to be fetched + +try { + final result = api_instance.getOrderById(orderId); + print(result); +} catch (e) { + print('Exception when calling StoreApi->getOrderById: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **orderId** | **int**| ID of pet that needs to be fetched | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **placeOrder** +> Order placeOrder(order) + +Place an order for a pet + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = StoreApi(); +final order = Order(); // Order | order placed for purchasing the pet + +try { + final result = api_instance.placeOrder(order); + print(result); +} catch (e) { + print('Exception when calling StoreApi->placeOrder: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **order** | [**Order**](Order.md)| order placed for purchasing the pet | + +### Return type + +[**Order**](Order.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Tag.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Tag.md new file mode 100644 index 000000000000..c219f987c19c --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Tag.md @@ -0,0 +1,16 @@ +# openapi.model.Tag + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**name** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md new file mode 100644 index 000000000000..894a3e60ee31 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -0,0 +1,15 @@ +# openapi.model.TestInlineFreeformAdditionalPropertiesRequest + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**someproperty** | **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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md new file mode 100644 index 000000000000..37aa8c50230e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md @@ -0,0 +1,22 @@ +# openapi.model.User + +## Load the model package +```dart +import 'package:openapi/api.dart'; +``` + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**username** | **String** | | [optional] +**firstname** | **String** | | [optional] +**lastname** | **String** | | [optional] +**email** | **String** | | [optional] +**password** | **String** | | [optional] +**phone** | **String** | | [optional] +**userstatus** | **int** | User Status | [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) + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/UserApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/UserApi.md new file mode 100644 index 000000000000..ee26762d9336 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/UserApi.md @@ -0,0 +1,359 @@ +# openapi.api.UserApi + +## Load the API package +```dart +import 'package:openapi/api.dart'; +``` + +All URIs are relative to *http://petstore.swagger.io:80/v2* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createuser) | **POST** /user | Create user +[**createUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array +[**createUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array +[**deleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user +[**getUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name +[**loginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system +[**logoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session +[**updateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user + + +# **createUser** +> createUser(user) + +Create user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final user = User(); // User | Created user object + +try { + api_instance.createUser(user); +} catch (e) { + print('Exception when calling UserApi->createUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| Created user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithArrayInput** +> createUsersWithArrayInput(user) + +Creates list of users with given input array + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final user = [List()]; // List | List of user object + +try { + api_instance.createUsersWithArrayInput(user); +} catch (e) { + print('Exception when calling UserApi->createUsersWithArrayInput: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **createUsersWithListInput** +> createUsersWithListInput(user) + +Creates list of users with given input array + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final user = [List()]; // List | List of user object + +try { + api_instance.createUsersWithListInput(user); +} catch (e) { + print('Exception when calling UserApi->createUsersWithListInput: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**List**](User.md)| List of user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **deleteUser** +> deleteUser(username) + +Delete user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final username = username_example; // String | The name that needs to be deleted + +try { + api_instance.deleteUser(username); +} catch (e) { + print('Exception when calling UserApi->deleteUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be deleted | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getUserByName** +> User getUserByName(username) + +Get user by user name + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final username = username_example; // String | The name that needs to be fetched. Use user1 for testing. + +try { + final result = api_instance.getUserByName(username); + print(result); +} catch (e) { + print('Exception when calling UserApi->getUserByName: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The name that needs to be fetched. Use user1 for testing. | + +### Return type + +[**User**](User.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **loginUser** +> String loginUser(username, password) + +Logs user into the system + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final username = username_example; // String | The user name for login +final password = password_example; // String | The password for login in clear text + +try { + final result = api_instance.loginUser(username, password); + print(result); +} catch (e) { + print('Exception when calling UserApi->loginUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| The user name for login | + **password** | **String**| The password for login in clear text | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **logoutUser** +> logoutUser() + +Logs out current logged in user session + + + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); + +try { + api_instance.logoutUser(); +} catch (e) { + print('Exception when calling UserApi->logoutUser: $e\n'); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **updateUser** +> updateUser(username, user) + +Updated user + +This can only be done by the logged in user. + +### Example +```dart +import 'package:openapi/api.dart'; + +final api_instance = UserApi(); +final username = username_example; // String | name that need to be deleted +final user = User(); // User | Updated user object + +try { + api_instance.updateUser(username, user); +} catch (e) { + print('Exception when calling UserApi->updateUser: $e\n'); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| name that need to be deleted | + **user** | [**User**](User.md)| Updated user object | + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/git_push.sh b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/git_push.sh new file mode 100644 index 000000000000..f53a75d4fabe --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/git_push.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=$(git remote) +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api.dart new file mode 100644 index 000000000000..e2a18ff4f827 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api.dart @@ -0,0 +1,103 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +library openapi.api; + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:collection/collection.dart'; +import 'package:http/http.dart'; +import 'package:intl/intl.dart'; +import 'package:meta/meta.dart'; + +part 'api_client.dart'; +part 'api_helper.dart'; +part 'api_exception.dart'; +part 'auth/authentication.dart'; +part 'auth/api_key_auth.dart'; +part 'auth/oauth.dart'; +part 'auth/http_basic_auth.dart'; +part 'auth/http_bearer_auth.dart'; + +part 'api/another_fake_api.dart'; +part 'api/default_api.dart'; +part 'api/fake_api.dart'; +part 'api/fake_classname_tags123_api.dart'; +part 'api/pet_api.dart'; +part 'api/store_api.dart'; +part 'api/user_api.dart'; + +part 'model/additional_properties_class.dart'; +part 'model/all_of_with_single_ref.dart'; +part 'model/animal.dart'; +part 'model/api_response.dart'; +part 'model/array_of_array_of_number_only.dart'; +part 'model/array_of_number_only.dart'; +part 'model/array_test.dart'; +part 'model/capitalization.dart'; +part 'model/cat.dart'; +part 'model/category.dart'; +part 'model/child_with_nullable.dart'; +part 'model/class_model.dart'; +part 'model/deprecated_object.dart'; +part 'model/dog.dart'; +part 'model/enum_arrays.dart'; +part 'model/enum_class.dart'; +part 'model/enum_test.dart'; +part 'model/fake_big_decimal_map200_response.dart'; +part 'model/file_schema_test_class.dart'; +part 'model/foo.dart'; +part 'model/foo_get_default_response.dart'; +part 'model/format_test.dart'; +part 'model/has_only_read_only.dart'; +part 'model/health_check_result.dart'; +part 'model/map_test.dart'; +part 'model/mixed_properties_and_additional_properties_class.dart'; +part 'model/model200_response.dart'; +part 'model/model_client.dart'; +part 'model/model_file.dart'; +part 'model/model_list.dart'; +part 'model/model_return.dart'; +part 'model/name.dart'; +part 'model/nullable_class.dart'; +part 'model/number_only.dart'; +part 'model/object_with_deprecated_fields.dart'; +part 'model/order.dart'; +part 'model/outer_composite.dart'; +part 'model/outer_enum.dart'; +part 'model/outer_enum_default_value.dart'; +part 'model/outer_enum_integer.dart'; +part 'model/outer_enum_integer_default_value.dart'; +part 'model/outer_object_with_enum_property.dart'; +part 'model/parent_with_nullable.dart'; +part 'model/pet.dart'; +part 'model/read_only_first.dart'; +part 'model/single_ref_type.dart'; +part 'model/special_model_name.dart'; +part 'model/tag.dart'; +part 'model/test_inline_freeform_additional_properties_request.dart'; +part 'model/user.dart'; + + +/// An [ApiClient] instance that uses the default values obtained from +/// the OpenAPI specification file. +var defaultApiClient = ApiClient(); + +const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; +const _dateEpochMarker = 'epoch'; +const _deepEquality = DeepCollectionEquality(); +final _dateFormatter = DateFormat('yyyy-MM-dd'); +final _regList = RegExp(r'^List<(.*)>$'); +final _regSet = RegExp(r'^Set<(.*)>$'); +final _regMap = RegExp(r'^Map$'); + +bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart new file mode 100644 index 000000000000..3d7ceda6d0cd --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart @@ -0,0 +1,76 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class AnotherFakeApi { + AnotherFakeApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// To test special tags + /// + /// To test special tags and operation ID starting with number + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [ModelClient] modelclient (required): + /// client model + Future call123testSpecialTagsWithHttpInfo(ModelClient modelclient,) async { + // ignore: prefer_const_declarations + final path = r'/another-fake/dummy'; + + // ignore: prefer_final_locals + Object? postBody = modelclient; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// To test special tags + /// + /// To test special tags and operation ID starting with number + /// + /// Parameters: + /// + /// * [ModelClient] modelclient (required): + /// client model + Future call123testSpecialTags(ModelClient modelclient,) async { + final response = await call123testSpecialTagsWithHttpInfo(modelclient,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ModelClient',) as ModelClient; + + } + return null; + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/default_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/default_api.dart new file mode 100644 index 000000000000..059deb8d5e32 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/default_api.dart @@ -0,0 +1,59 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class DefaultApi { + DefaultApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Performs an HTTP 'GET /foo' operation and returns the [Response]. + Future fooGetWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/foo'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + Future fooGet() async { + final response = await fooGetWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FooGetDefaultResponse',) as FooGetDefaultResponse; + + } + return null; + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart new file mode 100644 index 000000000000..3674a2e5d66f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart @@ -0,0 +1,1411 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class FakeApi { + FakeApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + /// + /// Note: This method returns the HTTP [Response]. + Future fakeBigDecimalMapWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/fake/BigDecimalMap'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + Future fakeBigDecimalMap() async { + final response = await fakeBigDecimalMapWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FakeBigDecimalMap200Response',) as FakeBigDecimalMap200Response; + + } + return null; + } + + /// Health check endpoint + /// + /// Note: This method returns the HTTP [Response]. + Future fakeHealthGetWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/fake/health'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Health check endpoint + Future fakeHealthGet() async { + final response = await fakeHealthGetWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'HealthCheckResult',) as HealthCheckResult; + + } + return null; + } + + /// test http signature authentication + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Pet] pet (required): + /// Pet object that needs to be added to the store + /// + /// * [String] query1: + /// query parameter + /// + /// * [String] header1: + /// header parameter + Future fakeHttpSignatureTestWithHttpInfo(Pet pet, { String? query1, String? header1, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/http-signature-test'; + + // ignore: prefer_final_locals + Object? postBody = pet; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (query1 != null) { + queryParams.addAll(_queryParams('', 'query_1', query1)); + } + + if (header1 != null) { + headerParams[r'header_1'] = parameterToString(header1); + } + + const contentTypes = ['application/json', 'application/xml']; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test http signature authentication + /// + /// Parameters: + /// + /// * [Pet] pet (required): + /// Pet object that needs to be added to the store + /// + /// * [String] query1: + /// query parameter + /// + /// * [String] header1: + /// header parameter + Future fakeHttpSignatureTest(Pet pet, { String? query1, String? header1, }) async { + final response = await fakeHttpSignatureTestWithHttpInfo(pet, query1: query1, header1: header1, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Test serialization of outer boolean types + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [bool] body: + /// Input boolean as post body + Future fakeOuterBooleanSerializeWithHttpInfo({ bool? body, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/outer/boolean'; + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Test serialization of outer boolean types + /// + /// Parameters: + /// + /// * [bool] body: + /// Input boolean as post body + Future fakeOuterBooleanSerialize({ bool? body, }) async { + final response = await fakeOuterBooleanSerializeWithHttpInfo( body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'bool',) as bool; + + } + return null; + } + + /// Test serialization of object with outer number type + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OuterComposite] outercomposite: + /// Input composite as post body + Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outercomposite, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/outer/composite'; + + // ignore: prefer_final_locals + Object? postBody = outercomposite; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Test serialization of object with outer number type + /// + /// Parameters: + /// + /// * [OuterComposite] outercomposite: + /// Input composite as post body + Future fakeOuterCompositeSerialize({ OuterComposite? outercomposite, }) async { + final response = await fakeOuterCompositeSerializeWithHttpInfo( outercomposite: outercomposite, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OuterComposite',) as OuterComposite; + + } + return null; + } + + /// Test serialization of outer number types + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [num] body: + /// Input number as post body + Future fakeOuterNumberSerializeWithHttpInfo({ num? body, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/outer/number'; + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Test serialization of outer number types + /// + /// Parameters: + /// + /// * [num] body: + /// Input number as post body + Future fakeOuterNumberSerialize({ num? body, }) async { + final response = await fakeOuterNumberSerializeWithHttpInfo( body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'num',) as num; + + } + return null; + } + + /// Test serialization of outer string types + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] body: + /// Input string as post body + Future fakeOuterStringSerializeWithHttpInfo({ String? body, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/outer/string'; + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Test serialization of outer string types + /// + /// Parameters: + /// + /// * [String] body: + /// Input string as post body + Future fakeOuterStringSerialize({ String? body, }) async { + final response = await fakeOuterStringSerializeWithHttpInfo( body: body, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; + + } + return null; + } + + /// Test serialization of enum (int) properties with examples + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): + /// Input enum (int) as post body + Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { + // ignore: prefer_const_declarations + final path = r'/fake/property/enum-int'; + + // ignore: prefer_final_locals + Object? postBody = outerobjectwithenumproperty; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Test serialization of enum (int) properties with examples + /// + /// Parameters: + /// + /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): + /// Input enum (int) as post body + Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { + final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerobjectwithenumproperty,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OuterObjectWithEnumProperty',) as OuterObjectWithEnumProperty; + + } + return null; + } + + /// test referenced additionalProperties + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Map] requestBody (required): + /// request body + Future testAdditionalPropertiesReferenceWithHttpInfo(Map requestBody,) async { + // ignore: prefer_const_declarations + final path = r'/fake/additionalProperties-reference'; + + // ignore: prefer_final_locals + Object? postBody = requestBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test referenced additionalProperties + /// + /// + /// + /// Parameters: + /// + /// * [Map] requestBody (required): + /// request body + Future testAdditionalPropertiesReference(Map requestBody,) async { + final response = await testAdditionalPropertiesReferenceWithHttpInfo(requestBody,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// For this test, the body has to be a binary file. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [MultipartFile] body (required): + /// image to upload + Future testBodyWithBinaryWithHttpInfo(MultipartFile body,) async { + // ignore: prefer_const_declarations + final path = r'/fake/body-with-binary'; + + // ignore: prefer_final_locals + Object? postBody = body; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['image/png']; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// For this test, the body has to be a binary file. + /// + /// Parameters: + /// + /// * [MultipartFile] body (required): + /// image to upload + Future testBodyWithBinary(MultipartFile body,) async { + final response = await testBodyWithBinaryWithHttpInfo(body,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// For this test, the body for this request must reference a schema named `File`. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [FileSchemaTestClass] fileschematestclass (required): + Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileschematestclass,) async { + // ignore: prefer_const_declarations + final path = r'/fake/body-with-file-schema'; + + // ignore: prefer_final_locals + Object? postBody = fileschematestclass; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// For this test, the body for this request must reference a schema named `File`. + /// + /// Parameters: + /// + /// * [FileSchemaTestClass] fileschematestclass (required): + Future testBodyWithFileSchema(FileSchemaTestClass fileschematestclass,) async { + final response = await testBodyWithFileSchemaWithHttpInfo(fileschematestclass,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Performs an HTTP 'PUT /fake/body-with-query-params' operation and returns the [Response]. + /// Parameters: + /// + /// * [String] query (required): + /// + /// * [User] user (required): + Future testBodyWithQueryParamsWithHttpInfo(String query, User user,) async { + // ignore: prefer_const_declarations + final path = r'/fake/body-with-query-params'; + + // ignore: prefer_final_locals + Object? postBody = user; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('', 'query', query)); + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Parameters: + /// + /// * [String] query (required): + /// + /// * [User] user (required): + Future testBodyWithQueryParams(String query, User user,) async { + final response = await testBodyWithQueryParamsWithHttpInfo(query, user,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// To test \"client\" model + /// + /// To test \"client\" model + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [ModelClient] modelclient (required): + /// client model + Future testClientModelWithHttpInfo(ModelClient modelclient,) async { + // ignore: prefer_const_declarations + final path = r'/fake'; + + // ignore: prefer_final_locals + Object? postBody = modelclient; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// To test \"client\" model + /// + /// To test \"client\" model + /// + /// Parameters: + /// + /// * [ModelClient] modelclient (required): + /// client model + Future testClientModel(ModelClient modelclient,) async { + final response = await testClientModelWithHttpInfo(modelclient,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ModelClient',) as ModelClient; + + } + return null; + } + + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [num] number (required): + /// None + /// + /// * [double] double_ (required): + /// None + /// + /// * [String] patternWithoutDelimiter (required): + /// None + /// + /// * [String] byte (required): + /// None + /// + /// * [int] integer: + /// None + /// + /// * [int] int32: + /// None + /// + /// * [int] int64: + /// None + /// + /// * [double] float: + /// None + /// + /// * [String] string: + /// None + /// + /// * [MultipartFile] binary: + /// None + /// + /// * [DateTime] date: + /// None + /// + /// * [DateTime] datetime: + /// None + /// + /// * [String] password: + /// None + /// + /// * [String] callback: + /// None + Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { + // ignore: prefer_const_declarations + final path = r'/fake'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/x-www-form-urlencoded']; + + if (integer != null) { + formParams[r'integer'] = parameterToString(integer); + } + if (int32 != null) { + formParams[r'int32'] = parameterToString(int32); + } + if (int64 != null) { + formParams[r'int64'] = parameterToString(int64); + } + if (number != null) { + formParams[r'number'] = parameterToString(number); + } + if (float != null) { + formParams[r'float'] = parameterToString(float); + } + if (double_ != null) { + formParams[r'double'] = parameterToString(double_); + } + if (string != null) { + formParams[r'string'] = parameterToString(string); + } + if (patternWithoutDelimiter != null) { + formParams[r'pattern_without_delimiter'] = parameterToString(patternWithoutDelimiter); + } + if (byte != null) { + formParams[r'byte'] = parameterToString(byte); + } + if (date != null) { + formParams[r'date'] = parameterToString(date); + } + if (datetime != null) { + formParams[r'dateTime'] = parameterToString(datetime); + } + if (password != null) { + formParams[r'password'] = parameterToString(password); + } + if (callback != null) { + formParams[r'callback'] = parameterToString(callback); + } + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + /// + /// Parameters: + /// + /// * [num] number (required): + /// None + /// + /// * [double] double_ (required): + /// None + /// + /// * [String] patternWithoutDelimiter (required): + /// None + /// + /// * [String] byte (required): + /// None + /// + /// * [int] integer: + /// None + /// + /// * [int] int32: + /// None + /// + /// * [int] int64: + /// None + /// + /// * [double] float: + /// None + /// + /// * [String] string: + /// None + /// + /// * [MultipartFile] binary: + /// None + /// + /// * [DateTime] date: + /// None + /// + /// * [DateTime] datetime: + /// None + /// + /// * [String] password: + /// None + /// + /// * [String] callback: + /// None + Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { + final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, datetime: datetime, password: password, callback: callback, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// To test enum parameters + /// + /// To test enum parameters + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [List] enumHeaderStringArray: + /// Header parameter enum test (string array) + /// + /// * [String] enumHeaderString: + /// Header parameter enum test (string) + /// + /// * [List] enumQueryStringArray: + /// Query parameter enum test (string array) + /// + /// * [String] enumQueryString: + /// Query parameter enum test (string) + /// + /// * [int] enumQueryInteger: + /// Query parameter enum test (double) + /// + /// * [double] enumQueryDouble: + /// Query parameter enum test (double) + /// + /// * [List] enumQueryModelArray: + /// + /// * [List] enumFormStringArray: + /// Form parameter enum test (string array) + /// + /// * [String] enumFormString: + /// Form parameter enum test (string) + Future testEnumParametersWithHttpInfo({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumQueryModelArray, List? enumFormStringArray, String? enumFormString, }) async { + // ignore: prefer_const_declarations + final path = r'/fake'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (enumQueryStringArray != null) { + queryParams.addAll(_queryParams('multi', 'enum_query_string_array', enumQueryStringArray)); + } + if (enumQueryString != null) { + queryParams.addAll(_queryParams('', 'enum_query_string', enumQueryString)); + } + if (enumQueryInteger != null) { + queryParams.addAll(_queryParams('', 'enum_query_integer', enumQueryInteger)); + } + if (enumQueryDouble != null) { + queryParams.addAll(_queryParams('', 'enum_query_double', enumQueryDouble)); + } + if (enumQueryModelArray != null) { + queryParams.addAll(_queryParams('multi', 'enum_query_model_array', enumQueryModelArray)); + } + + if (enumHeaderStringArray != null) { + headerParams[r'enum_header_string_array'] = parameterToString(enumHeaderStringArray); + } + if (enumHeaderString != null) { + headerParams[r'enum_header_string'] = parameterToString(enumHeaderString); + } + + const contentTypes = ['application/x-www-form-urlencoded']; + + if (enumFormStringArray != null) { + formParams[r'enum_form_string_array'] = parameterToString(enumFormStringArray); + } + if (enumFormString != null) { + formParams[r'enum_form_string'] = parameterToString(enumFormString); + } + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// To test enum parameters + /// + /// To test enum parameters + /// + /// Parameters: + /// + /// * [List] enumHeaderStringArray: + /// Header parameter enum test (string array) + /// + /// * [String] enumHeaderString: + /// Header parameter enum test (string) + /// + /// * [List] enumQueryStringArray: + /// Query parameter enum test (string array) + /// + /// * [String] enumQueryString: + /// Query parameter enum test (string) + /// + /// * [int] enumQueryInteger: + /// Query parameter enum test (double) + /// + /// * [double] enumQueryDouble: + /// Query parameter enum test (double) + /// + /// * [List] enumQueryModelArray: + /// + /// * [List] enumFormStringArray: + /// Form parameter enum test (string array) + /// + /// * [String] enumFormString: + /// Form parameter enum test (string) + Future testEnumParameters({ List? enumHeaderStringArray, String? enumHeaderString, List? enumQueryStringArray, String? enumQueryString, int? enumQueryInteger, double? enumQueryDouble, List? enumQueryModelArray, List? enumFormStringArray, String? enumFormString, }) async { + final response = await testEnumParametersWithHttpInfo( enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumQueryModelArray: enumQueryModelArray, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Fake endpoint to test group parameters (optional) + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] requiredStringGroup (required): + /// Required String in group parameters + /// + /// * [bool] requiredBooleanGroup (required): + /// Required Boolean in group parameters + /// + /// * [int] requiredInt64Group (required): + /// Required Integer in group parameters + /// + /// * [int] stringGroup: + /// String in group parameters + /// + /// * [bool] booleanGroup: + /// Boolean in group parameters + /// + /// * [int] int64Group: + /// Integer in group parameters + Future testGroupParametersWithHttpInfo(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int? stringGroup, bool? booleanGroup, int? int64Group, }) async { + // ignore: prefer_const_declarations + final path = r'/fake'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('', 'required_string_group', requiredStringGroup)); + queryParams.addAll(_queryParams('', 'required_int64_group', requiredInt64Group)); + if (stringGroup != null) { + queryParams.addAll(_queryParams('', 'string_group', stringGroup)); + } + if (int64Group != null) { + queryParams.addAll(_queryParams('', 'int64_group', int64Group)); + } + + headerParams[r'required_boolean_group'] = parameterToString(requiredBooleanGroup); + if (booleanGroup != null) { + headerParams[r'boolean_group'] = parameterToString(booleanGroup); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Fake endpoint to test group parameters (optional) + /// + /// Fake endpoint to test group parameters (optional) + /// + /// Parameters: + /// + /// * [int] requiredStringGroup (required): + /// Required String in group parameters + /// + /// * [bool] requiredBooleanGroup (required): + /// Required Boolean in group parameters + /// + /// * [int] requiredInt64Group (required): + /// Required Integer in group parameters + /// + /// * [int] stringGroup: + /// String in group parameters + /// + /// * [bool] booleanGroup: + /// Boolean in group parameters + /// + /// * [int] int64Group: + /// Integer in group parameters + Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int? stringGroup, bool? booleanGroup, int? int64Group, }) async { + final response = await testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// test inline additionalProperties + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Map] requestBody (required): + /// request body + Future testInlineAdditionalPropertiesWithHttpInfo(Map requestBody,) async { + // ignore: prefer_const_declarations + final path = r'/fake/inline-additionalProperties'; + + // ignore: prefer_final_locals + Object? postBody = requestBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test inline additionalProperties + /// + /// + /// + /// Parameters: + /// + /// * [Map] requestBody (required): + /// request body + Future testInlineAdditionalProperties(Map requestBody,) async { + final response = await testInlineAdditionalPropertiesWithHttpInfo(requestBody,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// test inline free-form additionalProperties + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): + /// request body + Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { + // ignore: prefer_const_declarations + final path = r'/fake/inline-freeform-additionalProperties'; + + // ignore: prefer_final_locals + Object? postBody = testinlinefreeformadditionalpropertiesrequest; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test inline free-form additionalProperties + /// + /// + /// + /// Parameters: + /// + /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): + /// request body + Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { + final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testinlinefreeformadditionalpropertiesrequest,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// test json serialization of form data + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] param (required): + /// field1 + /// + /// * [String] param2 (required): + /// field2 + Future testJsonFormDataWithHttpInfo(String param, String param2,) async { + // ignore: prefer_const_declarations + final path = r'/fake/jsonFormData'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/x-www-form-urlencoded']; + + if (param != null) { + formParams[r'param'] = parameterToString(param); + } + if (param2 != null) { + formParams[r'param2'] = parameterToString(param2); + } + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test json serialization of form data + /// + /// + /// + /// Parameters: + /// + /// * [String] param (required): + /// field1 + /// + /// * [String] param2 (required): + /// field2 + Future testJsonFormData(String param, String param2,) async { + final response = await testJsonFormDataWithHttpInfo(param, param2,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// test nullable parent property + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [ChildWithNullable] childwithnullable (required): + /// request body + Future testNullableWithHttpInfo(ChildWithNullable childwithnullable,) async { + // ignore: prefer_const_declarations + final path = r'/fake/nullable'; + + // ignore: prefer_final_locals + Object? postBody = childwithnullable; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test nullable parent property + /// + /// + /// + /// Parameters: + /// + /// * [ChildWithNullable] childwithnullable (required): + /// request body + Future testNullable(ChildWithNullable childwithnullable,) async { + final response = await testNullableWithHttpInfo(childwithnullable,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// To test the collection format in query parameters + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [List] pipe (required): + /// + /// * [List] ioutil (required): + /// + /// * [List] http (required): + /// + /// * [List] url (required): + /// + /// * [List] context (required): + /// + /// * [String] allowempty (required): + /// + /// * [Map] language: + Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/test-query-parameters'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('pipes', 'pipe', pipe)); + queryParams.addAll(_queryParams('csv', 'ioutil', ioutil)); + queryParams.addAll(_queryParams('ssv', 'http', http)); + queryParams.addAll(_queryParams('csv', 'url', url)); + queryParams.addAll(_queryParams('multi', 'context', context)); + if (language != null) { + queryParams.addAll(_queryParams('', 'language', language)); + } + queryParams.addAll(_queryParams('', 'allowEmpty', allowempty)); + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// To test the collection format in query parameters + /// + /// Parameters: + /// + /// * [List] pipe (required): + /// + /// * [List] ioutil (required): + /// + /// * [List] http (required): + /// + /// * [List] url (required): + /// + /// * [List] context (required): + /// + /// * [String] allowempty (required): + /// + /// * [Map] language: + Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { + final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowempty, language: language, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// test referenced string map + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Map] requestBody (required): + /// request body + Future testStringMapReferenceWithHttpInfo(Map requestBody,) async { + // ignore: prefer_const_declarations + final path = r'/fake/stringMap-reference'; + + // ignore: prefer_final_locals + Object? postBody = requestBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// test referenced string map + /// + /// + /// + /// Parameters: + /// + /// * [Map] requestBody (required): + /// request body + Future testStringMapReference(Map requestBody,) async { + final response = await testStringMapReferenceWithHttpInfo(requestBody,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart new file mode 100644 index 000000000000..8f45d844fd69 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart @@ -0,0 +1,76 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class FakeClassnameTags123Api { + FakeClassnameTags123Api([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// To test class name in snake case + /// + /// To test class name in snake case + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [ModelClient] modelclient (required): + /// client model + Future testClassnameWithHttpInfo(ModelClient modelclient,) async { + // ignore: prefer_const_declarations + final path = r'/fake_classname_test'; + + // ignore: prefer_final_locals + Object? postBody = modelclient; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PATCH', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// To test class name in snake case + /// + /// To test class name in snake case + /// + /// Parameters: + /// + /// * [ModelClient] modelclient (required): + /// client model + Future testClassname(ModelClient modelclient,) async { + final response = await testClassnameWithHttpInfo(modelclient,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ModelClient',) as ModelClient; + + } + return null; + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart new file mode 100644 index 000000000000..ea3c0054bd65 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart @@ -0,0 +1,601 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class PetApi { + PetApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Add a new pet to the store + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Pet] pet (required): + /// Pet object that needs to be added to the store + Future addPetWithHttpInfo(Pet pet,) async { + // ignore: prefer_const_declarations + final path = r'/pet'; + + // ignore: prefer_final_locals + Object? postBody = pet; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json', 'application/xml']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Add a new pet to the store + /// + /// + /// + /// Parameters: + /// + /// * [Pet] pet (required): + /// Pet object that needs to be added to the store + Future addPet(Pet pet,) async { + final response = await addPetWithHttpInfo(pet,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Deletes a pet + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] petid (required): + /// Pet id to delete + /// + /// * [String] apiKey: + Future deletePetWithHttpInfo(int petid, { String? apiKey, }) async { + // ignore: prefer_const_declarations + final path = r'/pet/{petId}' + .replaceAll('{petId}', petid.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + if (apiKey != null) { + headerParams[r'api_key'] = parameterToString(apiKey); + } + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Deletes a pet + /// + /// + /// + /// Parameters: + /// + /// * [int] petid (required): + /// Pet id to delete + /// + /// * [String] apiKey: + Future deletePet(int petid, { String? apiKey, }) async { + final response = await deletePetWithHttpInfo(petid, apiKey: apiKey, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [List] status (required): + /// Status values that need to be considered for filter + Future findPetsByStatusWithHttpInfo(List status,) async { + // ignore: prefer_const_declarations + final path = r'/pet/findByStatus'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('csv', 'status', status)); + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Finds Pets by status + /// + /// Multiple status values can be provided with comma separated strings + /// + /// Parameters: + /// + /// * [List] status (required): + /// Status values that need to be considered for filter + Future?> findPetsByStatus(List status,) async { + final response = await findPetsByStatusWithHttpInfo(status,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'List') as List) + .cast() + .toList(growable: false); + + } + return null; + } + + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Set] tags (required): + /// Tags to filter by + Future findPetsByTagsWithHttpInfo(Set tags,) async { + // ignore: prefer_const_declarations + final path = r'/pet/findByTags'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('csv', 'tags', tags)); + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Finds Pets by tags + /// + /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + /// + /// Parameters: + /// + /// * [Set] tags (required): + /// Tags to filter by + Future?> findPetsByTags(Set tags,) async { + final response = await findPetsByTagsWithHttpInfo(tags,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + final responseBody = await _decodeBodyBytes(response); + return (await apiClient.deserializeAsync(responseBody, 'Set') as List) + .cast() + .toSet(); + + } + return null; + } + + /// Find pet by ID + /// + /// Returns a single pet + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet to return + Future getPetByIdWithHttpInfo(int petid,) async { + // ignore: prefer_const_declarations + final path = r'/pet/{petId}' + .replaceAll('{petId}', petid.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Find pet by ID + /// + /// Returns a single pet + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet to return + Future getPetById(int petid,) async { + final response = await getPetByIdWithHttpInfo(petid,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Pet',) as Pet; + + } + return null; + } + + /// Update an existing pet + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Pet] pet (required): + /// Pet object that needs to be added to the store + Future updatePetWithHttpInfo(Pet pet,) async { + // ignore: prefer_const_declarations + final path = r'/pet'; + + // ignore: prefer_final_locals + Object? postBody = pet; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json', 'application/xml']; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Update an existing pet + /// + /// + /// + /// Parameters: + /// + /// * [Pet] pet (required): + /// Pet object that needs to be added to the store + Future updatePet(Pet pet,) async { + final response = await updatePetWithHttpInfo(pet,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Updates a pet in the store with form data + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet that needs to be updated + /// + /// * [String] name: + /// Updated name of the pet + /// + /// * [String] status: + /// Updated status of the pet + Future updatePetWithFormWithHttpInfo(int petid, { String? name, String? status, }) async { + // ignore: prefer_const_declarations + final path = r'/pet/{petId}' + .replaceAll('{petId}', petid.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/x-www-form-urlencoded']; + + if (name != null) { + formParams[r'name'] = parameterToString(name); + } + if (status != null) { + formParams[r'status'] = parameterToString(status); + } + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Updates a pet in the store with form data + /// + /// + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet that needs to be updated + /// + /// * [String] name: + /// Updated name of the pet + /// + /// * [String] status: + /// Updated status of the pet + Future updatePetWithForm(int petid, { String? name, String? status, }) async { + final response = await updatePetWithFormWithHttpInfo(petid, name: name, status: status, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// uploads an image + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet to update + /// + /// * [String] additionalmetadata: + /// Additional data to pass to server + /// + /// * [MultipartFile] file: + /// file to upload + Future uploadFileWithHttpInfo(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + // ignore: prefer_const_declarations + final path = r'/pet/{petId}/uploadImage' + .replaceAll('{petId}', petid.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['multipart/form-data']; + + bool hasFields = false; + final mp = MultipartRequest('POST', Uri.parse(path)); + if (additionalmetadata != null) { + hasFields = true; + mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + } + if (file != null) { + hasFields = true; + mp.fields[r'file'] = file.field; + mp.files.add(file); + } + if (hasFields) { + postBody = mp; + } + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// uploads an image + /// + /// + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet to update + /// + /// * [String] additionalmetadata: + /// Additional data to pass to server + /// + /// * [MultipartFile] file: + /// file to upload + Future uploadFile(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + final response = await uploadFileWithHttpInfo(petid, additionalmetadata: additionalmetadata, file: file, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiResponse',) as ApiResponse; + + } + return null; + } + + /// uploads an image (required) + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet to update + /// + /// * [MultipartFile] requiredfile (required): + /// file to upload + /// + /// * [String] additionalmetadata: + /// Additional data to pass to server + Future uploadFileWithRequiredFileWithHttpInfo(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { + // ignore: prefer_const_declarations + final path = r'/fake/{petId}/uploadImageWithRequiredFile' + .replaceAll('{petId}', petid.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['multipart/form-data']; + + bool hasFields = false; + final mp = MultipartRequest('POST', Uri.parse(path)); + if (additionalmetadata != null) { + hasFields = true; + mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + } + if (requiredfile != null) { + hasFields = true; + mp.fields[r'requiredFile'] = requiredfile.field; + mp.files.add(requiredfile); + } + if (hasFields) { + postBody = mp; + } + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// uploads an image (required) + /// + /// + /// + /// Parameters: + /// + /// * [int] petid (required): + /// ID of pet to update + /// + /// * [MultipartFile] requiredfile (required): + /// file to upload + /// + /// * [String] additionalmetadata: + /// Additional data to pass to server + Future uploadFileWithRequiredFile(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { + final response = await uploadFileWithRequiredFileWithHttpInfo(petid, requiredfile, additionalmetadata: additionalmetadata, ); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiResponse',) as ApiResponse; + + } + return null; + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/store_api.dart new file mode 100644 index 000000000000..7236e3de94fe --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/store_api.dart @@ -0,0 +1,234 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class StoreApi { + StoreApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] orderId (required): + /// ID of the order that needs to be deleted + Future deleteOrderWithHttpInfo(String orderId,) async { + // ignore: prefer_const_declarations + final path = r'/store/order/{order_id}' + .replaceAll('{order_id}', orderId); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete purchase order by ID + /// + /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + /// + /// Parameters: + /// + /// * [String] orderId (required): + /// ID of the order that needs to be deleted + Future deleteOrder(String orderId,) async { + final response = await deleteOrderWithHttpInfo(orderId,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + /// + /// Note: This method returns the HTTP [Response]. + Future getInventoryWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/store/inventory'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Returns pet inventories by status + /// + /// Returns a map of status codes to quantities + Future?> getInventory() async { + final response = await getInventoryWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return Map.from(await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Map'),); + + } + return null; + } + + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [int] orderId (required): + /// ID of pet that needs to be fetched + Future getOrderByIdWithHttpInfo(int orderId,) async { + // ignore: prefer_const_declarations + final path = r'/store/order/{order_id}' + .replaceAll('{order_id}', orderId.toString()); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Find purchase order by ID + /// + /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + /// + /// Parameters: + /// + /// * [int] orderId (required): + /// ID of pet that needs to be fetched + Future getOrderById(int orderId,) async { + final response = await getOrderByIdWithHttpInfo(orderId,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Order',) as Order; + + } + return null; + } + + /// Place an order for a pet + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [Order] order (required): + /// order placed for purchasing the pet + Future placeOrderWithHttpInfo(Order order,) async { + // ignore: prefer_const_declarations + final path = r'/store/order'; + + // ignore: prefer_final_locals + Object? postBody = order; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Place an order for a pet + /// + /// + /// + /// Parameters: + /// + /// * [Order] order (required): + /// order placed for purchasing the pet + Future placeOrder(Order order,) async { + final response = await placeOrderWithHttpInfo(order,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Order',) as Order; + + } + return null; + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/user_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/user_api.dart new file mode 100644 index 000000000000..4c59eb21f63e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/user_api.dart @@ -0,0 +1,442 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class UserApi { + UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; + + final ApiClient apiClient; + + /// Create user + /// + /// This can only be done by the logged in user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [User] user (required): + /// Created user object + Future createUserWithHttpInfo(User user,) async { + // ignore: prefer_const_declarations + final path = r'/user'; + + // ignore: prefer_final_locals + Object? postBody = user; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Create user + /// + /// This can only be done by the logged in user. + /// + /// Parameters: + /// + /// * [User] user (required): + /// Created user object + Future createUser(User user,) async { + final response = await createUserWithHttpInfo(user,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Creates list of users with given input array + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [List] user (required): + /// List of user object + Future createUsersWithArrayInputWithHttpInfo(List user,) async { + // ignore: prefer_const_declarations + final path = r'/user/createWithArray'; + + // ignore: prefer_final_locals + Object? postBody = user; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates list of users with given input array + /// + /// + /// + /// Parameters: + /// + /// * [List] user (required): + /// List of user object + Future createUsersWithArrayInput(List user,) async { + final response = await createUsersWithArrayInputWithHttpInfo(user,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Creates list of users with given input array + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [List] user (required): + /// List of user object + Future createUsersWithListInputWithHttpInfo(List user,) async { + // ignore: prefer_const_declarations + final path = r'/user/createWithList'; + + // ignore: prefer_final_locals + Object? postBody = user; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'POST', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Creates list of users with given input array + /// + /// + /// + /// Parameters: + /// + /// * [List] user (required): + /// List of user object + Future createUsersWithListInput(List user,) async { + final response = await createUsersWithListInputWithHttpInfo(user,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Delete user + /// + /// This can only be done by the logged in user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] username (required): + /// The name that needs to be deleted + Future deleteUserWithHttpInfo(String username,) async { + // ignore: prefer_const_declarations + final path = r'/user/{username}' + .replaceAll('{username}', username); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'DELETE', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Delete user + /// + /// This can only be done by the logged in user. + /// + /// Parameters: + /// + /// * [String] username (required): + /// The name that needs to be deleted + Future deleteUser(String username,) async { + final response = await deleteUserWithHttpInfo(username,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Get user by user name + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] username (required): + /// The name that needs to be fetched. Use user1 for testing. + Future getUserByNameWithHttpInfo(String username,) async { + // ignore: prefer_const_declarations + final path = r'/user/{username}' + .replaceAll('{username}', username); + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Get user by user name + /// + /// + /// + /// Parameters: + /// + /// * [String] username (required): + /// The name that needs to be fetched. Use user1 for testing. + Future getUserByName(String username,) async { + final response = await getUserByNameWithHttpInfo(username,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'User',) as User; + + } + return null; + } + + /// Logs user into the system + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] username (required): + /// The user name for login + /// + /// * [String] password (required): + /// The password for login in clear text + Future loginUserWithHttpInfo(String username, String password,) async { + // ignore: prefer_const_declarations + final path = r'/user/login'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + queryParams.addAll(_queryParams('', 'username', username)); + queryParams.addAll(_queryParams('', 'password', password)); + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Logs user into the system + /// + /// + /// + /// Parameters: + /// + /// * [String] username (required): + /// The user name for login + /// + /// * [String] password (required): + /// The password for login in clear text + Future loginUser(String username, String password,) async { + final response = await loginUserWithHttpInfo(username, password,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + // When a remote server returns no body with a status of 204, we shall not decode it. + // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" + // FormatException when trying to decode an empty string. + if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { + return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; + + } + return null; + } + + /// Logs out current logged in user session + /// + /// + /// + /// Note: This method returns the HTTP [Response]. + Future logoutUserWithHttpInfo() async { + // ignore: prefer_const_declarations + final path = r'/user/logout'; + + // ignore: prefer_final_locals + Object? postBody; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = []; + + + return apiClient.invokeAPI( + path, + 'GET', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Logs out current logged in user session + /// + /// + Future logoutUser() async { + final response = await logoutUserWithHttpInfo(); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } + + /// Updated user + /// + /// This can only be done by the logged in user. + /// + /// Note: This method returns the HTTP [Response]. + /// + /// Parameters: + /// + /// * [String] username (required): + /// name that need to be deleted + /// + /// * [User] user (required): + /// Updated user object + Future updateUserWithHttpInfo(String username, User user,) async { + // ignore: prefer_const_declarations + final path = r'/user/{username}' + .replaceAll('{username}', username); + + // ignore: prefer_final_locals + Object? postBody = user; + + final queryParams = []; + final headerParams = {}; + final formParams = {}; + + const contentTypes = ['application/json']; + + + return apiClient.invokeAPI( + path, + 'PUT', + queryParams, + postBody, + headerParams, + formParams, + contentTypes.isEmpty ? null : contentTypes.first, + ); + } + + /// Updated user + /// + /// This can only be done by the logged in user. + /// + /// Parameters: + /// + /// * [String] username (required): + /// name that need to be deleted + /// + /// * [User] user (required): + /// Updated user object + Future updateUser(String username, User user,) async { + final response = await updateUserWithHttpInfo(username, user,); + if (response.statusCode >= HttpStatus.badRequest) { + throw ApiException(response.statusCode, await _decodeBodyBytes(response)); + } + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_client.dart new file mode 100644 index 000000000000..b23eea980a86 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_client.dart @@ -0,0 +1,356 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiClient { + ApiClient({this.basePath = 'http://petstore.swagger.io:80/v2', this.authentication,}); + + final String basePath; + final Authentication? authentication; + + var _client = Client(); + final _defaultHeaderMap = {}; + + /// Returns the current HTTP [Client] instance to use in this class. + /// + /// The return value is guaranteed to never be null. + Client get client => _client; + + /// Requests to use a new HTTP [Client] in this class. + set client(Client newClient) { + _client = newClient; + } + + Map get defaultHeaderMap => _defaultHeaderMap; + + void addDefaultHeader(String key, String value) { + _defaultHeaderMap[key] = value; + } + + // We don't use a Map for queryParams. + // If collectionFormat is 'multi', a key might appear multiple times. + Future invokeAPI( + String path, + String method, + List queryParams, + Object? body, + Map headerParams, + Map formParams, + String? contentType, + ) async { + await authentication?.applyToParams(queryParams, headerParams); + + headerParams.addAll(_defaultHeaderMap); + if (contentType != null) { + headerParams['Content-Type'] = contentType; + } + + final urlEncodedQueryParams = queryParams.map((param) => '$param'); + final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; + final uri = Uri.parse('$basePath$path$queryString'); + + try { + // Special case for uploading a single file which isn't a 'multipart/form-data'. + if ( + body is MultipartFile && (contentType == null || + !contentType.toLowerCase().startsWith('multipart/form-data')) + ) { + final request = StreamedRequest(method, uri); + request.headers.addAll(headerParams); + request.contentLength = body.length; + body.finalize().listen( + request.sink.add, + onDone: request.sink.close, + // ignore: avoid_types_on_closure_parameters + onError: (Object error, StackTrace trace) => request.sink.close(), + cancelOnError: true, + ); + final response = await _client.send(request); + return Response.fromStream(response); + } + + if (body is MultipartRequest) { + final request = MultipartRequest(method, uri); + request.fields.addAll(body.fields); + request.files.addAll(body.files); + request.headers.addAll(body.headers); + request.headers.addAll(headerParams); + final response = await _client.send(request); + return Response.fromStream(response); + } + + final msgBody = contentType == 'application/x-www-form-urlencoded' + ? formParams + : await serializeAsync(body); + final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; + + switch(method) { + case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,); + case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,); + case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,); + case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,); + case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,); + case 'GET': return await _client.get(uri, headers: nullableHeaderParams,); + } + } on SocketException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Socket operation failed: $method $path', + error, + trace, + ); + } on TlsException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'TLS/SSL communication failed: $method $path', + error, + trace, + ); + } on IOException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'I/O operation failed: $method $path', + error, + trace, + ); + } on ClientException catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'HTTP connection failed: $method $path', + error, + trace, + ); + } on Exception catch (error, trace) { + throw ApiException.withInner( + HttpStatus.badRequest, + 'Exception occurred: $method $path', + error, + trace, + ); + } + + throw ApiException( + HttpStatus.badRequest, + 'Invalid HTTP operation: $method $path', + ); + } + + Future deserializeAsync(String value, String targetType, {bool growable = false,}) async => + // ignore: deprecated_member_use_from_same_package + deserialize(value, targetType, growable: growable); + + @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') + dynamic deserialize(String value, String targetType, {bool growable = false,}) { + // Remove all spaces. Necessary for regular expressions as well. + targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments + + // If the expected target type is String, nothing to do... + return targetType == 'String' + ? value + : fromJson(json.decode(value), targetType, growable: growable); + } + + // ignore: deprecated_member_use_from_same_package + Future serializeAsync(Object? value) async => serialize(value); + + @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') + String serialize(Object? value) => value == null ? '' : json.encode(value); + + /// Returns a native instance of an OpenAPI class matching the [specified type][targetType]. + static dynamic fromJson(dynamic value, String targetType, {bool growable = false,}) { + try { + switch (targetType) { + case 'String': + return value is String ? value : value.toString(); + case 'int': + return value is int ? value : int.parse('$value'); + case 'double': + return value is double ? value : double.parse('$value'); + case 'bool': + if (value is bool) { + return value; + } + final valueString = '$value'.toLowerCase(); + return valueString == 'true' || valueString == '1'; + case 'DateTime': + return value is DateTime ? value : DateTime.tryParse(value); + case 'AdditionalPropertiesClass': + return AdditionalPropertiesClass.fromJson(value); + case 'AllOfWithSingleRef': + return AllOfWithSingleRef.fromJson(value); + case 'Animal': + return Animal.fromJson(value); + case 'ApiResponse': + return ApiResponse.fromJson(value); + case 'ArrayOfArrayOfNumberOnly': + return ArrayOfArrayOfNumberOnly.fromJson(value); + case 'ArrayOfNumberOnly': + return ArrayOfNumberOnly.fromJson(value); + case 'ArrayTest': + return ArrayTest.fromJson(value); + case 'Capitalization': + return Capitalization.fromJson(value); + case 'Cat': + return Cat.fromJson(value); + case 'Category': + return Category.fromJson(value); + case 'ChildWithNullable': + return ChildWithNullable.fromJson(value); + case 'ClassModel': + return ClassModel.fromJson(value); + case 'DeprecatedObject': + return DeprecatedObject.fromJson(value); + case 'Dog': + return Dog.fromJson(value); + case 'EnumArrays': + return EnumArrays.fromJson(value); + case 'EnumClass': + return EnumClassTypeTransformer().decode(value); + case 'EnumTest': + return EnumTest.fromJson(value); + case 'FakeBigDecimalMap200Response': + return FakeBigDecimalMap200Response.fromJson(value); + case 'FileSchemaTestClass': + return FileSchemaTestClass.fromJson(value); + case 'Foo': + return Foo.fromJson(value); + case 'FooGetDefaultResponse': + return FooGetDefaultResponse.fromJson(value); + case 'FormatTest': + return FormatTest.fromJson(value); + case 'HasOnlyReadOnly': + return HasOnlyReadOnly.fromJson(value); + case 'HealthCheckResult': + return HealthCheckResult.fromJson(value); + case 'MapTest': + return MapTest.fromJson(value); + case 'MixedPropertiesAndAdditionalPropertiesClass': + return MixedPropertiesAndAdditionalPropertiesClass.fromJson(value); + case 'Model200Response': + return Model200Response.fromJson(value); + case 'ModelClient': + return ModelClient.fromJson(value); + case 'ModelFile': + return ModelFile.fromJson(value); + case 'ModelList': + return ModelList.fromJson(value); + case 'ModelReturn': + return ModelReturn.fromJson(value); + case 'Name': + return Name.fromJson(value); + case 'NullableClass': + return NullableClass.fromJson(value); + case 'NumberOnly': + return NumberOnly.fromJson(value); + case 'ObjectWithDeprecatedFields': + return ObjectWithDeprecatedFields.fromJson(value); + case 'Order': + return Order.fromJson(value); + case 'OuterComposite': + return OuterComposite.fromJson(value); + case 'OuterEnum': + return OuterEnumTypeTransformer().decode(value); + case 'OuterEnumDefaultValue': + return OuterEnumDefaultValueTypeTransformer().decode(value); + case 'OuterEnumInteger': + return OuterEnumIntegerTypeTransformer().decode(value); + case 'OuterEnumIntegerDefaultValue': + return OuterEnumIntegerDefaultValueTypeTransformer().decode(value); + case 'OuterObjectWithEnumProperty': + return OuterObjectWithEnumProperty.fromJson(value); + case 'ParentWithNullable': + return ParentWithNullable.fromJson(value); + case 'Pet': + return Pet.fromJson(value); + case 'ReadOnlyFirst': + return ReadOnlyFirst.fromJson(value); + case 'SingleRefType': + return SingleRefTypeTypeTransformer().decode(value); + case 'SpecialModelName': + return SpecialModelName.fromJson(value); + case 'Tag': + return Tag.fromJson(value); + case 'TestInlineFreeformAdditionalPropertiesRequest': + return TestInlineFreeformAdditionalPropertiesRequest.fromJson(value); + case 'User': + return User.fromJson(value); + default: + dynamic match; + if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { + return value + .map((dynamic v) => fromJson(v, match, growable: growable,)) + .toList(growable: growable); + } + if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { + return value + .map((dynamic v) => fromJson(v, match, growable: growable,)) + .toSet(); + } + if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { + return Map.fromIterables( + value.keys.cast(), + value.values.map((dynamic v) => fromJson(v, match, growable: growable,)), + ); + } + } + } on Exception catch (error, trace) { + throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); + } + throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); + } +} + +/// Primarily intended for use in an isolate. +class DeserializationMessage { + const DeserializationMessage({ + required this.json, + required this.targetType, + this.growable = false, + }); + + /// The JSON value to deserialize. + final String json; + + /// Target type to deserialize to. + final String targetType; + + /// Whether to make deserialized lists or maps growable. + final bool growable; +} + +/// Primarily intended for use in an isolate. +Future decodeAsync(DeserializationMessage message) async { + // Remove all spaces. Necessary for regular expressions as well. + final targetType = message.targetType.replaceAll(' ', ''); + + // If the expected target type is String, nothing to do... + return targetType == 'String' + ? message.json + : json.decode(message.json); +} + +/// Primarily intended for use in an isolate. +Future deserializeAsync(DeserializationMessage message) async { + // Remove all spaces. Necessary for regular expressions as well. + final targetType = message.targetType.replaceAll(' ', ''); + + // If the expected target type is String, nothing to do... + return targetType == 'String' + ? message.json + : ApiClient.fromJson( + json.decode(message.json), + targetType, + growable: message.growable, + ); +} + +/// Primarily intended for use in an isolate. +Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_exception.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_exception.dart new file mode 100644 index 000000000000..53077d686df6 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_exception.dart @@ -0,0 +1,33 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiException implements Exception { + ApiException(this.code, this.message); + + ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); + + int code = 0; + String? message; + Exception? innerException; + StackTrace? stackTrace; + + @override + String toString() { + if (message == null) { + return 'ApiException'; + } + if (innerException == null) { + return 'ApiException $code: $message'; + } + return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace'; + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_helper.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_helper.dart new file mode 100644 index 000000000000..a07a5497a661 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api_helper.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class QueryParam { + const QueryParam(this.name, this.value); + + final String name; + final String value; + + @override + String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; +} + +// Ported from the Java version. +Iterable _queryParams(String collectionFormat, String name, dynamic value,) { + // Assertions to run in debug mode only. + assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); + + final params = []; + + if (value is List) { + if (collectionFormat == 'multi') { + return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); + } + + // Default collection format is 'csv'. + if (collectionFormat.isEmpty) { + collectionFormat = 'csv'; // ignore: parameter_assignments + } + + final delimiter = _delimiters[collectionFormat] ?? ','; + + params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); + } else if (value != null) { + params.add(QueryParam(name, parameterToString(value))); + } + + return params; +} + +/// Format the given parameter object into a [String]. +String parameterToString(dynamic value) { + if (value == null) { + return ''; + } + if (value is DateTime) { + return value.toUtc().toIso8601String(); + } + if (value is EnumClass) { + return EnumClassTypeTransformer().encode(value).toString(); + } + if (value is OuterEnum) { + return OuterEnumTypeTransformer().encode(value).toString(); + } + if (value is OuterEnumDefaultValue) { + return OuterEnumDefaultValueTypeTransformer().encode(value).toString(); + } + if (value is OuterEnumInteger) { + return OuterEnumIntegerTypeTransformer().encode(value).toString(); + } + if (value is OuterEnumIntegerDefaultValue) { + return OuterEnumIntegerDefaultValueTypeTransformer().encode(value).toString(); + } + if (value is SingleRefType) { + return SingleRefTypeTypeTransformer().encode(value).toString(); + } + return value.toString(); +} + +/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' +/// content type. Otherwise, returns the decoded body as decoded by dart:http package. +Future _decodeBodyBytes(Response response) async { + final contentType = response.headers['content-type']; + return contentType != null && contentType.toLowerCase().startsWith('application/json') + ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) + : response.body; +} + +/// Returns a valid [T] value found at the specified Map [key], null otherwise. +T? mapValueOfType(dynamic map, String key) { + final dynamic value = map is Map ? map[key] : null; + if (T == double && value is int) { + return value.toDouble() as T; + } + return value is T ? value : null; +} + +/// Returns a valid Map found at the specified Map [key], null otherwise. +Map? mapCastOfType(dynamic map, String key) { + final dynamic value = map is Map ? map[key] : null; + return value is Map ? value.cast() : null; +} + +/// Returns a valid [DateTime] found at the specified Map [key], null otherwise. +DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { + final dynamic value = map is Map ? map[key] : null; + if (value != null) { + int? millis; + if (value is int) { + millis = value; + } else if (value is String) { + if (_isEpochMarker(pattern)) { + millis = int.tryParse(value); + } else { + return DateTime.tryParse(value); + } + } + if (millis != null) { + return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true); + } + } + return null; +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/api_key_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/api_key_auth.dart new file mode 100644 index 000000000000..6c5621798f9e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/api_key_auth.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiKeyAuth implements Authentication { + ApiKeyAuth(this.location, this.paramName); + + final String location; + final String paramName; + + String apiKeyPrefix = ''; + String apiKey = ''; + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; + + if (paramValue.isNotEmpty) { + if (location == 'query') { + queryParams.add(QueryParam(paramName, paramValue)); + } else if (location == 'header') { + headerParams[paramName] = paramValue; + } else if (location == 'cookie') { + headerParams.update( + 'Cookie', + (existingCookie) => '$existingCookie; $paramName=$paramValue', + ifAbsent: () => '$paramName=$paramValue', + ); + } + } + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/authentication.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/authentication.dart new file mode 100644 index 000000000000..5377fb6f34c1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/authentication.dart @@ -0,0 +1,17 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +// ignore: one_member_abstracts +abstract class Authentication { + /// Apply authentication settings to header and query params. + Future applyToParams(List queryParams, Map headerParams); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_basic_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_basic_auth.dart new file mode 100644 index 000000000000..5e8b1c4147eb --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_basic_auth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HttpBasicAuth implements Authentication { + HttpBasicAuth({this.username = '', this.password = ''}); + + String username; + String password; + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + if (username.isNotEmpty && password.isNotEmpty) { + final credentials = '$username:$password'; + headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; + } + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_bearer_auth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_bearer_auth.dart new file mode 100644 index 000000000000..847dc056e100 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/http_bearer_auth.dart @@ -0,0 +1,49 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +typedef HttpBearerAuthProvider = String Function(); + +class HttpBearerAuth implements Authentication { + HttpBearerAuth(); + + dynamic _accessToken; + + dynamic get accessToken => _accessToken; + + set accessToken(dynamic accessToken) { + if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { + throw ArgumentError('accessToken value must be either a String or a String Function().'); + } + _accessToken = accessToken; + } + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + if (_accessToken == null) { + return; + } + + String accessToken; + + if (_accessToken is String) { + accessToken = _accessToken; + } else if (_accessToken is HttpBearerAuthProvider) { + accessToken = _accessToken!(); + } else { + return; + } + + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; + } + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/oauth.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/oauth.dart new file mode 100644 index 000000000000..73fd8202dcb0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/auth/oauth.dart @@ -0,0 +1,24 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OAuth implements Authentication { + OAuth({this.accessToken = ''}); + + String accessToken; + + @override + Future applyToParams(List queryParams, Map headerParams,) async { + if (accessToken.isNotEmpty) { + headerParams['Authorization'] = 'Bearer $accessToken'; + } + } +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/additional_properties_class.dart new file mode 100644 index 000000000000..1986d67dc9d9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/additional_properties_class.dart @@ -0,0 +1,115 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AdditionalPropertiesClass { + /// Returns a new [AdditionalPropertiesClass] instance. + AdditionalPropertiesClass({ + this.mapProperty = const {}, + this.mapOfMapProperty = const {}, + }); + + Map mapProperty; + + Map> mapOfMapProperty; + + @override + bool operator ==(Object other) => identical(this, other) || other is AdditionalPropertiesClass && + _deepEquality.equals(other.mapProperty, mapProperty) && + _deepEquality.equals(other.mapOfMapProperty, mapOfMapProperty); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (mapProperty.hashCode) + + (mapOfMapProperty.hashCode); + + @override + String toString() => 'AdditionalPropertiesClass[mapProperty=$mapProperty, mapOfMapProperty=$mapOfMapProperty]'; + + Map toJson() { + final json = {}; + json[r'map_property'] = this.mapProperty; + json[r'map_of_map_property'] = this.mapOfMapProperty; + return json; + } + + /// Returns a new [AdditionalPropertiesClass] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AdditionalPropertiesClass? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AdditionalPropertiesClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AdditionalPropertiesClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AdditionalPropertiesClass( + mapProperty: mapCastOfType(json, r'map_property') ?? const {}, + mapOfMapProperty: mapCastOfType(json, r'map_of_map_property') ?? const {}, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AdditionalPropertiesClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AdditionalPropertiesClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AdditionalPropertiesClass-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AdditionalPropertiesClass.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart new file mode 100644 index 000000000000..24890cf3f2ed --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class AllOfWithSingleRef { + /// Returns a new [AllOfWithSingleRef] instance. + AllOfWithSingleRef({ + this.username, + this.singlereftype, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? username; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + SingleRefType? singlereftype; + + @override + bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && + other.username == username && + other.singlereftype == singlereftype; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (username == null ? 0 : username!.hashCode) + + (singlereftype == null ? 0 : singlereftype!.hashCode); + + @override + String toString() => 'AllOfWithSingleRef[username=$username, singlereftype=$singlereftype]'; + + Map toJson() { + final json = {}; + if (this.username != null) { + json[r'username'] = this.username; + } else { + json[r'username'] = null; + } + if (this.singlereftype != null) { + json[r'SingleRefType'] = this.singlereftype; + } else { + json[r'SingleRefType'] = null; + } + return json; + } + + /// Returns a new [AllOfWithSingleRef] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static AllOfWithSingleRef? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "AllOfWithSingleRef[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "AllOfWithSingleRef[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return AllOfWithSingleRef( + username: mapValueOfType(json, r'username'), + singlereftype: SingleRefType.fromJson(json[r'SingleRefType']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = AllOfWithSingleRef.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = AllOfWithSingleRef.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of AllOfWithSingleRef-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = AllOfWithSingleRef.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart new file mode 100644 index 000000000000..6259e6082643 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart @@ -0,0 +1,116 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Animal { + /// Returns a new [Animal] instance. + Animal({ + required this.classname, + this.color = 'red', + }); + + String classname; + + String color; + + @override + bool operator ==(Object other) => identical(this, other) || other is Animal && + other.classname == classname && + other.color == color; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (classname.hashCode) + + (color.hashCode); + + @override + String toString() => 'Animal[classname=$classname, color=$color]'; + + Map toJson() { + final json = {}; + json[r'className'] = this.classname; + json[r'color'] = this.color; + return json; + } + + /// Returns a new [Animal] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Animal? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Animal[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Animal[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Animal( + classname: mapValueOfType(json, r'className')!, + color: mapValueOfType(json, r'color') ?? 'red', + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Animal.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Animal.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Animal-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Animal.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'className', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/api_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/api_response.dart new file mode 100644 index 000000000000..5f9ddf484d20 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/api_response.dart @@ -0,0 +1,152 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ApiResponse { + /// Returns a new [ApiResponse] instance. + ApiResponse({ + this.code, + this.type, + this.message, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? code; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? type; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? message; + + @override + bool operator ==(Object other) => identical(this, other) || other is ApiResponse && + other.code == code && + other.type == type && + other.message == message; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (code == null ? 0 : code!.hashCode) + + (type == null ? 0 : type!.hashCode) + + (message == null ? 0 : message!.hashCode); + + @override + String toString() => 'ApiResponse[code=$code, type=$type, message=$message]'; + + Map toJson() { + final json = {}; + if (this.code != null) { + json[r'code'] = this.code; + } else { + json[r'code'] = null; + } + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.message != null) { + json[r'message'] = this.message; + } else { + json[r'message'] = null; + } + return json; + } + + /// Returns a new [ApiResponse] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ApiResponse? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ApiResponse[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ApiResponse[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ApiResponse( + code: mapValueOfType(json, r'code'), + type: mapValueOfType(json, r'type'), + message: mapValueOfType(json, r'message'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ApiResponse.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ApiResponse.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ApiResponse-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ApiResponse.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart new file mode 100644 index 000000000000..0dc0ec4c734c --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart @@ -0,0 +1,112 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ArrayOfArrayOfNumberOnly { + /// Returns a new [ArrayOfArrayOfNumberOnly] instance. + ArrayOfArrayOfNumberOnly({ + this.arrayarraynumber = const [], + }); + + List> arrayarraynumber; + + @override + bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && + _deepEquality.equals(other.arrayarraynumber, arrayarraynumber); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (arrayarraynumber.hashCode); + + @override + String toString() => 'ArrayOfArrayOfNumberOnly[arrayarraynumber=$arrayarraynumber]'; + + Map toJson() { + final json = {}; + json[r'ArrayArrayNumber'] = this.arrayarraynumber; + return json; + } + + /// Returns a new [ArrayOfArrayOfNumberOnly] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ArrayOfArrayOfNumberOnly? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ArrayOfArrayOfNumberOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ArrayOfArrayOfNumberOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ArrayOfArrayOfNumberOnly( + arrayarraynumber: json[r'ArrayArrayNumber'] is List + ? (json[r'ArrayArrayNumber'] as List).map((e) => + e == null ? const [] : (e as List).cast() + ).toList() + : const [], + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArrayOfArrayOfNumberOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayOfArrayOfNumberOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ArrayOfArrayOfNumberOnly-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ArrayOfArrayOfNumberOnly.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart new file mode 100644 index 000000000000..6de38929b80b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ArrayOfNumberOnly { + /// Returns a new [ArrayOfNumberOnly] instance. + ArrayOfNumberOnly({ + this.arraynumber = const [], + }); + + List arraynumber; + + @override + bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && + _deepEquality.equals(other.arraynumber, arraynumber); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (arraynumber.hashCode); + + @override + String toString() => 'ArrayOfNumberOnly[arraynumber=$arraynumber]'; + + Map toJson() { + final json = {}; + json[r'ArrayNumber'] = this.arraynumber; + return json; + } + + /// Returns a new [ArrayOfNumberOnly] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ArrayOfNumberOnly? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ArrayOfNumberOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ArrayOfNumberOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ArrayOfNumberOnly( + arraynumber: json[r'ArrayNumber'] is Iterable + ? (json[r'ArrayNumber'] as Iterable).cast().toList(growable: false) + : const [], + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArrayOfNumberOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayOfNumberOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ArrayOfNumberOnly-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ArrayOfNumberOnly.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_test.dart new file mode 100644 index 000000000000..ae7b08dbd3b9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_test.dart @@ -0,0 +1,132 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ArrayTest { + /// Returns a new [ArrayTest] instance. + ArrayTest({ + this.arrayOfString = const [], + this.arrayArrayOfInteger = const [], + this.arrayArrayOfModel = const [], + }); + + List arrayOfString; + + List> arrayArrayOfInteger; + + List> arrayArrayOfModel; + + @override + bool operator ==(Object other) => identical(this, other) || other is ArrayTest && + _deepEquality.equals(other.arrayOfString, arrayOfString) && + _deepEquality.equals(other.arrayArrayOfInteger, arrayArrayOfInteger) && + _deepEquality.equals(other.arrayArrayOfModel, arrayArrayOfModel); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (arrayOfString.hashCode) + + (arrayArrayOfInteger.hashCode) + + (arrayArrayOfModel.hashCode); + + @override + String toString() => 'ArrayTest[arrayOfString=$arrayOfString, arrayArrayOfInteger=$arrayArrayOfInteger, arrayArrayOfModel=$arrayArrayOfModel]'; + + Map toJson() { + final json = {}; + json[r'array_of_string'] = this.arrayOfString; + json[r'array_array_of_integer'] = this.arrayArrayOfInteger; + json[r'array_array_of_model'] = this.arrayArrayOfModel; + return json; + } + + /// Returns a new [ArrayTest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ArrayTest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ArrayTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ArrayTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ArrayTest( + arrayOfString: json[r'array_of_string'] is Iterable + ? (json[r'array_of_string'] as Iterable).cast().toList(growable: false) + : const [], + arrayArrayOfInteger: json[r'array_array_of_integer'] is List + ? (json[r'array_array_of_integer'] as List).map((e) => + e == null ? const [] : (e as List).cast() + ).toList() + : const [], + arrayArrayOfModel: json[r'array_array_of_model'] is List + ? (json[r'array_array_of_model'] as List).map((e) => + ReadOnlyFirst.listFromJson(json[r'array_array_of_model']) + ).toList() + : const [], + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ArrayTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ArrayTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ArrayTest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ArrayTest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart new file mode 100644 index 000000000000..4d613ce167d3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart @@ -0,0 +1,204 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Capitalization { + /// Returns a new [Capitalization] instance. + Capitalization({ + this.smallcamel, + this.capitalcamel, + this.smallSnake, + this.capitalSnake, + this.scaEthFlowPoints, + this.attName, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? smallcamel; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? capitalcamel; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? smallSnake; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? capitalSnake; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? scaEthFlowPoints; + + /// Name of the pet + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? attName; + + @override + bool operator ==(Object other) => identical(this, other) || other is Capitalization && + other.smallcamel == smallcamel && + other.capitalcamel == capitalcamel && + other.smallSnake == smallSnake && + other.capitalSnake == capitalSnake && + other.scaEthFlowPoints == scaEthFlowPoints && + other.attName == attName; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (smallcamel == null ? 0 : smallcamel!.hashCode) + + (capitalcamel == null ? 0 : capitalcamel!.hashCode) + + (smallSnake == null ? 0 : smallSnake!.hashCode) + + (capitalSnake == null ? 0 : capitalSnake!.hashCode) + + (scaEthFlowPoints == null ? 0 : scaEthFlowPoints!.hashCode) + + (attName == null ? 0 : attName!.hashCode); + + @override + String toString() => 'Capitalization[smallcamel=$smallcamel, capitalcamel=$capitalcamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, scaEthFlowPoints=$scaEthFlowPoints, attName=$attName]'; + + Map toJson() { + final json = {}; + if (this.smallcamel != null) { + json[r'smallCamel'] = this.smallcamel; + } else { + json[r'smallCamel'] = null; + } + if (this.capitalcamel != null) { + json[r'CapitalCamel'] = this.capitalcamel; + } else { + json[r'CapitalCamel'] = null; + } + if (this.smallSnake != null) { + json[r'small_Snake'] = this.smallSnake; + } else { + json[r'small_Snake'] = null; + } + if (this.capitalSnake != null) { + json[r'Capital_Snake'] = this.capitalSnake; + } else { + json[r'Capital_Snake'] = null; + } + if (this.scaEthFlowPoints != null) { + json[r'SCA_ETH_Flow_Points'] = this.scaEthFlowPoints; + } else { + json[r'SCA_ETH_Flow_Points'] = null; + } + if (this.attName != null) { + json[r'ATT_NAME'] = this.attName; + } else { + json[r'ATT_NAME'] = null; + } + return json; + } + + /// Returns a new [Capitalization] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Capitalization? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Capitalization[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Capitalization[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Capitalization( + smallcamel: mapValueOfType(json, r'smallCamel'), + capitalcamel: mapValueOfType(json, r'CapitalCamel'), + smallSnake: mapValueOfType(json, r'small_Snake'), + capitalSnake: mapValueOfType(json, r'Capital_Snake'), + scaEthFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), + attName: mapValueOfType(json, r'ATT_NAME'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Capitalization.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Capitalization.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Capitalization-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Capitalization.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart new file mode 100644 index 000000000000..ed6fb49e1a98 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart @@ -0,0 +1,133 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Cat { + /// Returns a new [Cat] instance. + Cat({ + required this.classname, + this.color = 'red', + this.declawed, + }); + + String classname; + + String color; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? declawed; + + @override + bool operator ==(Object other) => identical(this, other) || other is Cat && + other.classname == classname && + other.color == color && + other.declawed == declawed; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (classname.hashCode) + + (color.hashCode) + + (declawed == null ? 0 : declawed!.hashCode); + + @override + String toString() => 'Cat[classname=$classname, color=$color, declawed=$declawed]'; + + Map toJson() { + final json = {}; + json[r'className'] = this.classname; + json[r'color'] = this.color; + if (this.declawed != null) { + json[r'declawed'] = this.declawed; + } else { + json[r'declawed'] = null; + } + return json; + } + + /// Returns a new [Cat] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Cat? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Cat[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Cat[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Cat( + classname: mapValueOfType(json, r'className')!, + color: mapValueOfType(json, r'color') ?? 'red', + declawed: mapValueOfType(json, r'declawed'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Cat.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Cat.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Cat-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Cat.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'className', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/category.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/category.dart new file mode 100644 index 000000000000..7a2841cd9dcd --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/category.dart @@ -0,0 +1,126 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Category { + /// Returns a new [Category] instance. + Category({ + this.id, + this.name = 'default-name', + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + String name; + + @override + bool operator ==(Object other) => identical(this, other) || other is Category && + other.id == id && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name.hashCode); + + @override + String toString() => 'Category[id=$id, name=$name]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + json[r'name'] = this.name; + return json; + } + + /// Returns a new [Category] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Category? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Category[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Category[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Category( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name')!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Category.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Category.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Category-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Category.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart new file mode 100644 index 000000000000..8d1041dac9d5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart @@ -0,0 +1,211 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ChildWithNullable { + /// Returns a new [ChildWithNullable] instance. + ChildWithNullable({ + this.type, + this.nullableproperty, + this.otherproperty, + }); + + ChildWithNullableTypeEnum? type; + + String? nullableproperty; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? otherproperty; + + @override + bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && + other.type == type && + other.nullableproperty == nullableproperty && + other.otherproperty == otherproperty; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (nullableproperty == null ? 0 : nullableproperty!.hashCode) + + (otherproperty == null ? 0 : otherproperty!.hashCode); + + @override + String toString() => 'ChildWithNullable[type=$type, nullableproperty=$nullableproperty, otherproperty=$otherproperty]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.nullableproperty != null) { + json[r'nullableProperty'] = this.nullableproperty; + } else { + json[r'nullableProperty'] = null; + } + if (this.otherproperty != null) { + json[r'otherProperty'] = this.otherproperty; + } else { + json[r'otherProperty'] = null; + } + return json; + } + + /// Returns a new [ChildWithNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ChildWithNullable? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ChildWithNullable[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ChildWithNullable[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ChildWithNullable( + type: ChildWithNullableTypeEnum.fromJson(json[r'type']), + nullableproperty: mapValueOfType(json, r'nullableProperty'), + otherproperty: mapValueOfType(json, r'otherProperty'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ChildWithNullable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ChildWithNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ChildWithNullable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ChildWithNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class ChildWithNullableTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ChildWithNullableTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const childwithnullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); + + /// List of all possible values in this [enum][ChildWithNullableTypeEnum]. + static const values = [ + childwithnullable, + ]; + + static ChildWithNullableTypeEnum? fromJson(dynamic value) => ChildWithNullableTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ChildWithNullableTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ChildWithNullableTypeEnum] to String, +/// and [decode] dynamic data back to [ChildWithNullableTypeEnum]. +class ChildWithNullableTypeEnumTypeTransformer { + factory ChildWithNullableTypeEnumTypeTransformer() => _instance ??= const ChildWithNullableTypeEnumTypeTransformer._(); + + const ChildWithNullableTypeEnumTypeTransformer._(); + + String encode(ChildWithNullableTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ChildWithNullableTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ChildWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'ChildWithNullable': return ChildWithNullableTypeEnum.childwithnullable; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ChildWithNullableTypeEnumTypeTransformer] instance. + static ChildWithNullableTypeEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/class_model.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/class_model.dart new file mode 100644 index 000000000000..abf08d64bdfd --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/class_model.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ClassModel { + /// Returns a new [ClassModel] instance. + ClassModel({ + this.class_, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? class_; + + @override + bool operator ==(Object other) => identical(this, other) || other is ClassModel && + other.class_ == class_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (class_ == null ? 0 : class_!.hashCode); + + @override + String toString() => 'ClassModel[class_=$class_]'; + + Map toJson() { + final json = {}; + if (this.class_ != null) { + json[r'_class'] = this.class_; + } else { + json[r'_class'] = null; + } + return json; + } + + /// Returns a new [ClassModel] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ClassModel? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ClassModel[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ClassModel[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ClassModel( + class_: mapValueOfType(json, r'_class'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ClassModel.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ClassModel.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ClassModel-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ClassModel.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/deprecated_object.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/deprecated_object.dart new file mode 100644 index 000000000000..9b5f9d3bb472 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/deprecated_object.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class DeprecatedObject { + /// Returns a new [DeprecatedObject] instance. + DeprecatedObject({ + this.name, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is DeprecatedObject && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'DeprecatedObject[name=$name]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [DeprecatedObject] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static DeprecatedObject? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "DeprecatedObject[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "DeprecatedObject[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return DeprecatedObject( + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = DeprecatedObject.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = DeprecatedObject.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of DeprecatedObject-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = DeprecatedObject.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart new file mode 100644 index 000000000000..227bd1b55772 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart @@ -0,0 +1,133 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Dog { + /// Returns a new [Dog] instance. + Dog({ + required this.classname, + this.color = 'red', + this.breed, + }); + + String classname; + + String color; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? breed; + + @override + bool operator ==(Object other) => identical(this, other) || other is Dog && + other.classname == classname && + other.color == color && + other.breed == breed; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (classname.hashCode) + + (color.hashCode) + + (breed == null ? 0 : breed!.hashCode); + + @override + String toString() => 'Dog[classname=$classname, color=$color, breed=$breed]'; + + Map toJson() { + final json = {}; + json[r'className'] = this.classname; + json[r'color'] = this.color; + if (this.breed != null) { + json[r'breed'] = this.breed; + } else { + json[r'breed'] = null; + } + return json; + } + + /// Returns a new [Dog] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Dog? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Dog[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Dog[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Dog( + classname: mapValueOfType(json, r'className')!, + color: mapValueOfType(json, r'color') ?? 'red', + breed: mapValueOfType(json, r'breed'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Dog.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Dog.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Dog-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Dog.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'className', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_arrays.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_arrays.dart new file mode 100644 index 000000000000..74c68b096792 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_arrays.dart @@ -0,0 +1,267 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class EnumArrays { + /// Returns a new [EnumArrays] instance. + EnumArrays({ + this.justSymbol, + this.arrayEnum = const [], + }); + + EnumArraysJustSymbolEnum? justSymbol; + + List arrayEnum; + + @override + bool operator ==(Object other) => identical(this, other) || other is EnumArrays && + other.justSymbol == justSymbol && + _deepEquality.equals(other.arrayEnum, arrayEnum); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (justSymbol == null ? 0 : justSymbol!.hashCode) + + (arrayEnum.hashCode); + + @override + String toString() => 'EnumArrays[justSymbol=$justSymbol, arrayEnum=$arrayEnum]'; + + Map toJson() { + final json = {}; + if (this.justSymbol != null) { + json[r'just_symbol'] = this.justSymbol; + } else { + json[r'just_symbol'] = null; + } + json[r'array_enum'] = this.arrayEnum; + return json; + } + + /// Returns a new [EnumArrays] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static EnumArrays? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "EnumArrays[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "EnumArrays[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return EnumArrays( + justSymbol: EnumArraysJustSymbolEnum.fromJson(json[r'just_symbol']), + arrayEnum: EnumArraysArrayEnumEnum.listFromJson(json[r'array_enum']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumArrays.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumArrays.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of EnumArrays-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = EnumArrays.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class EnumArraysJustSymbolEnum { + /// Instantiate a new enum with the provided [value]. + const EnumArraysJustSymbolEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const greaterThanEqual = EnumArraysJustSymbolEnum._(r'>='); + static const dollar = EnumArraysJustSymbolEnum._(r'$'); + + /// List of all possible values in this [enum][EnumArraysJustSymbolEnum]. + static const values = [ + greaterThanEqual, + dollar, + ]; + + static EnumArraysJustSymbolEnum? fromJson(dynamic value) => EnumArraysJustSymbolEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumArraysJustSymbolEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumArraysJustSymbolEnum] to String, +/// and [decode] dynamic data back to [EnumArraysJustSymbolEnum]. +class EnumArraysJustSymbolEnumTypeTransformer { + factory EnumArraysJustSymbolEnumTypeTransformer() => _instance ??= const EnumArraysJustSymbolEnumTypeTransformer._(); + + const EnumArraysJustSymbolEnumTypeTransformer._(); + + String encode(EnumArraysJustSymbolEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumArraysJustSymbolEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumArraysJustSymbolEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'>=': return EnumArraysJustSymbolEnum.greaterThanEqual; + case r'$': return EnumArraysJustSymbolEnum.dollar; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumArraysJustSymbolEnumTypeTransformer] instance. + static EnumArraysJustSymbolEnumTypeTransformer? _instance; +} + + + +class EnumArraysArrayEnumEnum { + /// Instantiate a new enum with the provided [value]. + const EnumArraysArrayEnumEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const fish = EnumArraysArrayEnumEnum._(r'fish'); + static const crab = EnumArraysArrayEnumEnum._(r'crab'); + + /// List of all possible values in this [enum][EnumArraysArrayEnumEnum]. + static const values = [ + fish, + crab, + ]; + + static EnumArraysArrayEnumEnum? fromJson(dynamic value) => EnumArraysArrayEnumEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumArraysArrayEnumEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumArraysArrayEnumEnum] to String, +/// and [decode] dynamic data back to [EnumArraysArrayEnumEnum]. +class EnumArraysArrayEnumEnumTypeTransformer { + factory EnumArraysArrayEnumEnumTypeTransformer() => _instance ??= const EnumArraysArrayEnumEnumTypeTransformer._(); + + const EnumArraysArrayEnumEnumTypeTransformer._(); + + String encode(EnumArraysArrayEnumEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumArraysArrayEnumEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumArraysArrayEnumEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'fish': return EnumArraysArrayEnumEnum.fish; + case r'crab': return EnumArraysArrayEnumEnum.crab; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumArraysArrayEnumEnumTypeTransformer] instance. + static EnumArraysArrayEnumEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart new file mode 100644 index 000000000000..898da969de8b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class EnumClass { + /// Instantiate a new enum with the provided [value]. + const EnumClass._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const abc = EnumClass._(r'_abc'); + static const efg = EnumClass._(r'-efg'); + static const leftParenthesisXyzrightParenthesis = EnumClass._(r'(xyz)'); + + /// List of all possible values in this [enum][EnumClass]. + static const values = [ + abc, + efg, + leftParenthesisXyzrightParenthesis, + ]; + + static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumClass] to String, +/// and [decode] dynamic data back to [EnumClass]. +class EnumClassTypeTransformer { + factory EnumClassTypeTransformer() => _instance ??= const EnumClassTypeTransformer._(); + + const EnumClassTypeTransformer._(); + + String encode(EnumClass data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumClass. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumClass? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'_abc': return EnumClass.abc; + case r'-efg': return EnumClass.efg; + case r'(xyz)': return EnumClass.leftParenthesisXyzrightParenthesis; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumClassTypeTransformer] instance. + static EnumClassTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart new file mode 100644 index 000000000000..898fae87bffa --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart @@ -0,0 +1,506 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class EnumTest { + /// Returns a new [EnumTest] instance. + EnumTest({ + this.enumString, + required this.enumStringRequired, + this.enumInteger, + this.enumNumber, + this.outerenum, + this.outerenuminteger, + this.outerenumdefaultvalue, + this.outerenumintegerdefaultvalue, + }); + + EnumTestEnumStringEnum? enumString; + + EnumTestEnumStringRequiredEnum enumStringRequired; + + EnumTestEnumIntegerEnum? enumInteger; + + EnumTestEnumNumberEnum? enumNumber; + + OuterEnum? outerenum; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OuterEnumInteger? outerenuminteger; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OuterEnumDefaultValue? outerenumdefaultvalue; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; + + @override + bool operator ==(Object other) => identical(this, other) || other is EnumTest && + other.enumString == enumString && + other.enumStringRequired == enumStringRequired && + other.enumInteger == enumInteger && + other.enumNumber == enumNumber && + other.outerenum == outerenum && + other.outerenuminteger == outerenuminteger && + other.outerenumdefaultvalue == outerenumdefaultvalue && + other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (enumString == null ? 0 : enumString!.hashCode) + + (enumStringRequired.hashCode) + + (enumInteger == null ? 0 : enumInteger!.hashCode) + + (enumNumber == null ? 0 : enumNumber!.hashCode) + + (outerenum == null ? 0 : outerenum!.hashCode) + + (outerenuminteger == null ? 0 : outerenuminteger!.hashCode) + + (outerenumdefaultvalue == null ? 0 : outerenumdefaultvalue!.hashCode) + + (outerenumintegerdefaultvalue == null ? 0 : outerenumintegerdefaultvalue!.hashCode); + + @override + String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerenum=$outerenum, outerenuminteger=$outerenuminteger, outerenumdefaultvalue=$outerenumdefaultvalue, outerenumintegerdefaultvalue=$outerenumintegerdefaultvalue]'; + + Map toJson() { + final json = {}; + if (this.enumString != null) { + json[r'enum_string'] = this.enumString; + } else { + json[r'enum_string'] = null; + } + json[r'enum_string_required'] = this.enumStringRequired; + if (this.enumInteger != null) { + json[r'enum_integer'] = this.enumInteger; + } else { + json[r'enum_integer'] = null; + } + if (this.enumNumber != null) { + json[r'enum_number'] = this.enumNumber; + } else { + json[r'enum_number'] = null; + } + if (this.outerenum != null) { + json[r'outerEnum'] = this.outerenum; + } else { + json[r'outerEnum'] = null; + } + if (this.outerenuminteger != null) { + json[r'outerEnumInteger'] = this.outerenuminteger; + } else { + json[r'outerEnumInteger'] = null; + } + if (this.outerenumdefaultvalue != null) { + json[r'outerEnumDefaultValue'] = this.outerenumdefaultvalue; + } else { + json[r'outerEnumDefaultValue'] = null; + } + if (this.outerenumintegerdefaultvalue != null) { + json[r'outerEnumIntegerDefaultValue'] = this.outerenumintegerdefaultvalue; + } else { + json[r'outerEnumIntegerDefaultValue'] = null; + } + return json; + } + + /// Returns a new [EnumTest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static EnumTest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "EnumTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "EnumTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return EnumTest( + enumString: EnumTestEnumStringEnum.fromJson(json[r'enum_string']), + enumStringRequired: EnumTestEnumStringRequiredEnum.fromJson(json[r'enum_string_required'])!, + enumInteger: EnumTestEnumIntegerEnum.fromJson(json[r'enum_integer']), + enumNumber: EnumTestEnumNumberEnum.fromJson(json[r'enum_number']), + outerenum: OuterEnum.fromJson(json[r'outerEnum']), + outerenuminteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), + outerenumdefaultvalue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), + outerenumintegerdefaultvalue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = EnumTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of EnumTest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = EnumTest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'enum_string_required', + }; +} + + +class EnumTestEnumStringEnum { + /// Instantiate a new enum with the provided [value]. + const EnumTestEnumStringEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const upper = EnumTestEnumStringEnum._(r'UPPER'); + static const lower = EnumTestEnumStringEnum._(r'lower'); + static const empty = EnumTestEnumStringEnum._(r''); + + /// List of all possible values in this [enum][EnumTestEnumStringEnum]. + static const values = [ + upper, + lower, + empty, + ]; + + static EnumTestEnumStringEnum? fromJson(dynamic value) => EnumTestEnumStringEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumStringEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumTestEnumStringEnum] to String, +/// and [decode] dynamic data back to [EnumTestEnumStringEnum]. +class EnumTestEnumStringEnumTypeTransformer { + factory EnumTestEnumStringEnumTypeTransformer() => _instance ??= const EnumTestEnumStringEnumTypeTransformer._(); + + const EnumTestEnumStringEnumTypeTransformer._(); + + String encode(EnumTestEnumStringEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumTestEnumStringEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumTestEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'UPPER': return EnumTestEnumStringEnum.upper; + case r'lower': return EnumTestEnumStringEnum.lower; + case r'': return EnumTestEnumStringEnum.empty; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumTestEnumStringEnumTypeTransformer] instance. + static EnumTestEnumStringEnumTypeTransformer? _instance; +} + + + +class EnumTestEnumStringRequiredEnum { + /// Instantiate a new enum with the provided [value]. + const EnumTestEnumStringRequiredEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const upper = EnumTestEnumStringRequiredEnum._(r'UPPER'); + static const lower = EnumTestEnumStringRequiredEnum._(r'lower'); + static const empty = EnumTestEnumStringRequiredEnum._(r''); + + /// List of all possible values in this [enum][EnumTestEnumStringRequiredEnum]. + static const values = [ + upper, + lower, + empty, + ]; + + static EnumTestEnumStringRequiredEnum? fromJson(dynamic value) => EnumTestEnumStringRequiredEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumStringRequiredEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumTestEnumStringRequiredEnum] to String, +/// and [decode] dynamic data back to [EnumTestEnumStringRequiredEnum]. +class EnumTestEnumStringRequiredEnumTypeTransformer { + factory EnumTestEnumStringRequiredEnumTypeTransformer() => _instance ??= const EnumTestEnumStringRequiredEnumTypeTransformer._(); + + const EnumTestEnumStringRequiredEnumTypeTransformer._(); + + String encode(EnumTestEnumStringRequiredEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumTestEnumStringRequiredEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumTestEnumStringRequiredEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'UPPER': return EnumTestEnumStringRequiredEnum.upper; + case r'lower': return EnumTestEnumStringRequiredEnum.lower; + case r'': return EnumTestEnumStringRequiredEnum.empty; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumTestEnumStringRequiredEnumTypeTransformer] instance. + static EnumTestEnumStringRequiredEnumTypeTransformer? _instance; +} + + + +class EnumTestEnumIntegerEnum { + /// Instantiate a new enum with the provided [value]. + const EnumTestEnumIntegerEnum._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const number1 = EnumTestEnumIntegerEnum._(1); + static const numberNegative1 = EnumTestEnumIntegerEnum._(-1); + + /// List of all possible values in this [enum][EnumTestEnumIntegerEnum]. + static const values = [ + number1, + numberNegative1, + ]; + + static EnumTestEnumIntegerEnum? fromJson(dynamic value) => EnumTestEnumIntegerEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumIntegerEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumTestEnumIntegerEnum] to int, +/// and [decode] dynamic data back to [EnumTestEnumIntegerEnum]. +class EnumTestEnumIntegerEnumTypeTransformer { + factory EnumTestEnumIntegerEnumTypeTransformer() => _instance ??= const EnumTestEnumIntegerEnumTypeTransformer._(); + + const EnumTestEnumIntegerEnumTypeTransformer._(); + + int encode(EnumTestEnumIntegerEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumTestEnumIntegerEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumTestEnumIntegerEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 1: return EnumTestEnumIntegerEnum.number1; + case -1: return EnumTestEnumIntegerEnum.numberNegative1; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumTestEnumIntegerEnumTypeTransformer] instance. + static EnumTestEnumIntegerEnumTypeTransformer? _instance; +} + + + +class EnumTestEnumNumberEnum { + /// Instantiate a new enum with the provided [value]. + const EnumTestEnumNumberEnum._(this.value); + + /// The underlying value of this enum member. + final double value; + + @override + String toString() => value.toString(); + + double toJson() => value; + + static const number1period1 = EnumTestEnumNumberEnum._('1.1'); + static const numberNegative1period2 = EnumTestEnumNumberEnum._('-1.2'); + + /// List of all possible values in this [enum][EnumTestEnumNumberEnum]. + static const values = [ + number1period1, + numberNegative1period2, + ]; + + static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = EnumTestEnumNumberEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [EnumTestEnumNumberEnum] to double, +/// and [decode] dynamic data back to [EnumTestEnumNumberEnum]. +class EnumTestEnumNumberEnumTypeTransformer { + factory EnumTestEnumNumberEnumTypeTransformer() => _instance ??= const EnumTestEnumNumberEnumTypeTransformer._(); + + const EnumTestEnumNumberEnumTypeTransformer._(); + + double encode(EnumTestEnumNumberEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a EnumTestEnumNumberEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + EnumTestEnumNumberEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case '1.1': return EnumTestEnumNumberEnum.number1period1; + case '-1.2': return EnumTestEnumNumberEnum.numberNegative1period2; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [EnumTestEnumNumberEnumTypeTransformer] instance. + static EnumTestEnumNumberEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart new file mode 100644 index 000000000000..249f9c2401d7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FakeBigDecimalMap200Response { + /// Returns a new [FakeBigDecimalMap200Response] instance. + FakeBigDecimalMap200Response({ + this.someid, + this.somemap = const {}, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? someid; + + Map somemap; + + @override + bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && + other.someid == someid && + _deepEquality.equals(other.somemap, somemap); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (someid == null ? 0 : someid!.hashCode) + + (somemap.hashCode); + + @override + String toString() => 'FakeBigDecimalMap200Response[someid=$someid, somemap=$somemap]'; + + Map toJson() { + final json = {}; + if (this.someid != null) { + json[r'someId'] = this.someid; + } else { + json[r'someId'] = null; + } + json[r'someMap'] = this.somemap; + return json; + } + + /// Returns a new [FakeBigDecimalMap200Response] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FakeBigDecimalMap200Response? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FakeBigDecimalMap200Response[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FakeBigDecimalMap200Response[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FakeBigDecimalMap200Response( + someid: num.parse('${json[r'someId']}'), + somemap: mapCastOfType(json, r'someMap') ?? const {}, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FakeBigDecimalMap200Response.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FakeBigDecimalMap200Response.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FakeBigDecimalMap200Response-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FakeBigDecimalMap200Response.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/file_schema_test_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/file_schema_test_class.dart new file mode 100644 index 000000000000..ff956bc14916 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/file_schema_test_class.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FileSchemaTestClass { + /// Returns a new [FileSchemaTestClass] instance. + FileSchemaTestClass({ + this.file, + this.files = const [], + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + ModelFile? file; + + List files; + + @override + bool operator ==(Object other) => identical(this, other) || other is FileSchemaTestClass && + other.file == file && + _deepEquality.equals(other.files, files); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (file == null ? 0 : file!.hashCode) + + (files.hashCode); + + @override + String toString() => 'FileSchemaTestClass[file=$file, files=$files]'; + + Map toJson() { + final json = {}; + if (this.file != null) { + json[r'file'] = this.file; + } else { + json[r'file'] = null; + } + json[r'files'] = this.files; + return json; + } + + /// Returns a new [FileSchemaTestClass] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FileSchemaTestClass? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FileSchemaTestClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FileSchemaTestClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FileSchemaTestClass( + file: ModelFile.fromJson(json[r'file']), + files: ModelFile.listFromJson(json[r'files']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FileSchemaTestClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FileSchemaTestClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FileSchemaTestClass-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FileSchemaTestClass.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo.dart new file mode 100644 index 000000000000..6334191a11e8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Foo { + /// Returns a new [Foo] instance. + Foo({ + this.bar = 'bar', + }); + + String bar; + + @override + bool operator ==(Object other) => identical(this, other) || other is Foo && + other.bar == bar; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (bar.hashCode); + + @override + String toString() => 'Foo[bar=$bar]'; + + Map toJson() { + final json = {}; + json[r'bar'] = this.bar; + return json; + } + + /// Returns a new [Foo] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Foo? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Foo[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Foo[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Foo( + bar: mapValueOfType(json, r'bar') ?? 'bar', + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Foo.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Foo.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Foo-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Foo.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo_get_default_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo_get_default_response.dart new file mode 100644 index 000000000000..1d562914d307 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/foo_get_default_response.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FooGetDefaultResponse { + /// Returns a new [FooGetDefaultResponse] instance. + FooGetDefaultResponse({ + this.string, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Foo? string; + + @override + bool operator ==(Object other) => identical(this, other) || other is FooGetDefaultResponse && + other.string == string; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (string == null ? 0 : string!.hashCode); + + @override + String toString() => 'FooGetDefaultResponse[string=$string]'; + + Map toJson() { + final json = {}; + if (this.string != null) { + json[r'string'] = this.string; + } else { + json[r'string'] = null; + } + return json; + } + + /// Returns a new [FooGetDefaultResponse] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FooGetDefaultResponse? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FooGetDefaultResponse[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FooGetDefaultResponse[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FooGetDefaultResponse( + string: Foo.fromJson(json[r'string']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FooGetDefaultResponse.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FooGetDefaultResponse.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FooGetDefaultResponse-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FooGetDefaultResponse.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart new file mode 100644 index 000000000000..957a6b7c0415 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart @@ -0,0 +1,349 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class FormatTest { + /// Returns a new [FormatTest] instance. + FormatTest({ + this.integer, + this.int32, + this.int64, + required this.number, + this.float, + this.double_, + this.decimal, + this.string, + required this.byte, + this.binary, + required this.date, + this.datetime, + this.uuid, + required this.password, + this.patternWithDigits, + this.patternWithDigitsAndDelimiter, + }); + + /// Minimum value: 10 + /// Maximum value: 100 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? integer; + + /// Minimum value: 20 + /// Maximum value: 200 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? int32; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? int64; + + /// Minimum value: 32.1 + /// Maximum value: 543.2 + num number; + + /// Minimum value: 54.3 + /// Maximum value: 987.6 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + double? float; + + /// Minimum value: 67.8 + /// Maximum value: 123.4 + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + double? double_; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + double? decimal; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? string; + + String byte; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + MultipartFile? binary; + + DateTime date; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? datetime; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? uuid; + + String password; + + /// A string that is a 10 digit number. Can have leading zeros. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? patternWithDigits; + + /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? patternWithDigitsAndDelimiter; + + @override + bool operator ==(Object other) => identical(this, other) || other is FormatTest && + other.integer == integer && + other.int32 == int32 && + other.int64 == int64 && + other.number == number && + other.float == float && + other.double_ == double_ && + other.decimal == decimal && + other.string == string && + other.byte == byte && + other.binary == binary && + other.date == date && + other.datetime == datetime && + other.uuid == uuid && + other.password == password && + other.patternWithDigits == patternWithDigits && + other.patternWithDigitsAndDelimiter == patternWithDigitsAndDelimiter; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (integer == null ? 0 : integer!.hashCode) + + (int32 == null ? 0 : int32!.hashCode) + + (int64 == null ? 0 : int64!.hashCode) + + (number.hashCode) + + (float == null ? 0 : float!.hashCode) + + (double_ == null ? 0 : double_!.hashCode) + + (decimal == null ? 0 : decimal!.hashCode) + + (string == null ? 0 : string!.hashCode) + + (byte.hashCode) + + (binary == null ? 0 : binary!.hashCode) + + (date.hashCode) + + (datetime == null ? 0 : datetime!.hashCode) + + (uuid == null ? 0 : uuid!.hashCode) + + (password.hashCode) + + (patternWithDigits == null ? 0 : patternWithDigits!.hashCode) + + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter!.hashCode); + + @override + String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, datetime=$datetime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; + + Map toJson() { + final json = {}; + if (this.integer != null) { + json[r'integer'] = this.integer; + } else { + json[r'integer'] = null; + } + if (this.int32 != null) { + json[r'int32'] = this.int32; + } else { + json[r'int32'] = null; + } + if (this.int64 != null) { + json[r'int64'] = this.int64; + } else { + json[r'int64'] = null; + } + json[r'number'] = this.number; + if (this.float != null) { + json[r'float'] = this.float; + } else { + json[r'float'] = null; + } + if (this.double_ != null) { + json[r'double'] = this.double_; + } else { + json[r'double'] = null; + } + if (this.decimal != null) { + json[r'decimal'] = this.decimal; + } else { + json[r'decimal'] = null; + } + if (this.string != null) { + json[r'string'] = this.string; + } else { + json[r'string'] = null; + } + json[r'byte'] = this.byte; + if (this.binary != null) { + json[r'binary'] = this.binary; + } else { + json[r'binary'] = null; + } + json[r'date'] = _dateFormatter.format(this.date.toUtc()); + if (this.datetime != null) { + json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); + } else { + json[r'dateTime'] = null; + } + if (this.uuid != null) { + json[r'uuid'] = this.uuid; + } else { + json[r'uuid'] = null; + } + json[r'password'] = this.password; + if (this.patternWithDigits != null) { + json[r'pattern_with_digits'] = this.patternWithDigits; + } else { + json[r'pattern_with_digits'] = null; + } + if (this.patternWithDigitsAndDelimiter != null) { + json[r'pattern_with_digits_and_delimiter'] = this.patternWithDigitsAndDelimiter; + } else { + json[r'pattern_with_digits_and_delimiter'] = null; + } + return json; + } + + /// Returns a new [FormatTest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static FormatTest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "FormatTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "FormatTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return FormatTest( + integer: mapValueOfType(json, r'integer'), + int32: mapValueOfType(json, r'int32'), + int64: mapValueOfType(json, r'int64'), + number: num.parse('${json[r'number']}'), + float: mapValueOfType(json, r'float'), + double_: mapValueOfType(json, r'double'), + decimal: mapValueOfType(json, r'decimal'), + string: mapValueOfType(json, r'string'), + byte: mapValueOfType(json, r'byte')!, + binary: null, // No support for decoding binary content from JSON + date: mapDateTime(json, r'date', r'')!, + datetime: mapDateTime(json, r'dateTime', r''), + uuid: mapValueOfType(json, r'uuid'), + password: mapValueOfType(json, r'password')!, + patternWithDigits: mapValueOfType(json, r'pattern_with_digits'), + patternWithDigitsAndDelimiter: mapValueOfType(json, r'pattern_with_digits_and_delimiter'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = FormatTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = FormatTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of FormatTest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = FormatTest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'number', + 'byte', + 'date', + 'password', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/has_only_read_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/has_only_read_only.dart new file mode 100644 index 000000000000..6a753c10fee5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/has_only_read_only.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HasOnlyReadOnly { + /// Returns a new [HasOnlyReadOnly] instance. + HasOnlyReadOnly({ + this.bar, + this.foo, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? bar; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? foo; + + @override + bool operator ==(Object other) => identical(this, other) || other is HasOnlyReadOnly && + other.bar == bar && + other.foo == foo; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (bar == null ? 0 : bar!.hashCode) + + (foo == null ? 0 : foo!.hashCode); + + @override + String toString() => 'HasOnlyReadOnly[bar=$bar, foo=$foo]'; + + Map toJson() { + final json = {}; + if (this.bar != null) { + json[r'bar'] = this.bar; + } else { + json[r'bar'] = null; + } + if (this.foo != null) { + json[r'foo'] = this.foo; + } else { + json[r'foo'] = null; + } + return json; + } + + /// Returns a new [HasOnlyReadOnly] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HasOnlyReadOnly? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HasOnlyReadOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HasOnlyReadOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HasOnlyReadOnly( + bar: mapValueOfType(json, r'bar'), + foo: mapValueOfType(json, r'foo'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HasOnlyReadOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HasOnlyReadOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HasOnlyReadOnly-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HasOnlyReadOnly.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart new file mode 100644 index 000000000000..bf69f5c13600 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart @@ -0,0 +1,112 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class HealthCheckResult { + /// Returns a new [HealthCheckResult] instance. + HealthCheckResult({ + this.nullablemessage, + }); + + String? nullablemessage; + + @override + bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && + other.nullablemessage == nullablemessage; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (nullablemessage == null ? 0 : nullablemessage!.hashCode); + + @override + String toString() => 'HealthCheckResult[nullablemessage=$nullablemessage]'; + + Map toJson() { + final json = {}; + if (this.nullablemessage != null) { + json[r'NullableMessage'] = this.nullablemessage; + } else { + json[r'NullableMessage'] = null; + } + return json; + } + + /// Returns a new [HealthCheckResult] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static HealthCheckResult? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "HealthCheckResult[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "HealthCheckResult[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return HealthCheckResult( + nullablemessage: mapValueOfType(json, r'NullableMessage'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = HealthCheckResult.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = HealthCheckResult.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of HealthCheckResult-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = HealthCheckResult.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/map_test.dart new file mode 100644 index 000000000000..a0a7241e6889 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/map_test.dart @@ -0,0 +1,203 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class MapTest { + /// Returns a new [MapTest] instance. + MapTest({ + this.mapMapOfString = const {}, + this.mapOfEnumString = const {}, + this.directMap = const {}, + this.indirectMap = const {}, + }); + + Map> mapMapOfString; + + Map mapOfEnumString; + + Map directMap; + + Map indirectMap; + + @override + bool operator ==(Object other) => identical(this, other) || other is MapTest && + _deepEquality.equals(other.mapMapOfString, mapMapOfString) && + _deepEquality.equals(other.mapOfEnumString, mapOfEnumString) && + _deepEquality.equals(other.directMap, directMap) && + _deepEquality.equals(other.indirectMap, indirectMap); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (mapMapOfString.hashCode) + + (mapOfEnumString.hashCode) + + (directMap.hashCode) + + (indirectMap.hashCode); + + @override + String toString() => 'MapTest[mapMapOfString=$mapMapOfString, mapOfEnumString=$mapOfEnumString, directMap=$directMap, indirectMap=$indirectMap]'; + + Map toJson() { + final json = {}; + json[r'map_map_of_string'] = this.mapMapOfString; + json[r'map_of_enum_string'] = this.mapOfEnumString; + json[r'direct_map'] = this.directMap; + json[r'indirect_map'] = this.indirectMap; + return json; + } + + /// Returns a new [MapTest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MapTest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MapTest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MapTest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MapTest( + mapMapOfString: mapCastOfType(json, r'map_map_of_string') ?? const {}, + mapOfEnumString: mapCastOfType(json, r'map_of_enum_string') ?? const {}, + directMap: mapCastOfType(json, r'direct_map') ?? const {}, + indirectMap: mapCastOfType(json, r'indirect_map') ?? const {}, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapTest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MapTest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MapTest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MapTest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class MapTestMapOfEnumStringEnum { + /// Instantiate a new enum with the provided [value]. + const MapTestMapOfEnumStringEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const upper = MapTestMapOfEnumStringEnum._(r'UPPER'); + static const lower = MapTestMapOfEnumStringEnum._(r'lower'); + + /// List of all possible values in this [enum][MapTestMapOfEnumStringEnum]. + static const values = [ + upper, + lower, + ]; + + static MapTestMapOfEnumStringEnum? fromJson(dynamic value) => MapTestMapOfEnumStringEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MapTestMapOfEnumStringEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [MapTestMapOfEnumStringEnum] to String, +/// and [decode] dynamic data back to [MapTestMapOfEnumStringEnum]. +class MapTestMapOfEnumStringEnumTypeTransformer { + factory MapTestMapOfEnumStringEnumTypeTransformer() => _instance ??= const MapTestMapOfEnumStringEnumTypeTransformer._(); + + const MapTestMapOfEnumStringEnumTypeTransformer._(); + + String encode(MapTestMapOfEnumStringEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a MapTestMapOfEnumStringEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + MapTestMapOfEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'UPPER': return MapTestMapOfEnumStringEnum.upper; + case r'lower': return MapTestMapOfEnumStringEnum.lower; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [MapTestMapOfEnumStringEnumTypeTransformer] instance. + static MapTestMapOfEnumStringEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart new file mode 100644 index 000000000000..7a5b5ad0b058 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart @@ -0,0 +1,142 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class MixedPropertiesAndAdditionalPropertiesClass { + /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. + MixedPropertiesAndAdditionalPropertiesClass({ + this.uuid, + this.datetime, + this.map = const {}, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? uuid; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? datetime; + + Map map; + + @override + bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && + other.uuid == uuid && + other.datetime == datetime && + _deepEquality.equals(other.map, map); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (uuid == null ? 0 : uuid!.hashCode) + + (datetime == null ? 0 : datetime!.hashCode) + + (map.hashCode); + + @override + String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, datetime=$datetime, map=$map]'; + + Map toJson() { + final json = {}; + if (this.uuid != null) { + json[r'uuid'] = this.uuid; + } else { + json[r'uuid'] = null; + } + if (this.datetime != null) { + json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); + } else { + json[r'dateTime'] = null; + } + json[r'map'] = this.map; + return json; + } + + /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static MixedPropertiesAndAdditionalPropertiesClass? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "MixedPropertiesAndAdditionalPropertiesClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "MixedPropertiesAndAdditionalPropertiesClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return MixedPropertiesAndAdditionalPropertiesClass( + uuid: mapValueOfType(json, r'uuid'), + datetime: mapDateTime(json, r'dateTime', r''), + map: Animal.mapFromJson(json[r'map']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = MixedPropertiesAndAdditionalPropertiesClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = MixedPropertiesAndAdditionalPropertiesClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of MixedPropertiesAndAdditionalPropertiesClass-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = MixedPropertiesAndAdditionalPropertiesClass.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model200_response.dart new file mode 100644 index 000000000000..2dd008e72e26 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model200_response.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Model200Response { + /// Returns a new [Model200Response] instance. + Model200Response({ + this.name, + this.class_, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? class_; + + @override + bool operator ==(Object other) => identical(this, other) || other is Model200Response && + other.name == name && + other.class_ == class_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name == null ? 0 : name!.hashCode) + + (class_ == null ? 0 : class_!.hashCode); + + @override + String toString() => 'Model200Response[name=$name, class_=$class_]'; + + Map toJson() { + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + if (this.class_ != null) { + json[r'class'] = this.class_; + } else { + json[r'class'] = null; + } + return json; + } + + /// Returns a new [Model200Response] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Model200Response? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Model200Response[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Model200Response[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Model200Response( + name: mapValueOfType(json, r'name'), + class_: mapValueOfType(json, r'class'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Model200Response.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Model200Response.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Model200Response-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Model200Response.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_client.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_client.dart new file mode 100644 index 000000000000..15f48a054876 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_client.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ModelClient { + /// Returns a new [ModelClient] instance. + ModelClient({ + this.client, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? client; + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelClient && + other.client == client; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (client == null ? 0 : client!.hashCode); + + @override + String toString() => 'ModelClient[client=$client]'; + + Map toJson() { + final json = {}; + if (this.client != null) { + json[r'client'] = this.client; + } else { + json[r'client'] = null; + } + return json; + } + + /// Returns a new [ModelClient] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ModelClient? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelClient[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelClient[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ModelClient( + client: mapValueOfType(json, r'client'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelClient.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelClient.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ModelClient-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ModelClient.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart new file mode 100644 index 000000000000..c93f3d57f55d --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart @@ -0,0 +1,119 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ModelFile { + /// Returns a new [ModelFile] instance. + ModelFile({ + this.sourceuri, + }); + + /// Test capitalization + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? sourceuri; + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelFile && + other.sourceuri == sourceuri; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (sourceuri == null ? 0 : sourceuri!.hashCode); + + @override + String toString() => 'ModelFile[sourceuri=$sourceuri]'; + + Map toJson() { + final json = {}; + if (this.sourceuri != null) { + json[r'sourceURI'] = this.sourceuri; + } else { + json[r'sourceURI'] = null; + } + return json; + } + + /// Returns a new [ModelFile] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ModelFile? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelFile[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelFile[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ModelFile( + sourceuri: mapValueOfType(json, r'sourceURI'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelFile.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelFile.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ModelFile-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ModelFile.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_list.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_list.dart new file mode 100644 index 000000000000..40a2767daa8b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_list.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ModelList { + /// Returns a new [ModelList] instance. + ModelList({ + this.n123list, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? n123list; + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelList && + other.n123list == n123list; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (n123list == null ? 0 : n123list!.hashCode); + + @override + String toString() => 'ModelList[n123list=$n123list]'; + + Map toJson() { + final json = {}; + if (this.n123list != null) { + json[r'123-list'] = this.n123list; + } else { + json[r'123-list'] = null; + } + return json; + } + + /// Returns a new [ModelList] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ModelList? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelList[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelList[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ModelList( + n123list: mapValueOfType(json, r'123-list'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelList.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelList.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ModelList-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ModelList.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_return.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_return.dart new file mode 100644 index 000000000000..610500530533 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_return.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ModelReturn { + /// Returns a new [ModelReturn] instance. + ModelReturn({ + this.return_, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? return_; + + @override + bool operator ==(Object other) => identical(this, other) || other is ModelReturn && + other.return_ == return_; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (return_ == null ? 0 : return_!.hashCode); + + @override + String toString() => 'ModelReturn[return_=$return_]'; + + Map toJson() { + final json = {}; + if (this.return_ != null) { + json[r'return'] = this.return_; + } else { + json[r'return'] = null; + } + return json; + } + + /// Returns a new [ModelReturn] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ModelReturn? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ModelReturn[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ModelReturn[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ModelReturn( + return_: mapValueOfType(json, r'return'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ModelReturn.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ModelReturn.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ModelReturn-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ModelReturn.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/name.dart new file mode 100644 index 000000000000..7d366892b58c --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/name.dart @@ -0,0 +1,160 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Name { + /// Returns a new [Name] instance. + Name({ + required this.name, + this.snakeCase, + this.property, + this.n123number, + }); + + int name; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? snakeCase; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? property; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? n123number; + + @override + bool operator ==(Object other) => identical(this, other) || other is Name && + other.name == name && + other.snakeCase == snakeCase && + other.property == property && + other.n123number == n123number; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (name.hashCode) + + (snakeCase == null ? 0 : snakeCase!.hashCode) + + (property == null ? 0 : property!.hashCode) + + (n123number == null ? 0 : n123number!.hashCode); + + @override + String toString() => 'Name[name=$name, snakeCase=$snakeCase, property=$property, n123number=$n123number]'; + + Map toJson() { + final json = {}; + json[r'name'] = this.name; + if (this.snakeCase != null) { + json[r'snake_case'] = this.snakeCase; + } else { + json[r'snake_case'] = null; + } + if (this.property != null) { + json[r'property'] = this.property; + } else { + json[r'property'] = null; + } + if (this.n123number != null) { + json[r'123Number'] = this.n123number; + } else { + json[r'123Number'] = null; + } + return json; + } + + /// Returns a new [Name] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Name? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Name[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Name[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Name( + name: mapValueOfType(json, r'name')!, + snakeCase: mapValueOfType(json, r'snake_case'), + property: mapValueOfType(json, r'property'), + n123number: mapValueOfType(json, r'123Number'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Name.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Name.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Name-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Name.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/nullable_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/nullable_class.dart new file mode 100644 index 000000000000..25e70c05d92b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/nullable_class.dart @@ -0,0 +1,227 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NullableClass { + /// Returns a new [NullableClass] instance. + NullableClass({ + this.integerProp, + this.numberProp, + this.booleanProp, + this.stringProp, + this.dateProp, + this.datetimeProp, + this.arrayNullableProp = const [], + this.arrayAndItemsNullableProp = const [], + this.arrayItemsNullable = const [], + this.objectNullableProp = const {}, + this.objectAndItemsNullableProp = const {}, + this.objectItemsNullable = const {}, + }); + + int? integerProp; + + num? numberProp; + + bool? booleanProp; + + String? stringProp; + + DateTime? dateProp; + + DateTime? datetimeProp; + + List? arrayNullableProp; + + List? arrayAndItemsNullableProp; + + List arrayItemsNullable; + + Map? objectNullableProp; + + Map? objectAndItemsNullableProp; + + Map objectItemsNullable; + + @override + bool operator ==(Object other) => identical(this, other) || other is NullableClass && + other.integerProp == integerProp && + other.numberProp == numberProp && + other.booleanProp == booleanProp && + other.stringProp == stringProp && + other.dateProp == dateProp && + other.datetimeProp == datetimeProp && + _deepEquality.equals(other.arrayNullableProp, arrayNullableProp) && + _deepEquality.equals(other.arrayAndItemsNullableProp, arrayAndItemsNullableProp) && + _deepEquality.equals(other.arrayItemsNullable, arrayItemsNullable) && + _deepEquality.equals(other.objectNullableProp, objectNullableProp) && + _deepEquality.equals(other.objectAndItemsNullableProp, objectAndItemsNullableProp) && + _deepEquality.equals(other.objectItemsNullable, objectItemsNullable); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (integerProp == null ? 0 : integerProp!.hashCode) + + (numberProp == null ? 0 : numberProp!.hashCode) + + (booleanProp == null ? 0 : booleanProp!.hashCode) + + (stringProp == null ? 0 : stringProp!.hashCode) + + (dateProp == null ? 0 : dateProp!.hashCode) + + (datetimeProp == null ? 0 : datetimeProp!.hashCode) + + (arrayNullableProp == null ? 0 : arrayNullableProp!.hashCode) + + (arrayAndItemsNullableProp == null ? 0 : arrayAndItemsNullableProp!.hashCode) + + (arrayItemsNullable.hashCode) + + (objectNullableProp == null ? 0 : objectNullableProp!.hashCode) + + (objectAndItemsNullableProp == null ? 0 : objectAndItemsNullableProp!.hashCode) + + (objectItemsNullable.hashCode); + + @override + String toString() => 'NullableClass[integerProp=$integerProp, numberProp=$numberProp, booleanProp=$booleanProp, stringProp=$stringProp, dateProp=$dateProp, datetimeProp=$datetimeProp, arrayNullableProp=$arrayNullableProp, arrayAndItemsNullableProp=$arrayAndItemsNullableProp, arrayItemsNullable=$arrayItemsNullable, objectNullableProp=$objectNullableProp, objectAndItemsNullableProp=$objectAndItemsNullableProp, objectItemsNullable=$objectItemsNullable]'; + + Map toJson() { + final json = {}; + if (this.integerProp != null) { + json[r'integer_prop'] = this.integerProp; + } else { + json[r'integer_prop'] = null; + } + if (this.numberProp != null) { + json[r'number_prop'] = this.numberProp; + } else { + json[r'number_prop'] = null; + } + if (this.booleanProp != null) { + json[r'boolean_prop'] = this.booleanProp; + } else { + json[r'boolean_prop'] = null; + } + if (this.stringProp != null) { + json[r'string_prop'] = this.stringProp; + } else { + json[r'string_prop'] = null; + } + if (this.dateProp != null) { + json[r'date_prop'] = _dateFormatter.format(this.dateProp!.toUtc()); + } else { + json[r'date_prop'] = null; + } + if (this.datetimeProp != null) { + json[r'datetime_prop'] = this.datetimeProp!.toUtc().toIso8601String(); + } else { + json[r'datetime_prop'] = null; + } + if (this.arrayNullableProp != null) { + json[r'array_nullable_prop'] = this.arrayNullableProp; + } else { + json[r'array_nullable_prop'] = null; + } + if (this.arrayAndItemsNullableProp != null) { + json[r'array_and_items_nullable_prop'] = this.arrayAndItemsNullableProp; + } else { + json[r'array_and_items_nullable_prop'] = null; + } + json[r'array_items_nullable'] = this.arrayItemsNullable; + if (this.objectNullableProp != null) { + json[r'object_nullable_prop'] = this.objectNullableProp; + } else { + json[r'object_nullable_prop'] = null; + } + if (this.objectAndItemsNullableProp != null) { + json[r'object_and_items_nullable_prop'] = this.objectAndItemsNullableProp; + } else { + json[r'object_and_items_nullable_prop'] = null; + } + json[r'object_items_nullable'] = this.objectItemsNullable; + return json; + } + + /// Returns a new [NullableClass] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NullableClass? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NullableClass[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NullableClass[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NullableClass( + integerProp: mapValueOfType(json, r'integer_prop'), + numberProp: json[r'number_prop'] == null + ? null + : num.parse('${json[r'number_prop']}'), + booleanProp: mapValueOfType(json, r'boolean_prop'), + stringProp: mapValueOfType(json, r'string_prop'), + dateProp: mapDateTime(json, r'date_prop', r''), + datetimeProp: mapDateTime(json, r'datetime_prop', r''), + arrayNullableProp: Object.listFromJson(json[r'array_nullable_prop']), + arrayAndItemsNullableProp: Object.listFromJson(json[r'array_and_items_nullable_prop']), + arrayItemsNullable: Object.listFromJson(json[r'array_items_nullable']), + objectNullableProp: mapCastOfType(json, r'object_nullable_prop') ?? const {}, + objectAndItemsNullableProp: mapCastOfType(json, r'object_and_items_nullable_prop') ?? const {}, + objectItemsNullable: mapCastOfType(json, r'object_items_nullable') ?? const {}, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NullableClass.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NullableClass.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NullableClass-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NullableClass.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart new file mode 100644 index 000000000000..c3942c6fdc82 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class NumberOnly { + /// Returns a new [NumberOnly] instance. + NumberOnly({ + this.justnumber, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? justnumber; + + @override + bool operator ==(Object other) => identical(this, other) || other is NumberOnly && + other.justnumber == justnumber; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (justnumber == null ? 0 : justnumber!.hashCode); + + @override + String toString() => 'NumberOnly[justnumber=$justnumber]'; + + Map toJson() { + final json = {}; + if (this.justnumber != null) { + json[r'JustNumber'] = this.justnumber; + } else { + json[r'JustNumber'] = null; + } + return json; + } + + /// Returns a new [NumberOnly] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static NumberOnly? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "NumberOnly[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "NumberOnly[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return NumberOnly( + justnumber: num.parse('${json[r'JustNumber']}'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = NumberOnly.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = NumberOnly.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of NumberOnly-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = NumberOnly.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart new file mode 100644 index 000000000000..7e2c588d7fec --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart @@ -0,0 +1,161 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ObjectWithDeprecatedFields { + /// Returns a new [ObjectWithDeprecatedFields] instance. + ObjectWithDeprecatedFields({ + this.uuid, + this.id, + this.deprecatedref, + this.bars = const [], + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? uuid; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DeprecatedObject? deprecatedref; + + List bars; + + @override + bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && + other.uuid == uuid && + other.id == id && + other.deprecatedref == deprecatedref && + _deepEquality.equals(other.bars, bars); + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (uuid == null ? 0 : uuid!.hashCode) + + (id == null ? 0 : id!.hashCode) + + (deprecatedref == null ? 0 : deprecatedref!.hashCode) + + (bars.hashCode); + + @override + String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedref=$deprecatedref, bars=$bars]'; + + Map toJson() { + final json = {}; + if (this.uuid != null) { + json[r'uuid'] = this.uuid; + } else { + json[r'uuid'] = null; + } + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.deprecatedref != null) { + json[r'deprecatedRef'] = this.deprecatedref; + } else { + json[r'deprecatedRef'] = null; + } + json[r'bars'] = this.bars; + return json; + } + + /// Returns a new [ObjectWithDeprecatedFields] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ObjectWithDeprecatedFields? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ObjectWithDeprecatedFields[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ObjectWithDeprecatedFields[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ObjectWithDeprecatedFields( + uuid: mapValueOfType(json, r'uuid'), + id: num.parse('${json[r'id']}'), + deprecatedref: DeprecatedObject.fromJson(json[r'deprecatedRef']), + bars: json[r'bars'] is Iterable + ? (json[r'bars'] as Iterable).cast().toList(growable: false) + : const [], + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ObjectWithDeprecatedFields.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ObjectWithDeprecatedFields.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ObjectWithDeprecatedFields-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ObjectWithDeprecatedFields.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart new file mode 100644 index 000000000000..d9c4cc9887a0 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart @@ -0,0 +1,265 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Order { + /// Returns a new [Order] instance. + Order({ + this.id, + this.petid, + this.quantity, + this.shipdate, + this.status, + this.complete = false, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? petid; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? quantity; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + DateTime? shipdate; + + /// Order Status + OrderStatusEnum? status; + + bool complete; + + @override + bool operator ==(Object other) => identical(this, other) || other is Order && + other.id == id && + other.petid == petid && + other.quantity == quantity && + other.shipdate == shipdate && + other.status == status && + other.complete == complete; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (petid == null ? 0 : petid!.hashCode) + + (quantity == null ? 0 : quantity!.hashCode) + + (shipdate == null ? 0 : shipdate!.hashCode) + + (status == null ? 0 : status!.hashCode) + + (complete.hashCode); + + @override + String toString() => 'Order[id=$id, petid=$petid, quantity=$quantity, shipdate=$shipdate, status=$status, complete=$complete]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.petid != null) { + json[r'petId'] = this.petid; + } else { + json[r'petId'] = null; + } + if (this.quantity != null) { + json[r'quantity'] = this.quantity; + } else { + json[r'quantity'] = null; + } + if (this.shipdate != null) { + json[r'shipDate'] = this.shipdate!.toUtc().toIso8601String(); + } else { + json[r'shipDate'] = null; + } + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + json[r'complete'] = this.complete; + return json; + } + + /// Returns a new [Order] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Order? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Order[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Order[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Order( + id: mapValueOfType(json, r'id'), + petid: mapValueOfType(json, r'petId'), + quantity: mapValueOfType(json, r'quantity'), + shipdate: mapDateTime(json, r'shipDate', r''), + status: OrderStatusEnum.fromJson(json[r'status']), + complete: mapValueOfType(json, r'complete') ?? false, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Order.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Order.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Order-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Order.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + +/// Order Status +class OrderStatusEnum { + /// Instantiate a new enum with the provided [value]. + const OrderStatusEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const placed = OrderStatusEnum._(r'placed'); + static const approved = OrderStatusEnum._(r'approved'); + static const delivered = OrderStatusEnum._(r'delivered'); + + /// List of all possible values in this [enum][OrderStatusEnum]. + static const values = [ + placed, + approved, + delivered, + ]; + + static OrderStatusEnum? fromJson(dynamic value) => OrderStatusEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OrderStatusEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OrderStatusEnum] to String, +/// and [decode] dynamic data back to [OrderStatusEnum]. +class OrderStatusEnumTypeTransformer { + factory OrderStatusEnumTypeTransformer() => _instance ??= const OrderStatusEnumTypeTransformer._(); + + const OrderStatusEnumTypeTransformer._(); + + String encode(OrderStatusEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a OrderStatusEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OrderStatusEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'placed': return OrderStatusEnum.placed; + case r'approved': return OrderStatusEnum.approved; + case r'delivered': return OrderStatusEnum.delivered; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OrderStatusEnumTypeTransformer] instance. + static OrderStatusEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_composite.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_composite.dart new file mode 100644 index 000000000000..5a8757f61984 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_composite.dart @@ -0,0 +1,152 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OuterComposite { + /// Returns a new [OuterComposite] instance. + OuterComposite({ + this.myNumber, + this.myString, + this.myBoolean, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + num? myNumber; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? myString; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + bool? myBoolean; + + @override + bool operator ==(Object other) => identical(this, other) || other is OuterComposite && + other.myNumber == myNumber && + other.myString == myString && + other.myBoolean == myBoolean; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (myNumber == null ? 0 : myNumber!.hashCode) + + (myString == null ? 0 : myString!.hashCode) + + (myBoolean == null ? 0 : myBoolean!.hashCode); + + @override + String toString() => 'OuterComposite[myNumber=$myNumber, myString=$myString, myBoolean=$myBoolean]'; + + Map toJson() { + final json = {}; + if (this.myNumber != null) { + json[r'my_number'] = this.myNumber; + } else { + json[r'my_number'] = null; + } + if (this.myString != null) { + json[r'my_string'] = this.myString; + } else { + json[r'my_string'] = null; + } + if (this.myBoolean != null) { + json[r'my_boolean'] = this.myBoolean; + } else { + json[r'my_boolean'] = null; + } + return json; + } + + /// Returns a new [OuterComposite] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OuterComposite? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OuterComposite[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OuterComposite[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OuterComposite( + myNumber: num.parse('${json[r'my_number']}'), + myString: mapValueOfType(json, r'my_string'), + myBoolean: mapValueOfType(json, r'my_boolean'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterComposite.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OuterComposite.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OuterComposite-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OuterComposite.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum.dart new file mode 100644 index 000000000000..9ee834d09bab --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class OuterEnum { + /// Instantiate a new enum with the provided [value]. + const OuterEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const placed = OuterEnum._(r'placed'); + static const approved = OuterEnum._(r'approved'); + static const delivered = OuterEnum._(r'delivered'); + + /// List of all possible values in this [enum][OuterEnum]. + static const values = [ + placed, + approved, + delivered, + ]; + + static OuterEnum? fromJson(dynamic value) => OuterEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OuterEnum] to String, +/// and [decode] dynamic data back to [OuterEnum]. +class OuterEnumTypeTransformer { + factory OuterEnumTypeTransformer() => _instance ??= const OuterEnumTypeTransformer._(); + + const OuterEnumTypeTransformer._(); + + String encode(OuterEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a OuterEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OuterEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'placed': return OuterEnum.placed; + case r'approved': return OuterEnum.approved; + case r'delivered': return OuterEnum.delivered; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OuterEnumTypeTransformer] instance. + static OuterEnumTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_default_value.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_default_value.dart new file mode 100644 index 000000000000..3eb74df05c04 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_default_value.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class OuterEnumDefaultValue { + /// Instantiate a new enum with the provided [value]. + const OuterEnumDefaultValue._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const placed = OuterEnumDefaultValue._(r'placed'); + static const approved = OuterEnumDefaultValue._(r'approved'); + static const delivered = OuterEnumDefaultValue._(r'delivered'); + + /// List of all possible values in this [enum][OuterEnumDefaultValue]. + static const values = [ + placed, + approved, + delivered, + ]; + + static OuterEnumDefaultValue? fromJson(dynamic value) => OuterEnumDefaultValueTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnumDefaultValue.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OuterEnumDefaultValue] to String, +/// and [decode] dynamic data back to [OuterEnumDefaultValue]. +class OuterEnumDefaultValueTypeTransformer { + factory OuterEnumDefaultValueTypeTransformer() => _instance ??= const OuterEnumDefaultValueTypeTransformer._(); + + const OuterEnumDefaultValueTypeTransformer._(); + + String encode(OuterEnumDefaultValue data) => data.value; + + /// Decodes a [dynamic value][data] to a OuterEnumDefaultValue. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OuterEnumDefaultValue? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'placed': return OuterEnumDefaultValue.placed; + case r'approved': return OuterEnumDefaultValue.approved; + case r'delivered': return OuterEnumDefaultValue.delivered; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OuterEnumDefaultValueTypeTransformer] instance. + static OuterEnumDefaultValueTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer.dart new file mode 100644 index 000000000000..ca3f669d7c8a --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class OuterEnumInteger { + /// Instantiate a new enum with the provided [value]. + const OuterEnumInteger._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const number0 = OuterEnumInteger._(0); + static const number1 = OuterEnumInteger._(1); + static const number2 = OuterEnumInteger._(2); + + /// List of all possible values in this [enum][OuterEnumInteger]. + static const values = [ + number0, + number1, + number2, + ]; + + static OuterEnumInteger? fromJson(dynamic value) => OuterEnumIntegerTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnumInteger.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OuterEnumInteger] to int, +/// and [decode] dynamic data back to [OuterEnumInteger]. +class OuterEnumIntegerTypeTransformer { + factory OuterEnumIntegerTypeTransformer() => _instance ??= const OuterEnumIntegerTypeTransformer._(); + + const OuterEnumIntegerTypeTransformer._(); + + int encode(OuterEnumInteger data) => data.value; + + /// Decodes a [dynamic value][data] to a OuterEnumInteger. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OuterEnumInteger? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 0: return OuterEnumInteger.number0; + case 1: return OuterEnumInteger.number1; + case 2: return OuterEnumInteger.number2; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OuterEnumIntegerTypeTransformer] instance. + static OuterEnumIntegerTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer_default_value.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer_default_value.dart new file mode 100644 index 000000000000..7dcc72b79c93 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_enum_integer_default_value.dart @@ -0,0 +1,88 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class OuterEnumIntegerDefaultValue { + /// Instantiate a new enum with the provided [value]. + const OuterEnumIntegerDefaultValue._(this.value); + + /// The underlying value of this enum member. + final int value; + + @override + String toString() => value.toString(); + + int toJson() => value; + + static const number0 = OuterEnumIntegerDefaultValue._(0); + static const number1 = OuterEnumIntegerDefaultValue._(1); + static const number2 = OuterEnumIntegerDefaultValue._(2); + + /// List of all possible values in this [enum][OuterEnumIntegerDefaultValue]. + static const values = [ + number0, + number1, + number2, + ]; + + static OuterEnumIntegerDefaultValue? fromJson(dynamic value) => OuterEnumIntegerDefaultValueTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterEnumIntegerDefaultValue.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [OuterEnumIntegerDefaultValue] to int, +/// and [decode] dynamic data back to [OuterEnumIntegerDefaultValue]. +class OuterEnumIntegerDefaultValueTypeTransformer { + factory OuterEnumIntegerDefaultValueTypeTransformer() => _instance ??= const OuterEnumIntegerDefaultValueTypeTransformer._(); + + const OuterEnumIntegerDefaultValueTypeTransformer._(); + + int encode(OuterEnumIntegerDefaultValue data) => data.value; + + /// Decodes a [dynamic value][data] to a OuterEnumIntegerDefaultValue. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + OuterEnumIntegerDefaultValue? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case 0: return OuterEnumIntegerDefaultValue.number0; + case 1: return OuterEnumIntegerDefaultValue.number1; + case 2: return OuterEnumIntegerDefaultValue.number2; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [OuterEnumIntegerDefaultValueTypeTransformer] instance. + static OuterEnumIntegerDefaultValueTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_object_with_enum_property.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_object_with_enum_property.dart new file mode 100644 index 000000000000..96a121ffc6f5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/outer_object_with_enum_property.dart @@ -0,0 +1,109 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class OuterObjectWithEnumProperty { + /// Returns a new [OuterObjectWithEnumProperty] instance. + OuterObjectWithEnumProperty({ + required this.value, + }); + + OuterEnumInteger value; + + @override + bool operator ==(Object other) => identical(this, other) || other is OuterObjectWithEnumProperty && + other.value == value; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (value.hashCode); + + @override + String toString() => 'OuterObjectWithEnumProperty[value=$value]'; + + Map toJson() { + final json = {}; + json[r'value'] = this.value; + return json; + } + + /// Returns a new [OuterObjectWithEnumProperty] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static OuterObjectWithEnumProperty? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "OuterObjectWithEnumProperty[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "OuterObjectWithEnumProperty[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return OuterObjectWithEnumProperty( + value: OuterEnumInteger.fromJson(json[r'value'])!, + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = OuterObjectWithEnumProperty.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = OuterObjectWithEnumProperty.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of OuterObjectWithEnumProperty-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = OuterObjectWithEnumProperty.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'value', + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart new file mode 100644 index 000000000000..5fc3c16cd56d --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart @@ -0,0 +1,194 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ParentWithNullable { + /// Returns a new [ParentWithNullable] instance. + ParentWithNullable({ + this.type, + this.nullableproperty, + }); + + ParentWithNullableTypeEnum? type; + + String? nullableproperty; + + @override + bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && + other.type == type && + other.nullableproperty == nullableproperty; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (type == null ? 0 : type!.hashCode) + + (nullableproperty == null ? 0 : nullableproperty!.hashCode); + + @override + String toString() => 'ParentWithNullable[type=$type, nullableproperty=$nullableproperty]'; + + Map toJson() { + final json = {}; + if (this.type != null) { + json[r'type'] = this.type; + } else { + json[r'type'] = null; + } + if (this.nullableproperty != null) { + json[r'nullableProperty'] = this.nullableproperty; + } else { + json[r'nullableProperty'] = null; + } + return json; + } + + /// Returns a new [ParentWithNullable] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ParentWithNullable? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ParentWithNullable[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ParentWithNullable[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ParentWithNullable( + type: ParentWithNullableTypeEnum.fromJson(json[r'type']), + nullableproperty: mapValueOfType(json, r'nullableProperty'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ParentWithNullable.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ParentWithNullable.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ParentWithNullable-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ParentWithNullable.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + + +class ParentWithNullableTypeEnum { + /// Instantiate a new enum with the provided [value]. + const ParentWithNullableTypeEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const childwithnullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); + + /// List of all possible values in this [enum][ParentWithNullableTypeEnum]. + static const values = [ + childwithnullable, + ]; + + static ParentWithNullableTypeEnum? fromJson(dynamic value) => ParentWithNullableTypeEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ParentWithNullableTypeEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [ParentWithNullableTypeEnum] to String, +/// and [decode] dynamic data back to [ParentWithNullableTypeEnum]. +class ParentWithNullableTypeEnumTypeTransformer { + factory ParentWithNullableTypeEnumTypeTransformer() => _instance ??= const ParentWithNullableTypeEnumTypeTransformer._(); + + const ParentWithNullableTypeEnumTypeTransformer._(); + + String encode(ParentWithNullableTypeEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a ParentWithNullableTypeEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + ParentWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'ChildWithNullable': return ParentWithNullableTypeEnum.childwithnullable; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [ParentWithNullableTypeEnumTypeTransformer] instance. + static ParentWithNullableTypeEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart new file mode 100644 index 000000000000..6d44804b9a63 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart @@ -0,0 +1,249 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Pet { + /// Returns a new [Pet] instance. + Pet({ + this.id, + this.category, + required this.name, + this.photourls = const {}, + this.tags = const [], + this.status, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + Category? category; + + String name; + + Set photourls; + + List tags; + + /// pet status in the store + PetStatusEnum? status; + + @override + bool operator ==(Object other) => identical(this, other) || other is Pet && + other.id == id && + other.category == category && + other.name == name && + _deepEquality.equals(other.photourls, photourls) && + _deepEquality.equals(other.tags, tags) && + other.status == status; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (category == null ? 0 : category!.hashCode) + + (name.hashCode) + + (photourls.hashCode) + + (tags.hashCode) + + (status == null ? 0 : status!.hashCode); + + @override + String toString() => 'Pet[id=$id, category=$category, name=$name, photourls=$photourls, tags=$tags, status=$status]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.category != null) { + json[r'category'] = this.category; + } else { + json[r'category'] = null; + } + json[r'name'] = this.name; + json[r'photoUrls'] = this.photourls.toList(growable: false); + json[r'tags'] = this.tags; + if (this.status != null) { + json[r'status'] = this.status; + } else { + json[r'status'] = null; + } + return json; + } + + /// Returns a new [Pet] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Pet? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Pet[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Pet[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Pet( + id: mapValueOfType(json, r'id'), + category: Category.fromJson(json[r'category']), + name: mapValueOfType(json, r'name')!, + photourls: json[r'photoUrls'] is Iterable + ? (json[r'photoUrls'] as Iterable).cast().toSet() + : const {}, + tags: Tag.listFromJson(json[r'tags']), + status: PetStatusEnum.fromJson(json[r'status']), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Pet.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Pet.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Pet-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Pet.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + 'name', + 'photoUrls', + }; +} + +/// pet status in the store +class PetStatusEnum { + /// Instantiate a new enum with the provided [value]. + const PetStatusEnum._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const available = PetStatusEnum._(r'available'); + static const pending = PetStatusEnum._(r'pending'); + static const sold = PetStatusEnum._(r'sold'); + + /// List of all possible values in this [enum][PetStatusEnum]. + static const values = [ + available, + pending, + sold, + ]; + + static PetStatusEnum? fromJson(dynamic value) => PetStatusEnumTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = PetStatusEnum.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [PetStatusEnum] to String, +/// and [decode] dynamic data back to [PetStatusEnum]. +class PetStatusEnumTypeTransformer { + factory PetStatusEnumTypeTransformer() => _instance ??= const PetStatusEnumTypeTransformer._(); + + const PetStatusEnumTypeTransformer._(); + + String encode(PetStatusEnum data) => data.value; + + /// Decodes a [dynamic value][data] to a PetStatusEnum. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + PetStatusEnum? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'available': return PetStatusEnum.available; + case r'pending': return PetStatusEnum.pending; + case r'sold': return PetStatusEnum.sold; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [PetStatusEnumTypeTransformer] instance. + static PetStatusEnumTypeTransformer? _instance; +} + + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/read_only_first.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/read_only_first.dart new file mode 100644 index 000000000000..7088ae4195bf --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/read_only_first.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class ReadOnlyFirst { + /// Returns a new [ReadOnlyFirst] instance. + ReadOnlyFirst({ + this.bar, + this.baz, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? bar; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? baz; + + @override + bool operator ==(Object other) => identical(this, other) || other is ReadOnlyFirst && + other.bar == bar && + other.baz == baz; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (bar == null ? 0 : bar!.hashCode) + + (baz == null ? 0 : baz!.hashCode); + + @override + String toString() => 'ReadOnlyFirst[bar=$bar, baz=$baz]'; + + Map toJson() { + final json = {}; + if (this.bar != null) { + json[r'bar'] = this.bar; + } else { + json[r'bar'] = null; + } + if (this.baz != null) { + json[r'baz'] = this.baz; + } else { + json[r'baz'] = null; + } + return json; + } + + /// Returns a new [ReadOnlyFirst] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static ReadOnlyFirst? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "ReadOnlyFirst[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "ReadOnlyFirst[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return ReadOnlyFirst( + bar: mapValueOfType(json, r'bar'), + baz: mapValueOfType(json, r'baz'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = ReadOnlyFirst.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = ReadOnlyFirst.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of ReadOnlyFirst-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = ReadOnlyFirst.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/single_ref_type.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/single_ref_type.dart new file mode 100644 index 000000000000..332a19c56fee --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/single_ref_type.dart @@ -0,0 +1,85 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + + +class SingleRefType { + /// Instantiate a new enum with the provided [value]. + const SingleRefType._(this.value); + + /// The underlying value of this enum member. + final String value; + + @override + String toString() => value; + + String toJson() => value; + + static const admin = SingleRefType._(r'admin'); + static const user = SingleRefType._(r'user'); + + /// List of all possible values in this [enum][SingleRefType]. + static const values = [ + admin, + user, + ]; + + static SingleRefType? fromJson(dynamic value) => SingleRefTypeTypeTransformer().decode(value); + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SingleRefType.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } +} + +/// Transformation class that can [encode] an instance of [SingleRefType] to String, +/// and [decode] dynamic data back to [SingleRefType]. +class SingleRefTypeTypeTransformer { + factory SingleRefTypeTypeTransformer() => _instance ??= const SingleRefTypeTypeTransformer._(); + + const SingleRefTypeTypeTransformer._(); + + String encode(SingleRefType data) => data.value; + + /// Decodes a [dynamic value][data] to a SingleRefType. + /// + /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, + /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] + /// cannot be decoded successfully, then an [UnimplementedError] is thrown. + /// + /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, + /// and users are still using an old app with the old code. + SingleRefType? decode(dynamic data, {bool allowNull = true}) { + if (data != null) { + switch (data) { + case r'admin': return SingleRefType.admin; + case r'user': return SingleRefType.user; + default: + if (!allowNull) { + throw ArgumentError('Unknown enum value to decode: $data'); + } + } + } + return null; + } + + /// Singleton [SingleRefTypeTypeTransformer] instance. + static SingleRefTypeTypeTransformer? _instance; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart new file mode 100644 index 000000000000..ac2f099a4df4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class SpecialModelName { + /// Returns a new [SpecialModelName] instance. + SpecialModelName({ + this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + + @override + bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && + other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == null ? 0 : dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket!.hashCode); + + @override + String toString() => 'SpecialModelName[dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket=$dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket]'; + + Map toJson() { + final json = {}; + if (this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket != null) { + json[r'$special[property.name]'] = this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + } else { + json[r'$special[property.name]'] = null; + } + return json; + } + + /// Returns a new [SpecialModelName] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static SpecialModelName? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "SpecialModelName[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "SpecialModelName[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return SpecialModelName( + dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket: mapValueOfType(json, r'$special[property.name]'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = SpecialModelName.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = SpecialModelName.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of SpecialModelName-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = SpecialModelName.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/tag.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/tag.dart new file mode 100644 index 000000000000..b8b5696cf9b5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/tag.dart @@ -0,0 +1,135 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class Tag { + /// Returns a new [Tag] instance. + Tag({ + this.id, + this.name, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? name; + + @override + bool operator ==(Object other) => identical(this, other) || other is Tag && + other.id == id && + other.name == name; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (name == null ? 0 : name!.hashCode); + + @override + String toString() => 'Tag[id=$id, name=$name]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.name != null) { + json[r'name'] = this.name; + } else { + json[r'name'] = null; + } + return json; + } + + /// Returns a new [Tag] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static Tag? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "Tag[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "Tag[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return Tag( + id: mapValueOfType(json, r'id'), + name: mapValueOfType(json, r'name'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = Tag.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = Tag.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of Tag-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = Tag.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart new file mode 100644 index 000000000000..fd81a25bd83d --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart @@ -0,0 +1,118 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class TestInlineFreeformAdditionalPropertiesRequest { + /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. + TestInlineFreeformAdditionalPropertiesRequest({ + this.someproperty, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? someproperty; + + @override + bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && + other.someproperty == someproperty; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (someproperty == null ? 0 : someproperty!.hashCode); + + @override + String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someproperty=$someproperty]'; + + Map toJson() { + final json = {}; + if (this.someproperty != null) { + json[r'someProperty'] = this.someproperty; + } else { + json[r'someProperty'] = null; + } + return json; + } + + /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static TestInlineFreeformAdditionalPropertiesRequest? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "TestInlineFreeformAdditionalPropertiesRequest[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "TestInlineFreeformAdditionalPropertiesRequest[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return TestInlineFreeformAdditionalPropertiesRequest( + someproperty: mapValueOfType(json, r'someProperty'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = TestInlineFreeformAdditionalPropertiesRequest.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = TestInlineFreeformAdditionalPropertiesRequest.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of TestInlineFreeformAdditionalPropertiesRequest-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = TestInlineFreeformAdditionalPropertiesRequest.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart new file mode 100644 index 000000000000..b6be541d49f9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart @@ -0,0 +1,238 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +part of openapi.api; + +class User { + /// Returns a new [User] instance. + User({ + this.id, + this.username, + this.firstname, + this.lastname, + this.email, + this.password, + this.phone, + this.userstatus, + }); + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? id; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? username; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? firstname; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? lastname; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? email; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? password; + + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + String? phone; + + /// User Status + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + int? userstatus; + + @override + bool operator ==(Object other) => identical(this, other) || other is User && + other.id == id && + other.username == username && + other.firstname == firstname && + other.lastname == lastname && + other.email == email && + other.password == password && + other.phone == phone && + other.userstatus == userstatus; + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + (id == null ? 0 : id!.hashCode) + + (username == null ? 0 : username!.hashCode) + + (firstname == null ? 0 : firstname!.hashCode) + + (lastname == null ? 0 : lastname!.hashCode) + + (email == null ? 0 : email!.hashCode) + + (password == null ? 0 : password!.hashCode) + + (phone == null ? 0 : phone!.hashCode) + + (userstatus == null ? 0 : userstatus!.hashCode); + + @override + String toString() => 'User[id=$id, username=$username, firstname=$firstname, lastname=$lastname, email=$email, password=$password, phone=$phone, userstatus=$userstatus]'; + + Map toJson() { + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; + } else { + json[r'id'] = null; + } + if (this.username != null) { + json[r'username'] = this.username; + } else { + json[r'username'] = null; + } + if (this.firstname != null) { + json[r'firstName'] = this.firstname; + } else { + json[r'firstName'] = null; + } + if (this.lastname != null) { + json[r'lastName'] = this.lastname; + } else { + json[r'lastName'] = null; + } + if (this.email != null) { + json[r'email'] = this.email; + } else { + json[r'email'] = null; + } + if (this.password != null) { + json[r'password'] = this.password; + } else { + json[r'password'] = null; + } + if (this.phone != null) { + json[r'phone'] = this.phone; + } else { + json[r'phone'] = null; + } + if (this.userstatus != null) { + json[r'userStatus'] = this.userstatus; + } else { + json[r'userStatus'] = null; + } + return json; + } + + /// Returns a new [User] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static User? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "User[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "User[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return User( + id: mapValueOfType(json, r'id'), + username: mapValueOfType(json, r'username'), + firstname: mapValueOfType(json, r'firstName'), + lastname: mapValueOfType(json, r'lastName'), + email: mapValueOfType(json, r'email'), + password: mapValueOfType(json, r'password'), + phone: mapValueOfType(json, r'phone'), + userstatus: mapValueOfType(json, r'userStatus'), + ); + } + return null; + } + + static List listFromJson(dynamic json, {bool growable = false,}) { + final result = []; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = User.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = User.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of User-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + // ignore: parameter_assignments + json = json.cast(); + for (final entry in json.entries) { + map[entry.key] = User.listFromJson(entry.value, growable: growable,); + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { + }; +} + diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/pubspec.yaml b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/pubspec.yaml new file mode 100644 index 000000000000..8a7210966700 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/pubspec.yaml @@ -0,0 +1,17 @@ +# +# AUTO-GENERATED FILE, DO NOT MODIFY! +# + +name: 'openapi' +version: '1.0.0' +description: 'OpenAPI API client' +homepage: 'homepage' +environment: + sdk: '>=2.12.0 <4.0.0' +dependencies: + collection: '>=1.17.0 <2.0.0' + http: '>=0.13.0 <2.0.0' + intl: any + meta: '>=1.1.8 <2.0.0' +dev_dependencies: + test: '>=1.21.6 <1.22.0' diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart new file mode 100644 index 000000000000..2d8f6c5016cd --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/additional_properties_class_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AdditionalPropertiesClass +void main() { + // final instance = AdditionalPropertiesClass(); + + group('test AdditionalPropertiesClass', () { + // Map mapProperty (default value: const {}) + test('to test the property `mapProperty`', () async { + // TODO + }); + + // Map> mapOfMapProperty (default value: const {}) + test('to test the property `mapOfMapProperty`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart new file mode 100644 index 000000000000..b86d0401fbc5 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/all_of_with_single_ref_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for AllOfWithSingleRef +void main() { + // final instance = AllOfWithSingleRef(); + + group('test AllOfWithSingleRef', () { + // String username + test('to test the property `username`', () async { + // TODO + }); + + // SingleRefType singlereftype + test('to test the property `singlereftype`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/animal_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/animal_test.dart new file mode 100644 index 000000000000..add666f12d71 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/animal_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Animal +void main() { + // final instance = Animal(); + + group('test Animal', () { + // String classname + test('to test the property `classname`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart new file mode 100644 index 000000000000..c6dbce9afa79 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/another_fake_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for AnotherFakeApi +void main() { + // final instance = AnotherFakeApi(); + + group('tests for AnotherFakeApi', () { + // To test special tags + // + // To test special tags and operation ID starting with number + // + //Future call123testSpecialTags(ModelClient modelclient) async + test('test call123testSpecialTags', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart new file mode 100644 index 000000000000..ee118ec81e02 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/api_response_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ApiResponse +void main() { + // final instance = ApiResponse(); + + group('test ApiResponse', () { + // int code + test('to test the property `code`', () async { + // TODO + }); + + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String message + test('to test the property `message`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart new file mode 100644 index 000000000000..f295f377b076 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_array_of_number_only_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ArrayOfArrayOfNumberOnly +void main() { + // final instance = ArrayOfArrayOfNumberOnly(); + + group('test ArrayOfArrayOfNumberOnly', () { + // List> arrayarraynumber (default value: const []) + test('to test the property `arrayarraynumber`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart new file mode 100644 index 000000000000..a7d4090cc6a7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_of_number_only_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ArrayOfNumberOnly +void main() { + // final instance = ArrayOfNumberOnly(); + + group('test ArrayOfNumberOnly', () { + // List arraynumber (default value: const []) + test('to test the property `arraynumber`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart new file mode 100644 index 000000000000..888cfe72101a --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/array_test_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ArrayTest +void main() { + // final instance = ArrayTest(); + + group('test ArrayTest', () { + // List arrayOfString (default value: const []) + test('to test the property `arrayOfString`', () async { + // TODO + }); + + // List> arrayArrayOfInteger (default value: const []) + test('to test the property `arrayArrayOfInteger`', () async { + // TODO + }); + + // List> arrayArrayOfModel (default value: const []) + test('to test the property `arrayArrayOfModel`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart new file mode 100644 index 000000000000..6b8248c57c74 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/capitalization_test.dart @@ -0,0 +1,53 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Capitalization +void main() { + // final instance = Capitalization(); + + group('test Capitalization', () { + // String smallcamel + test('to test the property `smallcamel`', () async { + // TODO + }); + + // String capitalcamel + test('to test the property `capitalcamel`', () async { + // TODO + }); + + // String smallSnake + test('to test the property `smallSnake`', () async { + // TODO + }); + + // String capitalSnake + test('to test the property `capitalSnake`', () async { + // TODO + }); + + // String scaEthFlowPoints + test('to test the property `scaEthFlowPoints`', () async { + // TODO + }); + + // Name of the pet + // String attName + test('to test the property `attName`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/cat_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/cat_test.dart new file mode 100644 index 000000000000..332cc962ad57 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/cat_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Cat +void main() { + // final instance = Cat(); + + group('test Cat', () { + // String classname + test('to test the property `classname`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + // bool declawed + test('to test the property `declawed`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/category_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/category_test.dart new file mode 100644 index 000000000000..f463d6f760fd --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/category_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Category +void main() { + // final instance = Category(); + + group('test Category', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String name (default value: 'default-name') + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart new file mode 100644 index 000000000000..d7f703087a99 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/child_with_nullable_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ChildWithNullable +void main() { + // final instance = ChildWithNullable(); + + group('test ChildWithNullable', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableproperty + test('to test the property `nullableproperty`', () async { + // TODO + }); + + // String otherproperty + test('to test the property `otherproperty`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart new file mode 100644 index 000000000000..be11ea6968ff --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/class_model_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ClassModel +void main() { + // final instance = ClassModel(); + + group('test ClassModel', () { + // String class_ + test('to test the property `class_`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart new file mode 100644 index 000000000000..114c98209b61 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/default_api_test.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for DefaultApi +void main() { + // final instance = DefaultApi(); + + group('tests for DefaultApi', () { + //Future fooGet() async + test('test fooGet', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart new file mode 100644 index 000000000000..01d2d9a5200e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/deprecated_object_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for DeprecatedObject +void main() { + // final instance = DeprecatedObject(); + + group('test DeprecatedObject', () { + // String name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/dog_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/dog_test.dart new file mode 100644 index 000000000000..58108210f7c3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/dog_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Dog +void main() { + // final instance = Dog(); + + group('test Dog', () { + // String classname + test('to test the property `classname`', () async { + // TODO + }); + + // String color (default value: 'red') + test('to test the property `color`', () async { + // TODO + }); + + // String breed + test('to test the property `breed`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart new file mode 100644 index 000000000000..c138856233ad --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_arrays_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for EnumArrays +void main() { + // final instance = EnumArrays(); + + group('test EnumArrays', () { + // String justSymbol + test('to test the property `justSymbol`', () async { + // TODO + }); + + // List arrayEnum (default value: const []) + test('to test the property `arrayEnum`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_class_test.dart new file mode 100644 index 000000000000..19603ea30129 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_class_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for EnumClass +void main() { + + group('test EnumClass', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart new file mode 100644 index 000000000000..50ff85cfd334 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/enum_test_test.dart @@ -0,0 +1,62 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for EnumTest +void main() { + // final instance = EnumTest(); + + group('test EnumTest', () { + // String enumString + test('to test the property `enumString`', () async { + // TODO + }); + + // String enumStringRequired + test('to test the property `enumStringRequired`', () async { + // TODO + }); + + // int enumInteger + test('to test the property `enumInteger`', () async { + // TODO + }); + + // double enumNumber + test('to test the property `enumNumber`', () async { + // TODO + }); + + // OuterEnum outerenum + test('to test the property `outerenum`', () async { + // TODO + }); + + // OuterEnumInteger outerenuminteger + test('to test the property `outerenuminteger`', () async { + // TODO + }); + + // OuterEnumDefaultValue outerenumdefaultvalue + test('to test the property `outerenumdefaultvalue`', () async { + // TODO + }); + + // OuterEnumIntegerDefaultValue outerenumintegerdefaultvalue + test('to test the property `outerenumintegerdefaultvalue`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart new file mode 100644 index 000000000000..ee395bb53d66 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_api_test.dart @@ -0,0 +1,193 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for FakeApi +void main() { + // final instance = FakeApi(); + + group('tests for FakeApi', () { + // for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys + // + //Future fakeBigDecimalMap() async + test('test fakeBigDecimalMap', () async { + // TODO + }); + + // Health check endpoint + // + //Future fakeHealthGet() async + test('test fakeHealthGet', () async { + // TODO + }); + + // test http signature authentication + // + //Future fakeHttpSignatureTest(Pet pet, { String query1, String header1 }) async + test('test fakeHttpSignatureTest', () async { + // TODO + }); + + // Test serialization of outer boolean types + // + //Future fakeOuterBooleanSerialize({ bool body }) async + test('test fakeOuterBooleanSerialize', () async { + // TODO + }); + + // Test serialization of object with outer number type + // + //Future fakeOuterCompositeSerialize({ OuterComposite outercomposite }) async + test('test fakeOuterCompositeSerialize', () async { + // TODO + }); + + // Test serialization of outer number types + // + //Future fakeOuterNumberSerialize({ num body }) async + test('test fakeOuterNumberSerialize', () async { + // TODO + }); + + // Test serialization of outer string types + // + //Future fakeOuterStringSerialize({ String body }) async + test('test fakeOuterStringSerialize', () async { + // TODO + }); + + // Test serialization of enum (int) properties with examples + // + //Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerobjectwithenumproperty) async + test('test fakePropertyEnumIntegerSerialize', () async { + // TODO + }); + + // test referenced additionalProperties + // + // + // + //Future testAdditionalPropertiesReference(Map requestBody) async + test('test testAdditionalPropertiesReference', () async { + // TODO + }); + + // For this test, the body has to be a binary file. + // + //Future testBodyWithBinary(MultipartFile body) async + test('test testBodyWithBinary', () async { + // TODO + }); + + // For this test, the body for this request must reference a schema named `File`. + // + //Future testBodyWithFileSchema(FileSchemaTestClass fileschematestclass) async + test('test testBodyWithFileSchema', () async { + // TODO + }); + + //Future testBodyWithQueryParams(String query, User user) async + test('test testBodyWithQueryParams', () async { + // TODO + }); + + // To test \"client\" model + // + // To test \"client\" model + // + //Future testClientModel(ModelClient modelclient) async + test('test testClientModel', () async { + // TODO + }); + + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // + // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + // + //Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int integer, int int32, int int64, double float, String string, MultipartFile binary, DateTime date, DateTime datetime, String password, String callback }) async + test('test testEndpointParameters', () async { + // TODO + }); + + // To test enum parameters + // + // To test enum parameters + // + //Future testEnumParameters({ List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, int enumQueryInteger, double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString }) async + test('test testEnumParameters', () async { + // TODO + }); + + // Fake endpoint to test group parameters (optional) + // + // Fake endpoint to test group parameters (optional) + // + //Future testGroupParameters(int requiredStringGroup, bool requiredBooleanGroup, int requiredInt64Group, { int stringGroup, bool booleanGroup, int int64Group }) async + test('test testGroupParameters', () async { + // TODO + }); + + // test inline additionalProperties + // + // + // + //Future testInlineAdditionalProperties(Map requestBody) async + test('test testInlineAdditionalProperties', () async { + // TODO + }); + + // test inline free-form additionalProperties + // + // + // + //Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest) async + test('test testInlineFreeformAdditionalProperties', () async { + // TODO + }); + + // test json serialization of form data + // + // + // + //Future testJsonFormData(String param, String param2) async + test('test testJsonFormData', () async { + // TODO + }); + + // test nullable parent property + // + // + // + //Future testNullable(ChildWithNullable childwithnullable) async + test('test testNullable', () async { + // TODO + }); + + // To test the collection format in query parameters + // + //Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map language }) async + test('test testQueryParameterCollectionFormat', () async { + // TODO + }); + + // test referenced string map + // + // + // + //Future testStringMapReference(Map requestBody) async + test('test testStringMapReference', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart new file mode 100644 index 000000000000..1e59ed782914 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_big_decimal_map200_response_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FakeBigDecimalMap200Response +void main() { + // final instance = FakeBigDecimalMap200Response(); + + group('test FakeBigDecimalMap200Response', () { + // num someid + test('to test the property `someid`', () async { + // TODO + }); + + // Map somemap (default value: const {}) + test('to test the property `somemap`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart new file mode 100644 index 000000000000..1df72df2dc41 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/fake_classname_tags123_api_test.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for FakeClassnameTags123Api +void main() { + // final instance = FakeClassnameTags123Api(); + + group('tests for FakeClassnameTags123Api', () { + // To test class name in snake case + // + // To test class name in snake case + // + //Future testClassname(ModelClient modelclient) async + test('test testClassname', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart new file mode 100644 index 000000000000..6b9a34f502b7 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/file_schema_test_class_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FileSchemaTestClass +void main() { + // final instance = FileSchemaTestClass(); + + group('test FileSchemaTestClass', () { + // ModelFile file + test('to test the property `file`', () async { + // TODO + }); + + // List files (default value: const []) + test('to test the property `files`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart new file mode 100644 index 000000000000..907eaa37eca3 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_get_default_response_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FooGetDefaultResponse +void main() { + // final instance = FooGetDefaultResponse(); + + group('test FooGetDefaultResponse', () { + // Foo string + test('to test the property `string`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_test.dart new file mode 100644 index 000000000000..6dd3993f4875 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/foo_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Foo +void main() { + // final instance = Foo(); + + group('test Foo', () { + // String bar (default value: 'bar') + test('to test the property `bar`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart new file mode 100644 index 000000000000..391691f27d30 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/format_test_test.dart @@ -0,0 +1,104 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for FormatTest +void main() { + // final instance = FormatTest(); + + group('test FormatTest', () { + // int integer + test('to test the property `integer`', () async { + // TODO + }); + + // int int32 + test('to test the property `int32`', () async { + // TODO + }); + + // int int64 + test('to test the property `int64`', () async { + // TODO + }); + + // num number + test('to test the property `number`', () async { + // TODO + }); + + // double float + test('to test the property `float`', () async { + // TODO + }); + + // double double_ + test('to test the property `double_`', () async { + // TODO + }); + + // double decimal + test('to test the property `decimal`', () async { + // TODO + }); + + // String string + test('to test the property `string`', () async { + // TODO + }); + + // String byte + test('to test the property `byte`', () async { + // TODO + }); + + // MultipartFile binary + test('to test the property `binary`', () async { + // TODO + }); + + // DateTime date + test('to test the property `date`', () async { + // TODO + }); + + // DateTime datetime + test('to test the property `datetime`', () async { + // TODO + }); + + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // String password + test('to test the property `password`', () async { + // TODO + }); + + // A string that is a 10 digit number. Can have leading zeros. + // String patternWithDigits + test('to test the property `patternWithDigits`', () async { + // TODO + }); + + // A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. + // String patternWithDigitsAndDelimiter + test('to test the property `patternWithDigitsAndDelimiter`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart new file mode 100644 index 000000000000..f535c23fa962 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/has_only_read_only_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HasOnlyReadOnly +void main() { + // final instance = HasOnlyReadOnly(); + + group('test HasOnlyReadOnly', () { + // String bar + test('to test the property `bar`', () async { + // TODO + }); + + // String foo + test('to test the property `foo`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart new file mode 100644 index 000000000000..51c27a5ffd6f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/health_check_result_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for HealthCheckResult +void main() { + // final instance = HealthCheckResult(); + + group('test HealthCheckResult', () { + // String nullablemessage + test('to test the property `nullablemessage`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart new file mode 100644 index 000000000000..ed11d6d1227b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/map_test_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for MapTest +void main() { + // final instance = MapTest(); + + group('test MapTest', () { + // Map> mapMapOfString (default value: const {}) + test('to test the property `mapMapOfString`', () async { + // TODO + }); + + // Map mapOfEnumString (default value: const {}) + test('to test the property `mapOfEnumString`', () async { + // TODO + }); + + // Map directMap (default value: const {}) + test('to test the property `directMap`', () async { + // TODO + }); + + // Map indirectMap (default value: const {}) + test('to test the property `indirectMap`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart new file mode 100644 index 000000000000..dc1fda906e94 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/mixed_properties_and_additional_properties_class_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for MixedPropertiesAndAdditionalPropertiesClass +void main() { + // final instance = MixedPropertiesAndAdditionalPropertiesClass(); + + group('test MixedPropertiesAndAdditionalPropertiesClass', () { + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // DateTime datetime + test('to test the property `datetime`', () async { + // TODO + }); + + // Map map (default value: const {}) + test('to test the property `map`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart new file mode 100644 index 000000000000..431de0928582 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model200_response_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Model200Response +void main() { + // final instance = Model200Response(); + + group('test Model200Response', () { + // int name + test('to test the property `name`', () async { + // TODO + }); + + // String class_ + test('to test the property `class_`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart new file mode 100644 index 000000000000..614f136b9134 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_client_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ModelClient +void main() { + // final instance = ModelClient(); + + group('test ModelClient', () { + // String client + test('to test the property `client`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart new file mode 100644 index 000000000000..3f2f88d29ca4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_file_test.dart @@ -0,0 +1,28 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ModelFile +void main() { + // final instance = ModelFile(); + + group('test ModelFile', () { + // Test capitalization + // String sourceuri + test('to test the property `sourceuri`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart new file mode 100644 index 000000000000..6f6707fee36b --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_list_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ModelList +void main() { + // final instance = ModelList(); + + group('test ModelList', () { + // String n123list + test('to test the property `n123list`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart new file mode 100644 index 000000000000..6a1888f0883e --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/model_return_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ModelReturn +void main() { + // final instance = ModelReturn(); + + group('test ModelReturn', () { + // int return_ + test('to test the property `return_`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/name_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/name_test.dart new file mode 100644 index 000000000000..15aca54b0cf8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/name_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Name +void main() { + // final instance = Name(); + + group('test Name', () { + // int name + test('to test the property `name`', () async { + // TODO + }); + + // int snakeCase + test('to test the property `snakeCase`', () async { + // TODO + }); + + // String property + test('to test the property `property`', () async { + // TODO + }); + + // int n123number + test('to test the property `n123number`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart new file mode 100644 index 000000000000..6258a447760f --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/nullable_class_test.dart @@ -0,0 +1,82 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NullableClass +void main() { + // final instance = NullableClass(); + + group('test NullableClass', () { + // int integerProp + test('to test the property `integerProp`', () async { + // TODO + }); + + // num numberProp + test('to test the property `numberProp`', () async { + // TODO + }); + + // bool booleanProp + test('to test the property `booleanProp`', () async { + // TODO + }); + + // String stringProp + test('to test the property `stringProp`', () async { + // TODO + }); + + // DateTime dateProp + test('to test the property `dateProp`', () async { + // TODO + }); + + // DateTime datetimeProp + test('to test the property `datetimeProp`', () async { + // TODO + }); + + // List arrayNullableProp (default value: const []) + test('to test the property `arrayNullableProp`', () async { + // TODO + }); + + // List arrayAndItemsNullableProp (default value: const []) + test('to test the property `arrayAndItemsNullableProp`', () async { + // TODO + }); + + // List arrayItemsNullable (default value: const []) + test('to test the property `arrayItemsNullable`', () async { + // TODO + }); + + // Map objectNullableProp (default value: const {}) + test('to test the property `objectNullableProp`', () async { + // TODO + }); + + // Map objectAndItemsNullableProp (default value: const {}) + test('to test the property `objectAndItemsNullableProp`', () async { + // TODO + }); + + // Map objectItemsNullable (default value: const {}) + test('to test the property `objectItemsNullable`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart new file mode 100644 index 000000000000..4e62aaa8b551 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/number_only_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for NumberOnly +void main() { + // final instance = NumberOnly(); + + group('test NumberOnly', () { + // num justnumber + test('to test the property `justnumber`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart new file mode 100644 index 000000000000..8d43c8627753 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/object_with_deprecated_fields_test.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ObjectWithDeprecatedFields +void main() { + // final instance = ObjectWithDeprecatedFields(); + + group('test ObjectWithDeprecatedFields', () { + // String uuid + test('to test the property `uuid`', () async { + // TODO + }); + + // num id + test('to test the property `id`', () async { + // TODO + }); + + // DeprecatedObject deprecatedref + test('to test the property `deprecatedref`', () async { + // TODO + }); + + // List bars (default value: const []) + test('to test the property `bars`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/order_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/order_test.dart new file mode 100644 index 000000000000..425571e1f644 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/order_test.dart @@ -0,0 +1,53 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Order +void main() { + // final instance = Order(); + + group('test Order', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // int petid + test('to test the property `petid`', () async { + // TODO + }); + + // int quantity + test('to test the property `quantity`', () async { + // TODO + }); + + // DateTime shipdate + test('to test the property `shipdate`', () async { + // TODO + }); + + // Order Status + // String status + test('to test the property `status`', () async { + // TODO + }); + + // bool complete (default value: false) + test('to test the property `complete`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart new file mode 100644 index 000000000000..bacb1c0dc321 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_composite_test.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OuterComposite +void main() { + // final instance = OuterComposite(); + + group('test OuterComposite', () { + // num myNumber + test('to test the property `myNumber`', () async { + // TODO + }); + + // String myString + test('to test the property `myString`', () async { + // TODO + }); + + // bool myBoolean + test('to test the property `myBoolean`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart new file mode 100644 index 000000000000..b8bccd1b0569 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_default_value_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OuterEnumDefaultValue +void main() { + + group('test OuterEnumDefaultValue', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart new file mode 100644 index 000000000000..08acf7056dc8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_default_value_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OuterEnumIntegerDefaultValue +void main() { + + group('test OuterEnumIntegerDefaultValue', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart new file mode 100644 index 000000000000..5adf20a20d92 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_integer_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OuterEnumInteger +void main() { + + group('test OuterEnumInteger', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart new file mode 100644 index 000000000000..8c51aa895529 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_enum_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OuterEnum +void main() { + + group('test OuterEnum', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart new file mode 100644 index 000000000000..9fffef0c1db1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/outer_object_with_enum_property_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for OuterObjectWithEnumProperty +void main() { + // final instance = OuterObjectWithEnumProperty(); + + group('test OuterObjectWithEnumProperty', () { + // OuterEnumInteger value + test('to test the property `value`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart new file mode 100644 index 000000000000..958c4ae019d4 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/parent_with_nullable_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ParentWithNullable +void main() { + // final instance = ParentWithNullable(); + + group('test ParentWithNullable', () { + // String type + test('to test the property `type`', () async { + // TODO + }); + + // String nullableproperty + test('to test the property `nullableproperty`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart new file mode 100644 index 000000000000..52d58c42de4a --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_api_test.dart @@ -0,0 +1,102 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for PetApi +void main() { + // final instance = PetApi(); + + group('tests for PetApi', () { + // Add a new pet to the store + // + // + // + //Future addPet(Pet pet) async + test('test addPet', () async { + // TODO + }); + + // Deletes a pet + // + // + // + //Future deletePet(int petid, { String apiKey }) async + test('test deletePet', () async { + // TODO + }); + + // Finds Pets by status + // + // Multiple status values can be provided with comma separated strings + // + //Future> findPetsByStatus(List status) async + test('test findPetsByStatus', () async { + // TODO + }); + + // Finds Pets by tags + // + // Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + // + //Future> findPetsByTags(Set tags) async + test('test findPetsByTags', () async { + // TODO + }); + + // Find pet by ID + // + // Returns a single pet + // + //Future getPetById(int petid) async + test('test getPetById', () async { + // TODO + }); + + // Update an existing pet + // + // + // + //Future updatePet(Pet pet) async + test('test updatePet', () async { + // TODO + }); + + // Updates a pet in the store with form data + // + // + // + //Future updatePetWithForm(int petid, { String name, String status }) async + test('test updatePetWithForm', () async { + // TODO + }); + + // uploads an image + // + // + // + //Future uploadFile(int petid, { String additionalmetadata, MultipartFile file }) async + test('test uploadFile', () async { + // TODO + }); + + // uploads an image (required) + // + // + // + //Future uploadFileWithRequiredFile(int petid, MultipartFile requiredfile, { String additionalmetadata }) async + test('test uploadFileWithRequiredFile', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_test.dart new file mode 100644 index 000000000000..602c4c84cdbb --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/pet_test.dart @@ -0,0 +1,53 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Pet +void main() { + // final instance = Pet(); + + group('test Pet', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // Category category + test('to test the property `category`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + // Set photourls (default value: const {}) + test('to test the property `photourls`', () async { + // TODO + }); + + // List tags (default value: const []) + test('to test the property `tags`', () async { + // TODO + }); + + // pet status in the store + // String status + test('to test the property `status`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart new file mode 100644 index 000000000000..9d84c9e3d0c9 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/read_only_first_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for ReadOnlyFirst +void main() { + // final instance = ReadOnlyFirst(); + + group('test ReadOnlyFirst', () { + // String bar + test('to test the property `bar`', () async { + // TODO + }); + + // String baz + test('to test the property `baz`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart new file mode 100644 index 000000000000..aee6e38412e8 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/single_ref_type_test.dart @@ -0,0 +1,21 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for SingleRefType +void main() { + + group('test SingleRefType', () { + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart new file mode 100644 index 000000000000..a7c80ced1801 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/special_model_name_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for SpecialModelName +void main() { + // final instance = SpecialModelName(); + + group('test SpecialModelName', () { + // int dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket + test('to test the property `dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart new file mode 100644 index 000000000000..ea91b78f7079 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/store_api_test.dart @@ -0,0 +1,57 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for StoreApi +void main() { + // final instance = StoreApi(); + + group('tests for StoreApi', () { + // Delete purchase order by ID + // + // For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + // + //Future deleteOrder(String orderId) async + test('test deleteOrder', () async { + // TODO + }); + + // Returns pet inventories by status + // + // Returns a map of status codes to quantities + // + //Future> getInventory() async + test('test getInventory', () async { + // TODO + }); + + // Find purchase order by ID + // + // For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions + // + //Future getOrderById(int orderId) async + test('test getOrderById', () async { + // TODO + }); + + // Place an order for a pet + // + // + // + //Future placeOrder(Order order) async + test('test placeOrder', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/tag_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/tag_test.dart new file mode 100644 index 000000000000..0a7baa9a5600 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/tag_test.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for Tag +void main() { + // final instance = Tag(); + + group('test Tag', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String name + test('to test the property `name`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart new file mode 100644 index 000000000000..019de32bfb0d --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/test_inline_freeform_additional_properties_request_test.dart @@ -0,0 +1,27 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for TestInlineFreeformAdditionalPropertiesRequest +void main() { + // final instance = TestInlineFreeformAdditionalPropertiesRequest(); + + group('test TestInlineFreeformAdditionalPropertiesRequest', () { + // String someproperty + test('to test the property `someproperty`', () async { + // TODO + }); + + + }); + +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart new file mode 100644 index 000000000000..573f19d8ffe1 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_api_test.dart @@ -0,0 +1,93 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + + +/// tests for UserApi +void main() { + // final instance = UserApi(); + + group('tests for UserApi', () { + // Create user + // + // This can only be done by the logged in user. + // + //Future createUser(User user) async + test('test createUser', () async { + // TODO + }); + + // Creates list of users with given input array + // + // + // + //Future createUsersWithArrayInput(List user) async + test('test createUsersWithArrayInput', () async { + // TODO + }); + + // Creates list of users with given input array + // + // + // + //Future createUsersWithListInput(List user) async + test('test createUsersWithListInput', () async { + // TODO + }); + + // Delete user + // + // This can only be done by the logged in user. + // + //Future deleteUser(String username) async + test('test deleteUser', () async { + // TODO + }); + + // Get user by user name + // + // + // + //Future getUserByName(String username) async + test('test getUserByName', () async { + // TODO + }); + + // Logs user into the system + // + // + // + //Future loginUser(String username, String password) async + test('test loginUser', () async { + // TODO + }); + + // Logs out current logged in user session + // + // + // + //Future logoutUser() async + test('test logoutUser', () async { + // TODO + }); + + // Updated user + // + // This can only be done by the logged in user. + // + //Future updateUser(String username, User user) async + test('test updateUser', () async { + // TODO + }); + + }); +} diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_test.dart new file mode 100644 index 000000000000..8f30818caa67 --- /dev/null +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/test/user_test.dart @@ -0,0 +1,63 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// +// @dart=2.18 + +// ignore_for_file: unused_element, unused_import +// ignore_for_file: always_put_required_named_parameters_first +// ignore_for_file: constant_identifier_names +// ignore_for_file: lines_longer_than_80_chars + +import 'package:openapi/api.dart'; +import 'package:test/test.dart'; + +// tests for User +void main() { + // final instance = User(); + + group('test User', () { + // int id + test('to test the property `id`', () async { + // TODO + }); + + // String username + test('to test the property `username`', () async { + // TODO + }); + + // String firstname + test('to test the property `firstname`', () async { + // TODO + }); + + // String lastname + test('to test the property `lastname`', () async { + // TODO + }); + + // String email + test('to test the property `email`', () async { + // TODO + }); + + // String password + test('to test the property `password`', () async { + // TODO + }); + + // String phone + test('to test the property `phone`', () async { + // TODO + }); + + // User Status + // int userstatus + test('to test the property `userstatus`', () async { + // TODO + }); + + + }); + +} From 5c9fce26db975e2c6643d70e77842f1e943634c5 Mon Sep 17 00:00:00 2001 From: Florian Weihl Date: Fri, 9 May 2025 14:09:37 +0200 Subject: [PATCH 3/3] fix handling for lower enum cases and fixed tests --- .../languages/AbstractDartCodegen.java | 28 +++--- .../codegen/dart/DartClientOptionsTest.java | 1 + .../dart/dio/DartDioClientOptionsTest.java | 1 + .../options/DartClientOptionsProvider.java | 2 + .../options/DartDioClientOptionsProvider.java | 2 + .../3_0/petstore-use-lower-camel-case.yaml | 5 + .../README.md | 4 +- .../doc/Bar.md | 8 +- .../doc/BarApi.md | 8 +- .../doc/BarCreate.md | 8 +- .../doc/BarRef.md | 6 +- .../doc/BarRefOrValue.md | 10 +- .../doc/Entity.md | 4 +- .../doc/EntityRef.md | 6 +- .../doc/Extensible.md | 4 +- .../doc/Foo.md | 8 +- .../doc/FooRef.md | 8 +- .../doc/FooRefOrValue.md | 12 +-- .../doc/Fruit.md | 2 +- .../doc/Pasta.md | 4 +- .../doc/Pizza.md | 6 +- .../doc/PizzaSpeziale.md | 6 +- .../lib/src/api/bar_api.dart | 6 +- .../lib/src/model/bar.dart | 84 ++++++++-------- .../lib/src/model/bar_create.dart | 84 ++++++++-------- .../lib/src/model/bar_ref.dart | 44 ++++----- .../lib/src/model/bar_ref_or_value.dart | 10 +- .../lib/src/model/entity.dart | 44 ++++----- .../lib/src/model/entity_ref.dart | 54 +++++----- .../lib/src/model/extensible.dart | 20 ++-- .../lib/src/model/foo.dart | 68 ++++++------- .../lib/src/model/foo_ref.dart | 70 ++++++------- .../lib/src/model/foo_ref_or_value.dart | 12 +-- .../lib/src/model/fruit.dart | 10 +- .../lib/src/model/fruit_type.dart | 4 +- .../lib/src/model/pasta.dart | 44 ++++----- .../lib/src/model/pizza.dart | 54 +++++----- .../lib/src/model/pizza_speziale.dart | 44 ++++----- .../README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../doc/Dog.md | 2 +- .../doc/EnumTest.md | 8 +- .../doc/FakeApi.md | 64 ++++++------ .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../doc/Pet.md | 2 +- .../doc/PetApi.md | 52 +++++----- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../doc/User.md | 6 +- .../lib/src/api/another_fake_api.dart | 6 +- .../lib/src/api/fake_api.dart | 46 ++++----- .../src/api/fake_classname_tags123_api.dart | 6 +- .../lib/src/api/pet_api.dart | 42 ++++---- .../lib/src/model/all_of_with_single_ref.dart | 8 +- .../lib/src/model/animal.dart | 8 +- .../model/array_of_array_of_number_only.dart | 8 +- .../lib/src/model/array_of_number_only.dart | 8 +- .../lib/src/model/capitalization.dart | 32 +++--- .../lib/src/model/cat.dart | 8 +- .../lib/src/model/child_with_nullable.dart | 18 ++-- .../lib/src/model/dog.dart | 8 +- .../lib/src/model/enum_test.dart | 40 ++++---- .../fake_big_decimal_map200_response.dart | 16 +-- .../lib/src/model/format_test.dart | 8 +- .../lib/src/model/health_check_result.dart | 8 +- .../lib/src/model/map_test.dart | 2 +- ...rties_and_additional_properties_class.dart | 8 +- .../lib/src/model/model_enum_class.dart | 2 +- .../lib/src/model/model_file.dart | 8 +- .../lib/src/model/number_only.dart | 8 +- .../model/object_with_deprecated_fields.dart | 10 +- .../lib/src/model/order.dart | 16 +-- .../lib/src/model/parent_with_nullable.dart | 10 +- .../lib/src/model/pet.dart | 8 +- .../lib/src/model/special_model_name.dart | 8 +- ...reeform_additional_properties_request.dart | 8 +- .../lib/src/model/user.dart | 24 ++--- .../petstore_client_lib_fake/README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../petstore_client_lib_fake/doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../petstore_client_lib_fake/doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../petstore_client_lib_fake/doc/Dog.md | 2 +- .../petstore_client_lib_fake/doc/EnumTest.md | 8 +- .../petstore_client_lib_fake/doc/FakeApi.md | 64 ++++++------ .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore_client_lib_fake/doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../petstore_client_lib_fake/doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../petstore_client_lib_fake/doc/Pet.md | 2 +- .../petstore_client_lib_fake/doc/PetApi.md | 52 +++++----- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../petstore_client_lib_fake/doc/User.md | 6 +- .../lib/src/api/another_fake_api.dart | 6 +- .../lib/src/api/fake_api.dart | 48 ++++----- .../src/api/fake_classname_tags123_api.dart | 6 +- .../lib/src/api/pet_api.dart | 48 ++++----- .../lib/src/model/all_of_with_single_ref.dart | 12 +-- .../lib/src/model/animal.dart | 8 +- .../model/array_of_array_of_number_only.dart | 10 +- .../lib/src/model/array_of_number_only.dart | 10 +- .../lib/src/model/capitalization.dart | 40 ++++---- .../lib/src/model/cat.dart | 28 +++--- .../lib/src/model/child_with_nullable.dart | 44 ++++----- .../lib/src/model/dog.dart | 26 ++--- .../lib/src/model/enum_test.dart | 56 +++++------ .../fake_big_decimal_map200_response.dart | 20 ++-- .../lib/src/model/format_test.dart | 10 +- .../lib/src/model/health_check_result.dart | 10 +- .../lib/src/model/map_test.dart | 2 +- ...rties_and_additional_properties_class.dart | 10 +- .../lib/src/model/model_enum_class.dart | 2 +- .../lib/src/model/model_file.dart | 10 +- .../lib/src/model/number_only.dart | 10 +- .../model/object_with_deprecated_fields.dart | 12 +-- .../lib/src/model/order.dart | 20 ++-- .../lib/src/model/parent_with_nullable.dart | 12 +-- .../lib/src/model/pet.dart | 8 +- .../lib/src/model/special_model_name.dart | 10 +- ...reeform_additional_properties_request.dart | 10 +- .../lib/src/model/user.dart | 30 +++--- .../.openapi-generator/FILES | 58 ----------- .../README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../doc/Dog.md | 2 +- .../doc/EnumTest.md | 8 +- .../doc/FakeApi.md | 64 ++++++------ .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../doc/Pet.md | 2 +- .../doc/PetApi.md | 52 +++++----- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../doc/User.md | 6 +- .../lib/src/api/another_fake_api.dart | 6 +- .../lib/src/api/fake_api.dart | 46 ++++----- .../src/api/fake_classname_tags123_api.dart | 6 +- .../lib/src/api/pet_api.dart | 42 ++++---- .../lib/src/model/all_of_with_single_ref.dart | 8 +- .../lib/src/model/animal.dart | 8 +- .../model/array_of_array_of_number_only.dart | 8 +- .../lib/src/model/array_of_number_only.dart | 8 +- .../lib/src/model/capitalization.dart | 32 +++--- .../lib/src/model/cat.dart | 8 +- .../lib/src/model/child_with_nullable.dart | 18 ++-- .../lib/src/model/dog.dart | 8 +- .../lib/src/model/enum_test.dart | 36 +++---- .../fake_big_decimal_map200_response.dart | 16 +-- .../lib/src/model/format_test.dart | 8 +- .../lib/src/model/health_check_result.dart | 8 +- ...rties_and_additional_properties_class.dart | 8 +- .../lib/src/model/model_enum_class.dart | 12 ++- .../lib/src/model/model_file.dart | 8 +- .../lib/src/model/number_only.dart | 8 +- .../model/object_with_deprecated_fields.dart | 10 +- .../lib/src/model/order.dart | 16 +-- .../lib/src/model/parent_with_nullable.dart | 10 +- .../lib/src/model/pet.dart | 8 +- .../lib/src/model/special_model_name.dart | 8 +- ...reeform_additional_properties_request.dart | 8 +- .../lib/src/model/user.dart | 24 ++--- .../dart2/petstore_client_lib/doc/Order.md | 4 +- .../dart2/petstore_client_lib/doc/Pet.md | 2 +- .../dart2/petstore_client_lib/doc/PetApi.md | 36 +++---- .../dart2/petstore_client_lib/doc/StoreApi.md | 16 +-- .../dart2/petstore_client_lib/doc/User.md | 6 +- .../petstore_client_lib/lib/api/pet_api.dart | 56 +++++------ .../lib/api/store_api.dart | 24 ++--- .../petstore_client_lib/lib/model/order.dart | 30 +++--- .../petstore_client_lib/lib/model/pet.dart | 14 +-- .../petstore_client_lib/lib/model/user.dart | 44 ++++----- .../dart2/petstore_client_lib_fake/README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../petstore_client_lib_fake/doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../dart2/petstore_client_lib_fake/doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../dart2/petstore_client_lib_fake/doc/Dog.md | 2 +- .../petstore_client_lib_fake/doc/EnumTest.md | 8 +- .../petstore_client_lib_fake/doc/FakeApi.md | 64 ++++++------ .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../petstore_client_lib_fake/doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../petstore_client_lib_fake/doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../dart2/petstore_client_lib_fake/doc/Pet.md | 2 +- .../petstore_client_lib_fake/doc/PetApi.md | 52 +++++----- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../petstore_client_lib_fake/doc/User.md | 6 +- .../lib/api/another_fake_api.dart | 12 +-- .../lib/api/fake_api.dart | 98 +++++++++---------- .../lib/api/fake_classname_tags123_api.dart | 12 +-- .../lib/api/pet_api.dart | 86 ++++++++-------- .../lib/model/all_of_with_single_ref.dart | 16 +-- .../lib/model/animal.dart | 14 +-- .../model/array_of_array_of_number_only.dart | 14 +-- .../lib/model/array_of_number_only.dart | 14 +-- .../lib/model/capitalization.dart | 58 +++++------ .../lib/model/cat.dart | 14 +-- .../lib/model/child_with_nullable.dart | 36 +++---- .../lib/model/dog.dart | 14 +-- .../lib/model/enum_class.dart | 6 +- .../lib/model/enum_test.dart | 82 ++++++++-------- .../fake_big_decimal_map200_response.dart | 28 +++--- .../lib/model/format_test.dart | 16 +-- .../lib/model/health_check_result.dart | 16 +-- .../lib/model/map_test.dart | 6 +- ...rties_and_additional_properties_class.dart | 16 +-- .../lib/model/model_file.dart | 16 +-- .../lib/model/number_only.dart | 16 +-- .../model/object_with_deprecated_fields.dart | 16 +-- .../lib/model/order.dart | 30 +++--- .../lib/model/parent_with_nullable.dart | 22 ++--- .../lib/model/pet.dart | 14 +-- .../lib/model/special_model_name.dart | 16 +-- ...reeform_additional_properties_request.dart | 16 +-- .../lib/model/user.dart | 44 ++++----- .../.openapi-generator/FILES | 58 ----------- .../README.md | 4 +- .../doc/AllOfWithSingleRef.md | 2 +- .../doc/Animal.md | 2 +- .../doc/AnotherFakeApi.md | 8 +- .../doc/ArrayOfArrayOfNumberOnly.md | 2 +- .../doc/ArrayOfNumberOnly.md | 2 +- .../doc/Capitalization.md | 8 +- .../doc/Cat.md | 2 +- .../doc/ChildWithNullable.md | 4 +- .../doc/Dog.md | 2 +- .../doc/EnumTest.md | 8 +- .../doc/FakeApi.md | 64 ++++++------ .../doc/FakeBigDecimalMap200Response.md | 4 +- .../doc/FakeClassnameTags123Api.md | 8 +- .../doc/FormatTest.md | 2 +- .../doc/HealthCheckResult.md | 2 +- ...dPropertiesAndAdditionalPropertiesClass.md | 2 +- .../doc/ModelFile.md | 2 +- .../doc/NumberOnly.md | 2 +- .../doc/ObjectWithDeprecatedFields.md | 2 +- .../doc/Order.md | 4 +- .../doc/ParentWithNullable.md | 2 +- .../doc/Pet.md | 2 +- .../doc/PetApi.md | 52 +++++----- .../doc/SpecialModelName.md | 2 +- ...lineFreeformAdditionalPropertiesRequest.md | 2 +- .../doc/User.md | 6 +- .../lib/api/another_fake_api.dart | 12 +-- .../lib/api/fake_api.dart | 98 +++++++++---------- .../lib/api/fake_classname_tags123_api.dart | 12 +-- .../lib/api/pet_api.dart | 86 ++++++++-------- .../lib/model/all_of_with_single_ref.dart | 16 +-- .../lib/model/animal.dart | 14 +-- .../model/array_of_array_of_number_only.dart | 14 +-- .../lib/model/array_of_number_only.dart | 14 +-- .../lib/model/capitalization.dart | 58 +++++------ .../lib/model/cat.dart | 14 +-- .../lib/model/child_with_nullable.dart | 36 +++---- .../lib/model/dog.dart | 14 +-- .../lib/model/enum_class.dart | 21 +++- .../lib/model/enum_test.dart | 70 ++++++------- .../fake_big_decimal_map200_response.dart | 28 +++--- .../lib/model/format_test.dart | 16 +-- .../lib/model/health_check_result.dart | 16 +-- ...rties_and_additional_properties_class.dart | 16 +-- .../lib/model/model_file.dart | 16 +-- .../lib/model/number_only.dart | 16 +-- .../model/object_with_deprecated_fields.dart | 16 +-- .../lib/model/order.dart | 30 +++--- .../lib/model/parent_with_nullable.dart | 22 ++--- .../lib/model/pet.dart | 14 +-- .../lib/model/special_model_name.dart | 16 +-- ...reeform_additional_properties_request.dart | 16 +-- .../lib/model/user.dart | 44 ++++----- 323 files changed, 2426 insertions(+), 2506 deletions(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java index 9015be82094f..007c727801b0 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractDartCodegen.java @@ -58,7 +58,7 @@ public abstract class AbstractDartCodegen extends DefaultCodegen { @Setter protected String pubRepository = null; @Setter protected String pubPublishTo = null; @Setter protected boolean useEnumExtension = false; - @Setter protected boolean useLowerCamelCase = true; + @Setter protected boolean useLowerCamelCase = false; @Setter protected String sourceFolder = "src"; protected String libPath = "lib" + File.separator; protected String apiDocPath = "doc/"; @@ -306,9 +306,9 @@ public void processOpts() { } if (additionalProperties.containsKey(USE_LOWER_CAMEL_CASE)) { - this.setUseEnumExtension(convertPropertyToBooleanAndWriteBack(USE_LOWER_CAMEL_CASE)); + this.setUseLowerCamelCase(convertPropertyToBooleanAndWriteBack(USE_LOWER_CAMEL_CASE)); } else { - additionalProperties.put(USE_ENUM_EXTENSION, useLowerCamelCase); + additionalProperties.put(USE_LOWER_CAMEL_CASE, useLowerCamelCase); } if (additionalProperties.containsKey(CodegenConstants.SOURCE_FOLDER)) { @@ -395,8 +395,8 @@ public String toVarName(String name) { } name = name.replaceAll("^_", ""); - // if it's all upper case, do nothing - if (!useLowerCamelCase && name.matches("^[A-Z_]*$")) { + // if it's all upper case and more than two letters + if (name.matches("^[A-Z_]*$")) { return name; } @@ -408,14 +408,9 @@ public String toVarName(String name) { // remove the rest name = sanitizeName(name); - if (useLowerCamelCase) { - //to camelize it correctly it needs to be lower cased - name = camelize(name.toLowerCase(), LOWERCASE_FIRST_LETTER); - } else { - // camelize (lower first character) the variable name - // pet_id => petId - name = camelize(name, LOWERCASE_FIRST_LETTER); - } + // camelize (lower first character) the variable name + // pet_id => petI + name = camelize(name, LOWERCASE_FIRST_LETTER); if (name.matches("^\\d.*")) { name = "n" + name; @@ -746,9 +741,14 @@ public String toEnumVarName(String value, String datatype) { return enumNameMapping.get(value); } - if (value.length() == 0) { + if (value.isEmpty()) { return "empty"; } + + if (useLowerCamelCase && value.matches("^[A-Z_]*$")) { + value = value.toLowerCase(); + } + if (("number".equalsIgnoreCase(datatype) || "double".equalsIgnoreCase(datatype) || "int".equalsIgnoreCase(datatype)) && diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartClientOptionsTest.java index 87dabbbfd00d..1db5c5625b35 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/DartClientOptionsTest.java @@ -52,6 +52,7 @@ protected void verifyOptions() { verify(clientCodegen).setPubPublishTo(DartClientOptionsProvider.PUB_PUBLISH_TO_VALUE); verify(clientCodegen).setSourceFolder(DartClientOptionsProvider.SOURCE_FOLDER_VALUE); verify(clientCodegen).setUseEnumExtension(Boolean.parseBoolean(DartClientOptionsProvider.USE_ENUM_EXTENSION)); + verify(clientCodegen).setUseLowerCamelCase(Boolean.parseBoolean(DartClientOptionsProvider.USE_LOWER_CAMEL_CASE)); verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(DartClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE)); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java index cb3350d57e2e..0437eaf86b3a 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/dart/dio/DartDioClientOptionsTest.java @@ -54,6 +54,7 @@ protected void verifyOptions() { verify(clientCodegen).setDateLibrary(DartDioClientCodegen.DATE_LIBRARY_DEFAULT); verify(clientCodegen).setLibrary(DartDioClientCodegen.SERIALIZATION_LIBRARY_DEFAULT); verify(clientCodegen).setEqualityCheckMethod(DartDioClientCodegen.EQUALITY_CHECK_METHOD_DEFAULT); + verify(clientCodegen).setUseLowerCamelCase(Boolean.parseBoolean(DartDioClientOptionsProvider.USE_LOWER_CAMEL_CASE)); verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(DartDioClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE)); } } diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java index 50bbfdb5e9b5..fdc5e00573bf 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartClientOptionsProvider.java @@ -38,6 +38,7 @@ public class DartClientOptionsProvider implements OptionsProvider { public static final String PUB_PUBLISH_TO_VALUE = "Publish To"; public static final String SOURCE_FOLDER_VALUE = "src"; public static final String USE_ENUM_EXTENSION = "true"; + public static final String USE_LOWER_CAMEL_CASE = "false"; public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false"; public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true"; public static final String ENUM_UNKNOWN_DEFAULT_CASE_VALUE = "false"; @@ -64,6 +65,7 @@ public Map createOptions() { .put(DartClientCodegen.PUB_PUBLISH_TO, PUB_PUBLISH_TO_VALUE) .put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE) .put(DartClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION) + .put(DartClientCodegen.USE_LOWER_CAMEL_CASE, USE_LOWER_CAMEL_CASE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java index bcda220f4328..ef5c34543cc1 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/DartDioClientOptionsProvider.java @@ -40,6 +40,7 @@ public class DartDioClientOptionsProvider implements OptionsProvider { public static final String PUB_REPOSITORY_VALUE = "Repository"; public static final String PUB_PUBLISH_TO_VALUE = "Publish to"; public static final String ENUM_UNKNOWN_DEFAULT_CASE_VALUE = "false"; + public static final String USE_LOWER_CAMEL_CASE = "false"; @Override public String getLanguage() { @@ -67,6 +68,7 @@ public Map createOptions() { .put(DartDioClientCodegen.EQUALITY_CHECK_METHOD, DartDioClientCodegen.EQUALITY_CHECK_METHOD_DEFAULT) .put(CodegenConstants.SOURCE_FOLDER, SOURCE_FOLDER_VALUE) .put(DartDioClientCodegen.USE_ENUM_EXTENSION, USE_ENUM_EXTENSION) + .put(DartDioClientCodegen.USE_LOWER_CAMEL_CASE, USE_LOWER_CAMEL_CASE) .put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE) .put(CodegenConstants.PREPEND_FORM_OR_BODY_PARAMETERS, PREPEND_FORM_OR_BODY_PARAMETERS_VALUE) .put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true") diff --git a/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml b/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml index e4957b4e19d1..8bb19186f3cb 100644 --- a/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/petstore-use-lower-camel-case.yaml @@ -1668,6 +1668,11 @@ components: - _abc - '-efg' - (xyz) + - TEST + - TEST_A + - TEST_A_ABC + - TEST_a + - tEST Enum_Test: type: object required: diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md index 6fb7317f863a..7178005ffbe0 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/README.md @@ -49,10 +49,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getBarApi(); -final BarCreate barcreate = ; // BarCreate | +final BarCreate barCreate = ; // BarCreate | try { - final response = await api.createBar(barcreate); + final response = await api.createBar(barCreate); print(response); } catch on DioException (e) { print("Exception when calling BarApi->createBar: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md index 6ca4a8971575..4cccc863a489 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Bar.md @@ -9,12 +9,12 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | -**barpropa** | **String** | | [optional] -**foopropb** | **String** | | [optional] +**barPropA** | **String** | | [optional] +**fooPropB** | **String** | | [optional] **foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional] **href** | **String** | Hyperlink reference | [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] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md index fc31bb2aa1a5..a6f23c00210c 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **createBar** -> Bar createBar(barcreate) +> Bar createBar(barCreate) Create a Bar @@ -22,10 +22,10 @@ Create a Bar import 'package:openapi/api.dart'; final api = Openapi().getBarApi(); -final BarCreate barcreate = ; // BarCreate | +final BarCreate barCreate = ; // BarCreate | try { - final response = api.createBar(barcreate); + final response = api.createBar(barCreate); print(response); } catch on DioException (e) { print('Exception when calling BarApi->createBar: $e\n'); @@ -36,7 +36,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **barcreate** | [**BarCreate**](BarCreate.md)| | + **barCreate** | [**BarCreate**](BarCreate.md)| | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md index 70a8b1494160..c0b4ba6edc9a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarCreate.md @@ -8,13 +8,13 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**barpropa** | **String** | | [optional] -**foopropb** | **String** | | [optional] +**barPropA** | **String** | | [optional] +**fooPropB** | **String** | | [optional] **foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md index ca33215df45b..cab0e7e57386 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRef.md @@ -9,11 +9,11 @@ import 'package:openapi/api.dart'; 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] +**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md index 3b18db86bd48..f88727e11aa8 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/BarRefOrValue.md @@ -9,15 +9,15 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | unique identifier | -**barpropa** | **String** | | [optional] -**foopropb** | **String** | | [optional] +**barPropA** | **String** | | [optional] +**fooPropB** | **String** | | [optional] **foo** | [**FooRefOrValue**](FooRefOrValue.md) | | [optional] **href** | **String** | Hyperlink reference | [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] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | **name** | **String** | Name of the related entity. | [optional] -**atReferredtype** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] +**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) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md index 22723a0bf7c7..5ba2144b44fe 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Entity.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md index 4cb29d7527a1..80eae55f4145 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/EntityRef.md @@ -9,11 +9,11 @@ import 'package:openapi/api.dart'; 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] +**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md index d0e7caf9cf19..7a781e578ea4 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Extensible.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**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] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md index 81ffbcbc751d..2627691fefe5 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Foo.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**foopropa** | **String** | | [optional] -**foopropb** | **String** | | [optional] +**fooPropA** | **String** | | [optional] +**fooPropB** | **String** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md index 009f3cffed25..bfa62bd4f54b 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRef.md @@ -8,13 +8,13 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**foorefpropa** | **String** | | [optional] +**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] +**atReferredType** | **String** | The actual type of the target instance when needed for disambiguation. | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md index ce104c12ede0..9bc8dec10571 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/FooRefOrValue.md @@ -8,16 +8,16 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**foopropa** | **String** | | [optional] -**foopropb** | **String** | | [optional] +**fooPropA** | **String** | | [optional] +**fooPropB** | **String** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | -**foorefpropa** | **String** | | [optional] +**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] +**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) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md index ebba72bb5827..91c1f1cf9b55 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Fruit.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**fruittype** | [**FruitType**](FruitType.md) | | +**fruitType** | [**FruitType**](FruitType.md) | | **seeds** | **int** | | **length** | **int** | | diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md index ba936d6869cc..034ff420d323 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pasta.md @@ -11,8 +11,8 @@ Name | Type | Description | Notes **vendor** | **String** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md index 0041f71da652..e4b040a6a79c 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/Pizza.md @@ -8,11 +8,11 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**pizzasize** | **num** | | [optional] +**pizzaSize** | **num** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md index 7802c2184f28..4e3800773dca 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/doc/PizzaSpeziale.md @@ -9,11 +9,11 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **toppings** | **String** | | [optional] -**pizzasize** | **num** | | [optional] +**pizzaSize** | **num** | | [optional] **href** | **String** | Hyperlink reference | [optional] **id** | **String** | unique identifier | [optional] -**atSchemalocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] -**atBasetype** | **String** | When sub-classing, this defines the super-class | [optional] +**atSchemaLocation** | **String** | A URI to a JSON-Schema file that defines additional attributes and relationships | [optional] +**atBaseType** | **String** | When sub-classing, this defines the super-class | [optional] **atType** | **String** | When sub-classing, this defines the sub-class Extensible name | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart index 805758092035..50e9bfbc2e9f 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/api/bar_api.dart @@ -23,7 +23,7 @@ class BarApi { /// /// /// Parameters: - /// * [barcreate] + /// * [barCreate] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -34,7 +34,7 @@ class BarApi { /// Returns a [Future] containing a [Response] with a [Bar] as data /// Throws [DioException] if API call or serialization fails Future> createBar({ - required BarCreate barcreate, + required BarCreate barCreate, CancelToken? cancelToken, Map? headers, Map? extra, @@ -60,7 +60,7 @@ class BarApi { try { const _type = FullType(BarCreate); - _bodyData = _serializers.serialize(barcreate, specifiedType: _type); + _bodyData = _serializers.serialize(barCreate, specifiedType: _type); } catch(error, stackTrace) { throw DioException( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart index 5ee715b3b206..cb769550b4f2 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar.dart @@ -14,23 +14,23 @@ part 'bar.g.dart'; /// /// Properties: /// * [id] -/// * [barpropa] -/// * [foopropb] +/// * [barPropA] +/// * [fooPropB] /// * [foo] /// * [href] - Hyperlink reference -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class Bar implements Entity, Built { @BuiltValueField(wireName: r'foo') FooRefOrValue? get foo; - @BuiltValueField(wireName: r'barPropA') - String? get barpropa; - @BuiltValueField(wireName: r'fooPropB') - String? get foopropb; + String? get fooPropB; + + @BuiltValueField(wireName: r'barPropA') + String? get barPropA; Bar._(); @@ -55,10 +55,10 @@ class _$BarSerializer implements PrimitiveSerializer { Bar object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } @@ -69,38 +69,31 @@ class _$BarSerializer implements PrimitiveSerializer { specifiedType: const FullType(FooRefOrValue), ); } - if (object.href != null) { - yield r'href'; - yield serializers.serialize( - object.href, - specifiedType: const FullType(String), - ); - } - if (object.id != null) { - yield r'id'; + if (object.atBaseType != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBaseType, specifiedType: const FullType(String), ); } - if (object.barpropa != null) { - yield r'barPropA'; + if (object.fooPropB != null) { + yield r'fooPropB'; yield serializers.serialize( - object.barpropa, + object.fooPropB, specifiedType: const FullType(String), ); } - if (object.foopropb != null) { - yield r'fooPropB'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.foopropb, + object.href, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBasetype, + object.id, specifiedType: const FullType(String), ); } @@ -109,6 +102,13 @@ class _$BarSerializer implements PrimitiveSerializer { object.atType, specifiedType: const FullType(String), ); + if (object.barPropA != null) { + yield r'barPropA'; + yield serializers.serialize( + object.barPropA, + specifiedType: const FullType(String), + ); + } } @override @@ -137,7 +137,7 @@ class _$BarSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; case r'foo': final valueDes = serializers.deserialize( @@ -146,47 +146,47 @@ class _$BarSerializer implements PrimitiveSerializer { ) as FooRefOrValue; result.foo.replace(valueDes); break; - case r'href': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atBaseType = valueDes; break; - case r'id': + case r'fooPropB': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.fooPropB = valueDes; break; - case r'barPropA': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.barpropa = valueDes; + result.href = valueDes; break; - case r'fooPropB': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.foopropb = valueDes; + result.id = valueDes; break; - case r'@baseType': + case r'@type': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.atType = valueDes; break; - case r'@type': + case r'barPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atType = valueDes; + result.barPropA = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart index dd2246bc8fbd..8942b6433f5e 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_create.dart @@ -13,24 +13,24 @@ part 'bar_create.g.dart'; /// BarCreate /// /// Properties: -/// * [barpropa] -/// * [foopropb] +/// * [barPropA] +/// * [fooPropB] /// * [foo] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class BarCreate implements Entity, Built { @BuiltValueField(wireName: r'foo') FooRefOrValue? get foo; - @BuiltValueField(wireName: r'barPropA') - String? get barpropa; - @BuiltValueField(wireName: r'fooPropB') - String? get foopropb; + String? get fooPropB; + + @BuiltValueField(wireName: r'barPropA') + String? get barPropA; BarCreate._(); @@ -55,10 +55,10 @@ class _$BarCreateSerializer implements PrimitiveSerializer { BarCreate object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } @@ -69,38 +69,31 @@ class _$BarCreateSerializer implements PrimitiveSerializer { specifiedType: const FullType(FooRefOrValue), ); } - if (object.href != null) { - yield r'href'; - yield serializers.serialize( - object.href, - specifiedType: const FullType(String), - ); - } - if (object.id != null) { - yield r'id'; + if (object.atBaseType != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBaseType, specifiedType: const FullType(String), ); } - if (object.barpropa != null) { - yield r'barPropA'; + if (object.fooPropB != null) { + yield r'fooPropB'; yield serializers.serialize( - object.barpropa, + object.fooPropB, specifiedType: const FullType(String), ); } - if (object.foopropb != null) { - yield r'fooPropB'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.foopropb, + object.href, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBasetype, + object.id, specifiedType: const FullType(String), ); } @@ -109,6 +102,13 @@ class _$BarCreateSerializer implements PrimitiveSerializer { object.atType, specifiedType: const FullType(String), ); + if (object.barPropA != null) { + yield r'barPropA'; + yield serializers.serialize( + object.barPropA, + specifiedType: const FullType(String), + ); + } } @override @@ -137,7 +137,7 @@ class _$BarCreateSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; case r'foo': final valueDes = serializers.deserialize( @@ -146,47 +146,47 @@ class _$BarCreateSerializer implements PrimitiveSerializer { ) as FooRefOrValue; result.foo.replace(valueDes); break; - case r'href': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atBaseType = valueDes; break; - case r'id': + case r'fooPropB': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.fooPropB = valueDes; break; - case r'barPropA': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.barpropa = valueDes; + result.href = valueDes; break; - case r'fooPropB': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.foopropb = valueDes; + result.id = valueDes; break; - case r'@baseType': + case r'@type': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.atType = valueDes; break; - case r'@type': + case r'barPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atType = valueDes; + result.barPropA = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart index c9e3517665f1..98f0724b35d2 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref.dart @@ -13,11 +13,11 @@ part 'bar_ref.g.dart'; /// /// Properties: /// * [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. /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class BarRef implements EntityRef, Built { @@ -44,17 +44,17 @@ class _$BarRefSerializer implements PrimitiveSerializer { BarRef object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.atReferredtype != null) { + if (object.atReferredType != null) { yield r'@referredType'; yield serializers.serialize( - object.atReferredtype, + object.atReferredType, specifiedType: const FullType(String), ); } @@ -65,6 +65,13 @@ class _$BarRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBaseType != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBaseType, + specifiedType: const FullType(String), + ); + } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -79,13 +86,6 @@ class _$BarRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBasetype, - specifiedType: const FullType(String), - ); - } yield r'@type'; yield serializers.serialize( object.atType, @@ -119,14 +119,14 @@ class _$BarRefSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atReferredtype = valueDes; + result.atReferredType = valueDes; break; case r'name': final valueDes = serializers.deserialize( @@ -135,26 +135,26 @@ class _$BarRefSerializer implements PrimitiveSerializer { ) as String; result.name = valueDes; break; - case r'href': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atBaseType = valueDes; break; - case r'id': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart index 89f5e4b39cb7..f880cb557955 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/bar_ref_or_value.dart @@ -16,15 +16,15 @@ part 'bar_ref_or_value.g.dart'; /// /// Properties: /// * [id] - unique identifier -/// * [barpropa] -/// * [foopropb] +/// * [barPropA] +/// * [fooPropB] /// * [foo] /// * [href] - Hyperlink reference -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name /// * [name] - Name of the related entity. -/// * [atReferredtype] - The actual type of the target instance when needed for disambiguation. +/// * [atReferredType] - The actual type of the target instance when needed for disambiguation. @BuiltValue() abstract class BarRefOrValue implements Built { /// One Of [Bar], [BarRef] diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart index ddf9abda5789..7e27fab47387 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity.dart @@ -21,8 +21,8 @@ part 'entity.g.dart'; /// Properties: /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Entity implements Addressable, Extensible { @@ -100,31 +100,31 @@ class _$EntitySerializer implements PrimitiveSerializer { Entity object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.href != null) { - yield r'href'; + if (object.atSchemaLocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.href, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBaseType != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBaseType, specifiedType: const FullType(String), ); } - if (object.atSchemalocation != null) { - yield r'@schemaLocation'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atSchemalocation, + object.href, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBasetype, + object.id, specifiedType: const FullType(String), ); } @@ -232,33 +232,33 @@ class _$$EntitySerializer implements PrimitiveSerializer<$Entity> { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'href': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atSchemaLocation = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBaseType = valueDes; break; - case r'@schemaLocation': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart index 705967fe0068..7502c94dd7f3 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/entity_ref.dart @@ -16,17 +16,17 @@ part 'entity_ref.g.dart'; /// /// Properties: /// * [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. /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class EntityRef implements Addressable, Extensible { /// The actual type of the target instance when needed for disambiguation. @BuiltValueField(wireName: r'@referredType') - String? get atReferredtype; + String? get atReferredType; /// Name of the related entity. @BuiltValueField(wireName: r'name') @@ -78,17 +78,17 @@ class _$EntityRefSerializer implements PrimitiveSerializer { EntityRef object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atReferredtype != null) { - yield r'@referredType'; + if (object.atSchemaLocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.atReferredtype, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.atSchemalocation != null) { - yield r'@schemaLocation'; + if (object.atReferredType != null) { + yield r'@referredType'; yield serializers.serialize( - object.atSchemalocation, + object.atReferredType, specifiedType: const FullType(String), ); } @@ -99,6 +99,13 @@ class _$EntityRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBaseType != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBaseType, + specifiedType: const FullType(String), + ); + } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -113,13 +120,6 @@ class _$EntityRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBasetype, - specifiedType: const FullType(String), - ); - } yield r'@type'; yield serializers.serialize( object.atType, @@ -204,19 +204,19 @@ class _$$EntityRefSerializer implements PrimitiveSerializer<$EntityRef> { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'@referredType': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atReferredtype = valueDes; + result.atSchemaLocation = valueDes; break; - case r'@schemaLocation': + case r'@referredType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atReferredType = valueDes; break; case r'name': final valueDes = serializers.deserialize( @@ -225,26 +225,26 @@ class _$$EntityRefSerializer implements PrimitiveSerializer<$EntityRef> { ) as String; result.name = valueDes; break; - case r'href': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atBaseType = valueDes; break; - case r'id': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart index ce9bc5ee0d9d..2423fb276412 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/extensible.dart @@ -11,18 +11,18 @@ part 'extensible.g.dart'; /// Extensible /// /// Properties: -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Extensible { /// A URI to a JSON-Schema file that defines additional attributes and relationships @BuiltValueField(wireName: r'@schemaLocation') - String? get atSchemalocation; + String? get atSchemaLocation; /// When sub-classing, this defines the super-class @BuiltValueField(wireName: r'@baseType') - String? get atBasetype; + String? get atBaseType; /// When sub-classing, this defines the sub-class Extensible name @BuiltValueField(wireName: r'@type') @@ -44,17 +44,17 @@ class _$ExtensibleSerializer implements PrimitiveSerializer { Extensible object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { + if (object.atBaseType != null) { yield r'@baseType'; yield serializers.serialize( - object.atBasetype, + object.atBaseType, specifiedType: const FullType(String), ); } @@ -131,14 +131,14 @@ class _$$ExtensibleSerializer implements PrimitiveSerializer<$Extensible> { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.atBaseType = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart index 4ca53742c0c0..d2e1f5817f20 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo.dart @@ -12,20 +12,20 @@ part 'foo.g.dart'; /// Foo /// /// Properties: -/// * [foopropa] -/// * [foopropb] +/// * [fooPropA] +/// * [fooPropB] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class Foo implements Entity, Built { - @BuiltValueField(wireName: r'fooPropB') - String? get foopropb; - @BuiltValueField(wireName: r'fooPropA') - String? get foopropa; + String? get fooPropA; + + @BuiltValueField(wireName: r'fooPropB') + String? get fooPropB; Foo._(); @@ -50,45 +50,45 @@ class _$FooSerializer implements PrimitiveSerializer { Foo object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.href != null) { - yield r'href'; + if (object.fooPropA != null) { + yield r'fooPropA'; yield serializers.serialize( - object.href, + object.fooPropA, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBaseType != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBaseType, specifiedType: const FullType(String), ); } - if (object.foopropb != null) { + if (object.fooPropB != null) { yield r'fooPropB'; yield serializers.serialize( - object.foopropb, + object.fooPropB, specifiedType: const FullType(String), ); } - if (object.foopropa != null) { - yield r'fooPropA'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.foopropa, + object.href, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBasetype, + object.id, specifiedType: const FullType(String), ); } @@ -125,42 +125,42 @@ class _$FooSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; - case r'href': + case r'fooPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.fooPropA = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBaseType = valueDes; break; case r'fooPropB': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.foopropb = valueDes; + result.fooPropB = valueDes; break; - case r'fooPropA': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.foopropa = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart index 8dd4ee834008..3f032ee8e08f 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref.dart @@ -12,18 +12,18 @@ part 'foo_ref.g.dart'; /// FooRef /// /// Properties: -/// * [foorefpropa] +/// * [foorefPropA] /// * [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. /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class FooRef implements EntityRef, Built { @BuiltValueField(wireName: r'foorefPropA') - String? get foorefpropa; + String? get foorefPropA; FooRef._(); @@ -48,17 +48,24 @@ class _$FooRefSerializer implements PrimitiveSerializer { FooRef object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.atReferredtype != null) { + if (object.atReferredType != null) { yield r'@referredType'; yield serializers.serialize( - object.atReferredtype, + object.atReferredType, + specifiedType: const FullType(String), + ); + } + if (object.foorefPropA != null) { + yield r'foorefPropA'; + yield serializers.serialize( + object.foorefPropA, specifiedType: const FullType(String), ); } @@ -69,6 +76,13 @@ class _$FooRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBaseType != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBaseType, + specifiedType: const FullType(String), + ); + } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -83,20 +97,6 @@ class _$FooRefSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.foorefpropa != null) { - yield r'foorefPropA'; - yield serializers.serialize( - object.foorefpropa, - specifiedType: const FullType(String), - ); - } - if (object.atBasetype != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBasetype, - specifiedType: const FullType(String), - ); - } yield r'@type'; yield serializers.serialize( object.atType, @@ -130,49 +130,49 @@ class _$FooRefSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; case r'@referredType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atReferredtype = valueDes; + result.atReferredType = valueDes; break; - case r'name': + case r'foorefPropA': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.name = valueDes; + result.foorefPropA = valueDes; break; - case r'href': + case r'name': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.name = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBaseType = valueDes; break; - case r'foorefPropA': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.foorefpropa = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart index c5c3710da771..d8164c5b9073 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/foo_ref_or_value.dart @@ -14,16 +14,16 @@ part 'foo_ref_or_value.g.dart'; /// FooRefOrValue /// /// Properties: -/// * [foopropa] -/// * [foopropb] +/// * [fooPropA] +/// * [fooPropB] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name -/// * [foorefpropa] +/// * [foorefPropA] /// * [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() abstract class FooRefOrValue implements Built { /// One Of [Foo], [FooRef] diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart index 7f8ec3b4637d..31b61361de5e 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit.dart @@ -15,14 +15,14 @@ part 'fruit.g.dart'; /// Fruit /// /// Properties: -/// * [fruittype] +/// * [fruitType] /// * [seeds] /// * [length] @BuiltValue() abstract class Fruit implements Built { @BuiltValueField(wireName: r'fruitType') - FruitType get fruittype; - // enum fruittypeEnum { APPLE, BANANA, }; + FruitType get fruitType; + // enum fruitTypeEnum { APPLE, BANANA, }; /// One Of [Apple], [Banana] OneOf get oneOf; @@ -82,7 +82,7 @@ class _$FruitSerializer implements PrimitiveSerializer { }) sync* { yield r'fruitType'; yield serializers.serialize( - object.fruittype, + object.fruitType, specifiedType: const FullType(FruitType), ); } @@ -116,7 +116,7 @@ class _$FruitSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(FruitType), ) as FruitType; - result.fruittype = valueDes; + result.fruitType = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart index 85b674977c15..3985f198fd0a 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/fruit_type.dart @@ -12,9 +12,9 @@ part 'fruit_type.g.dart'; class FruitType extends EnumClass { @BuiltValueEnumConst(wireName: r'APPLE') - static const FruitType apple = _$apple; + static const FruitType APPLE = _$APPLE; @BuiltValueEnumConst(wireName: r'BANANA') - static const FruitType banana = _$banana; + static const FruitType BANANA = _$BANANA; @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) static const FruitType unknownDefaultOpenApi = _$unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart index 4acab0087fd4..e8b1ebdf31ea 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pasta.dart @@ -15,8 +15,8 @@ part 'pasta.g.dart'; /// * [vendor] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class Pasta implements Entity, Built { @@ -46,31 +46,31 @@ class _$PastaSerializer implements PrimitiveSerializer { Pasta object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.href != null) { - yield r'href'; + if (object.atSchemaLocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.href, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBaseType != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBaseType, specifiedType: const FullType(String), ); } - if (object.atSchemalocation != null) { - yield r'@schemaLocation'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atSchemalocation, + object.href, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBasetype, + object.id, specifiedType: const FullType(String), ); } @@ -109,33 +109,33 @@ class _$PastaSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'href': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atSchemaLocation = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBaseType = valueDes; break; - case r'@schemaLocation': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart index 3c252a6e9f3a..14c06db06d7e 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza.dart @@ -13,16 +13,16 @@ part 'pizza.g.dart'; /// Pizza /// /// Properties: -/// * [pizzasize] +/// * [pizzaSize] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue(instantiable: false) abstract class Pizza implements Entity { @BuiltValueField(wireName: r'pizzaSize') - num? get pizzasize; + num? get pizzaSize; static const String discriminatorFieldName = r'@type'; @@ -63,38 +63,38 @@ class _$PizzaSerializer implements PrimitiveSerializer { Pizza object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.pizzasize != null) { + if (object.pizzaSize != null) { yield r'pizzaSize'; yield serializers.serialize( - object.pizzasize, + object.pizzaSize, specifiedType: const FullType(num), ); } - if (object.href != null) { - yield r'href'; + if (object.atSchemaLocation != null) { + yield r'@schemaLocation'; yield serializers.serialize( - object.href, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.id != null) { - yield r'id'; + if (object.atBaseType != null) { + yield r'@baseType'; yield serializers.serialize( - object.id, + object.atBaseType, specifiedType: const FullType(String), ); } - if (object.atSchemalocation != null) { - yield r'@schemaLocation'; + if (object.href != null) { + yield r'href'; yield serializers.serialize( - object.atSchemalocation, + object.href, specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; + if (object.id != null) { + yield r'id'; yield serializers.serialize( - object.atBasetype, + object.id, specifiedType: const FullType(String), ); } @@ -182,35 +182,35 @@ class _$$PizzaSerializer implements PrimitiveSerializer<$Pizza> { value, specifiedType: const FullType(num), ) as num; - result.pizzasize = valueDes; + result.pizzaSize = valueDes; break; - case r'href': + case r'@schemaLocation': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atSchemaLocation = valueDes; break; - case r'id': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.atBaseType = valueDes; break; - case r'@schemaLocation': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart index 8d47467e1d7c..73a2295df9ba 100644 --- a/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart +++ b/samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/lib/src/model/pizza_speziale.dart @@ -13,11 +13,11 @@ part 'pizza_speziale.g.dart'; /// /// Properties: /// * [toppings] -/// * [pizzasize] +/// * [pizzaSize] /// * [href] - Hyperlink reference /// * [id] - unique identifier -/// * [atSchemalocation] - A URI to a JSON-Schema file that defines additional attributes and relationships -/// * [atBasetype] - When sub-classing, this defines the super-class +/// * [atSchemaLocation] - A URI to a JSON-Schema file that defines additional attributes and relationships +/// * [atBaseType] - When sub-classing, this defines the super-class /// * [atType] - When sub-classing, this defines the sub-class Extensible name @BuiltValue() abstract class PizzaSpeziale implements Pizza, Built { @@ -47,17 +47,17 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { PizzaSpeziale object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.atSchemalocation != null) { + if (object.atSchemaLocation != null) { yield r'@schemaLocation'; yield serializers.serialize( - object.atSchemalocation, + object.atSchemaLocation, specifiedType: const FullType(String), ); } - if (object.pizzasize != null) { + if (object.pizzaSize != null) { yield r'pizzaSize'; yield serializers.serialize( - object.pizzasize, + object.pizzaSize, specifiedType: const FullType(num), ); } @@ -68,6 +68,13 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + if (object.atBaseType != null) { + yield r'@baseType'; + yield serializers.serialize( + object.atBaseType, + specifiedType: const FullType(String), + ); + } if (object.href != null) { yield r'href'; yield serializers.serialize( @@ -82,13 +89,6 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.atBasetype != null) { - yield r'@baseType'; - yield serializers.serialize( - object.atBasetype, - specifiedType: const FullType(String), - ); - } yield r'@type'; yield serializers.serialize( object.atType, @@ -122,14 +122,14 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.atSchemalocation = valueDes; + result.atSchemaLocation = valueDes; break; case r'pizzaSize': final valueDes = serializers.deserialize( value, specifiedType: const FullType(num), ) as num; - result.pizzasize = valueDes; + result.pizzaSize = valueDes; break; case r'toppings': final valueDes = serializers.deserialize( @@ -138,26 +138,26 @@ class _$PizzaSpezialeSerializer implements PrimitiveSerializer { ) as String; result.toppings = valueDes; break; - case r'href': + case r'@baseType': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.href = valueDes; + result.atBaseType = valueDes; break; - case r'id': + case r'href': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.id = valueDes; + result.href = valueDes; break; - case r'@baseType': + case r'id': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.atBasetype = valueDes; + result.id = valueDes; break; case r'@type': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md index d8a08b3c2a79..5a5211d271a0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/README.md @@ -49,10 +49,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = await api.call123testSpecialTags(modelclient); + final response = await api.call123testSpecialTags(modelClient); print(response); } catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md index 151142162f62..4c6f3ab2fe11 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singlereftype** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md index 570de2e45be3..415b56e9bc2e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md index 1ed2cb04d8f3..36a94e6bb703 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelclient) +> ModelClient call123testSpecialTags(modelClient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.call123testSpecialTags(modelclient); + final response = api.call123testSpecialTags(modelClient); print(response); } catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md index a1c3e86e055e..e5b9d669a436 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayarraynumber** | [**List<List<num>>**](List.md) | | [optional] +**arrayArrayNumber** | [**List<List<num>>**](List.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md index 184bc6962f85..fe8e071eb45c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arraynumber** | **List<num>** | | [optional] +**arrayNumber** | **List<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md index e673e7baef4b..4a07b4eb820d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallcamel** | **String** | | [optional] -**capitalcamel** | **String** | | [optional] +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**scaEthFlowPoints** | **String** | | [optional] -**attName** | **String** | Name of the pet | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md index 9c557ac9082a..6552eea4b435 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md index 54b310b0f58d..770494fcf4cc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] -**otherproperty** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md index b2ba3dfcef59..d36439b767bb 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md index f1b0758b868e..7c24fe2347b4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md index 14e13ea83e5f..1b5e1ca297c8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outercomposite) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterComposite outercomposite = ; // OuterComposite | Input composite as post body +final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body try { - final response = api.fakeOuterCompositeSerialize(outercomposite); + final response = api.fakeOuterCompositeSerialize(outerComposite); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterObjectWithEnumProperty outerobjectwithenumproperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body +final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final response = api.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileschematestclass) +> testBodyWithFileSchema(fileSchemaTestClass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final FileSchemaTestClass fileschematestclass = ; // FileSchemaTestClass | +final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | try { - api.testBodyWithFileSchema(fileschematestclass); + api.testBodyWithFileSchema(fileSchemaTestClass); } catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelclient) +> ModelClient testClientModel(modelClient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.testClientModel(modelclient); + final response = api.testClientModel(modelClient); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final double float = 3.4; // double | None final String string = string_example; // String | None final MultipartFile binary = BINARY_DATA_HERE; // MultipartFile | None final DateTime date = 2013-10-20; // DateTime | None -final DateTime datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final String password = password_example; // String | None final String callback = callback_example; // String | None try { - api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **MultipartFile**| None | [optional] **date** | **DateTime**| None | [optional] - **datetime** | **DateTime**| None | [optional] + **dateTime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -803,7 +803,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) +> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) test inline free-form additionalProperties @@ -814,10 +814,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body +final TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); + api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); } catch on DioException (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -827,7 +827,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -889,7 +889,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childwithnullable) +> testNullable(childWithNullable) test nullable parent property @@ -900,10 +900,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ChildWithNullable childwithnullable = ; // ChildWithNullable | request body +final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body try { - api.testNullable(childwithnullable); + api.testNullable(childWithNullable); } catch on DioException (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -913,7 +913,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -931,7 +931,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -947,11 +947,11 @@ final List ioutil = ; // List | final List http = ; // List | final List url = ; // List | final List context = ; // List | -final String allowempty = allowempty_example; // String | +final String allowEmpty = allowEmpty_example; // String | final Map language = ; // Map | try { - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -966,7 +966,7 @@ Name | Type | Description | Notes **http** | [**List<String>**](String.md)| | **url** | [**List<String>**](String.md)| | **context** | [**List<String>**](String.md)| | - **allowempty** | **String**| | + **allowEmpty** | **String**| | **language** | [**Map<String, String>**](String.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md index d01fd4973470..281dfc44fd8c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someid** | **num** | | [optional] -**somemap** | **Map<String, num>** | | [optional] +**someId** | **num** | | [optional] +**someMap** | **Map<String, 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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md index 88a70afff0f0..645aebf399f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelclient) +> ModelClient testClassname(modelClient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api = Openapi().getFakeClassnameTags123Api(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.testClassname(modelclient); + final response = api.testClassname(modelClient); print(response); } catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md index a25a61c53343..83b60545eb61 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md index c912fb2e08f4..4d6aeb75d965 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullablemessage** | **String** | | [optional] +**nullableMessage** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md index e9a76c258000..66d0d39c42be 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**Map<String, Animal>**](Animal.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md index d54b1bbbea04..4be260e93f6e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceuri** | **String** | Test capitalization | [optional] +**sourceURI** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md index f5fac6f8a17c..d8096a3db37a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justnumber** | **num** | | [optional] +**justNumber** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md index 9ba7fdf6634f..dda2836d8d54 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **List<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md index 08914a83f300..bde5ffe51a2c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petid** | **int** | | [optional] +**petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md index 435464987052..17aa5ca02941 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] +**nullableProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md index c6183f8d49d1..3cd230bfb213 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photourls** | **Set<String>** | | +**photoUrls** | **Set<String>** | | **tags** | [**List<Tag>**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md index 3dc820b749b5..5fc7fbd2657f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petid, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | Pet id to delete +final int petId = 789; // int | Pet id to delete final String apiKey = apiKey_example; // String | try { - api.deletePet(petid, apiKey); + api.deletePet(petId, apiKey); } catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| Pet id to delete | + **petId** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petid) +> Pet getPetById(petId) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to return +final int petId = 789; // int | ID of pet to return try { - final response = api.getPetById(petid); + final response = api.getPetById(petId); print(response); } catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to return | + **petId** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petid, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet that needs to be updated +final int petId = 789; // int | ID of pet that needs to be updated final String name = name_example; // String | Updated name of the pet final String status = status_example; // String | Updated status of the pet try { - api.updatePetWithForm(petid, name, status); + api.updatePetWithForm(petId, name, status); } catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet that needs to be updated | + **petId** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petid, additionalmetadata, file) +> ApiResponse uploadFile(petId, additionalMetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to update -final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final int petId = 789; // int | ID of pet to update +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final response = api.uploadFile(petid, additionalmetadata, file); + final response = api.uploadFile(petId, additionalMetadata, file); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to update -final MultipartFile requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload -final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final int petId = 789; // int | ID of pet to update +final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server try { - final response = api.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **requiredfile** | **MultipartFile**| file to upload | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **requiredFile** | **MultipartFile**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md index 04697c8e6225..5fcfa98e0b36 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [optional] +**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md index 894a3e60ee31..e2b2f1fd4468 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someproperty** | **String** | | [optional] +**someProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md index 37aa8c50230e..fa87e64d8595 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstname** | **String** | | [optional] -**lastname** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userstatus** | **int** | User Status | [optional] +**userStatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart index 4ffb898ab952..d98f3c23f4f7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/another_fake_api.dart @@ -21,7 +21,7 @@ class AnotherFakeApi { /// To test special tags and operation ID starting with number /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -32,7 +32,7 @@ class AnotherFakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -57,7 +57,7 @@ class AnotherFakeApi { dynamic _bodyData; try { -_bodyData=jsonEncode(modelclient); +_bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart index e4d673a4a32a..06486358eda5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_api.dart @@ -340,7 +340,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// Test serialization of object with outer number type /// /// Parameters: - /// * [outercomposite] - Input composite as post body + /// * [outerComposite] - Input composite as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -351,7 +351,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ - OuterComposite? outercomposite, + OuterComposite? outerComposite, CancelToken? cancelToken, Map? headers, Map? extra, @@ -376,7 +376,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' dynamic _bodyData; try { -_bodyData=jsonEncode(outercomposite); +_bodyData=jsonEncode(outerComposite); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -607,7 +607,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// Test serialization of enum (int) properties with examples /// /// Parameters: - /// * [outerobjectwithenumproperty] - Input enum (int) as post body + /// * [outerObjectWithEnumProperty] - Input enum (int) as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -618,7 +618,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ - required OuterObjectWithEnumProperty outerobjectwithenumproperty, + required OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancelToken? cancelToken, Map? headers, Map? extra, @@ -643,7 +643,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S dynamic _bodyData; try { -_bodyData=jsonEncode(outerobjectwithenumproperty); +_bodyData=jsonEncode(outerObjectWithEnumProperty); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -826,7 +826,7 @@ _bodyData=jsonEncode(body); /// For this test, the body for this request must reference a schema named `File`. /// /// Parameters: - /// * [fileschematestclass] + /// * [fileSchemaTestClass] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -837,7 +837,7 @@ _bodyData=jsonEncode(body); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testBodyWithFileSchema({ - required FileSchemaTestClass fileschematestclass, + required FileSchemaTestClass fileSchemaTestClass, CancelToken? cancelToken, Map? headers, Map? extra, @@ -862,7 +862,7 @@ _bodyData=jsonEncode(body); dynamic _bodyData; try { -_bodyData=jsonEncode(fileschematestclass); +_bodyData=jsonEncode(fileSchemaTestClass); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -964,7 +964,7 @@ _bodyData=jsonEncode(user); /// To test \"client\" model /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -975,7 +975,7 @@ _bodyData=jsonEncode(user); /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClientModel({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1000,7 +1000,7 @@ _bodyData=jsonEncode(user); dynamic _bodyData; try { -_bodyData=jsonEncode(modelclient); +_bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1064,7 +1064,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [string] - None /// * [binary] - None /// * [date] - None - /// * [datetime] - None + /// * [dateTime] - None /// * [password] - None /// * [callback] - None /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -1088,7 +1088,7 @@ _responseData = rawData == null ? null : deserialize(r String? string, MultipartFile? binary, DateTime? date, - DateTime? datetime, + DateTime? dateTime, String? password, String? callback, CancelToken? cancelToken, @@ -1381,7 +1381,7 @@ _bodyData=jsonEncode(requestBody); /// /// /// Parameters: - /// * [testinlinefreeformadditionalpropertiesrequest] - request body + /// * [testInlineFreeformAdditionalPropertiesRequest] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1392,7 +1392,7 @@ _bodyData=jsonEncode(requestBody); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testInlineFreeformAdditionalProperties({ - required TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest, + required TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1417,7 +1417,7 @@ _bodyData=jsonEncode(requestBody); dynamic _bodyData; try { -_bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); +_bodyData=jsonEncode(testInlineFreeformAdditionalPropertiesRequest); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1513,7 +1513,7 @@ _bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); /// /// /// Parameters: - /// * [childwithnullable] - request body + /// * [childWithNullable] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1524,7 +1524,7 @@ _bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testNullable({ - required ChildWithNullable childwithnullable, + required ChildWithNullable childWithNullable, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1549,7 +1549,7 @@ _bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); dynamic _bodyData; try { -_bodyData=jsonEncode(childwithnullable); +_bodyData=jsonEncode(childWithNullable); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1583,7 +1583,7 @@ _bodyData=jsonEncode(childwithnullable); /// * [http] /// * [url] /// * [context] - /// * [allowempty] + /// * [allowEmpty] /// * [language] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -1600,7 +1600,7 @@ _bodyData=jsonEncode(childwithnullable); required List http, required List url, required List context, - required String allowempty, + required String allowEmpty, Map? language, CancelToken? cancelToken, Map? headers, @@ -1629,7 +1629,7 @@ _bodyData=jsonEncode(childwithnullable); r'url': url, r'context': context, if (language != null) r'language': language, - r'allowEmpty': allowempty, + r'allowEmpty': allowEmpty, }; final _response = await _dio.request( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart index 7f1524c2f188..56ec33f1cace 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/fake_classname_tags123_api.dart @@ -21,7 +21,7 @@ class FakeClassnameTags123Api { /// To test class name in snake case /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -32,7 +32,7 @@ class FakeClassnameTags123Api { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClassname({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -64,7 +64,7 @@ class FakeClassnameTags123Api { dynamic _bodyData; try { -_bodyData=jsonEncode(modelclient); +_bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart index 54e619b596f1..ec20128ee1e3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/api/pet_api.dart @@ -92,7 +92,7 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petid] - Pet id to delete + /// * [petId] - Pet id to delete /// * [apiKey] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -104,7 +104,7 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> deletePet({ - required int petid, + required int petId, String? apiKey, CancelToken? cancelToken, Map? headers, @@ -113,7 +113,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'DELETE', headers: { @@ -310,7 +310,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// Returns a single pet /// /// Parameters: - /// * [petid] - ID of pet to return + /// * [petId] - ID of pet to return /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -321,7 +321,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// Returns a [Future] containing a [Response] with a [Pet] as data /// Throws [DioException] if API call or serialization fails Future> getPetById({ - required int petid, + required int petId, CancelToken? cancelToken, Map? headers, Map? extra, @@ -329,7 +329,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'GET', headers: { @@ -458,7 +458,7 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petid] - ID of pet that needs to be updated + /// * [petId] - ID of pet that needs to be updated /// * [name] - Updated name of the pet /// * [status] - Updated status of the pet /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -471,7 +471,7 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ - required int petid, + required int petId, String? name, String? status, CancelToken? cancelToken, @@ -481,7 +481,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { @@ -532,8 +532,8 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petid] - ID of pet to update - /// * [additionalmetadata] - Additional data to pass to server + /// * [petId] - ID of pet to update + /// * [additionalMetadata] - Additional data to pass to server /// * [file] - file to upload /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -545,8 +545,8 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFile({ - required int petid, - String? additionalmetadata, + required int petId, + String? additionalMetadata, MultipartFile? file, CancelToken? cancelToken, Map? headers, @@ -555,7 +555,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { @@ -630,9 +630,9 @@ _responseData = rawData == null ? null : deserialize(r /// /// /// Parameters: - /// * [petid] - ID of pet to update - /// * [requiredfile] - file to upload - /// * [additionalmetadata] - Additional data to pass to server + /// * [petId] - ID of pet to update + /// * [requiredFile] - file to upload + /// * [additionalMetadata] - Additional data to pass to server /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -643,9 +643,9 @@ _responseData = rawData == null ? null : deserialize(r /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ - required int petid, - required MultipartFile requiredfile, - String? additionalmetadata, + required int petId, + required MultipartFile requiredFile, + String? additionalMetadata, CancelToken? cancelToken, Map? headers, Map? extra, @@ -653,7 +653,7 @@ _responseData = rawData == null ? null : deserialize(r ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart index 126a3cbaf671..c196447ea5e4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/all_of_with_single_ref.dart @@ -21,7 +21,7 @@ class AllOfWithSingleRef { this.username, - this.singlereftype, + this.singleRefType, }); @JsonKey( @@ -45,7 +45,7 @@ class AllOfWithSingleRef { ) - final SingleRefType? singlereftype; + final SingleRefType? singleRefType; @@ -54,12 +54,12 @@ class AllOfWithSingleRef { @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && other.username == username && - other.singlereftype == singlereftype; + other.singleRefType == singleRefType; @override int get hashCode => username.hashCode + - singlereftype.hashCode; + singleRefType.hashCode; factory AllOfWithSingleRef.fromJson(Map json) => _$AllOfWithSingleRefFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart index 11efc809e240..732326357226 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/animal.dart @@ -18,7 +18,7 @@ class Animal { /// Returns a new [Animal] instance. Animal({ - required this.classname, + required this.className, this.color = 'red', }); @@ -31,7 +31,7 @@ class Animal { ) - final String classname; + final String className; @@ -51,12 +51,12 @@ class Animal { @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.classname == classname && + other.className == className && other.color == color; @override int get hashCode => - classname.hashCode + + className.hashCode + color.hashCode; factory Animal.fromJson(Map json) => _$AnimalFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart index 2ba4f0c19286..da8de0169296 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_array_of_number_only.dart @@ -18,7 +18,7 @@ class ArrayOfArrayOfNumberOnly { /// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayarraynumber, + this.arrayArrayNumber, }); @JsonKey( @@ -29,7 +29,7 @@ class ArrayOfArrayOfNumberOnly { ) - final List>? arrayarraynumber; + final List>? arrayArrayNumber; @@ -37,11 +37,11 @@ class ArrayOfArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - other.arrayarraynumber == arrayarraynumber; + other.arrayArrayNumber == arrayArrayNumber; @override int get hashCode => - arrayarraynumber.hashCode; + arrayArrayNumber.hashCode; factory ArrayOfArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfArrayOfNumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart index e058704c51af..4ead761e76f7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/array_of_number_only.dart @@ -18,7 +18,7 @@ class ArrayOfNumberOnly { /// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arraynumber, + this.arrayNumber, }); @JsonKey( @@ -29,7 +29,7 @@ class ArrayOfNumberOnly { ) - final List? arraynumber; + final List? arrayNumber; @@ -37,11 +37,11 @@ class ArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - other.arraynumber == arraynumber; + other.arrayNumber == arrayNumber; @override int get hashCode => - arraynumber.hashCode; + arrayNumber.hashCode; factory ArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfNumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart index c248b9c52192..d2bc40f33836 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/capitalization.dart @@ -18,17 +18,17 @@ class Capitalization { /// Returns a new [Capitalization] instance. Capitalization({ - this.smallcamel, + this.smallCamel, - this.capitalcamel, + this.capitalCamel, this.smallSnake, this.capitalSnake, - this.scaEthFlowPoints, + this.sCAETHFlowPoints, - this.attName, + this.ATT_NAME, }); @JsonKey( @@ -39,7 +39,7 @@ class Capitalization { ) - final String? smallcamel; + final String? smallCamel; @@ -51,7 +51,7 @@ class Capitalization { ) - final String? capitalcamel; + final String? capitalCamel; @@ -87,7 +87,7 @@ class Capitalization { ) - final String? scaEthFlowPoints; + final String? sCAETHFlowPoints; @@ -100,7 +100,7 @@ class Capitalization { ) - final String? attName; + final String? ATT_NAME; @@ -108,21 +108,21 @@ class Capitalization { @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallcamel == smallcamel && - other.capitalcamel == capitalcamel && + other.smallCamel == smallCamel && + other.capitalCamel == capitalCamel && other.smallSnake == smallSnake && other.capitalSnake == capitalSnake && - other.scaEthFlowPoints == scaEthFlowPoints && - other.attName == attName; + other.sCAETHFlowPoints == sCAETHFlowPoints && + other.ATT_NAME == ATT_NAME; @override int get hashCode => - smallcamel.hashCode + - capitalcamel.hashCode + + smallCamel.hashCode + + capitalCamel.hashCode + smallSnake.hashCode + capitalSnake.hashCode + - scaEthFlowPoints.hashCode + - attName.hashCode; + sCAETHFlowPoints.hashCode + + ATT_NAME.hashCode; factory Capitalization.fromJson(Map json) => _$CapitalizationFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart index d783b29bfebe..e2df6f2cc557 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/cat.dart @@ -21,7 +21,7 @@ class Cat { /// Returns a new [Cat] instance. Cat({ - required this.classname, + required this.className, this.color = 'red', @@ -36,7 +36,7 @@ class Cat { ) - final String classname; + final String className; @@ -68,13 +68,13 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.classname == classname && + other.className == className && other.color == color && other.declawed == declawed; @override int get hashCode => - classname.hashCode + + className.hashCode + color.hashCode + declawed.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart index 24e56c0a068d..dcda6f93ba6a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/child_with_nullable.dart @@ -23,9 +23,9 @@ class ChildWithNullable { this.type, - this.nullableproperty, + this.nullableProperty, - this.otherproperty, + this.otherProperty, }); @JsonKey( @@ -49,7 +49,7 @@ class ChildWithNullable { ) - final String? nullableproperty; + final String? nullableProperty; @@ -61,7 +61,7 @@ class ChildWithNullable { ) - final String? otherproperty; + final String? otherProperty; @@ -70,14 +70,14 @@ class ChildWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && other.type == type && - other.nullableproperty == nullableproperty && - other.otherproperty == otherproperty; + other.nullableProperty == nullableProperty && + other.otherProperty == otherProperty; @override int get hashCode => type.hashCode + - (nullableproperty == null ? 0 : nullableproperty.hashCode) + - otherproperty.hashCode; + (nullableProperty == null ? 0 : nullableProperty.hashCode) + + otherProperty.hashCode; factory ChildWithNullable.fromJson(Map json) => _$ChildWithNullableFromJson(json); @@ -93,7 +93,7 @@ class ChildWithNullable { enum ChildWithNullableTypeEnum { @JsonValue(r'ChildWithNullable') -childwithnullable(r'ChildWithNullable'), +childWithNullable(r'ChildWithNullable'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart index 871df64ab699..deb271b6dc3b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/dog.dart @@ -21,7 +21,7 @@ class Dog { /// Returns a new [Dog] instance. Dog({ - required this.classname, + required this.className, this.color = 'red', @@ -36,7 +36,7 @@ class Dog { ) - final String classname; + final String className; @@ -68,13 +68,13 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.classname == classname && + other.className == className && other.color == color && other.breed == breed; @override int get hashCode => - classname.hashCode + + className.hashCode + color.hashCode + breed.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart index 0051b7a6da14..563f7038b97f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/enum_test.dart @@ -30,13 +30,13 @@ class EnumTest { this.enumNumber, - this.outerenum, + this.outerEnum, - this.outerenuminteger, + this.outerEnumInteger, - this.outerenumdefaultvalue, + this.outerEnumDefaultValue, - this.outerenumintegerdefaultvalue, + this.outerEnumIntegerDefaultValue, }); @JsonKey( @@ -100,7 +100,7 @@ class EnumTest { ) - final OuterEnum? outerenum; + final OuterEnum? outerEnum; @@ -113,7 +113,7 @@ class EnumTest { ) - final OuterEnumInteger? outerenuminteger; + final OuterEnumInteger? outerEnumInteger; @@ -126,7 +126,7 @@ class EnumTest { ) - final OuterEnumDefaultValue? outerenumdefaultvalue; + final OuterEnumDefaultValue? outerEnumDefaultValue; @@ -139,7 +139,7 @@ class EnumTest { ) - final OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; + final OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; @@ -151,10 +151,10 @@ class EnumTest { other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && other.enumNumber == enumNumber && - other.outerenum == outerenum && - other.outerenuminteger == outerenuminteger && - other.outerenumdefaultvalue == outerenumdefaultvalue && - other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; + other.outerEnum == outerEnum && + other.outerEnumInteger == outerEnumInteger && + other.outerEnumDefaultValue == outerEnumDefaultValue && + other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; @override int get hashCode => @@ -162,10 +162,10 @@ class EnumTest { enumStringRequired.hashCode + enumInteger.hashCode + enumNumber.hashCode + - (outerenum == null ? 0 : outerenum.hashCode) + - outerenuminteger.hashCode + - outerenumdefaultvalue.hashCode + - outerenumintegerdefaultvalue.hashCode; + (outerEnum == null ? 0 : outerEnum.hashCode) + + outerEnumInteger.hashCode + + outerEnumDefaultValue.hashCode + + outerEnumIntegerDefaultValue.hashCode; factory EnumTest.fromJson(Map json) => _$EnumTestFromJson(json); @@ -181,7 +181,7 @@ class EnumTest { enum EnumTestEnumStringEnum { @JsonValue(r'UPPER') -upper(r'UPPER'), +UPPER(r'UPPER'), @JsonValue(r'lower') lower(r'lower'), @JsonValue(r'') @@ -201,7 +201,7 @@ String toString() => value; enum EnumTestEnumStringRequiredEnum { @JsonValue(r'UPPER') -upper(r'UPPER'), +UPPER(r'UPPER'), @JsonValue(r'lower') lower(r'lower'), @JsonValue(r'') @@ -239,9 +239,9 @@ String toString() => value; enum EnumTestEnumNumberEnum { @JsonValue('1.1') -number1period1(''1.1''), +number1Period1(''1.1''), @JsonValue('-1.2') -numberNegative1period2(''-1.2''), +numberNegative1Period2(''-1.2''), @JsonValue('11184809') unknownDefaultOpenApi(''11184809''); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart index 9c994771886c..1f0f2950a71c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/fake_big_decimal_map200_response.dart @@ -18,9 +18,9 @@ class FakeBigDecimalMap200Response { /// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someid, + this.someId, - this.somemap, + this.someMap, }); @JsonKey( @@ -31,7 +31,7 @@ class FakeBigDecimalMap200Response { ) - final num? someid; + final num? someId; @@ -43,7 +43,7 @@ class FakeBigDecimalMap200Response { ) - final Map? somemap; + final Map? someMap; @@ -51,13 +51,13 @@ class FakeBigDecimalMap200Response { @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someid == someid && - other.somemap == somemap; + other.someId == someId && + other.someMap == someMap; @override int get hashCode => - someid.hashCode + - somemap.hashCode; + someId.hashCode + + someMap.hashCode; factory FakeBigDecimalMap200Response.fromJson(Map json) => _$FakeBigDecimalMap200ResponseFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart index b724503e4ae2..a20ba417fa54 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/format_test.dart @@ -41,7 +41,7 @@ class FormatTest { required this.date, - this.datetime, + this.dateTime, this.uuid, @@ -197,7 +197,7 @@ class FormatTest { ) - final DateTime? datetime; + final DateTime? dateTime; @@ -266,7 +266,7 @@ class FormatTest { other.byte == byte && other.binary == binary && other.date == date && - other.datetime == datetime && + other.dateTime == dateTime && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -285,7 +285,7 @@ class FormatTest { byte.hashCode + binary.hashCode + date.hashCode + - datetime.hashCode + + dateTime.hashCode + uuid.hashCode + password.hashCode + patternWithDigits.hashCode + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart index fdacbc440a0b..6fd362cdf351 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/health_check_result.dart @@ -18,7 +18,7 @@ class HealthCheckResult { /// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullablemessage, + this.nullableMessage, }); @JsonKey( @@ -29,7 +29,7 @@ class HealthCheckResult { ) - final String? nullablemessage; + final String? nullableMessage; @@ -37,11 +37,11 @@ class HealthCheckResult { @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullablemessage == nullablemessage; + other.nullableMessage == nullableMessage; @override int get hashCode => - (nullablemessage == null ? 0 : nullablemessage.hashCode); + (nullableMessage == null ? 0 : nullableMessage.hashCode); factory HealthCheckResult.fromJson(Map json) => _$HealthCheckResultFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart index d87a07d10357..59f9377d253a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/map_test.dart @@ -106,7 +106,7 @@ class MapTest { enum MapTestMapOfEnumStringEnum { @JsonValue(r'UPPER') -upper(r'UPPER'), +UPPER(r'UPPER'), @JsonValue(r'lower') lower(r'lower'), @JsonValue(r'unknown_default_open_api') diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart index 960e16bba37a..458d2bd0534b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -21,7 +21,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { this.uuid, - this.datetime, + this.dateTime, this.map, }); @@ -46,7 +46,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { ) - final DateTime? datetime; + final DateTime? dateTime; @@ -67,13 +67,13 @@ class MixedPropertiesAndAdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && other.uuid == uuid && - other.datetime == datetime && + other.dateTime == dateTime && other.map == map; @override int get hashCode => uuid.hashCode + - datetime.hashCode + + dateTime.hashCode + map.hashCode; factory MixedPropertiesAndAdditionalPropertiesClass.fromJson(Map json) => _$MixedPropertiesAndAdditionalPropertiesClassFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart index 602fdc18d607..7ff6301e9edf 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_enum_class.dart @@ -12,7 +12,7 @@ enum ModelEnumClass { @JsonValue(r'-efg') efg(r'-efg'), @JsonValue(r'(xyz)') - leftParenthesisXyzrightParenthesis(r'(xyz)'), + leftParenthesisXyzRightParenthesis(r'(xyz)'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart index 85a43bd2a46d..cccca0412f46 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/model_file.dart @@ -18,7 +18,7 @@ class ModelFile { /// Returns a new [ModelFile] instance. ModelFile({ - this.sourceuri, + this.sourceURI, }); /// Test capitalization @@ -30,7 +30,7 @@ class ModelFile { ) - final String? sourceuri; + final String? sourceURI; @@ -38,11 +38,11 @@ class ModelFile { @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceuri == sourceuri; + other.sourceURI == sourceURI; @override int get hashCode => - sourceuri.hashCode; + sourceURI.hashCode; factory ModelFile.fromJson(Map json) => _$ModelFileFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart index c511946d665e..44e9d41a189d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/number_only.dart @@ -18,7 +18,7 @@ class NumberOnly { /// Returns a new [NumberOnly] instance. NumberOnly({ - this.justnumber, + this.justNumber, }); @JsonKey( @@ -29,7 +29,7 @@ class NumberOnly { ) - final num? justnumber; + final num? justNumber; @@ -37,11 +37,11 @@ class NumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justnumber == justnumber; + other.justNumber == justNumber; @override int get hashCode => - justnumber.hashCode; + justNumber.hashCode; factory NumberOnly.fromJson(Map json) => _$NumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart index 2c060a1ecfc8..5a36ffb5147e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/object_with_deprecated_fields.dart @@ -23,7 +23,7 @@ class ObjectWithDeprecatedFields { this.id, - this.deprecatedref, + this.deprecatedRef, this.bars, }); @@ -53,7 +53,7 @@ class ObjectWithDeprecatedFields { - @Deprecated('deprecatedref has been deprecated') + @Deprecated('deprecatedRef has been deprecated') @JsonKey( name: r'deprecatedRef', @@ -62,7 +62,7 @@ class ObjectWithDeprecatedFields { ) - final DeprecatedObject? deprecatedref; + final DeprecatedObject? deprecatedRef; @@ -85,14 +85,14 @@ class ObjectWithDeprecatedFields { bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && other.uuid == uuid && other.id == id && - other.deprecatedref == deprecatedref && + other.deprecatedRef == deprecatedRef && other.bars == bars; @override int get hashCode => uuid.hashCode + id.hashCode + - deprecatedref.hashCode + + deprecatedRef.hashCode + bars.hashCode; factory ObjectWithDeprecatedFields.fromJson(Map json) => _$ObjectWithDeprecatedFieldsFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart index a554ecc6311b..dfbc4f5c5e41 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/order.dart @@ -20,11 +20,11 @@ class Order { this.id, - this.petid, + this.petId, this.quantity, - this.shipdate, + this.shipDate, this.status, @@ -51,7 +51,7 @@ class Order { ) - final int? petid; + final int? petId; @@ -75,7 +75,7 @@ class Order { ) - final DateTime? shipdate; + final DateTime? shipDate; @@ -110,18 +110,18 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petid == petid && + other.petId == petId && other.quantity == quantity && - other.shipdate == shipdate && + other.shipDate == shipDate && other.status == status && other.complete == complete; @override int get hashCode => id.hashCode + - petid.hashCode + + petId.hashCode + quantity.hashCode + - shipdate.hashCode + + shipDate.hashCode + status.hashCode + complete.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart index 6a0edc0716fe..bda5847df5ad 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/parent_with_nullable.dart @@ -20,7 +20,7 @@ class ParentWithNullable { this.type, - this.nullableproperty, + this.nullableProperty, }); @JsonKey( @@ -44,7 +44,7 @@ class ParentWithNullable { ) - final String? nullableproperty; + final String? nullableProperty; @@ -53,12 +53,12 @@ class ParentWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && other.type == type && - other.nullableproperty == nullableproperty; + other.nullableProperty == nullableProperty; @override int get hashCode => type.hashCode + - (nullableproperty == null ? 0 : nullableproperty.hashCode); + (nullableProperty == null ? 0 : nullableProperty.hashCode); factory ParentWithNullable.fromJson(Map json) => _$ParentWithNullableFromJson(json); @@ -74,7 +74,7 @@ class ParentWithNullable { enum ParentWithNullableTypeEnum { @JsonValue(r'ChildWithNullable') -childwithnullable(r'ChildWithNullable'), +childWithNullable(r'ChildWithNullable'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart index 6d41a485b6c4..fdb70f9ce89a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/pet.dart @@ -26,7 +26,7 @@ class Pet { required this.name, - required this.photourls, + required this.photoUrls, this.tags, @@ -77,7 +77,7 @@ class Pet { ) - final Set photourls; + final Set photoUrls; @@ -114,7 +114,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - other.photourls == photourls && + other.photoUrls == photoUrls && other.tags == tags && other.status == status; @@ -123,7 +123,7 @@ class Pet { id.hashCode + category.hashCode + name.hashCode + - photourls.hashCode + + photoUrls.hashCode + tags.hashCode + status.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart index 30d3bc67b80d..175b6fb274ce 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/special_model_name.dart @@ -18,7 +18,7 @@ class SpecialModelName { /// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, + this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, }); @JsonKey( @@ -29,7 +29,7 @@ class SpecialModelName { ) - final int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + final int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @@ -37,11 +37,11 @@ class SpecialModelName { @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override int get hashCode => - dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket.hashCode; + dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket.hashCode; factory SpecialModelName.fromJson(Map json) => _$SpecialModelNameFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart index c2f51d310a23..5eda7d48b384 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -18,7 +18,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someproperty, + this.someProperty, }); @JsonKey( @@ -29,7 +29,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { ) - final String? someproperty; + final String? someProperty; @@ -37,11 +37,11 @@ class TestInlineFreeformAdditionalPropertiesRequest { @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && - other.someproperty == someproperty; + other.someProperty == someProperty; @override int get hashCode => - someproperty.hashCode; + someProperty.hashCode; factory TestInlineFreeformAdditionalPropertiesRequest.fromJson(Map json) => _$TestInlineFreeformAdditionalPropertiesRequestFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart index 0e2de7c18785..56c95cb75f15 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/lib/src/model/user.dart @@ -22,9 +22,9 @@ class User { this.username, - this.firstname, + this.firstName, - this.lastname, + this.lastName, this.email, @@ -32,7 +32,7 @@ class User { this.phone, - this.userstatus, + this.userStatus, }); @JsonKey( @@ -67,7 +67,7 @@ class User { ) - final String? firstname; + final String? firstName; @@ -79,7 +79,7 @@ class User { ) - final String? lastname; + final String? lastName; @@ -128,7 +128,7 @@ class User { ) - final int? userstatus; + final int? userStatus; @@ -138,23 +138,23 @@ class User { bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstname == firstname && - other.lastname == lastname && + other.firstName == firstName && + other.lastName == lastName && other.email == email && other.password == password && other.phone == phone && - other.userstatus == userstatus; + other.userStatus == userStatus; @override int get hashCode => id.hashCode + username.hashCode + - firstname.hashCode + - lastname.hashCode + + firstName.hashCode + + lastName.hashCode + email.hashCode + password.hashCode + phone.hashCode + - userstatus.hashCode; + userStatus.hashCode; factory User.fromJson(Map json) => _$UserFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md index 79de3b511b9a..ecde40a0ade4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/README.md @@ -48,10 +48,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = await api.call123testSpecialTags(modelclient); + final response = await api.call123testSpecialTags(modelClient); print(response); } catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md index 151142162f62..4c6f3ab2fe11 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singlereftype** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md index 570de2e45be3..415b56e9bc2e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md index 1ed2cb04d8f3..36a94e6bb703 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelclient) +> ModelClient call123testSpecialTags(modelClient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.call123testSpecialTags(modelclient); + final response = api.call123testSpecialTags(modelClient); print(response); } catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md index 0fa36a7fdaaf..d1a272ab6023 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayarraynumber** | [**BuiltList<BuiltList<num>>**](BuiltList.md) | | [optional] +**arrayArrayNumber** | [**BuiltList<BuiltList<num>>**](BuiltList.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md index 11eab0b6dc40..94b60f272fd4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arraynumber** | **BuiltList<num>** | | [optional] +**arrayNumber** | **BuiltList<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md index e673e7baef4b..4a07b4eb820d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallcamel** | **String** | | [optional] -**capitalcamel** | **String** | | [optional] +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**scaEthFlowPoints** | **String** | | [optional] -**attName** | **String** | Name of the pet | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md index 9c557ac9082a..6552eea4b435 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md index 54b310b0f58d..770494fcf4cc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] -**otherproperty** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md index b2ba3dfcef59..d36439b767bb 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md index f1b0758b868e..7c24fe2347b4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md index 987edf55dfcb..d9ba061a46e0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outercomposite) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterComposite outercomposite = ; // OuterComposite | Input composite as post body +final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body try { - final response = api.fakeOuterCompositeSerialize(outercomposite); + final response = api.fakeOuterCompositeSerialize(outerComposite); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterObjectWithEnumProperty outerobjectwithenumproperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body +final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final response = api.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileschematestclass) +> testBodyWithFileSchema(fileSchemaTestClass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final FileSchemaTestClass fileschematestclass = ; // FileSchemaTestClass | +final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | try { - api.testBodyWithFileSchema(fileschematestclass); + api.testBodyWithFileSchema(fileSchemaTestClass); } catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelclient) +> ModelClient testClientModel(modelClient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.testClientModel(modelclient); + final response = api.testClientModel(modelClient); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final double float = 3.4; // double | None final String string = string_example; // String | None final Uint8List binary = BINARY_DATA_HERE; // Uint8List | None final Date date = 2013-10-20; // Date | None -final DateTime datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final String password = password_example; // String | None final String callback = callback_example; // String | None try { - api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **Uint8List**| None | [optional] **date** | **Date**| None | [optional] - **datetime** | **DateTime**| None | [optional] + **dateTime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -803,7 +803,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) +> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) test inline free-form additionalProperties @@ -814,10 +814,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body +final TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); + api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); } catch on DioException (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -827,7 +827,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -889,7 +889,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childwithnullable) +> testNullable(childWithNullable) test nullable parent property @@ -900,10 +900,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ChildWithNullable childwithnullable = ; // ChildWithNullable | request body +final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body try { - api.testNullable(childwithnullable); + api.testNullable(childWithNullable); } catch on DioException (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -913,7 +913,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -931,7 +931,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -947,11 +947,11 @@ final BuiltList ioutil = ; // BuiltList | final BuiltList http = ; // BuiltList | final BuiltList url = ; // BuiltList | final BuiltList context = ; // BuiltList | -final String allowempty = allowempty_example; // String | +final String allowEmpty = allowEmpty_example; // String | final BuiltMap language = ; // BuiltMap | try { - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -966,7 +966,7 @@ Name | Type | Description | Notes **http** | [**BuiltList<String>**](String.md)| | **url** | [**BuiltList<String>**](String.md)| | **context** | [**BuiltList<String>**](String.md)| | - **allowempty** | **String**| | + **allowEmpty** | **String**| | **language** | [**BuiltMap<String, String>**](String.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md index 87733576b776..cedb487c954d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someid** | **num** | | [optional] -**somemap** | **BuiltMap<String, num>** | | [optional] +**someId** | **num** | | [optional] +**someMap** | **BuiltMap<String, 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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index 88a70afff0f0..645aebf399f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelclient) +> ModelClient testClassname(modelClient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api = Openapi().getFakeClassnameTags123Api(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.testClassname(modelclient); + final response = api.testClassname(modelClient); print(response); } catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md index e6b4ee4a6a95..f811264ca2ba 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**Uint8List**](Uint8List.md) | | [optional] **date** | [**Date**](Date.md) | | -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md index c912fb2e08f4..4d6aeb75d965 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullablemessage** | **String** | | [optional] +**nullableMessage** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md index cda3d76a20ab..b1a4c4ccc401 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**BuiltMap<String, Animal>**](Animal.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md index d54b1bbbea04..4be260e93f6e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceuri** | **String** | Test capitalization | [optional] +**sourceURI** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md index f5fac6f8a17c..d8096a3db37a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justnumber** | **num** | | [optional] +**justNumber** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md index b96040b7ec27..3e7848d382c2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **BuiltList<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md index 08914a83f300..bde5ffe51a2c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petid** | **int** | | [optional] +**petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md index 435464987052..17aa5ca02941 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] +**nullableProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md index dc8144baf071..08e0aeedd784 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photourls** | **BuiltSet<String>** | | +**photoUrls** | **BuiltSet<String>** | | **tags** | [**BuiltList<Tag>**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md index f7744bcc832a..2b7766eb60d4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petid, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | Pet id to delete +final int petId = 789; // int | Pet id to delete final String apiKey = apiKey_example; // String | try { - api.deletePet(petid, apiKey); + api.deletePet(petId, apiKey); } catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| Pet id to delete | + **petId** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petid) +> Pet getPetById(petId) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to return +final int petId = 789; // int | ID of pet to return try { - final response = api.getPetById(petid); + final response = api.getPetById(petId); print(response); } catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to return | + **petId** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petid, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet that needs to be updated +final int petId = 789; // int | ID of pet that needs to be updated final String name = name_example; // String | Updated name of the pet final String status = status_example; // String | Updated status of the pet try { - api.updatePetWithForm(petid, name, status); + api.updatePetWithForm(petId, name, status); } catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet that needs to be updated | + **petId** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petid, additionalmetadata, file) +> ApiResponse uploadFile(petId, additionalMetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to update -final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final int petId = 789; // int | ID of pet to update +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final response = api.uploadFile(petid, additionalmetadata, file); + final response = api.uploadFile(petId, additionalMetadata, file); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to update -final MultipartFile requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload -final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final int petId = 789; // int | ID of pet to update +final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server try { - final response = api.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **requiredfile** | **MultipartFile**| file to upload | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **requiredFile** | **MultipartFile**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md index 04697c8e6225..5fcfa98e0b36 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [optional] +**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md index 894a3e60ee31..e2b2f1fd4468 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someproperty** | **String** | | [optional] +**someProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md index 37aa8c50230e..fa87e64d8595 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstname** | **String** | | [optional] -**lastname** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userstatus** | **int** | User Status | [optional] +**userStatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart index 15199a7d2f23..5d2876183070 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/another_fake_api.dart @@ -22,7 +22,7 @@ class AnotherFakeApi { /// To test special tags and operation ID starting with number /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -33,7 +33,7 @@ class AnotherFakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -59,7 +59,7 @@ class AnotherFakeApi { try { const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelclient, specifiedType: _type); + _bodyData = _serializers.serialize(modelClient, specifiedType: _type); } catch(error, stackTrace) { throw DioException( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart index 756b1fe22f62..1cfaf9712ad4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_api.dart @@ -358,7 +358,7 @@ class FakeApi { /// Test serialization of object with outer number type /// /// Parameters: - /// * [outercomposite] - Input composite as post body + /// * [outerComposite] - Input composite as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -369,7 +369,7 @@ class FakeApi { /// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ - OuterComposite? outercomposite, + OuterComposite? outerComposite, CancelToken? cancelToken, Map? headers, Map? extra, @@ -395,7 +395,7 @@ class FakeApi { try { const _type = FullType(OuterComposite); - _bodyData = outercomposite == null ? null : _serializers.serialize(outercomposite, specifiedType: _type); + _bodyData = outerComposite == null ? null : _serializers.serialize(outerComposite, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -635,7 +635,7 @@ class FakeApi { /// Test serialization of enum (int) properties with examples /// /// Parameters: - /// * [outerobjectwithenumproperty] - Input enum (int) as post body + /// * [outerObjectWithEnumProperty] - Input enum (int) as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -646,7 +646,7 @@ class FakeApi { /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ - required OuterObjectWithEnumProperty outerobjectwithenumproperty, + required OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancelToken? cancelToken, Map? headers, Map? extra, @@ -672,7 +672,7 @@ class FakeApi { try { const _type = FullType(OuterObjectWithEnumProperty); - _bodyData = _serializers.serialize(outerobjectwithenumproperty, specifiedType: _type); + _bodyData = _serializers.serialize(outerObjectWithEnumProperty, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -863,7 +863,7 @@ class FakeApi { /// For this test, the body for this request must reference a schema named `File`. /// /// Parameters: - /// * [fileschematestclass] + /// * [fileSchemaTestClass] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -874,7 +874,7 @@ class FakeApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testBodyWithFileSchema({ - required FileSchemaTestClass fileschematestclass, + required FileSchemaTestClass fileSchemaTestClass, CancelToken? cancelToken, Map? headers, Map? extra, @@ -900,7 +900,7 @@ class FakeApi { try { const _type = FullType(FileSchemaTestClass); - _bodyData = _serializers.serialize(fileschematestclass, specifiedType: _type); + _bodyData = _serializers.serialize(fileSchemaTestClass, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1005,7 +1005,7 @@ class FakeApi { /// To test \"client\" model /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1016,7 +1016,7 @@ class FakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClientModel({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1042,7 +1042,7 @@ class FakeApi { try { const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelclient, specifiedType: _type); + _bodyData = _serializers.serialize(modelClient, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1111,7 +1111,7 @@ class FakeApi { /// * [string] - None /// * [binary] - None /// * [date] - None - /// * [datetime] - None + /// * [dateTime] - None /// * [password] - None /// * [callback] - None /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -1135,7 +1135,7 @@ class FakeApi { String? string, Uint8List? binary, Date? date, - DateTime? datetime, + DateTime? dateTime, String? password, String? callback, CancelToken? cancelToken, @@ -1180,7 +1180,7 @@ class FakeApi { r'byte': encodeQueryParameter(_serializers, byte, const FullType(String)), if (binary != null) r'binary': encodeQueryParameter(_serializers, binary, const FullType(Uint8List)), if (date != null) r'date': encodeQueryParameter(_serializers, date, const FullType(Date)), - if (datetime != null) r'dateTime': encodeQueryParameter(_serializers, datetime, const FullType(DateTime)), + if (dateTime != null) r'dateTime': encodeQueryParameter(_serializers, dateTime, const FullType(DateTime)), if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)), if (callback != null) r'callback': encodeQueryParameter(_serializers, callback, const FullType(String)), }; @@ -1450,7 +1450,7 @@ class FakeApi { /// /// /// Parameters: - /// * [testinlinefreeformadditionalpropertiesrequest] - request body + /// * [testInlineFreeformAdditionalPropertiesRequest] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1461,7 +1461,7 @@ class FakeApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testInlineFreeformAdditionalProperties({ - required TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest, + required TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1487,7 +1487,7 @@ class FakeApi { try { const _type = FullType(TestInlineFreeformAdditionalPropertiesRequest); - _bodyData = _serializers.serialize(testinlinefreeformadditionalpropertiesrequest, specifiedType: _type); + _bodyData = _serializers.serialize(testInlineFreeformAdditionalPropertiesRequest, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1588,7 +1588,7 @@ class FakeApi { /// /// /// Parameters: - /// * [childwithnullable] - request body + /// * [childWithNullable] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1599,7 +1599,7 @@ class FakeApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testNullable({ - required ChildWithNullable childwithnullable, + required ChildWithNullable childWithNullable, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1625,7 +1625,7 @@ class FakeApi { try { const _type = FullType(ChildWithNullable); - _bodyData = _serializers.serialize(childwithnullable, specifiedType: _type); + _bodyData = _serializers.serialize(childWithNullable, specifiedType: _type); } catch(error, stackTrace) { throw DioException( @@ -1660,7 +1660,7 @@ class FakeApi { /// * [http] /// * [url] /// * [context] - /// * [allowempty] + /// * [allowEmpty] /// * [language] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -1677,7 +1677,7 @@ class FakeApi { required BuiltList http, required BuiltList url, required BuiltList context, - required String allowempty, + required String allowEmpty, BuiltMap? language, CancelToken? cancelToken, Map? headers, @@ -1706,7 +1706,7 @@ class FakeApi { r'url': encodeCollectionQueryParameter(_serializers, url, const FullType(BuiltList, [FullType(String)]), format: ListFormat.csv,), r'context': encodeCollectionQueryParameter(_serializers, context, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), if (language != null) r'language': encodeQueryParameter(_serializers, language, const FullType(BuiltMap, [FullType(String), FullType(String)]), ), - r'allowEmpty': encodeQueryParameter(_serializers, allowempty, const FullType(String)), + r'allowEmpty': encodeQueryParameter(_serializers, allowEmpty, const FullType(String)), }; final _response = await _dio.request( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart index 7f9ec576afe4..671ec766ab47 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/fake_classname_tags123_api.dart @@ -22,7 +22,7 @@ class FakeClassnameTags123Api { /// To test class name in snake case /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -33,7 +33,7 @@ class FakeClassnameTags123Api { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClassname({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -66,7 +66,7 @@ class FakeClassnameTags123Api { try { const _type = FullType(ModelClient); - _bodyData = _serializers.serialize(modelclient, specifiedType: _type); + _bodyData = _serializers.serialize(modelClient, specifiedType: _type); } catch(error, stackTrace) { throw DioException( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart index 9507fb043079..a4da1c5ff6db 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/api/pet_api.dart @@ -97,7 +97,7 @@ class PetApi { /// /// /// Parameters: - /// * [petid] - Pet id to delete + /// * [petId] - Pet id to delete /// * [apiKey] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -109,7 +109,7 @@ class PetApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> deletePet({ - required int petid, + required int petId, String? apiKey, CancelToken? cancelToken, Map? headers, @@ -118,7 +118,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); final _options = Options( method: r'DELETE', headers: { @@ -323,7 +323,7 @@ class PetApi { /// Returns a single pet /// /// Parameters: - /// * [petid] - ID of pet to return + /// * [petId] - ID of pet to return /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -334,7 +334,7 @@ class PetApi { /// Returns a [Future] containing a [Response] with a [Pet] as data /// Throws [DioException] if API call or serialization fails Future> getPetById({ - required int petid, + required int petId, CancelToken? cancelToken, Map? headers, Map? extra, @@ -342,7 +342,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); final _options = Options( method: r'GET', headers: { @@ -477,7 +477,7 @@ class PetApi { /// /// /// Parameters: - /// * [petid] - ID of pet that needs to be updated + /// * [petId] - ID of pet that needs to be updated /// * [name] - Updated name of the pet /// * [status] - Updated status of the pet /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -490,7 +490,7 @@ class PetApi { /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ - required int petid, + required int petId, String? name, String? status, CancelToken? cancelToken, @@ -500,7 +500,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); final _options = Options( method: r'POST', headers: { @@ -555,8 +555,8 @@ class PetApi { /// /// /// Parameters: - /// * [petid] - ID of pet to update - /// * [additionalmetadata] - Additional data to pass to server + /// * [petId] - ID of pet to update + /// * [additionalMetadata] - Additional data to pass to server /// * [file] - file to upload /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -568,8 +568,8 @@ class PetApi { /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFile({ - required int petid, - String? additionalmetadata, + required int petId, + String? additionalMetadata, MultipartFile? file, CancelToken? cancelToken, Map? headers, @@ -578,7 +578,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); final _options = Options( method: r'POST', headers: { @@ -601,7 +601,7 @@ class PetApi { try { _bodyData = FormData.fromMap({ - if (additionalmetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalmetadata, const FullType(String)), + if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), if (file != null) r'file': file, }); @@ -661,9 +661,9 @@ class PetApi { /// /// /// Parameters: - /// * [petid] - ID of pet to update - /// * [requiredfile] - file to upload - /// * [additionalmetadata] - Additional data to pass to server + /// * [petId] - ID of pet to update + /// * [requiredFile] - file to upload + /// * [additionalMetadata] - Additional data to pass to server /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -674,9 +674,9 @@ class PetApi { /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ - required int petid, - required MultipartFile requiredfile, - String? additionalmetadata, + required int petId, + required MultipartFile requiredFile, + String? additionalMetadata, CancelToken? cancelToken, Map? headers, Map? extra, @@ -684,7 +684,7 @@ class PetApi { ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petid, const FullType(int)).toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', encodeQueryParameter(_serializers, petId, const FullType(int)).toString()); final _options = Options( method: r'POST', headers: { @@ -707,8 +707,8 @@ class PetApi { try { _bodyData = FormData.fromMap({ - if (additionalmetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalmetadata, const FullType(String)), - r'requiredFile': requiredfile, + if (additionalMetadata != null) r'additionalMetadata': encodeFormParameter(_serializers, additionalMetadata, const FullType(String)), + r'requiredFile': requiredFile, }); } catch(error, stackTrace) { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart index 15e316036e0a..5bcd7d9dee8a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/all_of_with_single_ref.dart @@ -13,15 +13,15 @@ part 'all_of_with_single_ref.g.dart'; /// /// Properties: /// * [username] -/// * [singlereftype] +/// * [singleRefType] @BuiltValue() abstract class AllOfWithSingleRef implements Built { @BuiltValueField(wireName: r'username') String? get username; @BuiltValueField(wireName: r'SingleRefType') - SingleRefType? get singlereftype; - // enum singlereftypeEnum { admin, user, }; + SingleRefType? get singleRefType; + // enum singleRefTypeEnum { admin, user, }; AllOfWithSingleRef._(); @@ -53,10 +53,10 @@ class _$AllOfWithSingleRefSerializer implements PrimitiveSerializer { }) sync* { yield r'className'; yield serializers.serialize( - object.classname, + object.className, specifiedType: const FullType(String), ); if (object.color != null) { @@ -165,7 +165,7 @@ class _$$AnimalSerializer implements PrimitiveSerializer<$Animal> { value, specifiedType: const FullType(String), ) as String; - result.classname = valueDes; + result.className = valueDes; break; case r'color': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart index 8a571b40fb91..5bc0982b8ab0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_array_of_number_only.dart @@ -12,11 +12,11 @@ part 'array_of_array_of_number_only.g.dart'; /// ArrayOfArrayOfNumberOnly /// /// Properties: -/// * [arrayarraynumber] +/// * [arrayArrayNumber] @BuiltValue() abstract class ArrayOfArrayOfNumberOnly implements Built { @BuiltValueField(wireName: r'ArrayArrayNumber') - BuiltList>? get arrayarraynumber; + BuiltList>? get arrayArrayNumber; ArrayOfArrayOfNumberOnly._(); @@ -41,10 +41,10 @@ class _$ArrayOfArrayOfNumberOnlySerializer implements PrimitiveSerializer>; - result.arrayarraynumber.replace(valueDes); + result.arrayArrayNumber.replace(valueDes); break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart index a2925f243ca3..72239924f5ec 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/array_of_number_only.dart @@ -12,11 +12,11 @@ part 'array_of_number_only.g.dart'; /// ArrayOfNumberOnly /// /// Properties: -/// * [arraynumber] +/// * [arrayNumber] @BuiltValue() abstract class ArrayOfNumberOnly implements Built { @BuiltValueField(wireName: r'ArrayNumber') - BuiltList? get arraynumber; + BuiltList? get arrayNumber; ArrayOfNumberOnly._(); @@ -41,10 +41,10 @@ class _$ArrayOfNumberOnlySerializer implements PrimitiveSerializer; - result.arraynumber.replace(valueDes); + result.arrayNumber.replace(valueDes); break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart index 985611a9cf23..75827b9a429e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/capitalization.dart @@ -11,19 +11,19 @@ part 'capitalization.g.dart'; /// Capitalization /// /// Properties: -/// * [smallcamel] -/// * [capitalcamel] +/// * [smallCamel] +/// * [capitalCamel] /// * [smallSnake] /// * [capitalSnake] -/// * [scaEthFlowPoints] -/// * [attName] - Name of the pet +/// * [sCAETHFlowPoints] +/// * [ATT_NAME] - Name of the pet @BuiltValue() abstract class Capitalization implements Built { @BuiltValueField(wireName: r'smallCamel') - String? get smallcamel; + String? get smallCamel; @BuiltValueField(wireName: r'CapitalCamel') - String? get capitalcamel; + String? get capitalCamel; @BuiltValueField(wireName: r'small_Snake') String? get smallSnake; @@ -32,11 +32,11 @@ abstract class Capitalization implements Built Capitalization object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.smallcamel != null) { + if (object.smallCamel != null) { yield r'smallCamel'; yield serializers.serialize( - object.smallcamel, + object.smallCamel, specifiedType: const FullType(String), ); } - if (object.capitalcamel != null) { + if (object.capitalCamel != null) { yield r'CapitalCamel'; yield serializers.serialize( - object.capitalcamel, + object.capitalCamel, specifiedType: const FullType(String), ); } @@ -89,17 +89,17 @@ class _$CapitalizationSerializer implements PrimitiveSerializer specifiedType: const FullType(String), ); } - if (object.scaEthFlowPoints != null) { + if (object.sCAETHFlowPoints != null) { yield r'SCA_ETH_Flow_Points'; yield serializers.serialize( - object.scaEthFlowPoints, + object.sCAETHFlowPoints, specifiedType: const FullType(String), ); } - if (object.attName != null) { + if (object.ATT_NAME != null) { yield r'ATT_NAME'; yield serializers.serialize( - object.attName, + object.ATT_NAME, specifiedType: const FullType(String), ); } @@ -131,14 +131,14 @@ class _$CapitalizationSerializer implements PrimitiveSerializer value, specifiedType: const FullType(String), ) as String; - result.smallcamel = valueDes; + result.smallCamel = valueDes; break; case r'CapitalCamel': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.capitalcamel = valueDes; + result.capitalCamel = valueDes; break; case r'small_Snake': final valueDes = serializers.deserialize( @@ -159,14 +159,14 @@ class _$CapitalizationSerializer implements PrimitiveSerializer value, specifiedType: const FullType(String), ) as String; - result.scaEthFlowPoints = valueDes; + result.sCAETHFlowPoints = valueDes; break; case r'ATT_NAME': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.attName = valueDes; + result.ATT_NAME = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart index 5b7162354b4e..af1faeef25cd 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat.dart @@ -12,7 +12,7 @@ part 'cat.g.dart'; /// Cat /// /// Properties: -/// * [classname] +/// * [className] /// * [color] /// * [declawed] @BuiltValue() @@ -25,7 +25,7 @@ abstract class Cat implements Animal, Built { factory Cat([void updates(CatBuilder b)]) = _$Cat; @BuiltValueHook(initializeBuilder: true) - static void _defaults(CatBuilder b) => b..classname=b.discriminatorValue + static void _defaults(CatBuilder b) => b..className=b.discriminatorValue ..color = 'red'; @BuiltValueSerializer(custom: true) @@ -44,11 +44,6 @@ class _$CatSerializer implements PrimitiveSerializer { Cat object, { FullType specifiedType = FullType.unspecified, }) sync* { - yield r'className'; - yield serializers.serialize( - object.classname, - specifiedType: const FullType(String), - ); if (object.color != null) { yield r'color'; yield serializers.serialize( @@ -63,6 +58,11 @@ class _$CatSerializer implements PrimitiveSerializer { specifiedType: const FullType(bool), ); } + yield r'className'; + yield serializers.serialize( + object.className, + specifiedType: const FullType(String), + ); } @override @@ -86,13 +86,6 @@ class _$CatSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'className': - final valueDes = serializers.deserialize( - value, - specifiedType: const FullType(String), - ) as String; - result.classname = valueDes; - break; case r'color': final valueDes = serializers.deserialize( value, @@ -107,6 +100,13 @@ class _$CatSerializer implements PrimitiveSerializer { ) as bool; result.declawed = valueDes; break; + case r'className': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.className = valueDes; + break; default: unhandled.add(key); unhandled.add(value); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart index 39de46a560ec..8e40eb1d2371 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/child_with_nullable.dart @@ -14,12 +14,12 @@ part 'child_with_nullable.g.dart'; /// /// Properties: /// * [type] -/// * [nullableproperty] -/// * [otherproperty] +/// * [nullableProperty] +/// * [otherProperty] @BuiltValue() abstract class ChildWithNullable implements ParentWithNullable, Built { @BuiltValueField(wireName: r'otherProperty') - String? get otherproperty; + String? get otherProperty; ChildWithNullable._(); @@ -44,13 +44,6 @@ class _$ChildWithNullableSerializer implements PrimitiveSerializer { factory Dog([void updates(DogBuilder b)]) = _$Dog; @BuiltValueHook(initializeBuilder: true) - static void _defaults(DogBuilder b) => b..classname=b.discriminatorValue + static void _defaults(DogBuilder b) => b..className=b.discriminatorValue ..color = 'red'; @BuiltValueSerializer(custom: true) @@ -44,11 +44,6 @@ class _$DogSerializer implements PrimitiveSerializer { Dog object, { FullType specifiedType = FullType.unspecified, }) sync* { - yield r'className'; - yield serializers.serialize( - object.classname, - specifiedType: const FullType(String), - ); if (object.color != null) { yield r'color'; yield serializers.serialize( @@ -63,6 +58,11 @@ class _$DogSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } + yield r'className'; + yield serializers.serialize( + object.className, + specifiedType: const FullType(String), + ); } @override @@ -86,26 +86,26 @@ class _$DogSerializer implements PrimitiveSerializer { final key = serializedList[i] as String; final value = serializedList[i + 1]; switch (key) { - case r'className': + case r'color': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.classname = valueDes; + result.color = valueDes; break; - case r'color': + case r'breed': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.color = valueDes; + result.breed = valueDes; break; - case r'breed': + case r'className': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.breed = valueDes; + result.className = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart index c88058c10a63..831f5b9d6d2d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/enum_test.dart @@ -20,10 +20,10 @@ part 'enum_test.g.dart'; /// * [enumStringRequired] /// * [enumInteger] /// * [enumNumber] -/// * [outerenum] -/// * [outerenuminteger] -/// * [outerenumdefaultvalue] -/// * [outerenumintegerdefaultvalue] +/// * [outerEnum] +/// * [outerEnumInteger] +/// * [outerEnumDefaultValue] +/// * [outerEnumIntegerDefaultValue] @BuiltValue() abstract class EnumTest implements Built { @BuiltValueField(wireName: r'enum_string') @@ -43,20 +43,20 @@ abstract class EnumTest implements Built { // enum enumNumberEnum { 1.1, -1.2, }; @BuiltValueField(wireName: r'outerEnum') - OuterEnum? get outerenum; - // enum outerenumEnum { placed, approved, delivered, }; + OuterEnum? get outerEnum; + // enum outerEnumEnum { placed, approved, delivered, }; @BuiltValueField(wireName: r'outerEnumInteger') - OuterEnumInteger? get outerenuminteger; - // enum outerenumintegerEnum { 0, 1, 2, }; + OuterEnumInteger? get outerEnumInteger; + // enum outerEnumIntegerEnum { 0, 1, 2, }; @BuiltValueField(wireName: r'outerEnumDefaultValue') - OuterEnumDefaultValue? get outerenumdefaultvalue; - // enum outerenumdefaultvalueEnum { placed, approved, delivered, }; + OuterEnumDefaultValue? get outerEnumDefaultValue; + // enum outerEnumDefaultValueEnum { placed, approved, delivered, }; @BuiltValueField(wireName: r'outerEnumIntegerDefaultValue') - OuterEnumIntegerDefaultValue? get outerenumintegerdefaultvalue; - // enum outerenumintegerdefaultvalueEnum { 0, 1, 2, }; + OuterEnumIntegerDefaultValue? get outerEnumIntegerDefaultValue; + // enum outerEnumIntegerDefaultValueEnum { 0, 1, 2, }; EnumTest._(); @@ -107,31 +107,31 @@ class _$EnumTestSerializer implements PrimitiveSerializer { specifiedType: const FullType(EnumTestEnumNumberEnum), ); } - if (object.outerenum != null) { + if (object.outerEnum != null) { yield r'outerEnum'; yield serializers.serialize( - object.outerenum, + object.outerEnum, specifiedType: const FullType.nullable(OuterEnum), ); } - if (object.outerenuminteger != null) { + if (object.outerEnumInteger != null) { yield r'outerEnumInteger'; yield serializers.serialize( - object.outerenuminteger, + object.outerEnumInteger, specifiedType: const FullType(OuterEnumInteger), ); } - if (object.outerenumdefaultvalue != null) { + if (object.outerEnumDefaultValue != null) { yield r'outerEnumDefaultValue'; yield serializers.serialize( - object.outerenumdefaultvalue, + object.outerEnumDefaultValue, specifiedType: const FullType(OuterEnumDefaultValue), ); } - if (object.outerenumintegerdefaultvalue != null) { + if (object.outerEnumIntegerDefaultValue != null) { yield r'outerEnumIntegerDefaultValue'; yield serializers.serialize( - object.outerenumintegerdefaultvalue, + object.outerEnumIntegerDefaultValue, specifiedType: const FullType(OuterEnumIntegerDefaultValue), ); } @@ -192,28 +192,28 @@ class _$EnumTestSerializer implements PrimitiveSerializer { specifiedType: const FullType.nullable(OuterEnum), ) as OuterEnum?; if (valueDes == null) continue; - result.outerenum = valueDes; + result.outerEnum = valueDes; break; case r'outerEnumInteger': final valueDes = serializers.deserialize( value, specifiedType: const FullType(OuterEnumInteger), ) as OuterEnumInteger; - result.outerenuminteger = valueDes; + result.outerEnumInteger = valueDes; break; case r'outerEnumDefaultValue': final valueDes = serializers.deserialize( value, specifiedType: const FullType(OuterEnumDefaultValue), ) as OuterEnumDefaultValue; - result.outerenumdefaultvalue = valueDes; + result.outerEnumDefaultValue = valueDes; break; case r'outerEnumIntegerDefaultValue': final valueDes = serializers.deserialize( value, specifiedType: const FullType(OuterEnumIntegerDefaultValue), ) as OuterEnumIntegerDefaultValue; - result.outerenumintegerdefaultvalue = valueDes; + result.outerEnumIntegerDefaultValue = valueDes; break; default: unhandled.add(key); @@ -247,7 +247,7 @@ class _$EnumTestSerializer implements PrimitiveSerializer { class EnumTestEnumStringEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringEnum upper = _$enumTestEnumStringEnum_upper; + static const EnumTestEnumStringEnum UPPER = _$enumTestEnumStringEnum_UPPER; @BuiltValueEnumConst(wireName: r'lower') static const EnumTestEnumStringEnum lower = _$enumTestEnumStringEnum_lower; @BuiltValueEnumConst(wireName: r'') @@ -266,7 +266,7 @@ class EnumTestEnumStringEnum extends EnumClass { class EnumTestEnumStringRequiredEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'UPPER') - static const EnumTestEnumStringRequiredEnum upper = _$enumTestEnumStringRequiredEnum_upper; + static const EnumTestEnumStringRequiredEnum UPPER = _$enumTestEnumStringRequiredEnum_UPPER; @BuiltValueEnumConst(wireName: r'lower') static const EnumTestEnumStringRequiredEnum lower = _$enumTestEnumStringRequiredEnum_lower; @BuiltValueEnumConst(wireName: r'') @@ -302,9 +302,9 @@ class EnumTestEnumIntegerEnum extends EnumClass { class EnumTestEnumNumberEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'1.1') - static const EnumTestEnumNumberEnum number1period1 = _$enumTestEnumNumberEnum_number1period1; + static const EnumTestEnumNumberEnum number1Period1 = _$enumTestEnumNumberEnum_number1Period1; @BuiltValueEnumConst(wireName: r'-1.2') - static const EnumTestEnumNumberEnum numberNegative1period2 = _$enumTestEnumNumberEnum_numberNegative1period2; + static const EnumTestEnumNumberEnum numberNegative1Period2 = _$enumTestEnumNumberEnum_numberNegative1Period2; @BuiltValueEnumConst(wireName: r'11184809', fallback: true) static const EnumTestEnumNumberEnum unknownDefaultOpenApi = _$enumTestEnumNumberEnum_unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart index ce10b09df986..ddfab9d2b56b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/fake_big_decimal_map200_response.dart @@ -12,15 +12,15 @@ part 'fake_big_decimal_map200_response.g.dart'; /// FakeBigDecimalMap200Response /// /// Properties: -/// * [someid] -/// * [somemap] +/// * [someId] +/// * [someMap] @BuiltValue() abstract class FakeBigDecimalMap200Response implements Built { @BuiltValueField(wireName: r'someId') - num? get someid; + num? get someId; @BuiltValueField(wireName: r'someMap') - BuiltMap? get somemap; + BuiltMap? get someMap; FakeBigDecimalMap200Response._(); @@ -45,17 +45,17 @@ class _$FakeBigDecimalMap200ResponseSerializer implements PrimitiveSerializer; - result.somemap.replace(valueDes); + result.someMap.replace(valueDes); break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart index 72d0e1020623..33775231476e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/format_test.dart @@ -24,7 +24,7 @@ part 'format_test.g.dart'; /// * [byte] /// * [binary] /// * [date] -/// * [datetime] +/// * [dateTime] /// * [uuid] /// * [password] /// * [patternWithDigits] - A string that is a 10 digit number. Can have leading zeros. @@ -65,7 +65,7 @@ abstract class FormatTest implements Built { Date get date; @BuiltValueField(wireName: r'dateTime') - DateTime? get datetime; + DateTime? get dateTime; @BuiltValueField(wireName: r'uuid') String? get uuid; @@ -175,10 +175,10 @@ class _$FormatTestSerializer implements PrimitiveSerializer { object.date, specifiedType: const FullType(Date), ); - if (object.datetime != null) { + if (object.dateTime != null) { yield r'dateTime'; yield serializers.serialize( - object.datetime, + object.dateTime, specifiedType: const FullType(DateTime), ); } @@ -313,7 +313,7 @@ class _$FormatTestSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(DateTime), ) as DateTime; - result.datetime = valueDes; + result.dateTime = valueDes; break; case r'uuid': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart index f84095e35b3f..c092a535f2fc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/health_check_result.dart @@ -11,11 +11,11 @@ part 'health_check_result.g.dart'; /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. /// /// Properties: -/// * [nullablemessage] +/// * [nullableMessage] @BuiltValue() abstract class HealthCheckResult implements Built { @BuiltValueField(wireName: r'NullableMessage') - String? get nullablemessage; + String? get nullableMessage; HealthCheckResult._(); @@ -40,10 +40,10 @@ class _$HealthCheckResultSerializer implements PrimitiveSerializer { class MapTestMapOfEnumStringEnum extends EnumClass { @BuiltValueEnumConst(wireName: r'UPPER') - static const MapTestMapOfEnumStringEnum upper = _$mapTestMapOfEnumStringEnum_upper; + static const MapTestMapOfEnumStringEnum UPPER = _$mapTestMapOfEnumStringEnum_UPPER; @BuiltValueEnumConst(wireName: r'lower') static const MapTestMapOfEnumStringEnum lower = _$mapTestMapOfEnumStringEnum_lower; @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart index 8c2c2a93b4d7..76b5933ae5a7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -14,7 +14,7 @@ part 'mixed_properties_and_additional_properties_class.g.dart'; /// /// Properties: /// * [uuid] -/// * [datetime] +/// * [dateTime] /// * [map] @BuiltValue() abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built { @@ -22,7 +22,7 @@ abstract class MixedPropertiesAndAdditionalPropertiesClass implements Built? get map; @@ -57,10 +57,10 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti specifiedType: const FullType(String), ); } - if (object.datetime != null) { + if (object.dateTime != null) { yield r'dateTime'; yield serializers.serialize( - object.datetime, + object.dateTime, specifiedType: const FullType(DateTime), ); } @@ -106,7 +106,7 @@ class _$MixedPropertiesAndAdditionalPropertiesClassSerializer implements Primiti value, specifiedType: const FullType(DateTime), ) as DateTime; - result.datetime = valueDes; + result.dateTime = valueDes; break; case r'map': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart index 82bad309aa27..ac609bfd15ad 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_enum_class.dart @@ -16,7 +16,7 @@ class ModelEnumClass extends EnumClass { @BuiltValueEnumConst(wireName: r'-efg') static const ModelEnumClass efg = _$efg; @BuiltValueEnumConst(wireName: r'(xyz)') - static const ModelEnumClass leftParenthesisXyzrightParenthesis = _$leftParenthesisXyzrightParenthesis; + static const ModelEnumClass leftParenthesisXyzRightParenthesis = _$leftParenthesisXyzRightParenthesis; @BuiltValueEnumConst(wireName: r'unknown_default_open_api', fallback: true) static const ModelEnumClass unknownDefaultOpenApi = _$unknownDefaultOpenApi; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart index 1e77f54615ee..2702c21d36f2 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/model_file.dart @@ -11,12 +11,12 @@ part 'model_file.g.dart'; /// Must be named `File` for test. /// /// Properties: -/// * [sourceuri] - Test capitalization +/// * [sourceURI] - Test capitalization @BuiltValue() abstract class ModelFile implements Built { /// Test capitalization @BuiltValueField(wireName: r'sourceURI') - String? get sourceuri; + String? get sourceURI; ModelFile._(); @@ -41,10 +41,10 @@ class _$ModelFileSerializer implements PrimitiveSerializer { ModelFile object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.sourceuri != null) { + if (object.sourceURI != null) { yield r'sourceURI'; yield serializers.serialize( - object.sourceuri, + object.sourceURI, specifiedType: const FullType(String), ); } @@ -76,7 +76,7 @@ class _$ModelFileSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.sourceuri = valueDes; + result.sourceURI = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart index 7913cd563683..482a95f3e521 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/number_only.dart @@ -11,11 +11,11 @@ part 'number_only.g.dart'; /// NumberOnly /// /// Properties: -/// * [justnumber] +/// * [justNumber] @BuiltValue() abstract class NumberOnly implements Built { @BuiltValueField(wireName: r'JustNumber') - num? get justnumber; + num? get justNumber; NumberOnly._(); @@ -40,10 +40,10 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { NumberOnly object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.justnumber != null) { + if (object.justNumber != null) { yield r'JustNumber'; yield serializers.serialize( - object.justnumber, + object.justNumber, specifiedType: const FullType(num), ); } @@ -75,7 +75,7 @@ class _$NumberOnlySerializer implements PrimitiveSerializer { value, specifiedType: const FullType(num), ) as num; - result.justnumber = valueDes; + result.justNumber = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart index c48d40715241..4e0ae04ae50d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/object_with_deprecated_fields.dart @@ -15,7 +15,7 @@ part 'object_with_deprecated_fields.g.dart'; /// Properties: /// * [uuid] /// * [id] -/// * [deprecatedref] +/// * [deprecatedRef] /// * [bars] @BuiltValue() abstract class ObjectWithDeprecatedFields implements Built { @@ -26,9 +26,9 @@ abstract class ObjectWithDeprecatedFields implements Built { int? get id; @BuiltValueField(wireName: r'petId') - int? get petid; + int? get petId; @BuiltValueField(wireName: r'quantity') int? get quantity; @BuiltValueField(wireName: r'shipDate') - DateTime? get shipdate; + DateTime? get shipDate; /// Order Status @BuiltValueField(wireName: r'status') @@ -71,10 +71,10 @@ class _$OrderSerializer implements PrimitiveSerializer { specifiedType: const FullType(int), ); } - if (object.petid != null) { + if (object.petId != null) { yield r'petId'; yield serializers.serialize( - object.petid, + object.petId, specifiedType: const FullType(int), ); } @@ -85,10 +85,10 @@ class _$OrderSerializer implements PrimitiveSerializer { specifiedType: const FullType(int), ); } - if (object.shipdate != null) { + if (object.shipDate != null) { yield r'shipDate'; yield serializers.serialize( - object.shipdate, + object.shipDate, specifiedType: const FullType(DateTime), ); } @@ -141,7 +141,7 @@ class _$OrderSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(int), ) as int; - result.petid = valueDes; + result.petId = valueDes; break; case r'quantity': final valueDes = serializers.deserialize( @@ -155,7 +155,7 @@ class _$OrderSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(DateTime), ) as DateTime; - result.shipdate = valueDes; + result.shipDate = valueDes; break; case r'status': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart index 4c15298b89b4..bf1252135cd9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/parent_with_nullable.dart @@ -14,7 +14,7 @@ part 'parent_with_nullable.g.dart'; /// /// Properties: /// * [type] -/// * [nullableproperty] +/// * [nullableProperty] @BuiltValue(instantiable: false) abstract class ParentWithNullable { @BuiltValueField(wireName: r'type') @@ -22,7 +22,7 @@ abstract class ParentWithNullable { // enum typeEnum { ChildWithNullable, }; @BuiltValueField(wireName: r'nullableProperty') - String? get nullableproperty; + String? get nullableProperty; static const String discriminatorFieldName = r'type'; @@ -70,10 +70,10 @@ class _$ParentWithNullableSerializer implements PrimitiveSerializer { String get name; @BuiltValueField(wireName: r'photoUrls') - BuiltSet get photourls; + BuiltSet get photoUrls; @BuiltValueField(wireName: r'tags') BuiltList? get tags; @@ -86,7 +86,7 @@ class _$PetSerializer implements PrimitiveSerializer { ); yield r'photoUrls'; yield serializers.serialize( - object.photourls, + object.photoUrls, specifiedType: const FullType(BuiltSet, [FullType(String)]), ); if (object.tags != null) { @@ -152,7 +152,7 @@ class _$PetSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(BuiltSet, [FullType(String)]), ) as BuiltSet; - result.photourls.replace(valueDes); + result.photoUrls.replace(valueDes); break; case r'tags': final valueDes = serializers.deserialize( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart index 23d062c575e8..fa860056b45d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/special_model_name.dart @@ -11,11 +11,11 @@ part 'special_model_name.g.dart'; /// SpecialModelName /// /// Properties: -/// * [dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket] +/// * [dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket] @BuiltValue() abstract class SpecialModelName implements Built { @BuiltValueField(wireName: r'$special[property.name]') - int? get dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + int? get dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; SpecialModelName._(); @@ -40,10 +40,10 @@ class _$SpecialModelNameSerializer implements PrimitiveSerializer { @BuiltValueField(wireName: r'someProperty') - String? get someproperty; + String? get someProperty; TestInlineFreeformAdditionalPropertiesRequest._(); @@ -42,10 +42,10 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi TestInlineFreeformAdditionalPropertiesRequest object, { FullType specifiedType = FullType.unspecified, }) sync* { - if (object.someproperty != null) { + if (object.someProperty != null) { yield r'someProperty'; yield serializers.serialize( - object.someproperty, + object.someProperty, specifiedType: const FullType(String), ); } @@ -77,7 +77,7 @@ class _$TestInlineFreeformAdditionalPropertiesRequestSerializer implements Primi value, specifiedType: const FullType(String), ) as String; - result.someproperty = valueDes; + result.someProperty = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart index 70b9cfe546af..f7577d7e1ee9 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/user.dart @@ -13,12 +13,12 @@ part 'user.g.dart'; /// Properties: /// * [id] /// * [username] -/// * [firstname] -/// * [lastname] +/// * [firstName] +/// * [lastName] /// * [email] /// * [password] /// * [phone] -/// * [userstatus] - User Status +/// * [userStatus] - User Status @BuiltValue() abstract class User implements Built { @BuiltValueField(wireName: r'id') @@ -28,10 +28,10 @@ abstract class User implements Built { String? get username; @BuiltValueField(wireName: r'firstName') - String? get firstname; + String? get firstName; @BuiltValueField(wireName: r'lastName') - String? get lastname; + String? get lastName; @BuiltValueField(wireName: r'email') String? get email; @@ -44,7 +44,7 @@ abstract class User implements Built { /// User Status @BuiltValueField(wireName: r'userStatus') - int? get userstatus; + int? get userStatus; User._(); @@ -83,17 +83,17 @@ class _$UserSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.firstname != null) { + if (object.firstName != null) { yield r'firstName'; yield serializers.serialize( - object.firstname, + object.firstName, specifiedType: const FullType(String), ); } - if (object.lastname != null) { + if (object.lastName != null) { yield r'lastName'; yield serializers.serialize( - object.lastname, + object.lastName, specifiedType: const FullType(String), ); } @@ -118,10 +118,10 @@ class _$UserSerializer implements PrimitiveSerializer { specifiedType: const FullType(String), ); } - if (object.userstatus != null) { + if (object.userStatus != null) { yield r'userStatus'; yield serializers.serialize( - object.userstatus, + object.userStatus, specifiedType: const FullType(int), ); } @@ -167,14 +167,14 @@ class _$UserSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(String), ) as String; - result.firstname = valueDes; + result.firstName = valueDes; break; case r'lastName': final valueDes = serializers.deserialize( value, specifiedType: const FullType(String), ) as String; - result.lastname = valueDes; + result.lastName = valueDes; break; case r'email': final valueDes = serializers.deserialize( @@ -202,7 +202,7 @@ class _$UserSerializer implements PrimitiveSerializer { value, specifiedType: const FullType(int), ) as int; - result.userstatus = valueDes; + result.userStatus = valueDes; break; default: unhandled.add(key); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES index fe0cc70c0731..1a5e5be75940 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore README.md analysis_options.yaml build.yaml @@ -126,60 +125,3 @@ lib/src/model/tag.dart lib/src/model/test_inline_freeform_additional_properties_request.dart lib/src/model/user.dart pubspec.yaml -test/additional_properties_class_test.dart -test/all_of_with_single_ref_test.dart -test/animal_test.dart -test/another_fake_api_test.dart -test/api_response_test.dart -test/array_of_array_of_number_only_test.dart -test/array_of_number_only_test.dart -test/array_test_test.dart -test/capitalization_test.dart -test/cat_test.dart -test/category_test.dart -test/child_with_nullable_test.dart -test/class_model_test.dart -test/default_api_test.dart -test/deprecated_object_test.dart -test/dog_test.dart -test/enum_arrays_test.dart -test/enum_test_test.dart -test/fake_api_test.dart -test/fake_big_decimal_map200_response_test.dart -test/fake_classname_tags123_api_test.dart -test/file_schema_test_class_test.dart -test/foo_get_default_response_test.dart -test/foo_test.dart -test/format_test_test.dart -test/has_only_read_only_test.dart -test/health_check_result_test.dart -test/map_test_test.dart -test/mixed_properties_and_additional_properties_class_test.dart -test/model200_response_test.dart -test/model_client_test.dart -test/model_enum_class_test.dart -test/model_file_test.dart -test/model_list_test.dart -test/model_return_test.dart -test/name_test.dart -test/nullable_class_test.dart -test/number_only_test.dart -test/object_with_deprecated_fields_test.dart -test/order_test.dart -test/outer_composite_test.dart -test/outer_enum_default_value_test.dart -test/outer_enum_integer_default_value_test.dart -test/outer_enum_integer_test.dart -test/outer_enum_test.dart -test/outer_object_with_enum_property_test.dart -test/parent_with_nullable_test.dart -test/pet_api_test.dart -test/pet_test.dart -test/read_only_first_test.dart -test/single_ref_type_test.dart -test/special_model_name_test.dart -test/store_api_test.dart -test/tag_test.dart -test/test_inline_freeform_additional_properties_request_test.dart -test/user_api_test.dart -test/user_test.dart diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md index d8a08b3c2a79..5a5211d271a0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/README.md @@ -49,10 +49,10 @@ import 'package:openapi/openapi.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = await api.call123testSpecialTags(modelclient); + final response = await api.call123testSpecialTags(modelClient); print(response); } catch on DioException (e) { print("Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n"); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md index 151142162f62..4c6f3ab2fe11 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singlereftype** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md index 570de2e45be3..415b56e9bc2e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md index 1ed2cb04d8f3..36a94e6bb703 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelclient) +> ModelClient call123testSpecialTags(modelClient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api = Openapi().getAnotherFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.call123testSpecialTags(modelclient); + final response = api.call123testSpecialTags(modelClient); print(response); } catch on DioException (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md index a1c3e86e055e..e5b9d669a436 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayarraynumber** | [**List<List<num>>**](List.md) | | [optional] +**arrayArrayNumber** | [**List<List<num>>**](List.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md index 184bc6962f85..fe8e071eb45c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arraynumber** | **List<num>** | | [optional] +**arrayNumber** | **List<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md index e673e7baef4b..4a07b4eb820d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallcamel** | **String** | | [optional] -**capitalcamel** | **String** | | [optional] +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**scaEthFlowPoints** | **String** | | [optional] -**attName** | **String** | Name of the pet | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md index 9c557ac9082a..6552eea4b435 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md index 54b310b0f58d..770494fcf4cc 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] -**otherproperty** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md index b2ba3dfcef59..d36439b767bb 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md index f1b0758b868e..7c24fe2347b4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md index 14e13ea83e5f..1b5e1ca297c8 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outercomposite) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterComposite outercomposite = ; // OuterComposite | Input composite as post body +final OuterComposite outerComposite = ; // OuterComposite | Input composite as post body try { - final response = api.fakeOuterCompositeSerialize(outercomposite); + final response = api.fakeOuterCompositeSerialize(outerComposite); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final OuterObjectWithEnumProperty outerobjectwithenumproperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body +final OuterObjectWithEnumProperty outerObjectWithEnumProperty = ; // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final response = api.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + final response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileschematestclass) +> testBodyWithFileSchema(fileSchemaTestClass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final FileSchemaTestClass fileschematestclass = ; // FileSchemaTestClass | +final FileSchemaTestClass fileSchemaTestClass = ; // FileSchemaTestClass | try { - api.testBodyWithFileSchema(fileschematestclass); + api.testBodyWithFileSchema(fileSchemaTestClass); } catch on DioException (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelclient) +> ModelClient testClientModel(modelClient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.testClientModel(modelclient); + final response = api.testClientModel(modelClient); print(response); } catch on DioException (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final double float = 3.4; // double | None final String string = string_example; // String | None final MultipartFile binary = BINARY_DATA_HERE; // MultipartFile | None final DateTime date = 2013-10-20; // DateTime | None -final DateTime datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final DateTime dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final String password = password_example; // String | None final String callback = callback_example; // String | None try { - api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); + api.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch on DioException (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **MultipartFile**| None | [optional] **date** | **DateTime**| None | [optional] - **datetime** | **DateTime**| None | [optional] + **dateTime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -803,7 +803,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) +> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) test inline free-form additionalProperties @@ -814,10 +814,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body +final TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = ; // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); + api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); } catch on DioException (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -827,7 +827,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -889,7 +889,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childwithnullable) +> testNullable(childWithNullable) test nullable parent property @@ -900,10 +900,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api = Openapi().getFakeApi(); -final ChildWithNullable childwithnullable = ; // ChildWithNullable | request body +final ChildWithNullable childWithNullable = ; // ChildWithNullable | request body try { - api.testNullable(childwithnullable); + api.testNullable(childWithNullable); } catch on DioException (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -913,7 +913,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -931,7 +931,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -947,11 +947,11 @@ final List ioutil = ; // List | final List http = ; // List | final List url = ; // List | final List context = ; // List | -final String allowempty = allowempty_example; // String | +final String allowEmpty = allowEmpty_example; // String | final Map language = ; // Map | try { - api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); + api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch on DioException (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -966,7 +966,7 @@ Name | Type | Description | Notes **http** | [**List<String>**](String.md)| | **url** | [**List<String>**](String.md)| | **context** | [**List<String>**](String.md)| | - **allowempty** | **String**| | + **allowEmpty** | **String**| | **language** | [**Map<String, String>**](String.md)| | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md index d01fd4973470..281dfc44fd8c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someid** | **num** | | [optional] -**somemap** | **Map<String, num>** | | [optional] +**someId** | **num** | | [optional] +**someMap** | **Map<String, 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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md index 88a70afff0f0..645aebf399f0 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelclient) +> ModelClient testClassname(modelClient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api = Openapi().getFakeClassnameTags123Api(); -final ModelClient modelclient = ; // ModelClient | client model +final ModelClient modelClient = ; // ModelClient | client model try { - final response = api.testClassname(modelclient); + final response = api.testClassname(modelClient); print(response); } catch on DioException (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md index a25a61c53343..83b60545eb61 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md index c912fb2e08f4..4d6aeb75d965 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullablemessage** | **String** | | [optional] +**nullableMessage** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md index e9a76c258000..66d0d39c42be 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**Map<String, Animal>**](Animal.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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md index d54b1bbbea04..4be260e93f6e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceuri** | **String** | Test capitalization | [optional] +**sourceURI** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md index f5fac6f8a17c..d8096a3db37a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justnumber** | **num** | | [optional] +**justNumber** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md index 9ba7fdf6634f..dda2836d8d54 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **List<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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md index 08914a83f300..bde5ffe51a2c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petid** | **int** | | [optional] +**petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md index 435464987052..17aa5ca02941 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] +**nullableProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md index c6183f8d49d1..3cd230bfb213 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photourls** | **Set<String>** | | +**photoUrls** | **Set<String>** | | **tags** | [**List<Tag>**](Tag.md) | | [optional] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md index 3dc820b749b5..5fc7fbd2657f 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petid, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | Pet id to delete +final int petId = 789; // int | Pet id to delete final String apiKey = apiKey_example; // String | try { - api.deletePet(petid, apiKey); + api.deletePet(petId, apiKey); } catch on DioException (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| Pet id to delete | + **petId** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petid) +> Pet getPetById(petId) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to return +final int petId = 789; // int | ID of pet to return try { - final response = api.getPetById(petid); + final response = api.getPetById(petId); print(response); } catch on DioException (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to return | + **petId** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petid, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet that needs to be updated +final int petId = 789; // int | ID of pet that needs to be updated final String name = name_example; // String | Updated name of the pet final String status = status_example; // String | Updated status of the pet try { - api.updatePetWithForm(petid, name, status); + api.updatePetWithForm(petId, name, status); } catch on DioException (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet that needs to be updated | + **petId** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petid, additionalmetadata, file) +> ApiResponse uploadFile(petId, additionalMetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to update -final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final int petId = 789; // int | ID of pet to update +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final response = api.uploadFile(petid, additionalmetadata, file); + final response = api.uploadFile(petId, additionalMetadata, file); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api = Openapi().getPetApi(); -final int petid = 789; // int | ID of pet to update -final MultipartFile requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload -final String additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final int petId = 789; // int | ID of pet to update +final MultipartFile requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload +final String additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server try { - final response = api.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + final response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(response); } catch on DioException (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **requiredfile** | **MultipartFile**| file to upload | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **requiredFile** | **MultipartFile**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md index 04697c8e6225..5fcfa98e0b36 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [optional] +**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md index 894a3e60ee31..e2b2f1fd4468 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someproperty** | **String** | | [optional] +**someProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md index 37aa8c50230e..fa87e64d8595 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstname** | **String** | | [optional] -**lastname** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userstatus** | **int** | User Status | [optional] +**userStatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart index 4ffb898ab952..d98f3c23f4f7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/another_fake_api.dart @@ -21,7 +21,7 @@ class AnotherFakeApi { /// To test special tags and operation ID starting with number /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -32,7 +32,7 @@ class AnotherFakeApi { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> call123testSpecialTags({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -57,7 +57,7 @@ class AnotherFakeApi { dynamic _bodyData; try { -_bodyData=jsonEncode(modelclient); +_bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart index e4d673a4a32a..06486358eda5 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_api.dart @@ -340,7 +340,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// Test serialization of object with outer number type /// /// Parameters: - /// * [outercomposite] - Input composite as post body + /// * [outerComposite] - Input composite as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -351,7 +351,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' /// Returns a [Future] containing a [Response] with a [OuterComposite] as data /// Throws [DioException] if API call or serialization fails Future> fakeOuterCompositeSerialize({ - OuterComposite? outercomposite, + OuterComposite? outerComposite, CancelToken? cancelToken, Map? headers, Map? extra, @@ -376,7 +376,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'bool' dynamic _bodyData; try { -_bodyData=jsonEncode(outercomposite); +_bodyData=jsonEncode(outerComposite); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -607,7 +607,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// Test serialization of enum (int) properties with examples /// /// Parameters: - /// * [outerobjectwithenumproperty] - Input enum (int) as post body + /// * [outerObjectWithEnumProperty] - Input enum (int) as post body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -618,7 +618,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S /// Returns a [Future] containing a [Response] with a [OuterObjectWithEnumProperty] as data /// Throws [DioException] if API call or serialization fails Future> fakePropertyEnumIntegerSerialize({ - required OuterObjectWithEnumProperty outerobjectwithenumproperty, + required OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancelToken? cancelToken, Map? headers, Map? extra, @@ -643,7 +643,7 @@ _responseData = rawData == null ? null : deserialize(rawData, 'S dynamic _bodyData; try { -_bodyData=jsonEncode(outerobjectwithenumproperty); +_bodyData=jsonEncode(outerObjectWithEnumProperty); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -826,7 +826,7 @@ _bodyData=jsonEncode(body); /// For this test, the body for this request must reference a schema named `File`. /// /// Parameters: - /// * [fileschematestclass] + /// * [fileSchemaTestClass] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -837,7 +837,7 @@ _bodyData=jsonEncode(body); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testBodyWithFileSchema({ - required FileSchemaTestClass fileschematestclass, + required FileSchemaTestClass fileSchemaTestClass, CancelToken? cancelToken, Map? headers, Map? extra, @@ -862,7 +862,7 @@ _bodyData=jsonEncode(body); dynamic _bodyData; try { -_bodyData=jsonEncode(fileschematestclass); +_bodyData=jsonEncode(fileSchemaTestClass); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -964,7 +964,7 @@ _bodyData=jsonEncode(user); /// To test \"client\" model /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -975,7 +975,7 @@ _bodyData=jsonEncode(user); /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClientModel({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1000,7 +1000,7 @@ _bodyData=jsonEncode(user); dynamic _bodyData; try { -_bodyData=jsonEncode(modelclient); +_bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1064,7 +1064,7 @@ _responseData = rawData == null ? null : deserialize(r /// * [string] - None /// * [binary] - None /// * [date] - None - /// * [datetime] - None + /// * [dateTime] - None /// * [password] - None /// * [callback] - None /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -1088,7 +1088,7 @@ _responseData = rawData == null ? null : deserialize(r String? string, MultipartFile? binary, DateTime? date, - DateTime? datetime, + DateTime? dateTime, String? password, String? callback, CancelToken? cancelToken, @@ -1381,7 +1381,7 @@ _bodyData=jsonEncode(requestBody); /// /// /// Parameters: - /// * [testinlinefreeformadditionalpropertiesrequest] - request body + /// * [testInlineFreeformAdditionalPropertiesRequest] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1392,7 +1392,7 @@ _bodyData=jsonEncode(requestBody); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testInlineFreeformAdditionalProperties({ - required TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest, + required TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1417,7 +1417,7 @@ _bodyData=jsonEncode(requestBody); dynamic _bodyData; try { -_bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); +_bodyData=jsonEncode(testInlineFreeformAdditionalPropertiesRequest); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1513,7 +1513,7 @@ _bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); /// /// /// Parameters: - /// * [childwithnullable] - request body + /// * [childWithNullable] - request body /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -1524,7 +1524,7 @@ _bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> testNullable({ - required ChildWithNullable childwithnullable, + required ChildWithNullable childWithNullable, CancelToken? cancelToken, Map? headers, Map? extra, @@ -1549,7 +1549,7 @@ _bodyData=jsonEncode(testinlinefreeformadditionalpropertiesrequest); dynamic _bodyData; try { -_bodyData=jsonEncode(childwithnullable); +_bodyData=jsonEncode(childWithNullable); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( @@ -1583,7 +1583,7 @@ _bodyData=jsonEncode(childwithnullable); /// * [http] /// * [url] /// * [context] - /// * [allowempty] + /// * [allowEmpty] /// * [language] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -1600,7 +1600,7 @@ _bodyData=jsonEncode(childwithnullable); required List http, required List url, required List context, - required String allowempty, + required String allowEmpty, Map? language, CancelToken? cancelToken, Map? headers, @@ -1629,7 +1629,7 @@ _bodyData=jsonEncode(childwithnullable); r'url': url, r'context': context, if (language != null) r'language': language, - r'allowEmpty': allowempty, + r'allowEmpty': allowEmpty, }; final _response = await _dio.request( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart index 7f1524c2f188..56ec33f1cace 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/fake_classname_tags123_api.dart @@ -21,7 +21,7 @@ class FakeClassnameTags123Api { /// To test class name in snake case /// /// Parameters: - /// * [modelclient] - client model + /// * [modelClient] - client model /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -32,7 +32,7 @@ class FakeClassnameTags123Api { /// Returns a [Future] containing a [Response] with a [ModelClient] as data /// Throws [DioException] if API call or serialization fails Future> testClassname({ - required ModelClient modelclient, + required ModelClient modelClient, CancelToken? cancelToken, Map? headers, Map? extra, @@ -64,7 +64,7 @@ class FakeClassnameTags123Api { dynamic _bodyData; try { -_bodyData=jsonEncode(modelclient); +_bodyData=jsonEncode(modelClient); } catch(error, stackTrace) { throw DioException( requestOptions: _options.compose( diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart index 54e619b596f1..ec20128ee1e3 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/api/pet_api.dart @@ -92,7 +92,7 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petid] - Pet id to delete + /// * [petId] - Pet id to delete /// * [apiKey] /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -104,7 +104,7 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> deletePet({ - required int petid, + required int petId, String? apiKey, CancelToken? cancelToken, Map? headers, @@ -113,7 +113,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'DELETE', headers: { @@ -310,7 +310,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// Returns a single pet /// /// Parameters: - /// * [petid] - ID of pet to return + /// * [petId] - ID of pet to return /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -321,7 +321,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se /// Returns a [Future] containing a [Response] with a [Pet] as data /// Throws [DioException] if API call or serialization fails Future> getPetById({ - required int petid, + required int petId, CancelToken? cancelToken, Map? headers, Map? extra, @@ -329,7 +329,7 @@ _responseData = rawData == null ? null : deserialize, Pet>(rawData, 'Se ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'GET', headers: { @@ -458,7 +458,7 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petid] - ID of pet that needs to be updated + /// * [petId] - ID of pet that needs to be updated /// * [name] - Updated name of the pet /// * [status] - Updated status of the pet /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation @@ -471,7 +471,7 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] /// Throws [DioException] if API call or serialization fails Future> updatePetWithForm({ - required int petid, + required int petId, String? name, String? status, CancelToken? cancelToken, @@ -481,7 +481,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { @@ -532,8 +532,8 @@ _bodyData=jsonEncode(pet); /// /// /// Parameters: - /// * [petid] - ID of pet to update - /// * [additionalmetadata] - Additional data to pass to server + /// * [petId] - ID of pet to update + /// * [additionalMetadata] - Additional data to pass to server /// * [file] - file to upload /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request @@ -545,8 +545,8 @@ _bodyData=jsonEncode(pet); /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFile({ - required int petid, - String? additionalmetadata, + required int petId, + String? additionalMetadata, MultipartFile? file, CancelToken? cancelToken, Map? headers, @@ -555,7 +555,7 @@ _bodyData=jsonEncode(pet); ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/pet/{petId}/uploadImage'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { @@ -630,9 +630,9 @@ _responseData = rawData == null ? null : deserialize(r /// /// /// Parameters: - /// * [petid] - ID of pet to update - /// * [requiredfile] - file to upload - /// * [additionalmetadata] - Additional data to pass to server + /// * [petId] - ID of pet to update + /// * [requiredFile] - file to upload + /// * [additionalMetadata] - Additional data to pass to server /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation /// * [headers] - Can be used to add additional headers to the request /// * [extras] - Can be used to add flags to the request @@ -643,9 +643,9 @@ _responseData = rawData == null ? null : deserialize(r /// Returns a [Future] containing a [Response] with a [ApiResponse] as data /// Throws [DioException] if API call or serialization fails Future> uploadFileWithRequiredFile({ - required int petid, - required MultipartFile requiredfile, - String? additionalmetadata, + required int petId, + required MultipartFile requiredFile, + String? additionalMetadata, CancelToken? cancelToken, Map? headers, Map? extra, @@ -653,7 +653,7 @@ _responseData = rawData == null ? null : deserialize(r ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { - final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petid.toString()); + final _path = r'/fake/{petId}/uploadImageWithRequiredFile'.replaceAll('{' r'petId' '}', petId.toString()); final _options = Options( method: r'POST', headers: { diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart index 126a3cbaf671..c196447ea5e4 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/all_of_with_single_ref.dart @@ -21,7 +21,7 @@ class AllOfWithSingleRef { this.username, - this.singlereftype, + this.singleRefType, }); @JsonKey( @@ -45,7 +45,7 @@ class AllOfWithSingleRef { ) - final SingleRefType? singlereftype; + final SingleRefType? singleRefType; @@ -54,12 +54,12 @@ class AllOfWithSingleRef { @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && other.username == username && - other.singlereftype == singlereftype; + other.singleRefType == singleRefType; @override int get hashCode => username.hashCode + - singlereftype.hashCode; + singleRefType.hashCode; factory AllOfWithSingleRef.fromJson(Map json) => _$AllOfWithSingleRefFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart index 11efc809e240..732326357226 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/animal.dart @@ -18,7 +18,7 @@ class Animal { /// Returns a new [Animal] instance. Animal({ - required this.classname, + required this.className, this.color = 'red', }); @@ -31,7 +31,7 @@ class Animal { ) - final String classname; + final String className; @@ -51,12 +51,12 @@ class Animal { @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.classname == classname && + other.className == className && other.color == color; @override int get hashCode => - classname.hashCode + + className.hashCode + color.hashCode; factory Animal.fromJson(Map json) => _$AnimalFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart index 2ba4f0c19286..da8de0169296 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_array_of_number_only.dart @@ -18,7 +18,7 @@ class ArrayOfArrayOfNumberOnly { /// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayarraynumber, + this.arrayArrayNumber, }); @JsonKey( @@ -29,7 +29,7 @@ class ArrayOfArrayOfNumberOnly { ) - final List>? arrayarraynumber; + final List>? arrayArrayNumber; @@ -37,11 +37,11 @@ class ArrayOfArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - other.arrayarraynumber == arrayarraynumber; + other.arrayArrayNumber == arrayArrayNumber; @override int get hashCode => - arrayarraynumber.hashCode; + arrayArrayNumber.hashCode; factory ArrayOfArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfArrayOfNumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart index e058704c51af..4ead761e76f7 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/array_of_number_only.dart @@ -18,7 +18,7 @@ class ArrayOfNumberOnly { /// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arraynumber, + this.arrayNumber, }); @JsonKey( @@ -29,7 +29,7 @@ class ArrayOfNumberOnly { ) - final List? arraynumber; + final List? arrayNumber; @@ -37,11 +37,11 @@ class ArrayOfNumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - other.arraynumber == arraynumber; + other.arrayNumber == arrayNumber; @override int get hashCode => - arraynumber.hashCode; + arrayNumber.hashCode; factory ArrayOfNumberOnly.fromJson(Map json) => _$ArrayOfNumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart index c248b9c52192..d2bc40f33836 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/capitalization.dart @@ -18,17 +18,17 @@ class Capitalization { /// Returns a new [Capitalization] instance. Capitalization({ - this.smallcamel, + this.smallCamel, - this.capitalcamel, + this.capitalCamel, this.smallSnake, this.capitalSnake, - this.scaEthFlowPoints, + this.sCAETHFlowPoints, - this.attName, + this.ATT_NAME, }); @JsonKey( @@ -39,7 +39,7 @@ class Capitalization { ) - final String? smallcamel; + final String? smallCamel; @@ -51,7 +51,7 @@ class Capitalization { ) - final String? capitalcamel; + final String? capitalCamel; @@ -87,7 +87,7 @@ class Capitalization { ) - final String? scaEthFlowPoints; + final String? sCAETHFlowPoints; @@ -100,7 +100,7 @@ class Capitalization { ) - final String? attName; + final String? ATT_NAME; @@ -108,21 +108,21 @@ class Capitalization { @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallcamel == smallcamel && - other.capitalcamel == capitalcamel && + other.smallCamel == smallCamel && + other.capitalCamel == capitalCamel && other.smallSnake == smallSnake && other.capitalSnake == capitalSnake && - other.scaEthFlowPoints == scaEthFlowPoints && - other.attName == attName; + other.sCAETHFlowPoints == sCAETHFlowPoints && + other.ATT_NAME == ATT_NAME; @override int get hashCode => - smallcamel.hashCode + - capitalcamel.hashCode + + smallCamel.hashCode + + capitalCamel.hashCode + smallSnake.hashCode + capitalSnake.hashCode + - scaEthFlowPoints.hashCode + - attName.hashCode; + sCAETHFlowPoints.hashCode + + ATT_NAME.hashCode; factory Capitalization.fromJson(Map json) => _$CapitalizationFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart index d783b29bfebe..e2df6f2cc557 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/cat.dart @@ -21,7 +21,7 @@ class Cat { /// Returns a new [Cat] instance. Cat({ - required this.classname, + required this.className, this.color = 'red', @@ -36,7 +36,7 @@ class Cat { ) - final String classname; + final String className; @@ -68,13 +68,13 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.classname == classname && + other.className == className && other.color == color && other.declawed == declawed; @override int get hashCode => - classname.hashCode + + className.hashCode + color.hashCode + declawed.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart index 24e56c0a068d..dcda6f93ba6a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/child_with_nullable.dart @@ -23,9 +23,9 @@ class ChildWithNullable { this.type, - this.nullableproperty, + this.nullableProperty, - this.otherproperty, + this.otherProperty, }); @JsonKey( @@ -49,7 +49,7 @@ class ChildWithNullable { ) - final String? nullableproperty; + final String? nullableProperty; @@ -61,7 +61,7 @@ class ChildWithNullable { ) - final String? otherproperty; + final String? otherProperty; @@ -70,14 +70,14 @@ class ChildWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && other.type == type && - other.nullableproperty == nullableproperty && - other.otherproperty == otherproperty; + other.nullableProperty == nullableProperty && + other.otherProperty == otherProperty; @override int get hashCode => type.hashCode + - (nullableproperty == null ? 0 : nullableproperty.hashCode) + - otherproperty.hashCode; + (nullableProperty == null ? 0 : nullableProperty.hashCode) + + otherProperty.hashCode; factory ChildWithNullable.fromJson(Map json) => _$ChildWithNullableFromJson(json); @@ -93,7 +93,7 @@ class ChildWithNullable { enum ChildWithNullableTypeEnum { @JsonValue(r'ChildWithNullable') -childwithnullable(r'ChildWithNullable'), +childWithNullable(r'ChildWithNullable'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart index 871df64ab699..deb271b6dc3b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/dog.dart @@ -21,7 +21,7 @@ class Dog { /// Returns a new [Dog] instance. Dog({ - required this.classname, + required this.className, this.color = 'red', @@ -36,7 +36,7 @@ class Dog { ) - final String classname; + final String className; @@ -68,13 +68,13 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.classname == classname && + other.className == className && other.color == color && other.breed == breed; @override int get hashCode => - classname.hashCode + + className.hashCode + color.hashCode + breed.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart index 0051b7a6da14..e0fe59151071 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/enum_test.dart @@ -30,13 +30,13 @@ class EnumTest { this.enumNumber, - this.outerenum, + this.outerEnum, - this.outerenuminteger, + this.outerEnumInteger, - this.outerenumdefaultvalue, + this.outerEnumDefaultValue, - this.outerenumintegerdefaultvalue, + this.outerEnumIntegerDefaultValue, }); @JsonKey( @@ -100,7 +100,7 @@ class EnumTest { ) - final OuterEnum? outerenum; + final OuterEnum? outerEnum; @@ -113,7 +113,7 @@ class EnumTest { ) - final OuterEnumInteger? outerenuminteger; + final OuterEnumInteger? outerEnumInteger; @@ -126,7 +126,7 @@ class EnumTest { ) - final OuterEnumDefaultValue? outerenumdefaultvalue; + final OuterEnumDefaultValue? outerEnumDefaultValue; @@ -139,7 +139,7 @@ class EnumTest { ) - final OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; + final OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; @@ -151,10 +151,10 @@ class EnumTest { other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && other.enumNumber == enumNumber && - other.outerenum == outerenum && - other.outerenuminteger == outerenuminteger && - other.outerenumdefaultvalue == outerenumdefaultvalue && - other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; + other.outerEnum == outerEnum && + other.outerEnumInteger == outerEnumInteger && + other.outerEnumDefaultValue == outerEnumDefaultValue && + other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; @override int get hashCode => @@ -162,10 +162,10 @@ class EnumTest { enumStringRequired.hashCode + enumInteger.hashCode + enumNumber.hashCode + - (outerenum == null ? 0 : outerenum.hashCode) + - outerenuminteger.hashCode + - outerenumdefaultvalue.hashCode + - outerenumintegerdefaultvalue.hashCode; + (outerEnum == null ? 0 : outerEnum.hashCode) + + outerEnumInteger.hashCode + + outerEnumDefaultValue.hashCode + + outerEnumIntegerDefaultValue.hashCode; factory EnumTest.fromJson(Map json) => _$EnumTestFromJson(json); @@ -239,9 +239,9 @@ String toString() => value; enum EnumTestEnumNumberEnum { @JsonValue('1.1') -number1period1(''1.1''), +number1Period1(''1.1''), @JsonValue('-1.2') -numberNegative1period2(''-1.2''), +numberNegative1Period2(''-1.2''), @JsonValue('11184809') unknownDefaultOpenApi(''11184809''); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart index 9c994771886c..1f0f2950a71c 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/fake_big_decimal_map200_response.dart @@ -18,9 +18,9 @@ class FakeBigDecimalMap200Response { /// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someid, + this.someId, - this.somemap, + this.someMap, }); @JsonKey( @@ -31,7 +31,7 @@ class FakeBigDecimalMap200Response { ) - final num? someid; + final num? someId; @@ -43,7 +43,7 @@ class FakeBigDecimalMap200Response { ) - final Map? somemap; + final Map? someMap; @@ -51,13 +51,13 @@ class FakeBigDecimalMap200Response { @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someid == someid && - other.somemap == somemap; + other.someId == someId && + other.someMap == someMap; @override int get hashCode => - someid.hashCode + - somemap.hashCode; + someId.hashCode + + someMap.hashCode; factory FakeBigDecimalMap200Response.fromJson(Map json) => _$FakeBigDecimalMap200ResponseFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart index b724503e4ae2..a20ba417fa54 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/format_test.dart @@ -41,7 +41,7 @@ class FormatTest { required this.date, - this.datetime, + this.dateTime, this.uuid, @@ -197,7 +197,7 @@ class FormatTest { ) - final DateTime? datetime; + final DateTime? dateTime; @@ -266,7 +266,7 @@ class FormatTest { other.byte == byte && other.binary == binary && other.date == date && - other.datetime == datetime && + other.dateTime == dateTime && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -285,7 +285,7 @@ class FormatTest { byte.hashCode + binary.hashCode + date.hashCode + - datetime.hashCode + + dateTime.hashCode + uuid.hashCode + password.hashCode + patternWithDigits.hashCode + diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart index fdacbc440a0b..6fd362cdf351 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/health_check_result.dart @@ -18,7 +18,7 @@ class HealthCheckResult { /// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullablemessage, + this.nullableMessage, }); @JsonKey( @@ -29,7 +29,7 @@ class HealthCheckResult { ) - final String? nullablemessage; + final String? nullableMessage; @@ -37,11 +37,11 @@ class HealthCheckResult { @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullablemessage == nullablemessage; + other.nullableMessage == nullableMessage; @override int get hashCode => - (nullablemessage == null ? 0 : nullablemessage.hashCode); + (nullableMessage == null ? 0 : nullableMessage.hashCode); factory HealthCheckResult.fromJson(Map json) => _$HealthCheckResultFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart index 960e16bba37a..458d2bd0534b 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/mixed_properties_and_additional_properties_class.dart @@ -21,7 +21,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { this.uuid, - this.datetime, + this.dateTime, this.map, }); @@ -46,7 +46,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { ) - final DateTime? datetime; + final DateTime? dateTime; @@ -67,13 +67,13 @@ class MixedPropertiesAndAdditionalPropertiesClass { @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && other.uuid == uuid && - other.datetime == datetime && + other.dateTime == dateTime && other.map == map; @override int get hashCode => uuid.hashCode + - datetime.hashCode + + dateTime.hashCode + map.hashCode; factory MixedPropertiesAndAdditionalPropertiesClass.fromJson(Map json) => _$MixedPropertiesAndAdditionalPropertiesClassFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart index 602fdc18d607..ec3d9ceee533 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_enum_class.dart @@ -12,7 +12,17 @@ enum ModelEnumClass { @JsonValue(r'-efg') efg(r'-efg'), @JsonValue(r'(xyz)') - leftParenthesisXyzrightParenthesis(r'(xyz)'), + leftParenthesisXyzRightParenthesis(r'(xyz)'), + @JsonValue(r'TEST') + test(r'TEST'), + @JsonValue(r'TEST_A') + testA(r'TEST_A'), + @JsonValue(r'TEST_A_ABC') + testAAbc(r'TEST_A_ABC'), + @JsonValue(r'TEST_a') + tESTA(r'TEST_a'), + @JsonValue(r'tEST') + tEST(r'tEST'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart index 85a43bd2a46d..cccca0412f46 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/model_file.dart @@ -18,7 +18,7 @@ class ModelFile { /// Returns a new [ModelFile] instance. ModelFile({ - this.sourceuri, + this.sourceURI, }); /// Test capitalization @@ -30,7 +30,7 @@ class ModelFile { ) - final String? sourceuri; + final String? sourceURI; @@ -38,11 +38,11 @@ class ModelFile { @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceuri == sourceuri; + other.sourceURI == sourceURI; @override int get hashCode => - sourceuri.hashCode; + sourceURI.hashCode; factory ModelFile.fromJson(Map json) => _$ModelFileFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart index c511946d665e..44e9d41a189d 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/number_only.dart @@ -18,7 +18,7 @@ class NumberOnly { /// Returns a new [NumberOnly] instance. NumberOnly({ - this.justnumber, + this.justNumber, }); @JsonKey( @@ -29,7 +29,7 @@ class NumberOnly { ) - final num? justnumber; + final num? justNumber; @@ -37,11 +37,11 @@ class NumberOnly { @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justnumber == justnumber; + other.justNumber == justNumber; @override int get hashCode => - justnumber.hashCode; + justNumber.hashCode; factory NumberOnly.fromJson(Map json) => _$NumberOnlyFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart index 2c060a1ecfc8..5a36ffb5147e 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/object_with_deprecated_fields.dart @@ -23,7 +23,7 @@ class ObjectWithDeprecatedFields { this.id, - this.deprecatedref, + this.deprecatedRef, this.bars, }); @@ -53,7 +53,7 @@ class ObjectWithDeprecatedFields { - @Deprecated('deprecatedref has been deprecated') + @Deprecated('deprecatedRef has been deprecated') @JsonKey( name: r'deprecatedRef', @@ -62,7 +62,7 @@ class ObjectWithDeprecatedFields { ) - final DeprecatedObject? deprecatedref; + final DeprecatedObject? deprecatedRef; @@ -85,14 +85,14 @@ class ObjectWithDeprecatedFields { bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && other.uuid == uuid && other.id == id && - other.deprecatedref == deprecatedref && + other.deprecatedRef == deprecatedRef && other.bars == bars; @override int get hashCode => uuid.hashCode + id.hashCode + - deprecatedref.hashCode + + deprecatedRef.hashCode + bars.hashCode; factory ObjectWithDeprecatedFields.fromJson(Map json) => _$ObjectWithDeprecatedFieldsFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart index a554ecc6311b..dfbc4f5c5e41 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/order.dart @@ -20,11 +20,11 @@ class Order { this.id, - this.petid, + this.petId, this.quantity, - this.shipdate, + this.shipDate, this.status, @@ -51,7 +51,7 @@ class Order { ) - final int? petid; + final int? petId; @@ -75,7 +75,7 @@ class Order { ) - final DateTime? shipdate; + final DateTime? shipDate; @@ -110,18 +110,18 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petid == petid && + other.petId == petId && other.quantity == quantity && - other.shipdate == shipdate && + other.shipDate == shipDate && other.status == status && other.complete == complete; @override int get hashCode => id.hashCode + - petid.hashCode + + petId.hashCode + quantity.hashCode + - shipdate.hashCode + + shipDate.hashCode + status.hashCode + complete.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart index 6a0edc0716fe..bda5847df5ad 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/parent_with_nullable.dart @@ -20,7 +20,7 @@ class ParentWithNullable { this.type, - this.nullableproperty, + this.nullableProperty, }); @JsonKey( @@ -44,7 +44,7 @@ class ParentWithNullable { ) - final String? nullableproperty; + final String? nullableProperty; @@ -53,12 +53,12 @@ class ParentWithNullable { @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && other.type == type && - other.nullableproperty == nullableproperty; + other.nullableProperty == nullableProperty; @override int get hashCode => type.hashCode + - (nullableproperty == null ? 0 : nullableproperty.hashCode); + (nullableProperty == null ? 0 : nullableProperty.hashCode); factory ParentWithNullable.fromJson(Map json) => _$ParentWithNullableFromJson(json); @@ -74,7 +74,7 @@ class ParentWithNullable { enum ParentWithNullableTypeEnum { @JsonValue(r'ChildWithNullable') -childwithnullable(r'ChildWithNullable'), +childWithNullable(r'ChildWithNullable'), @JsonValue(r'unknown_default_open_api') unknownDefaultOpenApi(r'unknown_default_open_api'); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart index 6d41a485b6c4..fdb70f9ce89a 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/pet.dart @@ -26,7 +26,7 @@ class Pet { required this.name, - required this.photourls, + required this.photoUrls, this.tags, @@ -77,7 +77,7 @@ class Pet { ) - final Set photourls; + final Set photoUrls; @@ -114,7 +114,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - other.photourls == photourls && + other.photoUrls == photoUrls && other.tags == tags && other.status == status; @@ -123,7 +123,7 @@ class Pet { id.hashCode + category.hashCode + name.hashCode + - photourls.hashCode + + photoUrls.hashCode + tags.hashCode + status.hashCode; diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart index 30d3bc67b80d..175b6fb274ce 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/special_model_name.dart @@ -18,7 +18,7 @@ class SpecialModelName { /// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, + this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, }); @JsonKey( @@ -29,7 +29,7 @@ class SpecialModelName { ) - final int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + final int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @@ -37,11 +37,11 @@ class SpecialModelName { @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override int get hashCode => - dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket.hashCode; + dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket.hashCode; factory SpecialModelName.fromJson(Map json) => _$SpecialModelNameFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart index c2f51d310a23..5eda7d48b384 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/test_inline_freeform_additional_properties_request.dart @@ -18,7 +18,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someproperty, + this.someProperty, }); @JsonKey( @@ -29,7 +29,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { ) - final String? someproperty; + final String? someProperty; @@ -37,11 +37,11 @@ class TestInlineFreeformAdditionalPropertiesRequest { @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && - other.someproperty == someproperty; + other.someProperty == someProperty; @override int get hashCode => - someproperty.hashCode; + someProperty.hashCode; factory TestInlineFreeformAdditionalPropertiesRequest.fromJson(Map json) => _$TestInlineFreeformAdditionalPropertiesRequestFromJson(json); diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart index 0e2de7c18785..56c95cb75f15 100644 --- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart +++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_use_lower_camel_case/lib/src/model/user.dart @@ -22,9 +22,9 @@ class User { this.username, - this.firstname, + this.firstName, - this.lastname, + this.lastName, this.email, @@ -32,7 +32,7 @@ class User { this.phone, - this.userstatus, + this.userStatus, }); @JsonKey( @@ -67,7 +67,7 @@ class User { ) - final String? firstname; + final String? firstName; @@ -79,7 +79,7 @@ class User { ) - final String? lastname; + final String? lastName; @@ -128,7 +128,7 @@ class User { ) - final int? userstatus; + final int? userStatus; @@ -138,23 +138,23 @@ class User { bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstname == firstname && - other.lastname == lastname && + other.firstName == firstName && + other.lastName == lastName && other.email == email && other.password == password && other.phone == phone && - other.userstatus == userstatus; + other.userStatus == userStatus; @override int get hashCode => id.hashCode + username.hashCode + - firstname.hashCode + - lastname.hashCode + + firstName.hashCode + + lastName.hashCode + email.hashCode + password.hashCode + phone.hashCode + - userstatus.hashCode; + userStatus.hashCode; factory User.fromJson(Map json) => _$UserFromJson(json); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md index 08914a83f300..bde5ffe51a2c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petid** | **int** | | [optional] +**petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md index a6acc8ba01ec..88512ee37035 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photourls** | **List** | | [default to const []] +**photoUrls** | **List** | | [default to const []] **tags** | [**List**](Tag.md) | | [optional] [default to const []] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md index 12637767ba2d..267b97755bef 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/PetApi.md @@ -65,7 +65,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petid, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | Pet id to delete +final petId = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | try { - api_instance.deletePet(petid, apiKey); + api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| Pet id to delete | + **petId** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petid) +> Pet getPetById(petId) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to return +final petId = 789; // int | ID of pet to return try { - final result = api_instance.getPetById(petid); + final result = api_instance.getPetById(petId); print(result); } catch (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to return | + **petId** | **int**| ID of pet to return | ### Return type @@ -293,7 +293,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petid, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -306,12 +306,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet that needs to be updated +final petId = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet try { - api_instance.updatePetWithForm(petid, name, status); + api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -321,7 +321,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet that needs to be updated | + **petId** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -341,7 +341,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petid, additionalmetadata, file) +> ApiResponse uploadFile(petId, additionalMetadata, file) uploads an image @@ -354,12 +354,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to update -final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final petId = 789; // int | ID of pet to update +final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final result = api_instance.uploadFile(petid, additionalmetadata, file); + final result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -370,8 +370,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md index 68e96b35dc5b..e52308617644 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/StoreApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **deleteOrder** -> deleteOrder(orderid) +> deleteOrder(orderId) Delete purchase order by ID @@ -27,10 +27,10 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non import 'package:openapi/api.dart'; final api_instance = StoreApi(); -final orderid = orderid_example; // String | ID of the order that needs to be deleted +final orderId = orderId_example; // String | ID of the order that needs to be deleted try { - api_instance.deleteOrder(orderid); + api_instance.deleteOrder(orderId); } catch (e) { print('Exception when calling StoreApi->deleteOrder: $e\n'); } @@ -40,7 +40,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orderid** | **String**| ID of the order that needs to be deleted | + **orderId** | **String**| ID of the order that needs to be deleted | ### Return type @@ -101,7 +101,7 @@ This endpoint does not need any parameter. [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getOrderById** -> Order getOrderById(orderid) +> Order getOrderById(orderId) Find purchase order by ID @@ -112,10 +112,10 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge import 'package:openapi/api.dart'; final api_instance = StoreApi(); -final orderid = 789; // int | ID of pet that needs to be fetched +final orderId = 789; // int | ID of pet that needs to be fetched try { - final result = api_instance.getOrderById(orderid); + final result = api_instance.getOrderById(orderId); print(result); } catch (e) { print('Exception when calling StoreApi->getOrderById: $e\n'); @@ -126,7 +126,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **orderid** | **int**| ID of pet that needs to be fetched | + **orderId** | **int**| ID of pet that needs to be fetched | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md index 37aa8c50230e..fa87e64d8595 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstname** | **String** | | [optional] -**lastname** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userstatus** | **int** | User Status | [optional] +**userStatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart index 39de05487f74..f6cb28f6cc2a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/pet_api.dart @@ -82,14 +82,14 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petid, { String? apiKey, }) async { + Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -122,12 +122,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petid, { String? apiKey, }) async { - final response = await deletePetWithHttpInfo(petid, apiKey: apiKey, ); + Future deletePet(int petId, { String? apiKey, }) async { + final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -267,12 +267,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to return - Future getPetByIdWithHttpInfo(int petid,) async { + Future getPetByIdWithHttpInfo(int petId,) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -301,10 +301,10 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to return - Future getPetById(int petid,) async { - final response = await getPetByIdWithHttpInfo(petid,); + Future getPetById(int petId,) async { + final response = await getPetByIdWithHttpInfo(petId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -384,7 +384,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -392,10 +392,10 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petid, { String? name, String? status, }) async { + Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -430,7 +430,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -438,8 +438,8 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petid, { String? name, String? status, }) async { - final response = await updatePetWithFormWithHttpInfo(petid, name: name, status: status, ); + Future updatePetWithForm(int petId, { String? name, String? status, }) async { + final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -453,18 +453,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -477,9 +477,9 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalmetadata != null) { + if (additionalMetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); } if (file != null) { hasFields = true; @@ -507,16 +507,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petid, { String? additionalmetadata, MultipartFile? file, }) async { - final response = await uploadFileWithHttpInfo(petid, additionalmetadata: additionalmetadata, file: file, ); + Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { + final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart index cd20ddd4366f..e27c2b04cb8b 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/api/store_api.dart @@ -24,12 +24,12 @@ class StoreApi { /// /// Parameters: /// - /// * [String] orderid (required): + /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrderWithHttpInfo(String orderid,) async { + Future deleteOrderWithHttpInfo(String orderId,) async { // ignore: prefer_const_declarations final path = r'/store/order/{orderId}' - .replaceAll('{orderId}', orderid); + .replaceAll('{orderId}', orderId); // ignore: prefer_final_locals Object? postBody; @@ -58,10 +58,10 @@ class StoreApi { /// /// Parameters: /// - /// * [String] orderid (required): + /// * [String] orderId (required): /// ID of the order that needs to be deleted - Future deleteOrder(String orderid,) async { - final response = await deleteOrderWithHttpInfo(orderid,); + Future deleteOrder(String orderId,) async { + final response = await deleteOrderWithHttpInfo(orderId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -123,12 +123,12 @@ class StoreApi { /// /// Parameters: /// - /// * [int] orderid (required): + /// * [int] orderId (required): /// ID of pet that needs to be fetched - Future getOrderByIdWithHttpInfo(int orderid,) async { + Future getOrderByIdWithHttpInfo(int orderId,) async { // ignore: prefer_const_declarations final path = r'/store/order/{orderId}' - .replaceAll('{orderId}', orderid.toString()); + .replaceAll('{orderId}', orderId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -157,10 +157,10 @@ class StoreApi { /// /// Parameters: /// - /// * [int] orderid (required): + /// * [int] orderId (required): /// ID of pet that needs to be fetched - Future getOrderById(int orderid,) async { - final response = await getOrderByIdWithHttpInfo(orderid,); + Future getOrderById(int orderId,) async { + final response = await getOrderByIdWithHttpInfo(orderId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart index 0ee88f1fd8a4..88a37f9c5fcb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/order.dart @@ -14,9 +14,9 @@ class Order { /// Returns a new [Order] instance. Order({ this.id, - this.petid, + this.petId, this.quantity, - this.shipdate, + this.shipDate, this.status, this.complete = false, }); @@ -35,7 +35,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? petid; + int? petId; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -51,7 +51,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? shipdate; + DateTime? shipDate; /// Order Status OrderStatusEnum? status; @@ -61,9 +61,9 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petid == petid && + other.petId == petId && other.quantity == quantity && - other.shipdate == shipdate && + other.shipDate == shipDate && other.status == status && other.complete == complete; @@ -71,14 +71,14 @@ class Order { int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + - (petid == null ? 0 : petid!.hashCode) + + (petId == null ? 0 : petId!.hashCode) + (quantity == null ? 0 : quantity!.hashCode) + - (shipdate == null ? 0 : shipdate!.hashCode) + + (shipDate == null ? 0 : shipDate!.hashCode) + (status == null ? 0 : status!.hashCode) + (complete.hashCode); @override - String toString() => 'Order[id=$id, petid=$petid, quantity=$quantity, shipdate=$shipdate, status=$status, complete=$complete]'; + String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; Map toJson() { final json = {}; @@ -87,8 +87,8 @@ class Order { } else { json[r'id'] = null; } - if (this.petid != null) { - json[r'petId'] = this.petid; + if (this.petId != null) { + json[r'petId'] = this.petId; } else { json[r'petId'] = null; } @@ -97,8 +97,8 @@ class Order { } else { json[r'quantity'] = null; } - if (this.shipdate != null) { - json[r'shipDate'] = this.shipdate!.toUtc().toIso8601String(); + if (this.shipDate != null) { + json[r'shipDate'] = this.shipDate!.toUtc().toIso8601String(); } else { json[r'shipDate'] = null; } @@ -131,9 +131,9 @@ class Order { return Order( id: mapValueOfType(json, r'id'), - petid: mapValueOfType(json, r'petId'), + petId: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), - shipdate: mapDateTime(json, r'shipDate', r''), + shipDate: mapDateTime(json, r'shipDate', r''), status: OrderStatusEnum.fromJson(json[r'status']), complete: mapValueOfType(json, r'complete') ?? false, ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart index 3c986470aedc..9b79b4e1c571 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/pet.dart @@ -16,7 +16,7 @@ class Pet { this.id, this.category, required this.name, - this.photourls = const [], + this.photoUrls = const [], this.tags = const [], this.status, }); @@ -39,7 +39,7 @@ class Pet { String name; - List photourls; + List photoUrls; List tags; @@ -51,7 +51,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - _deepEquality.equals(other.photourls, photourls) && + _deepEquality.equals(other.photoUrls, photoUrls) && _deepEquality.equals(other.tags, tags) && other.status == status; @@ -61,12 +61,12 @@ class Pet { (id == null ? 0 : id!.hashCode) + (category == null ? 0 : category!.hashCode) + (name.hashCode) + - (photourls.hashCode) + + (photoUrls.hashCode) + (tags.hashCode) + (status == null ? 0 : status!.hashCode); @override - String toString() => 'Pet[id=$id, category=$category, name=$name, photourls=$photourls, tags=$tags, status=$status]'; + String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; Map toJson() { final json = {}; @@ -81,7 +81,7 @@ class Pet { json[r'category'] = null; } json[r'name'] = this.name; - json[r'photoUrls'] = this.photourls; + json[r'photoUrls'] = this.photoUrls; json[r'tags'] = this.tags; if (this.status != null) { json[r'status'] = this.status; @@ -113,7 +113,7 @@ class Pet { id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), name: mapValueOfType(json, r'name')!, - photourls: json[r'photoUrls'] is Iterable + photoUrls: json[r'photoUrls'] is Iterable ? (json[r'photoUrls'] as Iterable).cast().toList(growable: false) : const [], tags: Tag.listFromJson(json[r'tags']), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart index b6be541d49f9..395f9e38e043 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/lib/model/user.dart @@ -15,12 +15,12 @@ class User { User({ this.id, this.username, - this.firstname, - this.lastname, + this.firstName, + this.lastName, this.email, this.password, this.phone, - this.userstatus, + this.userStatus, }); /// @@ -45,7 +45,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? firstname; + String? firstName; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -53,7 +53,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? lastname; + String? lastName; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -86,33 +86,33 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? userstatus; + int? userStatus; @override bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstname == firstname && - other.lastname == lastname && + other.firstName == firstName && + other.lastName == lastName && other.email == email && other.password == password && other.phone == phone && - other.userstatus == userstatus; + other.userStatus == userStatus; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (username == null ? 0 : username!.hashCode) + - (firstname == null ? 0 : firstname!.hashCode) + - (lastname == null ? 0 : lastname!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + (email == null ? 0 : email!.hashCode) + (password == null ? 0 : password!.hashCode) + (phone == null ? 0 : phone!.hashCode) + - (userstatus == null ? 0 : userstatus!.hashCode); + (userStatus == null ? 0 : userStatus!.hashCode); @override - String toString() => 'User[id=$id, username=$username, firstname=$firstname, lastname=$lastname, email=$email, password=$password, phone=$phone, userstatus=$userstatus]'; + String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; Map toJson() { final json = {}; @@ -126,13 +126,13 @@ class User { } else { json[r'username'] = null; } - if (this.firstname != null) { - json[r'firstName'] = this.firstname; + if (this.firstName != null) { + json[r'firstName'] = this.firstName; } else { json[r'firstName'] = null; } - if (this.lastname != null) { - json[r'lastName'] = this.lastname; + if (this.lastName != null) { + json[r'lastName'] = this.lastName; } else { json[r'lastName'] = null; } @@ -151,8 +151,8 @@ class User { } else { json[r'phone'] = null; } - if (this.userstatus != null) { - json[r'userStatus'] = this.userstatus; + if (this.userStatus != null) { + json[r'userStatus'] = this.userStatus; } else { json[r'userStatus'] = null; } @@ -180,12 +180,12 @@ class User { return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), - firstname: mapValueOfType(json, r'firstName'), - lastname: mapValueOfType(json, r'lastName'), + firstName: mapValueOfType(json, r'firstName'), + lastName: mapValueOfType(json, r'lastName'), email: mapValueOfType(json, r'email'), password: mapValueOfType(json, r'password'), phone: mapValueOfType(json, r'phone'), - userstatus: mapValueOfType(json, r'userStatus'), + userStatus: mapValueOfType(json, r'userStatus'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md index 85818103b4d9..5a8c345c8de3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/README.md @@ -42,10 +42,10 @@ import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.call123testSpecialTags(modelclient); + final result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md index 151142162f62..4c6f3ab2fe11 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singlereftype** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md index 570de2e45be3..415b56e9bc2e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md index c2ae77848227..241c82e575d4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelclient) +> ModelClient call123testSpecialTags(modelClient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.call123testSpecialTags(modelclient); + final result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md index 84f21164e7b4..0a0dc2a7b752 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayarraynumber** | [**List>**](List.md) | | [optional] [default to const []] +**arrayArrayNumber** | [**List>**](List.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md index fa8e9caffce8..01b6f58870ff 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arraynumber** | **List** | | [optional] [default to const []] +**arrayNumber** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md index e673e7baef4b..4a07b4eb820d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallcamel** | **String** | | [optional] -**capitalcamel** | **String** | | [optional] +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**scaEthFlowPoints** | **String** | | [optional] -**attName** | **String** | Name of the pet | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md index 9c557ac9082a..6552eea4b435 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md index 54b310b0f58d..770494fcf4cc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] -**otherproperty** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md index b2ba3dfcef59..d36439b767bb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md index f1b0758b868e..7c24fe2347b4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md index cf92b84aa2cf..e5c71555c9a8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outercomposite) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final outercomposite = OuterComposite(); // OuterComposite | Input composite as post body +final outerComposite = OuterComposite(); // OuterComposite | Input composite as post body try { - final result = api_instance.fakeOuterCompositeSerialize(outercomposite); + final result = api_instance.fakeOuterCompositeSerialize(outerComposite); print(result); } catch (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final outerobjectwithenumproperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body +final outerObjectWithEnumProperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final result = api_instance.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + final result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(result); } catch (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileschematestclass) +> testBodyWithFileSchema(fileSchemaTestClass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final fileschematestclass = FileSchemaTestClass(); // FileSchemaTestClass | +final fileSchemaTestClass = FileSchemaTestClass(); // FileSchemaTestClass | try { - api_instance.testBodyWithFileSchema(fileschematestclass); + api_instance.testBodyWithFileSchema(fileSchemaTestClass); } catch (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelclient) +> ModelClient testClientModel(modelClient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.testClientModel(modelclient); + final result = api_instance.testClientModel(modelClient); print(result); } catch (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final float = 3.4; // double | None final string = string_example; // String | None final binary = BINARY_DATA_HERE; // MultipartFile | None final date = 2013-10-20; // DateTime | None -final datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final password = password_example; // String | None final callback = callback_example; // String | None try { - api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); + api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **MultipartFile**| None | [optional] **date** | **DateTime**| None | [optional] - **datetime** | **DateTime**| None | [optional] + **dateTime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -809,7 +809,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) +> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) test inline free-form additionalProperties @@ -820,10 +820,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final testinlinefreeformadditionalpropertiesrequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body +final testInlineFreeformAdditionalPropertiesRequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api_instance.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); + api_instance.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); } catch (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -833,7 +833,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -895,7 +895,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childwithnullable) +> testNullable(childWithNullable) test nullable parent property @@ -906,10 +906,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final childwithnullable = ChildWithNullable(); // ChildWithNullable | request body +final childWithNullable = ChildWithNullable(); // ChildWithNullable | request body try { - api_instance.testNullable(childwithnullable); + api_instance.testNullable(childWithNullable); } catch (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -919,7 +919,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -937,7 +937,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -953,11 +953,11 @@ final ioutil = []; // List | final http = []; // List | final url = []; // List | final context = []; // List | -final allowempty = allowempty_example; // String | +final allowEmpty = allowEmpty_example; // String | final language = ; // Map | try { - api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); + api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -972,7 +972,7 @@ Name | Type | Description | Notes **http** | [**List**](String.md)| | [default to const []] **url** | [**List**](String.md)| | [default to const []] **context** | [**List**](String.md)| | [default to const []] - **allowempty** | **String**| | + **allowEmpty** | **String**| | **language** | [**Map**](String.md)| | [optional] [default to const {}] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md index f3c0d00337e9..21ccf6ec012f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someid** | **num** | | [optional] -**somemap** | **Map** | | [optional] [default to const {}] +**someId** | **num** | | [optional] +**someMap** | **Map** | | [optional] [default to const {}] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md index be7a69c1b967..5518c67403ff 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelclient) +> ModelClient testClassname(modelClient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api_instance = FakeClassnameTags123Api(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.testClassname(modelclient); + final result = api_instance.testClassname(modelClient); print(result); } catch (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md index a25a61c53343..83b60545eb61 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md index c912fb2e08f4..4d6aeb75d965 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullablemessage** | **String** | | [optional] +**nullableMessage** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md index 3df16ab1a90c..1f7f66b684fd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**Map**](Animal.md) | | [optional] [default to const {}] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md index d54b1bbbea04..4be260e93f6e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceuri** | **String** | Test capitalization | [optional] +**sourceURI** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md index f5fac6f8a17c..d8096a3db37a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justnumber** | **num** | | [optional] +**justNumber** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md index a78891d33014..566816d8d278 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md index 08914a83f300..bde5ffe51a2c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petid** | **int** | | [optional] +**petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md index 435464987052..17aa5ca02941 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] +**nullableProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md index ceb71740166f..b6fdea5299ba 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photourls** | **Set** | | [default to const {}] +**photoUrls** | **Set** | | [default to const {}] **tags** | [**List**](Tag.md) | | [optional] [default to const []] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md index 978146e44886..3883a9e96a00 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petid, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | Pet id to delete +final petId = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | try { - api_instance.deletePet(petid, apiKey); + api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| Pet id to delete | + **petId** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petid) +> Pet getPetById(petId) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to return +final petId = 789; // int | ID of pet to return try { - final result = api_instance.getPetById(petid); + final result = api_instance.getPetById(petId); print(result); } catch (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to return | + **petId** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petid, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet that needs to be updated +final petId = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet try { - api_instance.updatePetWithForm(petid, name, status); + api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet that needs to be updated | + **petId** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petid, additionalmetadata, file) +> ApiResponse uploadFile(petId, additionalMetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to update -final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final petId = 789; // int | ID of pet to update +final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final result = api_instance.uploadFile(petid, additionalmetadata, file); + final result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to update -final requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload -final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final petId = 789; // int | ID of pet to update +final requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload +final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server try { - final result = api_instance.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + final result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(result); } catch (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **requiredfile** | **MultipartFile**| file to upload | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **requiredFile** | **MultipartFile**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md index 04697c8e6225..5fcfa98e0b36 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [optional] +**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md index 894a3e60ee31..e2b2f1fd4468 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someproperty** | **String** | | [optional] +**someProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md index 37aa8c50230e..fa87e64d8595 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstname** | **String** | | [optional] -**lastname** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userstatus** | **int** | User Status | [optional] +**userStatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart index 3d7ceda6d0cd..81ab2d859dda 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/another_fake_api.dart @@ -24,14 +24,14 @@ class AnotherFakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future call123testSpecialTagsWithHttpInfo(ModelClient modelclient,) async { + Future call123testSpecialTagsWithHttpInfo(ModelClient modelClient,) async { // ignore: prefer_const_declarations final path = r'/another-fake/dummy'; // ignore: prefer_final_locals - Object? postBody = modelclient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -57,10 +57,10 @@ class AnotherFakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future call123testSpecialTags(ModelClient modelclient,) async { - final response = await call123testSpecialTagsWithHttpInfo(modelclient,); + Future call123testSpecialTags(ModelClient modelClient,) async { + final response = await call123testSpecialTagsWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart index 3674a2e5d66f..1fa377f864dd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_api.dart @@ -230,14 +230,14 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterComposite] outercomposite: + /// * [OuterComposite] outerComposite: /// Input composite as post body - Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outercomposite, }) async { + Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outerComposite, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/composite'; // ignore: prefer_final_locals - Object? postBody = outercomposite; + Object? postBody = outerComposite; final queryParams = []; final headerParams = {}; @@ -261,10 +261,10 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterComposite] outercomposite: + /// * [OuterComposite] outerComposite: /// Input composite as post body - Future fakeOuterCompositeSerialize({ OuterComposite? outercomposite, }) async { - final response = await fakeOuterCompositeSerializeWithHttpInfo( outercomposite: outercomposite, ); + Future fakeOuterCompositeSerialize({ OuterComposite? outerComposite, }) async { + final response = await fakeOuterCompositeSerializeWithHttpInfo( outerComposite: outerComposite, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -392,14 +392,14 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): + /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { + Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { // ignore: prefer_const_declarations final path = r'/fake/property/enum-int'; // ignore: prefer_final_locals - Object? postBody = outerobjectwithenumproperty; + Object? postBody = outerObjectWithEnumProperty; final queryParams = []; final headerParams = {}; @@ -423,10 +423,10 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): + /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { - final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerobjectwithenumproperty,); + Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { + final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -542,13 +542,13 @@ class FakeApi { /// /// Parameters: /// - /// * [FileSchemaTestClass] fileschematestclass (required): - Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileschematestclass,) async { + /// * [FileSchemaTestClass] fileSchemaTestClass (required): + Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass,) async { // ignore: prefer_const_declarations final path = r'/fake/body-with-file-schema'; // ignore: prefer_final_locals - Object? postBody = fileschematestclass; + Object? postBody = fileSchemaTestClass; final queryParams = []; final headerParams = {}; @@ -572,9 +572,9 @@ class FakeApi { /// /// Parameters: /// - /// * [FileSchemaTestClass] fileschematestclass (required): - Future testBodyWithFileSchema(FileSchemaTestClass fileschematestclass,) async { - final response = await testBodyWithFileSchemaWithHttpInfo(fileschematestclass,); + /// * [FileSchemaTestClass] fileSchemaTestClass (required): + Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass,) async { + final response = await testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -633,14 +633,14 @@ class FakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClientModelWithHttpInfo(ModelClient modelclient,) async { + Future testClientModelWithHttpInfo(ModelClient modelClient,) async { // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object? postBody = modelclient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -666,10 +666,10 @@ class FakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClientModel(ModelClient modelclient,) async { - final response = await testClientModelWithHttpInfo(modelclient,); + Future testClientModel(ModelClient modelClient,) async { + final response = await testClientModelWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -724,7 +724,7 @@ class FakeApi { /// * [DateTime] date: /// None /// - /// * [DateTime] datetime: + /// * [DateTime] dateTime: /// None /// /// * [String] password: @@ -732,7 +732,7 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { + Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { // ignore: prefer_const_declarations final path = r'/fake'; @@ -775,8 +775,8 @@ class FakeApi { if (date != null) { formParams[r'date'] = parameterToString(date); } - if (datetime != null) { - formParams[r'dateTime'] = parameterToString(datetime); + if (dateTime != null) { + formParams[r'dateTime'] = parameterToString(dateTime); } if (password != null) { formParams[r'password'] = parameterToString(password); @@ -835,7 +835,7 @@ class FakeApi { /// * [DateTime] date: /// None /// - /// * [DateTime] datetime: + /// * [DateTime] dateTime: /// None /// /// * [String] password: @@ -843,8 +843,8 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { - final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, datetime: datetime, password: password, callback: callback, ); + Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { + final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1127,14 +1127,14 @@ class FakeApi { /// /// Parameters: /// - /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): + /// * [TestInlineFreeformAdditionalPropertiesRequest] testInlineFreeformAdditionalPropertiesRequest (required): /// request body - Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { + Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,) async { // ignore: prefer_const_declarations final path = r'/fake/inline-freeform-additionalProperties'; // ignore: prefer_final_locals - Object? postBody = testinlinefreeformadditionalpropertiesrequest; + Object? postBody = testInlineFreeformAdditionalPropertiesRequest; final queryParams = []; final headerParams = {}; @@ -1160,10 +1160,10 @@ class FakeApi { /// /// Parameters: /// - /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): + /// * [TestInlineFreeformAdditionalPropertiesRequest] testInlineFreeformAdditionalPropertiesRequest (required): /// request body - Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { - final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testinlinefreeformadditionalpropertiesrequest,); + Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,) async { + final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1239,14 +1239,14 @@ class FakeApi { /// /// Parameters: /// - /// * [ChildWithNullable] childwithnullable (required): + /// * [ChildWithNullable] childWithNullable (required): /// request body - Future testNullableWithHttpInfo(ChildWithNullable childwithnullable,) async { + Future testNullableWithHttpInfo(ChildWithNullable childWithNullable,) async { // ignore: prefer_const_declarations final path = r'/fake/nullable'; // ignore: prefer_final_locals - Object? postBody = childwithnullable; + Object? postBody = childWithNullable; final queryParams = []; final headerParams = {}; @@ -1272,10 +1272,10 @@ class FakeApi { /// /// Parameters: /// - /// * [ChildWithNullable] childwithnullable (required): + /// * [ChildWithNullable] childWithNullable (required): /// request body - Future testNullable(ChildWithNullable childwithnullable,) async { - final response = await testNullableWithHttpInfo(childwithnullable,); + Future testNullable(ChildWithNullable childWithNullable,) async { + final response = await testNullableWithHttpInfo(childWithNullable,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1297,10 +1297,10 @@ class FakeApi { /// /// * [List] context (required): /// - /// * [String] allowempty (required): + /// * [String] allowEmpty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { + Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { // ignore: prefer_const_declarations final path = r'/fake/test-query-parameters'; @@ -1319,7 +1319,7 @@ class FakeApi { if (language != null) { queryParams.addAll(_queryParams('', 'language', language)); } - queryParams.addAll(_queryParams('', 'allowEmpty', allowempty)); + queryParams.addAll(_queryParams('', 'allowEmpty', allowEmpty)); const contentTypes = []; @@ -1349,11 +1349,11 @@ class FakeApi { /// /// * [List] context (required): /// - /// * [String] allowempty (required): + /// * [String] allowEmpty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { - final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowempty, language: language, ); + Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { + final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language: language, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart index 8f45d844fd69..7689f51b6884 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/fake_classname_tags123_api.dart @@ -24,14 +24,14 @@ class FakeClassnameTags123Api { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClassnameWithHttpInfo(ModelClient modelclient,) async { + Future testClassnameWithHttpInfo(ModelClient modelClient,) async { // ignore: prefer_const_declarations final path = r'/fake_classname_test'; // ignore: prefer_final_locals - Object? postBody = modelclient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -57,10 +57,10 @@ class FakeClassnameTags123Api { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClassname(ModelClient modelclient,) async { - final response = await testClassnameWithHttpInfo(modelclient,); + Future testClassname(ModelClient modelClient,) async { + final response = await testClassnameWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart index ea3c0054bd65..61fd1666af49 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/api/pet_api.dart @@ -74,14 +74,14 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petid, { String? apiKey, }) async { + Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -114,12 +114,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petid, { String? apiKey, }) async { - final response = await deletePetWithHttpInfo(petid, apiKey: apiKey, ); + Future deletePet(int petId, { String? apiKey, }) async { + final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -259,12 +259,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to return - Future getPetByIdWithHttpInfo(int petid,) async { + Future getPetByIdWithHttpInfo(int petId,) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -293,10 +293,10 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to return - Future getPetById(int petid,) async { - final response = await getPetByIdWithHttpInfo(petid,); + Future getPetById(int petId,) async { + final response = await getPetByIdWithHttpInfo(petId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -368,7 +368,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -376,10 +376,10 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petid, { String? name, String? status, }) async { + Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -414,7 +414,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -422,8 +422,8 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petid, { String? name, String? status, }) async { - final response = await updatePetWithFormWithHttpInfo(petid, name: name, status: status, ); + Future updatePetWithForm(int petId, { String? name, String? status, }) async { + final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -437,18 +437,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -461,9 +461,9 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalmetadata != null) { + if (additionalMetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); } if (file != null) { hasFields = true; @@ -491,16 +491,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petid, { String? additionalmetadata, MultipartFile? file, }) async { - final response = await uploadFileWithHttpInfo(petid, additionalmetadata: additionalmetadata, file: file, ); + Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { + final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -522,18 +522,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [MultipartFile] requiredfile (required): + /// * [MultipartFile] requiredFile (required): /// file to upload /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFileWithHttpInfo(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { + Future uploadFileWithRequiredFileWithHttpInfo(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { // ignore: prefer_const_declarations final path = r'/fake/{petId}/uploadImageWithRequiredFile' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -546,14 +546,14 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalmetadata != null) { + if (additionalMetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); } - if (requiredfile != null) { + if (requiredFile != null) { hasFields = true; - mp.fields[r'requiredFile'] = requiredfile.field; - mp.files.add(requiredfile); + mp.fields[r'requiredFile'] = requiredFile.field; + mp.files.add(requiredFile); } if (hasFields) { postBody = mp; @@ -576,16 +576,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [MultipartFile] requiredfile (required): + /// * [MultipartFile] requiredFile (required): /// file to upload /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFile(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { - final response = await uploadFileWithRequiredFileWithHttpInfo(petid, requiredfile, additionalmetadata: additionalmetadata, ); + Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { + final response = await uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata: additionalMetadata, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart index 24890cf3f2ed..0411ccc2b7a1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/all_of_with_single_ref.dart @@ -14,7 +14,7 @@ class AllOfWithSingleRef { /// Returns a new [AllOfWithSingleRef] instance. AllOfWithSingleRef({ this.username, - this.singlereftype, + this.singleRefType, }); /// @@ -31,21 +31,21 @@ class AllOfWithSingleRef { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - SingleRefType? singlereftype; + SingleRefType? singleRefType; @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && other.username == username && - other.singlereftype == singlereftype; + other.singleRefType == singleRefType; @override int get hashCode => // ignore: unnecessary_parenthesis (username == null ? 0 : username!.hashCode) + - (singlereftype == null ? 0 : singlereftype!.hashCode); + (singleRefType == null ? 0 : singleRefType!.hashCode); @override - String toString() => 'AllOfWithSingleRef[username=$username, singlereftype=$singlereftype]'; + String toString() => 'AllOfWithSingleRef[username=$username, singleRefType=$singleRefType]'; Map toJson() { final json = {}; @@ -54,8 +54,8 @@ class AllOfWithSingleRef { } else { json[r'username'] = null; } - if (this.singlereftype != null) { - json[r'SingleRefType'] = this.singlereftype; + if (this.singleRefType != null) { + json[r'SingleRefType'] = this.singleRefType; } else { json[r'SingleRefType'] = null; } @@ -82,7 +82,7 @@ class AllOfWithSingleRef { return AllOfWithSingleRef( username: mapValueOfType(json, r'username'), - singlereftype: SingleRefType.fromJson(json[r'SingleRefType']), + singleRefType: SingleRefType.fromJson(json[r'SingleRefType']), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart index 6259e6082643..a562a11becce 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/animal.dart @@ -13,31 +13,31 @@ part of openapi.api; class Animal { /// Returns a new [Animal] instance. Animal({ - required this.classname, + required this.className, this.color = 'red', }); - String classname; + String className; String color; @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.classname == classname && + other.className == className && other.color == color; @override int get hashCode => // ignore: unnecessary_parenthesis - (classname.hashCode) + + (className.hashCode) + (color.hashCode); @override - String toString() => 'Animal[classname=$classname, color=$color]'; + String toString() => 'Animal[className=$className, color=$color]'; Map toJson() { final json = {}; - json[r'className'] = this.classname; + json[r'className'] = this.className; json[r'color'] = this.color; return json; } @@ -61,7 +61,7 @@ class Animal { }()); return Animal( - classname: mapValueOfType(json, r'className')!, + className: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart index 0dc0ec4c734c..04a9e99e986f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_array_of_number_only.dart @@ -13,26 +13,26 @@ part of openapi.api; class ArrayOfArrayOfNumberOnly { /// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayarraynumber = const [], + this.arrayArrayNumber = const [], }); - List> arrayarraynumber; + List> arrayArrayNumber; @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - _deepEquality.equals(other.arrayarraynumber, arrayarraynumber); + _deepEquality.equals(other.arrayArrayNumber, arrayArrayNumber); @override int get hashCode => // ignore: unnecessary_parenthesis - (arrayarraynumber.hashCode); + (arrayArrayNumber.hashCode); @override - String toString() => 'ArrayOfArrayOfNumberOnly[arrayarraynumber=$arrayarraynumber]'; + String toString() => 'ArrayOfArrayOfNumberOnly[arrayArrayNumber=$arrayArrayNumber]'; Map toJson() { final json = {}; - json[r'ArrayArrayNumber'] = this.arrayarraynumber; + json[r'ArrayArrayNumber'] = this.arrayArrayNumber; return json; } @@ -55,7 +55,7 @@ class ArrayOfArrayOfNumberOnly { }()); return ArrayOfArrayOfNumberOnly( - arrayarraynumber: json[r'ArrayArrayNumber'] is List + arrayArrayNumber: json[r'ArrayArrayNumber'] is List ? (json[r'ArrayArrayNumber'] as List).map((e) => e == null ? const [] : (e as List).cast() ).toList() diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart index 6de38929b80b..ccf33088a3e1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/array_of_number_only.dart @@ -13,26 +13,26 @@ part of openapi.api; class ArrayOfNumberOnly { /// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arraynumber = const [], + this.arrayNumber = const [], }); - List arraynumber; + List arrayNumber; @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - _deepEquality.equals(other.arraynumber, arraynumber); + _deepEquality.equals(other.arrayNumber, arrayNumber); @override int get hashCode => // ignore: unnecessary_parenthesis - (arraynumber.hashCode); + (arrayNumber.hashCode); @override - String toString() => 'ArrayOfNumberOnly[arraynumber=$arraynumber]'; + String toString() => 'ArrayOfNumberOnly[arrayNumber=$arrayNumber]'; Map toJson() { final json = {}; - json[r'ArrayNumber'] = this.arraynumber; + json[r'ArrayNumber'] = this.arrayNumber; return json; } @@ -55,7 +55,7 @@ class ArrayOfNumberOnly { }()); return ArrayOfNumberOnly( - arraynumber: json[r'ArrayNumber'] is Iterable + arrayNumber: json[r'ArrayNumber'] is Iterable ? (json[r'ArrayNumber'] as Iterable).cast().toList(growable: false) : const [], ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart index 4d613ce167d3..0f525b45dd87 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/capitalization.dart @@ -13,12 +13,12 @@ part of openapi.api; class Capitalization { /// Returns a new [Capitalization] instance. Capitalization({ - this.smallcamel, - this.capitalcamel, + this.smallCamel, + this.capitalCamel, this.smallSnake, this.capitalSnake, - this.scaEthFlowPoints, - this.attName, + this.sCAETHFlowPoints, + this.ATT_NAME, }); /// @@ -27,7 +27,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? smallcamel; + String? smallCamel; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -35,7 +35,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? capitalcamel; + String? capitalCamel; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -59,7 +59,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? scaEthFlowPoints; + String? sCAETHFlowPoints; /// Name of the pet /// @@ -68,39 +68,39 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? attName; + String? ATT_NAME; @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallcamel == smallcamel && - other.capitalcamel == capitalcamel && + other.smallCamel == smallCamel && + other.capitalCamel == capitalCamel && other.smallSnake == smallSnake && other.capitalSnake == capitalSnake && - other.scaEthFlowPoints == scaEthFlowPoints && - other.attName == attName; + other.sCAETHFlowPoints == sCAETHFlowPoints && + other.ATT_NAME == ATT_NAME; @override int get hashCode => // ignore: unnecessary_parenthesis - (smallcamel == null ? 0 : smallcamel!.hashCode) + - (capitalcamel == null ? 0 : capitalcamel!.hashCode) + + (smallCamel == null ? 0 : smallCamel!.hashCode) + + (capitalCamel == null ? 0 : capitalCamel!.hashCode) + (smallSnake == null ? 0 : smallSnake!.hashCode) + (capitalSnake == null ? 0 : capitalSnake!.hashCode) + - (scaEthFlowPoints == null ? 0 : scaEthFlowPoints!.hashCode) + - (attName == null ? 0 : attName!.hashCode); + (sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints!.hashCode) + + (ATT_NAME == null ? 0 : ATT_NAME!.hashCode); @override - String toString() => 'Capitalization[smallcamel=$smallcamel, capitalcamel=$capitalcamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, scaEthFlowPoints=$scaEthFlowPoints, attName=$attName]'; + String toString() => 'Capitalization[smallCamel=$smallCamel, capitalCamel=$capitalCamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, sCAETHFlowPoints=$sCAETHFlowPoints, ATT_NAME=$ATT_NAME]'; Map toJson() { final json = {}; - if (this.smallcamel != null) { - json[r'smallCamel'] = this.smallcamel; + if (this.smallCamel != null) { + json[r'smallCamel'] = this.smallCamel; } else { json[r'smallCamel'] = null; } - if (this.capitalcamel != null) { - json[r'CapitalCamel'] = this.capitalcamel; + if (this.capitalCamel != null) { + json[r'CapitalCamel'] = this.capitalCamel; } else { json[r'CapitalCamel'] = null; } @@ -114,13 +114,13 @@ class Capitalization { } else { json[r'Capital_Snake'] = null; } - if (this.scaEthFlowPoints != null) { - json[r'SCA_ETH_Flow_Points'] = this.scaEthFlowPoints; + if (this.sCAETHFlowPoints != null) { + json[r'SCA_ETH_Flow_Points'] = this.sCAETHFlowPoints; } else { json[r'SCA_ETH_Flow_Points'] = null; } - if (this.attName != null) { - json[r'ATT_NAME'] = this.attName; + if (this.ATT_NAME != null) { + json[r'ATT_NAME'] = this.ATT_NAME; } else { json[r'ATT_NAME'] = null; } @@ -146,12 +146,12 @@ class Capitalization { }()); return Capitalization( - smallcamel: mapValueOfType(json, r'smallCamel'), - capitalcamel: mapValueOfType(json, r'CapitalCamel'), + smallCamel: mapValueOfType(json, r'smallCamel'), + capitalCamel: mapValueOfType(json, r'CapitalCamel'), smallSnake: mapValueOfType(json, r'small_Snake'), capitalSnake: mapValueOfType(json, r'Capital_Snake'), - scaEthFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), - attName: mapValueOfType(json, r'ATT_NAME'), + sCAETHFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), + ATT_NAME: mapValueOfType(json, r'ATT_NAME'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart index ed6fb49e1a98..398fd8525280 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/cat.dart @@ -13,12 +13,12 @@ part of openapi.api; class Cat { /// Returns a new [Cat] instance. Cat({ - required this.classname, + required this.className, this.color = 'red', this.declawed, }); - String classname; + String className; String color; @@ -32,23 +32,23 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.classname == classname && + other.className == className && other.color == color && other.declawed == declawed; @override int get hashCode => // ignore: unnecessary_parenthesis - (classname.hashCode) + + (className.hashCode) + (color.hashCode) + (declawed == null ? 0 : declawed!.hashCode); @override - String toString() => 'Cat[classname=$classname, color=$color, declawed=$declawed]'; + String toString() => 'Cat[className=$className, color=$color, declawed=$declawed]'; Map toJson() { final json = {}; - json[r'className'] = this.classname; + json[r'className'] = this.className; json[r'color'] = this.color; if (this.declawed != null) { json[r'declawed'] = this.declawed; @@ -77,7 +77,7 @@ class Cat { }()); return Cat( - classname: mapValueOfType(json, r'className')!, + className: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', declawed: mapValueOfType(json, r'declawed'), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart index 8d1041dac9d5..2092b2c76845 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/child_with_nullable.dart @@ -14,13 +14,13 @@ class ChildWithNullable { /// Returns a new [ChildWithNullable] instance. ChildWithNullable({ this.type, - this.nullableproperty, - this.otherproperty, + this.nullableProperty, + this.otherProperty, }); ChildWithNullableTypeEnum? type; - String? nullableproperty; + String? nullableProperty; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -28,23 +28,23 @@ class ChildWithNullable { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? otherproperty; + String? otherProperty; @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && other.type == type && - other.nullableproperty == nullableproperty && - other.otherproperty == otherproperty; + other.nullableProperty == nullableProperty && + other.otherProperty == otherProperty; @override int get hashCode => // ignore: unnecessary_parenthesis (type == null ? 0 : type!.hashCode) + - (nullableproperty == null ? 0 : nullableproperty!.hashCode) + - (otherproperty == null ? 0 : otherproperty!.hashCode); + (nullableProperty == null ? 0 : nullableProperty!.hashCode) + + (otherProperty == null ? 0 : otherProperty!.hashCode); @override - String toString() => 'ChildWithNullable[type=$type, nullableproperty=$nullableproperty, otherproperty=$otherproperty]'; + String toString() => 'ChildWithNullable[type=$type, nullableProperty=$nullableProperty, otherProperty=$otherProperty]'; Map toJson() { final json = {}; @@ -53,13 +53,13 @@ class ChildWithNullable { } else { json[r'type'] = null; } - if (this.nullableproperty != null) { - json[r'nullableProperty'] = this.nullableproperty; + if (this.nullableProperty != null) { + json[r'nullableProperty'] = this.nullableProperty; } else { json[r'nullableProperty'] = null; } - if (this.otherproperty != null) { - json[r'otherProperty'] = this.otherproperty; + if (this.otherProperty != null) { + json[r'otherProperty'] = this.otherProperty; } else { json[r'otherProperty'] = null; } @@ -86,8 +86,8 @@ class ChildWithNullable { return ChildWithNullable( type: ChildWithNullableTypeEnum.fromJson(json[r'type']), - nullableproperty: mapValueOfType(json, r'nullableProperty'), - otherproperty: mapValueOfType(json, r'otherProperty'), + nullableProperty: mapValueOfType(json, r'nullableProperty'), + otherProperty: mapValueOfType(json, r'otherProperty'), ); } return null; @@ -151,11 +151,11 @@ class ChildWithNullableTypeEnum { String toJson() => value; - static const childwithnullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); + static const childWithNullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); /// List of all possible values in this [enum][ChildWithNullableTypeEnum]. static const values = [ - childwithnullable, + childWithNullable, ]; static ChildWithNullableTypeEnum? fromJson(dynamic value) => ChildWithNullableTypeEnumTypeTransformer().decode(value); @@ -194,7 +194,7 @@ class ChildWithNullableTypeEnumTypeTransformer { ChildWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'ChildWithNullable': return ChildWithNullableTypeEnum.childwithnullable; + case r'ChildWithNullable': return ChildWithNullableTypeEnum.childWithNullable; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart index 227bd1b55772..d7677510b91c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/dog.dart @@ -13,12 +13,12 @@ part of openapi.api; class Dog { /// Returns a new [Dog] instance. Dog({ - required this.classname, + required this.className, this.color = 'red', this.breed, }); - String classname; + String className; String color; @@ -32,23 +32,23 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.classname == classname && + other.className == className && other.color == color && other.breed == breed; @override int get hashCode => // ignore: unnecessary_parenthesis - (classname.hashCode) + + (className.hashCode) + (color.hashCode) + (breed == null ? 0 : breed!.hashCode); @override - String toString() => 'Dog[classname=$classname, color=$color, breed=$breed]'; + String toString() => 'Dog[className=$className, color=$color, breed=$breed]'; Map toJson() { final json = {}; - json[r'className'] = this.classname; + json[r'className'] = this.className; json[r'color'] = this.color; if (this.breed != null) { json[r'breed'] = this.breed; @@ -77,7 +77,7 @@ class Dog { }()); return Dog( - classname: mapValueOfType(json, r'className')!, + className: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', breed: mapValueOfType(json, r'breed'), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart index 898da969de8b..71872cf0165f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_class.dart @@ -25,13 +25,13 @@ class EnumClass { static const abc = EnumClass._(r'_abc'); static const efg = EnumClass._(r'-efg'); - static const leftParenthesisXyzrightParenthesis = EnumClass._(r'(xyz)'); + static const leftParenthesisXyzRightParenthesis = EnumClass._(r'(xyz)'); /// List of all possible values in this [enum][EnumClass]. static const values = [ abc, efg, - leftParenthesisXyzrightParenthesis, + leftParenthesisXyzRightParenthesis, ]; static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value); @@ -72,7 +72,7 @@ class EnumClassTypeTransformer { switch (data) { case r'_abc': return EnumClass.abc; case r'-efg': return EnumClass.efg; - case r'(xyz)': return EnumClass.leftParenthesisXyzrightParenthesis; + case r'(xyz)': return EnumClass.leftParenthesisXyzRightParenthesis; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart index 898fae87bffa..04ee7808fc0d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/enum_test.dart @@ -17,10 +17,10 @@ class EnumTest { required this.enumStringRequired, this.enumInteger, this.enumNumber, - this.outerenum, - this.outerenuminteger, - this.outerenumdefaultvalue, - this.outerenumintegerdefaultvalue, + this.outerEnum, + this.outerEnumInteger, + this.outerEnumDefaultValue, + this.outerEnumIntegerDefaultValue, }); EnumTestEnumStringEnum? enumString; @@ -31,7 +31,7 @@ class EnumTest { EnumTestEnumNumberEnum? enumNumber; - OuterEnum? outerenum; + OuterEnum? outerEnum; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -39,7 +39,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumInteger? outerenuminteger; + OuterEnumInteger? outerEnumInteger; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -47,7 +47,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumDefaultValue? outerenumdefaultvalue; + OuterEnumDefaultValue? outerEnumDefaultValue; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -55,7 +55,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; + OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; @override bool operator ==(Object other) => identical(this, other) || other is EnumTest && @@ -63,10 +63,10 @@ class EnumTest { other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && other.enumNumber == enumNumber && - other.outerenum == outerenum && - other.outerenuminteger == outerenuminteger && - other.outerenumdefaultvalue == outerenumdefaultvalue && - other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; + other.outerEnum == outerEnum && + other.outerEnumInteger == outerEnumInteger && + other.outerEnumDefaultValue == outerEnumDefaultValue && + other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; @override int get hashCode => @@ -75,13 +75,13 @@ class EnumTest { (enumStringRequired.hashCode) + (enumInteger == null ? 0 : enumInteger!.hashCode) + (enumNumber == null ? 0 : enumNumber!.hashCode) + - (outerenum == null ? 0 : outerenum!.hashCode) + - (outerenuminteger == null ? 0 : outerenuminteger!.hashCode) + - (outerenumdefaultvalue == null ? 0 : outerenumdefaultvalue!.hashCode) + - (outerenumintegerdefaultvalue == null ? 0 : outerenumintegerdefaultvalue!.hashCode); + (outerEnum == null ? 0 : outerEnum!.hashCode) + + (outerEnumInteger == null ? 0 : outerEnumInteger!.hashCode) + + (outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue!.hashCode) + + (outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue!.hashCode); @override - String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerenum=$outerenum, outerenuminteger=$outerenuminteger, outerenumdefaultvalue=$outerenumdefaultvalue, outerenumintegerdefaultvalue=$outerenumintegerdefaultvalue]'; + String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerEnum=$outerEnum, outerEnumInteger=$outerEnumInteger, outerEnumDefaultValue=$outerEnumDefaultValue, outerEnumIntegerDefaultValue=$outerEnumIntegerDefaultValue]'; Map toJson() { final json = {}; @@ -101,23 +101,23 @@ class EnumTest { } else { json[r'enum_number'] = null; } - if (this.outerenum != null) { - json[r'outerEnum'] = this.outerenum; + if (this.outerEnum != null) { + json[r'outerEnum'] = this.outerEnum; } else { json[r'outerEnum'] = null; } - if (this.outerenuminteger != null) { - json[r'outerEnumInteger'] = this.outerenuminteger; + if (this.outerEnumInteger != null) { + json[r'outerEnumInteger'] = this.outerEnumInteger; } else { json[r'outerEnumInteger'] = null; } - if (this.outerenumdefaultvalue != null) { - json[r'outerEnumDefaultValue'] = this.outerenumdefaultvalue; + if (this.outerEnumDefaultValue != null) { + json[r'outerEnumDefaultValue'] = this.outerEnumDefaultValue; } else { json[r'outerEnumDefaultValue'] = null; } - if (this.outerenumintegerdefaultvalue != null) { - json[r'outerEnumIntegerDefaultValue'] = this.outerenumintegerdefaultvalue; + if (this.outerEnumIntegerDefaultValue != null) { + json[r'outerEnumIntegerDefaultValue'] = this.outerEnumIntegerDefaultValue; } else { json[r'outerEnumIntegerDefaultValue'] = null; } @@ -147,10 +147,10 @@ class EnumTest { enumStringRequired: EnumTestEnumStringRequiredEnum.fromJson(json[r'enum_string_required'])!, enumInteger: EnumTestEnumIntegerEnum.fromJson(json[r'enum_integer']), enumNumber: EnumTestEnumNumberEnum.fromJson(json[r'enum_number']), - outerenum: OuterEnum.fromJson(json[r'outerEnum']), - outerenuminteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), - outerenumdefaultvalue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), - outerenumintegerdefaultvalue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), + outerEnum: OuterEnum.fromJson(json[r'outerEnum']), + outerEnumInteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), + outerEnumDefaultValue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), + outerEnumIntegerDefaultValue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), ); } return null; @@ -215,13 +215,13 @@ class EnumTestEnumStringEnum { String toJson() => value; - static const upper = EnumTestEnumStringEnum._(r'UPPER'); + static const UPPER = EnumTestEnumStringEnum._(r'UPPER'); static const lower = EnumTestEnumStringEnum._(r'lower'); static const empty = EnumTestEnumStringEnum._(r''); /// List of all possible values in this [enum][EnumTestEnumStringEnum]. static const values = [ - upper, + UPPER, lower, empty, ]; @@ -262,7 +262,7 @@ class EnumTestEnumStringEnumTypeTransformer { EnumTestEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'UPPER': return EnumTestEnumStringEnum.upper; + case r'UPPER': return EnumTestEnumStringEnum.UPPER; case r'lower': return EnumTestEnumStringEnum.lower; case r'': return EnumTestEnumStringEnum.empty; default: @@ -292,13 +292,13 @@ class EnumTestEnumStringRequiredEnum { String toJson() => value; - static const upper = EnumTestEnumStringRequiredEnum._(r'UPPER'); + static const UPPER = EnumTestEnumStringRequiredEnum._(r'UPPER'); static const lower = EnumTestEnumStringRequiredEnum._(r'lower'); static const empty = EnumTestEnumStringRequiredEnum._(r''); /// List of all possible values in this [enum][EnumTestEnumStringRequiredEnum]. static const values = [ - upper, + UPPER, lower, empty, ]; @@ -339,7 +339,7 @@ class EnumTestEnumStringRequiredEnumTypeTransformer { EnumTestEnumStringRequiredEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'UPPER': return EnumTestEnumStringRequiredEnum.upper; + case r'UPPER': return EnumTestEnumStringRequiredEnum.UPPER; case r'lower': return EnumTestEnumStringRequiredEnum.lower; case r'': return EnumTestEnumStringRequiredEnum.empty; default: @@ -443,13 +443,13 @@ class EnumTestEnumNumberEnum { double toJson() => value; - static const number1period1 = EnumTestEnumNumberEnum._('1.1'); - static const numberNegative1period2 = EnumTestEnumNumberEnum._('-1.2'); + static const number1Period1 = EnumTestEnumNumberEnum._('1.1'); + static const numberNegative1Period2 = EnumTestEnumNumberEnum._('-1.2'); /// List of all possible values in this [enum][EnumTestEnumNumberEnum]. static const values = [ - number1period1, - numberNegative1period2, + number1Period1, + numberNegative1Period2, ]; static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value); @@ -488,8 +488,8 @@ class EnumTestEnumNumberEnumTypeTransformer { EnumTestEnumNumberEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case '1.1': return EnumTestEnumNumberEnum.number1period1; - case '-1.2': return EnumTestEnumNumberEnum.numberNegative1period2; + case '1.1': return EnumTestEnumNumberEnum.number1Period1; + case '-1.2': return EnumTestEnumNumberEnum.numberNegative1Period2; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart index 249f9c2401d7..55de1b12e981 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/fake_big_decimal_map200_response.dart @@ -13,8 +13,8 @@ part of openapi.api; class FakeBigDecimalMap200Response { /// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someid, - this.somemap = const {}, + this.someId, + this.someMap = const {}, }); /// @@ -23,32 +23,32 @@ class FakeBigDecimalMap200Response { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - num? someid; + num? someId; - Map somemap; + Map someMap; @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someid == someid && - _deepEquality.equals(other.somemap, somemap); + other.someId == someId && + _deepEquality.equals(other.someMap, someMap); @override int get hashCode => // ignore: unnecessary_parenthesis - (someid == null ? 0 : someid!.hashCode) + - (somemap.hashCode); + (someId == null ? 0 : someId!.hashCode) + + (someMap.hashCode); @override - String toString() => 'FakeBigDecimalMap200Response[someid=$someid, somemap=$somemap]'; + String toString() => 'FakeBigDecimalMap200Response[someId=$someId, someMap=$someMap]'; Map toJson() { final json = {}; - if (this.someid != null) { - json[r'someId'] = this.someid; + if (this.someId != null) { + json[r'someId'] = this.someId; } else { json[r'someId'] = null; } - json[r'someMap'] = this.somemap; + json[r'someMap'] = this.someMap; return json; } @@ -71,8 +71,8 @@ class FakeBigDecimalMap200Response { }()); return FakeBigDecimalMap200Response( - someid: num.parse('${json[r'someId']}'), - somemap: mapCastOfType(json, r'someMap') ?? const {}, + someId: num.parse('${json[r'someId']}'), + someMap: mapCastOfType(json, r'someMap') ?? const {}, ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart index 957a6b7c0415..b0edc2e38e14 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/format_test.dart @@ -24,7 +24,7 @@ class FormatTest { required this.byte, this.binary, required this.date, - this.datetime, + this.dateTime, this.uuid, required this.password, this.patternWithDigits, @@ -117,7 +117,7 @@ class FormatTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? datetime; + DateTime? dateTime; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -160,7 +160,7 @@ class FormatTest { other.byte == byte && other.binary == binary && other.date == date && - other.datetime == datetime && + other.dateTime == dateTime && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -180,14 +180,14 @@ class FormatTest { (byte.hashCode) + (binary == null ? 0 : binary!.hashCode) + (date.hashCode) + - (datetime == null ? 0 : datetime!.hashCode) + + (dateTime == null ? 0 : dateTime!.hashCode) + (uuid == null ? 0 : uuid!.hashCode) + (password.hashCode) + (patternWithDigits == null ? 0 : patternWithDigits!.hashCode) + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter!.hashCode); @override - String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, datetime=$datetime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; + String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; Map toJson() { final json = {}; @@ -234,8 +234,8 @@ class FormatTest { json[r'binary'] = null; } json[r'date'] = _dateFormatter.format(this.date.toUtc()); - if (this.datetime != null) { - json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); + if (this.dateTime != null) { + json[r'dateTime'] = this.dateTime!.toUtc().toIso8601String(); } else { json[r'dateTime'] = null; } @@ -288,7 +288,7 @@ class FormatTest { byte: mapValueOfType(json, r'byte')!, binary: null, // No support for decoding binary content from JSON date: mapDateTime(json, r'date', r'')!, - datetime: mapDateTime(json, r'dateTime', r''), + dateTime: mapDateTime(json, r'dateTime', r''), uuid: mapValueOfType(json, r'uuid'), password: mapValueOfType(json, r'password')!, patternWithDigits: mapValueOfType(json, r'pattern_with_digits'), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart index bf69f5c13600..b3a3f7cb8e0f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/health_check_result.dart @@ -13,27 +13,27 @@ part of openapi.api; class HealthCheckResult { /// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullablemessage, + this.nullableMessage, }); - String? nullablemessage; + String? nullableMessage; @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullablemessage == nullablemessage; + other.nullableMessage == nullableMessage; @override int get hashCode => // ignore: unnecessary_parenthesis - (nullablemessage == null ? 0 : nullablemessage!.hashCode); + (nullableMessage == null ? 0 : nullableMessage!.hashCode); @override - String toString() => 'HealthCheckResult[nullablemessage=$nullablemessage]'; + String toString() => 'HealthCheckResult[nullableMessage=$nullableMessage]'; Map toJson() { final json = {}; - if (this.nullablemessage != null) { - json[r'NullableMessage'] = this.nullablemessage; + if (this.nullableMessage != null) { + json[r'NullableMessage'] = this.nullableMessage; } else { json[r'NullableMessage'] = null; } @@ -59,7 +59,7 @@ class HealthCheckResult { }()); return HealthCheckResult( - nullablemessage: mapValueOfType(json, r'NullableMessage'), + nullableMessage: mapValueOfType(json, r'NullableMessage'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart index a0a7241e6889..e55aa93d9056 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/map_test.dart @@ -140,12 +140,12 @@ class MapTestMapOfEnumStringEnum { String toJson() => value; - static const upper = MapTestMapOfEnumStringEnum._(r'UPPER'); + static const UPPER = MapTestMapOfEnumStringEnum._(r'UPPER'); static const lower = MapTestMapOfEnumStringEnum._(r'lower'); /// List of all possible values in this [enum][MapTestMapOfEnumStringEnum]. static const values = [ - upper, + UPPER, lower, ]; @@ -185,7 +185,7 @@ class MapTestMapOfEnumStringEnumTypeTransformer { MapTestMapOfEnumStringEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'UPPER': return MapTestMapOfEnumStringEnum.upper; + case r'UPPER': return MapTestMapOfEnumStringEnum.UPPER; case r'lower': return MapTestMapOfEnumStringEnum.lower; default: if (!allowNull) { diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart index 7a5b5ad0b058..edc224b79248 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/mixed_properties_and_additional_properties_class.dart @@ -14,7 +14,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. MixedPropertiesAndAdditionalPropertiesClass({ this.uuid, - this.datetime, + this.dateTime, this.map = const {}, }); @@ -32,25 +32,25 @@ class MixedPropertiesAndAdditionalPropertiesClass { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? datetime; + DateTime? dateTime; Map map; @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && other.uuid == uuid && - other.datetime == datetime && + other.dateTime == dateTime && _deepEquality.equals(other.map, map); @override int get hashCode => // ignore: unnecessary_parenthesis (uuid == null ? 0 : uuid!.hashCode) + - (datetime == null ? 0 : datetime!.hashCode) + + (dateTime == null ? 0 : dateTime!.hashCode) + (map.hashCode); @override - String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, datetime=$datetime, map=$map]'; + String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, dateTime=$dateTime, map=$map]'; Map toJson() { final json = {}; @@ -59,8 +59,8 @@ class MixedPropertiesAndAdditionalPropertiesClass { } else { json[r'uuid'] = null; } - if (this.datetime != null) { - json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); + if (this.dateTime != null) { + json[r'dateTime'] = this.dateTime!.toUtc().toIso8601String(); } else { json[r'dateTime'] = null; } @@ -88,7 +88,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { return MixedPropertiesAndAdditionalPropertiesClass( uuid: mapValueOfType(json, r'uuid'), - datetime: mapDateTime(json, r'dateTime', r''), + dateTime: mapDateTime(json, r'dateTime', r''), map: Animal.mapFromJson(json[r'map']), ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart index c93f3d57f55d..5183e0f98e49 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/model_file.dart @@ -13,7 +13,7 @@ part of openapi.api; class ModelFile { /// Returns a new [ModelFile] instance. ModelFile({ - this.sourceuri, + this.sourceURI, }); /// Test capitalization @@ -23,24 +23,24 @@ class ModelFile { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? sourceuri; + String? sourceURI; @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceuri == sourceuri; + other.sourceURI == sourceURI; @override int get hashCode => // ignore: unnecessary_parenthesis - (sourceuri == null ? 0 : sourceuri!.hashCode); + (sourceURI == null ? 0 : sourceURI!.hashCode); @override - String toString() => 'ModelFile[sourceuri=$sourceuri]'; + String toString() => 'ModelFile[sourceURI=$sourceURI]'; Map toJson() { final json = {}; - if (this.sourceuri != null) { - json[r'sourceURI'] = this.sourceuri; + if (this.sourceURI != null) { + json[r'sourceURI'] = this.sourceURI; } else { json[r'sourceURI'] = null; } @@ -66,7 +66,7 @@ class ModelFile { }()); return ModelFile( - sourceuri: mapValueOfType(json, r'sourceURI'), + sourceURI: mapValueOfType(json, r'sourceURI'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart index c3942c6fdc82..a27a5682533e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/number_only.dart @@ -13,7 +13,7 @@ part of openapi.api; class NumberOnly { /// Returns a new [NumberOnly] instance. NumberOnly({ - this.justnumber, + this.justNumber, }); /// @@ -22,24 +22,24 @@ class NumberOnly { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - num? justnumber; + num? justNumber; @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justnumber == justnumber; + other.justNumber == justNumber; @override int get hashCode => // ignore: unnecessary_parenthesis - (justnumber == null ? 0 : justnumber!.hashCode); + (justNumber == null ? 0 : justNumber!.hashCode); @override - String toString() => 'NumberOnly[justnumber=$justnumber]'; + String toString() => 'NumberOnly[justNumber=$justNumber]'; Map toJson() { final json = {}; - if (this.justnumber != null) { - json[r'JustNumber'] = this.justnumber; + if (this.justNumber != null) { + json[r'JustNumber'] = this.justNumber; } else { json[r'JustNumber'] = null; } @@ -65,7 +65,7 @@ class NumberOnly { }()); return NumberOnly( - justnumber: num.parse('${json[r'JustNumber']}'), + justNumber: num.parse('${json[r'JustNumber']}'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart index 7e2c588d7fec..5c7386821aa3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/object_with_deprecated_fields.dart @@ -15,7 +15,7 @@ class ObjectWithDeprecatedFields { ObjectWithDeprecatedFields({ this.uuid, this.id, - this.deprecatedref, + this.deprecatedRef, this.bars = const [], }); @@ -41,7 +41,7 @@ class ObjectWithDeprecatedFields { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DeprecatedObject? deprecatedref; + DeprecatedObject? deprecatedRef; List bars; @@ -49,7 +49,7 @@ class ObjectWithDeprecatedFields { bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && other.uuid == uuid && other.id == id && - other.deprecatedref == deprecatedref && + other.deprecatedRef == deprecatedRef && _deepEquality.equals(other.bars, bars); @override @@ -57,11 +57,11 @@ class ObjectWithDeprecatedFields { // ignore: unnecessary_parenthesis (uuid == null ? 0 : uuid!.hashCode) + (id == null ? 0 : id!.hashCode) + - (deprecatedref == null ? 0 : deprecatedref!.hashCode) + + (deprecatedRef == null ? 0 : deprecatedRef!.hashCode) + (bars.hashCode); @override - String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedref=$deprecatedref, bars=$bars]'; + String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedRef=$deprecatedRef, bars=$bars]'; Map toJson() { final json = {}; @@ -75,8 +75,8 @@ class ObjectWithDeprecatedFields { } else { json[r'id'] = null; } - if (this.deprecatedref != null) { - json[r'deprecatedRef'] = this.deprecatedref; + if (this.deprecatedRef != null) { + json[r'deprecatedRef'] = this.deprecatedRef; } else { json[r'deprecatedRef'] = null; } @@ -105,7 +105,7 @@ class ObjectWithDeprecatedFields { return ObjectWithDeprecatedFields( uuid: mapValueOfType(json, r'uuid'), id: num.parse('${json[r'id']}'), - deprecatedref: DeprecatedObject.fromJson(json[r'deprecatedRef']), + deprecatedRef: DeprecatedObject.fromJson(json[r'deprecatedRef']), bars: json[r'bars'] is Iterable ? (json[r'bars'] as Iterable).cast().toList(growable: false) : const [], diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart index d9c4cc9887a0..bc591de9fab9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/order.dart @@ -14,9 +14,9 @@ class Order { /// Returns a new [Order] instance. Order({ this.id, - this.petid, + this.petId, this.quantity, - this.shipdate, + this.shipDate, this.status, this.complete = false, }); @@ -35,7 +35,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? petid; + int? petId; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -51,7 +51,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? shipdate; + DateTime? shipDate; /// Order Status OrderStatusEnum? status; @@ -61,9 +61,9 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petid == petid && + other.petId == petId && other.quantity == quantity && - other.shipdate == shipdate && + other.shipDate == shipDate && other.status == status && other.complete == complete; @@ -71,14 +71,14 @@ class Order { int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + - (petid == null ? 0 : petid!.hashCode) + + (petId == null ? 0 : petId!.hashCode) + (quantity == null ? 0 : quantity!.hashCode) + - (shipdate == null ? 0 : shipdate!.hashCode) + + (shipDate == null ? 0 : shipDate!.hashCode) + (status == null ? 0 : status!.hashCode) + (complete.hashCode); @override - String toString() => 'Order[id=$id, petid=$petid, quantity=$quantity, shipdate=$shipdate, status=$status, complete=$complete]'; + String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; Map toJson() { final json = {}; @@ -87,8 +87,8 @@ class Order { } else { json[r'id'] = null; } - if (this.petid != null) { - json[r'petId'] = this.petid; + if (this.petId != null) { + json[r'petId'] = this.petId; } else { json[r'petId'] = null; } @@ -97,8 +97,8 @@ class Order { } else { json[r'quantity'] = null; } - if (this.shipdate != null) { - json[r'shipDate'] = this.shipdate!.toUtc().toIso8601String(); + if (this.shipDate != null) { + json[r'shipDate'] = this.shipDate!.toUtc().toIso8601String(); } else { json[r'shipDate'] = null; } @@ -131,9 +131,9 @@ class Order { return Order( id: mapValueOfType(json, r'id'), - petid: mapValueOfType(json, r'petId'), + petId: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), - shipdate: mapDateTime(json, r'shipDate', r''), + shipDate: mapDateTime(json, r'shipDate', r''), status: OrderStatusEnum.fromJson(json[r'status']), complete: mapValueOfType(json, r'complete') ?? false, ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart index 5fc3c16cd56d..219967ad59fa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/parent_with_nullable.dart @@ -14,26 +14,26 @@ class ParentWithNullable { /// Returns a new [ParentWithNullable] instance. ParentWithNullable({ this.type, - this.nullableproperty, + this.nullableProperty, }); ParentWithNullableTypeEnum? type; - String? nullableproperty; + String? nullableProperty; @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && other.type == type && - other.nullableproperty == nullableproperty; + other.nullableProperty == nullableProperty; @override int get hashCode => // ignore: unnecessary_parenthesis (type == null ? 0 : type!.hashCode) + - (nullableproperty == null ? 0 : nullableproperty!.hashCode); + (nullableProperty == null ? 0 : nullableProperty!.hashCode); @override - String toString() => 'ParentWithNullable[type=$type, nullableproperty=$nullableproperty]'; + String toString() => 'ParentWithNullable[type=$type, nullableProperty=$nullableProperty]'; Map toJson() { final json = {}; @@ -42,8 +42,8 @@ class ParentWithNullable { } else { json[r'type'] = null; } - if (this.nullableproperty != null) { - json[r'nullableProperty'] = this.nullableproperty; + if (this.nullableProperty != null) { + json[r'nullableProperty'] = this.nullableProperty; } else { json[r'nullableProperty'] = null; } @@ -70,7 +70,7 @@ class ParentWithNullable { return ParentWithNullable( type: ParentWithNullableTypeEnum.fromJson(json[r'type']), - nullableproperty: mapValueOfType(json, r'nullableProperty'), + nullableProperty: mapValueOfType(json, r'nullableProperty'), ); } return null; @@ -134,11 +134,11 @@ class ParentWithNullableTypeEnum { String toJson() => value; - static const childwithnullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); + static const childWithNullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); /// List of all possible values in this [enum][ParentWithNullableTypeEnum]. static const values = [ - childwithnullable, + childWithNullable, ]; static ParentWithNullableTypeEnum? fromJson(dynamic value) => ParentWithNullableTypeEnumTypeTransformer().decode(value); @@ -177,7 +177,7 @@ class ParentWithNullableTypeEnumTypeTransformer { ParentWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'ChildWithNullable': return ParentWithNullableTypeEnum.childwithnullable; + case r'ChildWithNullable': return ParentWithNullableTypeEnum.childWithNullable; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart index 6d44804b9a63..806f91e41ace 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/pet.dart @@ -16,7 +16,7 @@ class Pet { this.id, this.category, required this.name, - this.photourls = const {}, + this.photoUrls = const {}, this.tags = const [], this.status, }); @@ -39,7 +39,7 @@ class Pet { String name; - Set photourls; + Set photoUrls; List tags; @@ -51,7 +51,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - _deepEquality.equals(other.photourls, photourls) && + _deepEquality.equals(other.photoUrls, photoUrls) && _deepEquality.equals(other.tags, tags) && other.status == status; @@ -61,12 +61,12 @@ class Pet { (id == null ? 0 : id!.hashCode) + (category == null ? 0 : category!.hashCode) + (name.hashCode) + - (photourls.hashCode) + + (photoUrls.hashCode) + (tags.hashCode) + (status == null ? 0 : status!.hashCode); @override - String toString() => 'Pet[id=$id, category=$category, name=$name, photourls=$photourls, tags=$tags, status=$status]'; + String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; Map toJson() { final json = {}; @@ -81,7 +81,7 @@ class Pet { json[r'category'] = null; } json[r'name'] = this.name; - json[r'photoUrls'] = this.photourls.toList(growable: false); + json[r'photoUrls'] = this.photoUrls.toList(growable: false); json[r'tags'] = this.tags; if (this.status != null) { json[r'status'] = this.status; @@ -113,7 +113,7 @@ class Pet { id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), name: mapValueOfType(json, r'name')!, - photourls: json[r'photoUrls'] is Iterable + photoUrls: json[r'photoUrls'] is Iterable ? (json[r'photoUrls'] as Iterable).cast().toSet() : const {}, tags: Tag.listFromJson(json[r'tags']), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart index ac2f099a4df4..aeb25a138f07 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/special_model_name.dart @@ -13,7 +13,7 @@ part of openapi.api; class SpecialModelName { /// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, + this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, }); /// @@ -22,24 +22,24 @@ class SpecialModelName { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override int get hashCode => // ignore: unnecessary_parenthesis - (dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == null ? 0 : dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket!.hashCode); + (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket!.hashCode); @override - String toString() => 'SpecialModelName[dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket=$dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket]'; + String toString() => 'SpecialModelName[dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket=$dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket]'; Map toJson() { final json = {}; - if (this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket != null) { - json[r'$special[property.name]'] = this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + if (this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { + json[r'$special[property.name]'] = this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; } else { json[r'$special[property.name]'] = null; } @@ -65,7 +65,7 @@ class SpecialModelName { }()); return SpecialModelName( - dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket: mapValueOfType(json, r'$special[property.name]'), + dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: mapValueOfType(json, r'$special[property.name]'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart index fd81a25bd83d..8e2316a619dc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/test_inline_freeform_additional_properties_request.dart @@ -13,7 +13,7 @@ part of openapi.api; class TestInlineFreeformAdditionalPropertiesRequest { /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someproperty, + this.someProperty, }); /// @@ -22,24 +22,24 @@ class TestInlineFreeformAdditionalPropertiesRequest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? someproperty; + String? someProperty; @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && - other.someproperty == someproperty; + other.someProperty == someProperty; @override int get hashCode => // ignore: unnecessary_parenthesis - (someproperty == null ? 0 : someproperty!.hashCode); + (someProperty == null ? 0 : someProperty!.hashCode); @override - String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someproperty=$someproperty]'; + String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someProperty=$someProperty]'; Map toJson() { final json = {}; - if (this.someproperty != null) { - json[r'someProperty'] = this.someproperty; + if (this.someProperty != null) { + json[r'someProperty'] = this.someProperty; } else { json[r'someProperty'] = null; } @@ -65,7 +65,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { }()); return TestInlineFreeformAdditionalPropertiesRequest( - someproperty: mapValueOfType(json, r'someProperty'), + someProperty: mapValueOfType(json, r'someProperty'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart index b6be541d49f9..395f9e38e043 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/lib/model/user.dart @@ -15,12 +15,12 @@ class User { User({ this.id, this.username, - this.firstname, - this.lastname, + this.firstName, + this.lastName, this.email, this.password, this.phone, - this.userstatus, + this.userStatus, }); /// @@ -45,7 +45,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? firstname; + String? firstName; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -53,7 +53,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? lastname; + String? lastName; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -86,33 +86,33 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? userstatus; + int? userStatus; @override bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstname == firstname && - other.lastname == lastname && + other.firstName == firstName && + other.lastName == lastName && other.email == email && other.password == password && other.phone == phone && - other.userstatus == userstatus; + other.userStatus == userStatus; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (username == null ? 0 : username!.hashCode) + - (firstname == null ? 0 : firstname!.hashCode) + - (lastname == null ? 0 : lastname!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + (email == null ? 0 : email!.hashCode) + (password == null ? 0 : password!.hashCode) + (phone == null ? 0 : phone!.hashCode) + - (userstatus == null ? 0 : userstatus!.hashCode); + (userStatus == null ? 0 : userStatus!.hashCode); @override - String toString() => 'User[id=$id, username=$username, firstname=$firstname, lastname=$lastname, email=$email, password=$password, phone=$phone, userstatus=$userstatus]'; + String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; Map toJson() { final json = {}; @@ -126,13 +126,13 @@ class User { } else { json[r'username'] = null; } - if (this.firstname != null) { - json[r'firstName'] = this.firstname; + if (this.firstName != null) { + json[r'firstName'] = this.firstName; } else { json[r'firstName'] = null; } - if (this.lastname != null) { - json[r'lastName'] = this.lastname; + if (this.lastName != null) { + json[r'lastName'] = this.lastName; } else { json[r'lastName'] = null; } @@ -151,8 +151,8 @@ class User { } else { json[r'phone'] = null; } - if (this.userstatus != null) { - json[r'userStatus'] = this.userstatus; + if (this.userStatus != null) { + json[r'userStatus'] = this.userStatus; } else { json[r'userStatus'] = null; } @@ -180,12 +180,12 @@ class User { return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), - firstname: mapValueOfType(json, r'firstName'), - lastname: mapValueOfType(json, r'lastName'), + firstName: mapValueOfType(json, r'firstName'), + lastName: mapValueOfType(json, r'lastName'), email: mapValueOfType(json, r'email'), password: mapValueOfType(json, r'password'), phone: mapValueOfType(json, r'phone'), - userstatus: mapValueOfType(json, r'userStatus'), + userStatus: mapValueOfType(json, r'userStatus'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES index a5409bf46a4a..fbfe8cdd1809 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md analysis_options.yaml @@ -128,60 +127,3 @@ lib/model/tag.dart lib/model/test_inline_freeform_additional_properties_request.dart lib/model/user.dart pubspec.yaml -test/additional_properties_class_test.dart -test/all_of_with_single_ref_test.dart -test/animal_test.dart -test/another_fake_api_test.dart -test/api_response_test.dart -test/array_of_array_of_number_only_test.dart -test/array_of_number_only_test.dart -test/array_test_test.dart -test/capitalization_test.dart -test/cat_test.dart -test/category_test.dart -test/child_with_nullable_test.dart -test/class_model_test.dart -test/default_api_test.dart -test/deprecated_object_test.dart -test/dog_test.dart -test/enum_arrays_test.dart -test/enum_class_test.dart -test/enum_test_test.dart -test/fake_api_test.dart -test/fake_big_decimal_map200_response_test.dart -test/fake_classname_tags123_api_test.dart -test/file_schema_test_class_test.dart -test/foo_get_default_response_test.dart -test/foo_test.dart -test/format_test_test.dart -test/has_only_read_only_test.dart -test/health_check_result_test.dart -test/map_test_test.dart -test/mixed_properties_and_additional_properties_class_test.dart -test/model200_response_test.dart -test/model_client_test.dart -test/model_file_test.dart -test/model_list_test.dart -test/model_return_test.dart -test/name_test.dart -test/nullable_class_test.dart -test/number_only_test.dart -test/object_with_deprecated_fields_test.dart -test/order_test.dart -test/outer_composite_test.dart -test/outer_enum_default_value_test.dart -test/outer_enum_integer_default_value_test.dart -test/outer_enum_integer_test.dart -test/outer_enum_test.dart -test/outer_object_with_enum_property_test.dart -test/parent_with_nullable_test.dart -test/pet_api_test.dart -test/pet_test.dart -test/read_only_first_test.dart -test/single_ref_type_test.dart -test/special_model_name_test.dart -test/store_api_test.dart -test/tag_test.dart -test/test_inline_freeform_additional_properties_request_test.dart -test/user_api_test.dart -test/user_test.dart diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md index 85818103b4d9..5a8c345c8de3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/README.md @@ -42,10 +42,10 @@ import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.call123testSpecialTags(modelclient); + final result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md index 151142162f62..4c6f3ab2fe11 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AllOfWithSingleRef.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **username** | **String** | | [optional] -**singlereftype** | [**SingleRefType**](SingleRefType.md) | | [optional] +**singleRefType** | [**SingleRefType**](SingleRefType.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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md index 570de2e45be3..415b56e9bc2e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Animal.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md index c2ae77848227..241c82e575d4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/AnotherFakeApi.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **call123testSpecialTags** -> ModelClient call123testSpecialTags(modelclient) +> ModelClient call123testSpecialTags(modelClient) To test special tags @@ -24,10 +24,10 @@ To test special tags and operation ID starting with number import 'package:openapi/api.dart'; final api_instance = AnotherFakeApi(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.call123testSpecialTags(modelclient); + final result = api_instance.call123testSpecialTags(modelClient); print(result); } catch (e) { print('Exception when calling AnotherFakeApi->call123testSpecialTags: $e\n'); @@ -38,7 +38,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md index 84f21164e7b4..0a0dc2a7b752 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arrayarraynumber** | [**List>**](List.md) | | [optional] [default to const []] +**arrayArrayNumber** | [**List>**](List.md) | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md index fa8e9caffce8..01b6f58870ff 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ArrayOfNumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**arraynumber** | **List** | | [optional] [default to const []] +**arrayNumber** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md index e673e7baef4b..4a07b4eb820d 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Capitalization.md @@ -8,12 +8,12 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**smallcamel** | **String** | | [optional] -**capitalcamel** | **String** | | [optional] +**smallCamel** | **String** | | [optional] +**capitalCamel** | **String** | | [optional] **smallSnake** | **String** | | [optional] **capitalSnake** | **String** | | [optional] -**scaEthFlowPoints** | **String** | | [optional] -**attName** | **String** | Name of the pet | [optional] +**sCAETHFlowPoints** | **String** | | [optional] +**ATT_NAME** | **String** | Name of the pet | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md index 9c557ac9082a..6552eea4b435 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Cat.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **declawed** | **bool** | | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md index 54b310b0f58d..770494fcf4cc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ChildWithNullable.md @@ -9,8 +9,8 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] -**otherproperty** | **String** | | [optional] +**nullableProperty** | **String** | | [optional] +**otherProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md index b2ba3dfcef59..d36439b767bb 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Dog.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**classname** | **String** | | +**className** | **String** | | **color** | **String** | | [optional] [default to 'red'] **breed** | **String** | | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md index f1b0758b868e..7c24fe2347b4 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/EnumTest.md @@ -12,10 +12,10 @@ Name | Type | Description | Notes **enumStringRequired** | **String** | | **enumInteger** | **int** | | [optional] **enumNumber** | **double** | | [optional] -**outerenum** | [**OuterEnum**](OuterEnum.md) | | [optional] -**outerenuminteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] -**outerenumdefaultvalue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] -**outerenumintegerdefaultvalue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional] +**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] +**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional] +**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional] +**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md index cf92b84aa2cf..e5c71555c9a8 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeApi.md @@ -197,7 +197,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakeOuterCompositeSerialize** -> OuterComposite fakeOuterCompositeSerialize(outercomposite) +> OuterComposite fakeOuterCompositeSerialize(outerComposite) @@ -208,10 +208,10 @@ Test serialization of object with outer number type import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final outercomposite = OuterComposite(); // OuterComposite | Input composite as post body +final outerComposite = OuterComposite(); // OuterComposite | Input composite as post body try { - final result = api_instance.fakeOuterCompositeSerialize(outercomposite); + final result = api_instance.fakeOuterCompositeSerialize(outerComposite); print(result); } catch (e) { print('Exception when calling FakeApi->fakeOuterCompositeSerialize: $e\n'); @@ -222,7 +222,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outercomposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] + **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] ### Return type @@ -326,7 +326,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **fakePropertyEnumIntegerSerialize** -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty) +> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) @@ -337,10 +337,10 @@ Test serialization of enum (int) properties with examples import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final outerobjectwithenumproperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body +final outerObjectWithEnumProperty = OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body try { - final result = api_instance.fakePropertyEnumIntegerSerialize(outerobjectwithenumproperty); + final result = api_instance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); print(result); } catch (e) { print('Exception when calling FakeApi->fakePropertyEnumIntegerSerialize: $e\n'); @@ -351,7 +351,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **outerobjectwithenumproperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | + **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | ### Return type @@ -453,7 +453,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testBodyWithFileSchema** -> testBodyWithFileSchema(fileschematestclass) +> testBodyWithFileSchema(fileSchemaTestClass) @@ -464,10 +464,10 @@ For this test, the body for this request must reference a schema named `File`. import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final fileschematestclass = FileSchemaTestClass(); // FileSchemaTestClass | +final fileSchemaTestClass = FileSchemaTestClass(); // FileSchemaTestClass | try { - api_instance.testBodyWithFileSchema(fileschematestclass); + api_instance.testBodyWithFileSchema(fileSchemaTestClass); } catch (e) { print('Exception when calling FakeApi->testBodyWithFileSchema: $e\n'); } @@ -477,7 +477,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **fileschematestclass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | + **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | ### Return type @@ -537,7 +537,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testClientModel** -> ModelClient testClientModel(modelclient) +> ModelClient testClientModel(modelClient) To test \"client\" model @@ -548,10 +548,10 @@ To test \"client\" model import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.testClientModel(modelclient); + final result = api_instance.testClientModel(modelClient); print(result); } catch (e) { print('Exception when calling FakeApi->testClientModel: $e\n'); @@ -562,7 +562,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type @@ -580,7 +580,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testEndpointParameters** -> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback) +> testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback) Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 @@ -605,12 +605,12 @@ final float = 3.4; // double | None final string = string_example; // String | None final binary = BINARY_DATA_HERE; // MultipartFile | None final date = 2013-10-20; // DateTime | None -final datetime = 2013-10-20T19:20:30+01:00; // DateTime | None +final dateTime = 2013-10-20T19:20:30+01:00; // DateTime | None final password = password_example; // String | None final callback = callback_example; // String | None try { - api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, datetime, password, callback); + api_instance.testEndpointParameters(number, double_, patternWithoutDelimiter, byte, integer, int32, int64, float, string, binary, date, dateTime, password, callback); } catch (e) { print('Exception when calling FakeApi->testEndpointParameters: $e\n'); } @@ -631,7 +631,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **MultipartFile**| None | [optional] **date** | **DateTime**| None | [optional] - **datetime** | **DateTime**| None | [optional] + **dateTime** | **DateTime**| None | [optional] **password** | **String**| None | [optional] **callback** | **String**| None | [optional] @@ -809,7 +809,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testInlineFreeformAdditionalProperties** -> testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest) +> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) test inline free-form additionalProperties @@ -820,10 +820,10 @@ test inline free-form additionalProperties import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final testinlinefreeformadditionalpropertiesrequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body +final testInlineFreeformAdditionalPropertiesRequest = TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body try { - api_instance.testInlineFreeformAdditionalProperties(testinlinefreeformadditionalpropertiesrequest); + api_instance.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); } catch (e) { print('Exception when calling FakeApi->testInlineFreeformAdditionalProperties: $e\n'); } @@ -833,7 +833,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **testinlinefreeformadditionalpropertiesrequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | + **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | ### Return type @@ -895,7 +895,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testNullable** -> testNullable(childwithnullable) +> testNullable(childWithNullable) test nullable parent property @@ -906,10 +906,10 @@ test nullable parent property import 'package:openapi/api.dart'; final api_instance = FakeApi(); -final childwithnullable = ChildWithNullable(); // ChildWithNullable | request body +final childWithNullable = ChildWithNullable(); // ChildWithNullable | request body try { - api_instance.testNullable(childwithnullable); + api_instance.testNullable(childWithNullable); } catch (e) { print('Exception when calling FakeApi->testNullable: $e\n'); } @@ -919,7 +919,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **childwithnullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | + **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | ### Return type @@ -937,7 +937,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **testQueryParameterCollectionFormat** -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language) +> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) @@ -953,11 +953,11 @@ final ioutil = []; // List | final http = []; // List | final url = []; // List | final context = []; // List | -final allowempty = allowempty_example; // String | +final allowEmpty = allowEmpty_example; // String | final language = ; // Map | try { - api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowempty, language); + api_instance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); } catch (e) { print('Exception when calling FakeApi->testQueryParameterCollectionFormat: $e\n'); } @@ -972,7 +972,7 @@ Name | Type | Description | Notes **http** | [**List**](String.md)| | [default to const []] **url** | [**List**](String.md)| | [default to const []] **context** | [**List**](String.md)| | [default to const []] - **allowempty** | **String**| | + **allowEmpty** | **String**| | **language** | [**Map**](String.md)| | [optional] [default to const {}] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md index f3c0d00337e9..21ccf6ec012f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeBigDecimalMap200Response.md @@ -8,8 +8,8 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someid** | **num** | | [optional] -**somemap** | **Map** | | [optional] [default to const {}] +**someId** | **num** | | [optional] +**someMap** | **Map** | | [optional] [default to const {}] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md index be7a69c1b967..5518c67403ff 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FakeClassnameTags123Api.md @@ -13,7 +13,7 @@ Method | HTTP request | Description # **testClassname** -> ModelClient testClassname(modelclient) +> ModelClient testClassname(modelClient) To test class name in snake case @@ -28,10 +28,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key_query').apiKeyPrefix = 'Bearer'; final api_instance = FakeClassnameTags123Api(); -final modelclient = ModelClient(); // ModelClient | client model +final modelClient = ModelClient(); // ModelClient | client model try { - final result = api_instance.testClassname(modelclient); + final result = api_instance.testClassname(modelClient); print(result); } catch (e) { print('Exception when calling FakeClassnameTags123Api->testClassname: $e\n'); @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **modelclient** | [**ModelClient**](ModelClient.md)| client model | + **modelClient** | [**ModelClient**](ModelClient.md)| client model | ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md index a25a61c53343..83b60545eb61 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/FormatTest.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **byte** | **String** | | **binary** | [**MultipartFile**](MultipartFile.md) | | [optional] **date** | [**DateTime**](DateTime.md) | | -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **uuid** | **String** | | [optional] **password** | **String** | | **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md index c912fb2e08f4..4d6aeb75d965 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/HealthCheckResult.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**nullablemessage** | **String** | | [optional] +**nullableMessage** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md index 3df16ab1a90c..1f7f66b684fd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/MixedPropertiesAndAdditionalPropertiesClass.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] -**datetime** | [**DateTime**](DateTime.md) | | [optional] +**dateTime** | [**DateTime**](DateTime.md) | | [optional] **map** | [**Map**](Animal.md) | | [optional] [default to const {}] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md index d54b1bbbea04..4be260e93f6e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ModelFile.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**sourceuri** | **String** | Test capitalization | [optional] +**sourceURI** | **String** | Test capitalization | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md index f5fac6f8a17c..d8096a3db37a 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/NumberOnly.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**justnumber** | **num** | | [optional] +**justNumber** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md index a78891d33014..566816d8d278 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ObjectWithDeprecatedFields.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **uuid** | **String** | | [optional] **id** | **num** | | [optional] -**deprecatedref** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] +**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] **bars** | **List** | | [optional] [default to const []] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md index 08914a83f300..bde5ffe51a2c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Order.md @@ -9,9 +9,9 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] -**petid** | **int** | | [optional] +**petId** | **int** | | [optional] **quantity** | **int** | | [optional] -**shipdate** | [**DateTime**](DateTime.md) | | [optional] +**shipDate** | [**DateTime**](DateTime.md) | | [optional] **status** | **String** | Order Status | [optional] **complete** | **bool** | | [optional] [default to false] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md index 435464987052..17aa5ca02941 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/ParentWithNullable.md @@ -9,7 +9,7 @@ import 'package:openapi/api.dart'; Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **type** | **String** | | [optional] -**nullableproperty** | **String** | | [optional] +**nullableProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md index ceb71740166f..b6fdea5299ba 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/Pet.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **id** | **int** | | [optional] **category** | [**Category**](Category.md) | | [optional] **name** | **String** | | -**photourls** | **Set** | | [default to const {}] +**photoUrls** | **Set** | | [default to const {}] **tags** | [**List**](Tag.md) | | [optional] [default to const []] **status** | **String** | pet status in the store | [optional] diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md index 978146e44886..3883a9e96a00 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/PetApi.md @@ -65,7 +65,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **deletePet** -> deletePet(petid, apiKey) +> deletePet(petId, apiKey) Deletes a pet @@ -78,11 +78,11 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | Pet id to delete +final petId = 789; // int | Pet id to delete final apiKey = apiKey_example; // String | try { - api_instance.deletePet(petid, apiKey); + api_instance.deletePet(petId, apiKey); } catch (e) { print('Exception when calling PetApi->deletePet: $e\n'); } @@ -92,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| Pet id to delete | + **petId** | **int**| Pet id to delete | **apiKey** | **String**| | [optional] ### Return type @@ -201,7 +201,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **getPetById** -> Pet getPetById(petid) +> Pet getPetById(petId) Find pet by ID @@ -216,10 +216,10 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to return +final petId = 789; // int | ID of pet to return try { - final result = api_instance.getPetById(petid); + final result = api_instance.getPetById(petId); print(result); } catch (e) { print('Exception when calling PetApi->getPetById: $e\n'); @@ -230,7 +230,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to return | + **petId** | **int**| ID of pet to return | ### Return type @@ -292,7 +292,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePetWithForm** -> updatePetWithForm(petid, name, status) +> updatePetWithForm(petId, name, status) Updates a pet in the store with form data @@ -305,12 +305,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet that needs to be updated +final petId = 789; // int | ID of pet that needs to be updated final name = name_example; // String | Updated name of the pet final status = status_example; // String | Updated status of the pet try { - api_instance.updatePetWithForm(petid, name, status); + api_instance.updatePetWithForm(petId, name, status); } catch (e) { print('Exception when calling PetApi->updatePetWithForm: $e\n'); } @@ -320,7 +320,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet that needs to be updated | + **petId** | **int**| ID of pet that needs to be updated | **name** | **String**| Updated name of the pet | [optional] **status** | **String**| Updated status of the pet | [optional] @@ -340,7 +340,7 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFile** -> ApiResponse uploadFile(petid, additionalmetadata, file) +> ApiResponse uploadFile(petId, additionalMetadata, file) uploads an image @@ -353,12 +353,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to update -final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final petId = 789; // int | ID of pet to update +final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server final file = BINARY_DATA_HERE; // MultipartFile | file to upload try { - final result = api_instance.uploadFile(petid, additionalmetadata, file); + final result = api_instance.uploadFile(petId, additionalMetadata, file); print(result); } catch (e) { print('Exception when calling PetApi->uploadFile: $e\n'); @@ -369,8 +369,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] **file** | **MultipartFile**| file to upload | [optional] ### Return type @@ -389,7 +389,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **uploadFileWithRequiredFile** -> ApiResponse uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata) +> ApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) uploads an image (required) @@ -402,12 +402,12 @@ import 'package:openapi/api.dart'; //defaultApiClient.getAuthentication('petstore_auth').accessToken = 'YOUR_ACCESS_TOKEN'; final api_instance = PetApi(); -final petid = 789; // int | ID of pet to update -final requiredfile = BINARY_DATA_HERE; // MultipartFile | file to upload -final additionalmetadata = additionalmetadata_example; // String | Additional data to pass to server +final petId = 789; // int | ID of pet to update +final requiredFile = BINARY_DATA_HERE; // MultipartFile | file to upload +final additionalMetadata = additionalMetadata_example; // String | Additional data to pass to server try { - final result = api_instance.uploadFileWithRequiredFile(petid, requiredfile, additionalmetadata); + final result = api_instance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); print(result); } catch (e) { print('Exception when calling PetApi->uploadFileWithRequiredFile: $e\n'); @@ -418,9 +418,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **petid** | **int**| ID of pet to update | - **requiredfile** | **MultipartFile**| file to upload | - **additionalmetadata** | **String**| Additional data to pass to server | [optional] + **petId** | **int**| ID of pet to update | + **requiredFile** | **MultipartFile**| file to upload | + **additionalMetadata** | **String**| Additional data to pass to server | [optional] ### Return type diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md index 04697c8e6225..5fcfa98e0b36 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/SpecialModelName.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket** | **int** | | [optional] +**dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket** | **int** | | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md index 894a3e60ee31..e2b2f1fd4468 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/TestInlineFreeformAdditionalPropertiesRequest.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**someproperty** | **String** | | [optional] +**someProperty** | **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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md index 37aa8c50230e..fa87e64d8595 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/doc/User.md @@ -10,12 +10,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | | [optional] **username** | **String** | | [optional] -**firstname** | **String** | | [optional] -**lastname** | **String** | | [optional] +**firstName** | **String** | | [optional] +**lastName** | **String** | | [optional] **email** | **String** | | [optional] **password** | **String** | | [optional] **phone** | **String** | | [optional] -**userstatus** | **int** | User Status | [optional] +**userStatus** | **int** | User Status | [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) diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart index 3d7ceda6d0cd..81ab2d859dda 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/another_fake_api.dart @@ -24,14 +24,14 @@ class AnotherFakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future call123testSpecialTagsWithHttpInfo(ModelClient modelclient,) async { + Future call123testSpecialTagsWithHttpInfo(ModelClient modelClient,) async { // ignore: prefer_const_declarations final path = r'/another-fake/dummy'; // ignore: prefer_final_locals - Object? postBody = modelclient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -57,10 +57,10 @@ class AnotherFakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future call123testSpecialTags(ModelClient modelclient,) async { - final response = await call123testSpecialTagsWithHttpInfo(modelclient,); + Future call123testSpecialTags(ModelClient modelClient,) async { + final response = await call123testSpecialTagsWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart index 3674a2e5d66f..1fa377f864dd 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_api.dart @@ -230,14 +230,14 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterComposite] outercomposite: + /// * [OuterComposite] outerComposite: /// Input composite as post body - Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outercomposite, }) async { + Future fakeOuterCompositeSerializeWithHttpInfo({ OuterComposite? outerComposite, }) async { // ignore: prefer_const_declarations final path = r'/fake/outer/composite'; // ignore: prefer_final_locals - Object? postBody = outercomposite; + Object? postBody = outerComposite; final queryParams = []; final headerParams = {}; @@ -261,10 +261,10 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterComposite] outercomposite: + /// * [OuterComposite] outerComposite: /// Input composite as post body - Future fakeOuterCompositeSerialize({ OuterComposite? outercomposite, }) async { - final response = await fakeOuterCompositeSerializeWithHttpInfo( outercomposite: outercomposite, ); + Future fakeOuterCompositeSerialize({ OuterComposite? outerComposite, }) async { + final response = await fakeOuterCompositeSerializeWithHttpInfo( outerComposite: outerComposite, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -392,14 +392,14 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): + /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { + Future fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { // ignore: prefer_const_declarations final path = r'/fake/property/enum-int'; // ignore: prefer_final_locals - Object? postBody = outerobjectwithenumproperty; + Object? postBody = outerObjectWithEnumProperty; final queryParams = []; final headerParams = {}; @@ -423,10 +423,10 @@ class FakeApi { /// /// Parameters: /// - /// * [OuterObjectWithEnumProperty] outerobjectwithenumproperty (required): + /// * [OuterObjectWithEnumProperty] outerObjectWithEnumProperty (required): /// Input enum (int) as post body - Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerobjectwithenumproperty,) async { - final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerobjectwithenumproperty,); + Future fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty,) async { + final response = await fakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -542,13 +542,13 @@ class FakeApi { /// /// Parameters: /// - /// * [FileSchemaTestClass] fileschematestclass (required): - Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileschematestclass,) async { + /// * [FileSchemaTestClass] fileSchemaTestClass (required): + Future testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass,) async { // ignore: prefer_const_declarations final path = r'/fake/body-with-file-schema'; // ignore: prefer_final_locals - Object? postBody = fileschematestclass; + Object? postBody = fileSchemaTestClass; final queryParams = []; final headerParams = {}; @@ -572,9 +572,9 @@ class FakeApi { /// /// Parameters: /// - /// * [FileSchemaTestClass] fileschematestclass (required): - Future testBodyWithFileSchema(FileSchemaTestClass fileschematestclass,) async { - final response = await testBodyWithFileSchemaWithHttpInfo(fileschematestclass,); + /// * [FileSchemaTestClass] fileSchemaTestClass (required): + Future testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass,) async { + final response = await testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -633,14 +633,14 @@ class FakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClientModelWithHttpInfo(ModelClient modelclient,) async { + Future testClientModelWithHttpInfo(ModelClient modelClient,) async { // ignore: prefer_const_declarations final path = r'/fake'; // ignore: prefer_final_locals - Object? postBody = modelclient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -666,10 +666,10 @@ class FakeApi { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClientModel(ModelClient modelclient,) async { - final response = await testClientModelWithHttpInfo(modelclient,); + Future testClientModel(ModelClient modelClient,) async { + final response = await testClientModelWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -724,7 +724,7 @@ class FakeApi { /// * [DateTime] date: /// None /// - /// * [DateTime] datetime: + /// * [DateTime] dateTime: /// None /// /// * [String] password: @@ -732,7 +732,7 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { + Future testEndpointParametersWithHttpInfo(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { // ignore: prefer_const_declarations final path = r'/fake'; @@ -775,8 +775,8 @@ class FakeApi { if (date != null) { formParams[r'date'] = parameterToString(date); } - if (datetime != null) { - formParams[r'dateTime'] = parameterToString(datetime); + if (dateTime != null) { + formParams[r'dateTime'] = parameterToString(dateTime); } if (password != null) { formParams[r'password'] = parameterToString(password); @@ -835,7 +835,7 @@ class FakeApi { /// * [DateTime] date: /// None /// - /// * [DateTime] datetime: + /// * [DateTime] dateTime: /// None /// /// * [String] password: @@ -843,8 +843,8 @@ class FakeApi { /// /// * [String] callback: /// None - Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? datetime, String? password, String? callback, }) async { - final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, datetime: datetime, password: password, callback: callback, ); + Future testEndpointParameters(num number, double double_, String patternWithoutDelimiter, String byte, { int? integer, int? int32, int? int64, double? float, String? string, MultipartFile? binary, DateTime? date, DateTime? dateTime, String? password, String? callback, }) async { + final response = await testEndpointParametersWithHttpInfo(number, double_, patternWithoutDelimiter, byte, integer: integer, int32: int32, int64: int64, float: float, string: string, binary: binary, date: date, dateTime: dateTime, password: password, callback: callback, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1127,14 +1127,14 @@ class FakeApi { /// /// Parameters: /// - /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): + /// * [TestInlineFreeformAdditionalPropertiesRequest] testInlineFreeformAdditionalPropertiesRequest (required): /// request body - Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { + Future testInlineFreeformAdditionalPropertiesWithHttpInfo(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,) async { // ignore: prefer_const_declarations final path = r'/fake/inline-freeform-additionalProperties'; // ignore: prefer_final_locals - Object? postBody = testinlinefreeformadditionalpropertiesrequest; + Object? postBody = testInlineFreeformAdditionalPropertiesRequest; final queryParams = []; final headerParams = {}; @@ -1160,10 +1160,10 @@ class FakeApi { /// /// Parameters: /// - /// * [TestInlineFreeformAdditionalPropertiesRequest] testinlinefreeformadditionalpropertiesrequest (required): + /// * [TestInlineFreeformAdditionalPropertiesRequest] testInlineFreeformAdditionalPropertiesRequest (required): /// request body - Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testinlinefreeformadditionalpropertiesrequest,) async { - final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testinlinefreeformadditionalpropertiesrequest,); + Future testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest,) async { + final response = await testInlineFreeformAdditionalPropertiesWithHttpInfo(testInlineFreeformAdditionalPropertiesRequest,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1239,14 +1239,14 @@ class FakeApi { /// /// Parameters: /// - /// * [ChildWithNullable] childwithnullable (required): + /// * [ChildWithNullable] childWithNullable (required): /// request body - Future testNullableWithHttpInfo(ChildWithNullable childwithnullable,) async { + Future testNullableWithHttpInfo(ChildWithNullable childWithNullable,) async { // ignore: prefer_const_declarations final path = r'/fake/nullable'; // ignore: prefer_final_locals - Object? postBody = childwithnullable; + Object? postBody = childWithNullable; final queryParams = []; final headerParams = {}; @@ -1272,10 +1272,10 @@ class FakeApi { /// /// Parameters: /// - /// * [ChildWithNullable] childwithnullable (required): + /// * [ChildWithNullable] childWithNullable (required): /// request body - Future testNullable(ChildWithNullable childwithnullable,) async { - final response = await testNullableWithHttpInfo(childwithnullable,); + Future testNullable(ChildWithNullable childWithNullable,) async { + final response = await testNullableWithHttpInfo(childWithNullable,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -1297,10 +1297,10 @@ class FakeApi { /// /// * [List] context (required): /// - /// * [String] allowempty (required): + /// * [String] allowEmpty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { + Future testQueryParameterCollectionFormatWithHttpInfo(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { // ignore: prefer_const_declarations final path = r'/fake/test-query-parameters'; @@ -1319,7 +1319,7 @@ class FakeApi { if (language != null) { queryParams.addAll(_queryParams('', 'language', language)); } - queryParams.addAll(_queryParams('', 'allowEmpty', allowempty)); + queryParams.addAll(_queryParams('', 'allowEmpty', allowEmpty)); const contentTypes = []; @@ -1349,11 +1349,11 @@ class FakeApi { /// /// * [List] context (required): /// - /// * [String] allowempty (required): + /// * [String] allowEmpty (required): /// /// * [Map] language: - Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowempty, { Map? language, }) async { - final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowempty, language: language, ); + Future testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, { Map? language, }) async { + final response = await testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language: language, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart index 8f45d844fd69..7689f51b6884 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/fake_classname_tags123_api.dart @@ -24,14 +24,14 @@ class FakeClassnameTags123Api { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClassnameWithHttpInfo(ModelClient modelclient,) async { + Future testClassnameWithHttpInfo(ModelClient modelClient,) async { // ignore: prefer_const_declarations final path = r'/fake_classname_test'; // ignore: prefer_final_locals - Object? postBody = modelclient; + Object? postBody = modelClient; final queryParams = []; final headerParams = {}; @@ -57,10 +57,10 @@ class FakeClassnameTags123Api { /// /// Parameters: /// - /// * [ModelClient] modelclient (required): + /// * [ModelClient] modelClient (required): /// client model - Future testClassname(ModelClient modelclient,) async { - final response = await testClassnameWithHttpInfo(modelclient,); + Future testClassname(ModelClient modelClient,) async { + final response = await testClassnameWithHttpInfo(modelClient,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart index ea3c0054bd65..61fd1666af49 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/api/pet_api.dart @@ -74,14 +74,14 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePetWithHttpInfo(int petid, { String? apiKey, }) async { + Future deletePetWithHttpInfo(int petId, { String? apiKey, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -114,12 +114,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// Pet id to delete /// /// * [String] apiKey: - Future deletePet(int petid, { String? apiKey, }) async { - final response = await deletePetWithHttpInfo(petid, apiKey: apiKey, ); + Future deletePet(int petId, { String? apiKey, }) async { + final response = await deletePetWithHttpInfo(petId, apiKey: apiKey, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -259,12 +259,12 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to return - Future getPetByIdWithHttpInfo(int petid,) async { + Future getPetByIdWithHttpInfo(int petId,) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -293,10 +293,10 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to return - Future getPetById(int petid,) async { - final response = await getPetByIdWithHttpInfo(petid,); + Future getPetById(int petId,) async { + final response = await getPetByIdWithHttpInfo(petId,); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -368,7 +368,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -376,10 +376,10 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithFormWithHttpInfo(int petid, { String? name, String? status, }) async { + Future updatePetWithFormWithHttpInfo(int petId, { String? name, String? status, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -414,7 +414,7 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet that needs to be updated /// /// * [String] name: @@ -422,8 +422,8 @@ class PetApi { /// /// * [String] status: /// Updated status of the pet - Future updatePetWithForm(int petid, { String? name, String? status, }) async { - final response = await updatePetWithFormWithHttpInfo(petid, name: name, status: status, ); + Future updatePetWithForm(int petId, { String? name, String? status, }) async { + final response = await updatePetWithFormWithHttpInfo(petId, name: name, status: status, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -437,18 +437,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFileWithHttpInfo(int petid, { String? additionalmetadata, MultipartFile? file, }) async { + Future uploadFileWithHttpInfo(int petId, { String? additionalMetadata, MultipartFile? file, }) async { // ignore: prefer_const_declarations final path = r'/pet/{petId}/uploadImage' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -461,9 +461,9 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalmetadata != null) { + if (additionalMetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); } if (file != null) { hasFields = true; @@ -491,16 +491,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server /// /// * [MultipartFile] file: /// file to upload - Future uploadFile(int petid, { String? additionalmetadata, MultipartFile? file, }) async { - final response = await uploadFileWithHttpInfo(petid, additionalmetadata: additionalmetadata, file: file, ); + Future uploadFile(int petId, { String? additionalMetadata, MultipartFile? file, }) async { + final response = await uploadFileWithHttpInfo(petId, additionalMetadata: additionalMetadata, file: file, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } @@ -522,18 +522,18 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [MultipartFile] requiredfile (required): + /// * [MultipartFile] requiredFile (required): /// file to upload /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFileWithHttpInfo(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { + Future uploadFileWithRequiredFileWithHttpInfo(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { // ignore: prefer_const_declarations final path = r'/fake/{petId}/uploadImageWithRequiredFile' - .replaceAll('{petId}', petid.toString()); + .replaceAll('{petId}', petId.toString()); // ignore: prefer_final_locals Object? postBody; @@ -546,14 +546,14 @@ class PetApi { bool hasFields = false; final mp = MultipartRequest('POST', Uri.parse(path)); - if (additionalmetadata != null) { + if (additionalMetadata != null) { hasFields = true; - mp.fields[r'additionalMetadata'] = parameterToString(additionalmetadata); + mp.fields[r'additionalMetadata'] = parameterToString(additionalMetadata); } - if (requiredfile != null) { + if (requiredFile != null) { hasFields = true; - mp.fields[r'requiredFile'] = requiredfile.field; - mp.files.add(requiredfile); + mp.fields[r'requiredFile'] = requiredFile.field; + mp.files.add(requiredFile); } if (hasFields) { postBody = mp; @@ -576,16 +576,16 @@ class PetApi { /// /// Parameters: /// - /// * [int] petid (required): + /// * [int] petId (required): /// ID of pet to update /// - /// * [MultipartFile] requiredfile (required): + /// * [MultipartFile] requiredFile (required): /// file to upload /// - /// * [String] additionalmetadata: + /// * [String] additionalMetadata: /// Additional data to pass to server - Future uploadFileWithRequiredFile(int petid, MultipartFile requiredfile, { String? additionalmetadata, }) async { - final response = await uploadFileWithRequiredFileWithHttpInfo(petid, requiredfile, additionalmetadata: additionalmetadata, ); + Future uploadFileWithRequiredFile(int petId, MultipartFile requiredFile, { String? additionalMetadata, }) async { + final response = await uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata: additionalMetadata, ); if (response.statusCode >= HttpStatus.badRequest) { throw ApiException(response.statusCode, await _decodeBodyBytes(response)); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart index 24890cf3f2ed..0411ccc2b7a1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/all_of_with_single_ref.dart @@ -14,7 +14,7 @@ class AllOfWithSingleRef { /// Returns a new [AllOfWithSingleRef] instance. AllOfWithSingleRef({ this.username, - this.singlereftype, + this.singleRefType, }); /// @@ -31,21 +31,21 @@ class AllOfWithSingleRef { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - SingleRefType? singlereftype; + SingleRefType? singleRefType; @override bool operator ==(Object other) => identical(this, other) || other is AllOfWithSingleRef && other.username == username && - other.singlereftype == singlereftype; + other.singleRefType == singleRefType; @override int get hashCode => // ignore: unnecessary_parenthesis (username == null ? 0 : username!.hashCode) + - (singlereftype == null ? 0 : singlereftype!.hashCode); + (singleRefType == null ? 0 : singleRefType!.hashCode); @override - String toString() => 'AllOfWithSingleRef[username=$username, singlereftype=$singlereftype]'; + String toString() => 'AllOfWithSingleRef[username=$username, singleRefType=$singleRefType]'; Map toJson() { final json = {}; @@ -54,8 +54,8 @@ class AllOfWithSingleRef { } else { json[r'username'] = null; } - if (this.singlereftype != null) { - json[r'SingleRefType'] = this.singlereftype; + if (this.singleRefType != null) { + json[r'SingleRefType'] = this.singleRefType; } else { json[r'SingleRefType'] = null; } @@ -82,7 +82,7 @@ class AllOfWithSingleRef { return AllOfWithSingleRef( username: mapValueOfType(json, r'username'), - singlereftype: SingleRefType.fromJson(json[r'SingleRefType']), + singleRefType: SingleRefType.fromJson(json[r'SingleRefType']), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart index 6259e6082643..a562a11becce 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/animal.dart @@ -13,31 +13,31 @@ part of openapi.api; class Animal { /// Returns a new [Animal] instance. Animal({ - required this.classname, + required this.className, this.color = 'red', }); - String classname; + String className; String color; @override bool operator ==(Object other) => identical(this, other) || other is Animal && - other.classname == classname && + other.className == className && other.color == color; @override int get hashCode => // ignore: unnecessary_parenthesis - (classname.hashCode) + + (className.hashCode) + (color.hashCode); @override - String toString() => 'Animal[classname=$classname, color=$color]'; + String toString() => 'Animal[className=$className, color=$color]'; Map toJson() { final json = {}; - json[r'className'] = this.classname; + json[r'className'] = this.className; json[r'color'] = this.color; return json; } @@ -61,7 +61,7 @@ class Animal { }()); return Animal( - classname: mapValueOfType(json, r'className')!, + className: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart index 0dc0ec4c734c..04a9e99e986f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_array_of_number_only.dart @@ -13,26 +13,26 @@ part of openapi.api; class ArrayOfArrayOfNumberOnly { /// Returns a new [ArrayOfArrayOfNumberOnly] instance. ArrayOfArrayOfNumberOnly({ - this.arrayarraynumber = const [], + this.arrayArrayNumber = const [], }); - List> arrayarraynumber; + List> arrayArrayNumber; @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfArrayOfNumberOnly && - _deepEquality.equals(other.arrayarraynumber, arrayarraynumber); + _deepEquality.equals(other.arrayArrayNumber, arrayArrayNumber); @override int get hashCode => // ignore: unnecessary_parenthesis - (arrayarraynumber.hashCode); + (arrayArrayNumber.hashCode); @override - String toString() => 'ArrayOfArrayOfNumberOnly[arrayarraynumber=$arrayarraynumber]'; + String toString() => 'ArrayOfArrayOfNumberOnly[arrayArrayNumber=$arrayArrayNumber]'; Map toJson() { final json = {}; - json[r'ArrayArrayNumber'] = this.arrayarraynumber; + json[r'ArrayArrayNumber'] = this.arrayArrayNumber; return json; } @@ -55,7 +55,7 @@ class ArrayOfArrayOfNumberOnly { }()); return ArrayOfArrayOfNumberOnly( - arrayarraynumber: json[r'ArrayArrayNumber'] is List + arrayArrayNumber: json[r'ArrayArrayNumber'] is List ? (json[r'ArrayArrayNumber'] as List).map((e) => e == null ? const [] : (e as List).cast() ).toList() diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart index 6de38929b80b..ccf33088a3e1 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/array_of_number_only.dart @@ -13,26 +13,26 @@ part of openapi.api; class ArrayOfNumberOnly { /// Returns a new [ArrayOfNumberOnly] instance. ArrayOfNumberOnly({ - this.arraynumber = const [], + this.arrayNumber = const [], }); - List arraynumber; + List arrayNumber; @override bool operator ==(Object other) => identical(this, other) || other is ArrayOfNumberOnly && - _deepEquality.equals(other.arraynumber, arraynumber); + _deepEquality.equals(other.arrayNumber, arrayNumber); @override int get hashCode => // ignore: unnecessary_parenthesis - (arraynumber.hashCode); + (arrayNumber.hashCode); @override - String toString() => 'ArrayOfNumberOnly[arraynumber=$arraynumber]'; + String toString() => 'ArrayOfNumberOnly[arrayNumber=$arrayNumber]'; Map toJson() { final json = {}; - json[r'ArrayNumber'] = this.arraynumber; + json[r'ArrayNumber'] = this.arrayNumber; return json; } @@ -55,7 +55,7 @@ class ArrayOfNumberOnly { }()); return ArrayOfNumberOnly( - arraynumber: json[r'ArrayNumber'] is Iterable + arrayNumber: json[r'ArrayNumber'] is Iterable ? (json[r'ArrayNumber'] as Iterable).cast().toList(growable: false) : const [], ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart index 4d613ce167d3..0f525b45dd87 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/capitalization.dart @@ -13,12 +13,12 @@ part of openapi.api; class Capitalization { /// Returns a new [Capitalization] instance. Capitalization({ - this.smallcamel, - this.capitalcamel, + this.smallCamel, + this.capitalCamel, this.smallSnake, this.capitalSnake, - this.scaEthFlowPoints, - this.attName, + this.sCAETHFlowPoints, + this.ATT_NAME, }); /// @@ -27,7 +27,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? smallcamel; + String? smallCamel; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -35,7 +35,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? capitalcamel; + String? capitalCamel; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -59,7 +59,7 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? scaEthFlowPoints; + String? sCAETHFlowPoints; /// Name of the pet /// @@ -68,39 +68,39 @@ class Capitalization { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? attName; + String? ATT_NAME; @override bool operator ==(Object other) => identical(this, other) || other is Capitalization && - other.smallcamel == smallcamel && - other.capitalcamel == capitalcamel && + other.smallCamel == smallCamel && + other.capitalCamel == capitalCamel && other.smallSnake == smallSnake && other.capitalSnake == capitalSnake && - other.scaEthFlowPoints == scaEthFlowPoints && - other.attName == attName; + other.sCAETHFlowPoints == sCAETHFlowPoints && + other.ATT_NAME == ATT_NAME; @override int get hashCode => // ignore: unnecessary_parenthesis - (smallcamel == null ? 0 : smallcamel!.hashCode) + - (capitalcamel == null ? 0 : capitalcamel!.hashCode) + + (smallCamel == null ? 0 : smallCamel!.hashCode) + + (capitalCamel == null ? 0 : capitalCamel!.hashCode) + (smallSnake == null ? 0 : smallSnake!.hashCode) + (capitalSnake == null ? 0 : capitalSnake!.hashCode) + - (scaEthFlowPoints == null ? 0 : scaEthFlowPoints!.hashCode) + - (attName == null ? 0 : attName!.hashCode); + (sCAETHFlowPoints == null ? 0 : sCAETHFlowPoints!.hashCode) + + (ATT_NAME == null ? 0 : ATT_NAME!.hashCode); @override - String toString() => 'Capitalization[smallcamel=$smallcamel, capitalcamel=$capitalcamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, scaEthFlowPoints=$scaEthFlowPoints, attName=$attName]'; + String toString() => 'Capitalization[smallCamel=$smallCamel, capitalCamel=$capitalCamel, smallSnake=$smallSnake, capitalSnake=$capitalSnake, sCAETHFlowPoints=$sCAETHFlowPoints, ATT_NAME=$ATT_NAME]'; Map toJson() { final json = {}; - if (this.smallcamel != null) { - json[r'smallCamel'] = this.smallcamel; + if (this.smallCamel != null) { + json[r'smallCamel'] = this.smallCamel; } else { json[r'smallCamel'] = null; } - if (this.capitalcamel != null) { - json[r'CapitalCamel'] = this.capitalcamel; + if (this.capitalCamel != null) { + json[r'CapitalCamel'] = this.capitalCamel; } else { json[r'CapitalCamel'] = null; } @@ -114,13 +114,13 @@ class Capitalization { } else { json[r'Capital_Snake'] = null; } - if (this.scaEthFlowPoints != null) { - json[r'SCA_ETH_Flow_Points'] = this.scaEthFlowPoints; + if (this.sCAETHFlowPoints != null) { + json[r'SCA_ETH_Flow_Points'] = this.sCAETHFlowPoints; } else { json[r'SCA_ETH_Flow_Points'] = null; } - if (this.attName != null) { - json[r'ATT_NAME'] = this.attName; + if (this.ATT_NAME != null) { + json[r'ATT_NAME'] = this.ATT_NAME; } else { json[r'ATT_NAME'] = null; } @@ -146,12 +146,12 @@ class Capitalization { }()); return Capitalization( - smallcamel: mapValueOfType(json, r'smallCamel'), - capitalcamel: mapValueOfType(json, r'CapitalCamel'), + smallCamel: mapValueOfType(json, r'smallCamel'), + capitalCamel: mapValueOfType(json, r'CapitalCamel'), smallSnake: mapValueOfType(json, r'small_Snake'), capitalSnake: mapValueOfType(json, r'Capital_Snake'), - scaEthFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), - attName: mapValueOfType(json, r'ATT_NAME'), + sCAETHFlowPoints: mapValueOfType(json, r'SCA_ETH_Flow_Points'), + ATT_NAME: mapValueOfType(json, r'ATT_NAME'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart index ed6fb49e1a98..398fd8525280 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/cat.dart @@ -13,12 +13,12 @@ part of openapi.api; class Cat { /// Returns a new [Cat] instance. Cat({ - required this.classname, + required this.className, this.color = 'red', this.declawed, }); - String classname; + String className; String color; @@ -32,23 +32,23 @@ class Cat { @override bool operator ==(Object other) => identical(this, other) || other is Cat && - other.classname == classname && + other.className == className && other.color == color && other.declawed == declawed; @override int get hashCode => // ignore: unnecessary_parenthesis - (classname.hashCode) + + (className.hashCode) + (color.hashCode) + (declawed == null ? 0 : declawed!.hashCode); @override - String toString() => 'Cat[classname=$classname, color=$color, declawed=$declawed]'; + String toString() => 'Cat[className=$className, color=$color, declawed=$declawed]'; Map toJson() { final json = {}; - json[r'className'] = this.classname; + json[r'className'] = this.className; json[r'color'] = this.color; if (this.declawed != null) { json[r'declawed'] = this.declawed; @@ -77,7 +77,7 @@ class Cat { }()); return Cat( - classname: mapValueOfType(json, r'className')!, + className: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', declawed: mapValueOfType(json, r'declawed'), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart index 8d1041dac9d5..2092b2c76845 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/child_with_nullable.dart @@ -14,13 +14,13 @@ class ChildWithNullable { /// Returns a new [ChildWithNullable] instance. ChildWithNullable({ this.type, - this.nullableproperty, - this.otherproperty, + this.nullableProperty, + this.otherProperty, }); ChildWithNullableTypeEnum? type; - String? nullableproperty; + String? nullableProperty; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -28,23 +28,23 @@ class ChildWithNullable { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? otherproperty; + String? otherProperty; @override bool operator ==(Object other) => identical(this, other) || other is ChildWithNullable && other.type == type && - other.nullableproperty == nullableproperty && - other.otherproperty == otherproperty; + other.nullableProperty == nullableProperty && + other.otherProperty == otherProperty; @override int get hashCode => // ignore: unnecessary_parenthesis (type == null ? 0 : type!.hashCode) + - (nullableproperty == null ? 0 : nullableproperty!.hashCode) + - (otherproperty == null ? 0 : otherproperty!.hashCode); + (nullableProperty == null ? 0 : nullableProperty!.hashCode) + + (otherProperty == null ? 0 : otherProperty!.hashCode); @override - String toString() => 'ChildWithNullable[type=$type, nullableproperty=$nullableproperty, otherproperty=$otherproperty]'; + String toString() => 'ChildWithNullable[type=$type, nullableProperty=$nullableProperty, otherProperty=$otherProperty]'; Map toJson() { final json = {}; @@ -53,13 +53,13 @@ class ChildWithNullable { } else { json[r'type'] = null; } - if (this.nullableproperty != null) { - json[r'nullableProperty'] = this.nullableproperty; + if (this.nullableProperty != null) { + json[r'nullableProperty'] = this.nullableProperty; } else { json[r'nullableProperty'] = null; } - if (this.otherproperty != null) { - json[r'otherProperty'] = this.otherproperty; + if (this.otherProperty != null) { + json[r'otherProperty'] = this.otherProperty; } else { json[r'otherProperty'] = null; } @@ -86,8 +86,8 @@ class ChildWithNullable { return ChildWithNullable( type: ChildWithNullableTypeEnum.fromJson(json[r'type']), - nullableproperty: mapValueOfType(json, r'nullableProperty'), - otherproperty: mapValueOfType(json, r'otherProperty'), + nullableProperty: mapValueOfType(json, r'nullableProperty'), + otherProperty: mapValueOfType(json, r'otherProperty'), ); } return null; @@ -151,11 +151,11 @@ class ChildWithNullableTypeEnum { String toJson() => value; - static const childwithnullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); + static const childWithNullable = ChildWithNullableTypeEnum._(r'ChildWithNullable'); /// List of all possible values in this [enum][ChildWithNullableTypeEnum]. static const values = [ - childwithnullable, + childWithNullable, ]; static ChildWithNullableTypeEnum? fromJson(dynamic value) => ChildWithNullableTypeEnumTypeTransformer().decode(value); @@ -194,7 +194,7 @@ class ChildWithNullableTypeEnumTypeTransformer { ChildWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'ChildWithNullable': return ChildWithNullableTypeEnum.childwithnullable; + case r'ChildWithNullable': return ChildWithNullableTypeEnum.childWithNullable; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart index 227bd1b55772..d7677510b91c 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/dog.dart @@ -13,12 +13,12 @@ part of openapi.api; class Dog { /// Returns a new [Dog] instance. Dog({ - required this.classname, + required this.className, this.color = 'red', this.breed, }); - String classname; + String className; String color; @@ -32,23 +32,23 @@ class Dog { @override bool operator ==(Object other) => identical(this, other) || other is Dog && - other.classname == classname && + other.className == className && other.color == color && other.breed == breed; @override int get hashCode => // ignore: unnecessary_parenthesis - (classname.hashCode) + + (className.hashCode) + (color.hashCode) + (breed == null ? 0 : breed!.hashCode); @override - String toString() => 'Dog[classname=$classname, color=$color, breed=$breed]'; + String toString() => 'Dog[className=$className, color=$color, breed=$breed]'; Map toJson() { final json = {}; - json[r'className'] = this.classname; + json[r'className'] = this.className; json[r'color'] = this.color; if (this.breed != null) { json[r'breed'] = this.breed; @@ -77,7 +77,7 @@ class Dog { }()); return Dog( - classname: mapValueOfType(json, r'className')!, + className: mapValueOfType(json, r'className')!, color: mapValueOfType(json, r'color') ?? 'red', breed: mapValueOfType(json, r'breed'), ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart index 898da969de8b..584186d9a016 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_class.dart @@ -25,13 +25,23 @@ class EnumClass { static const abc = EnumClass._(r'_abc'); static const efg = EnumClass._(r'-efg'); - static const leftParenthesisXyzrightParenthesis = EnumClass._(r'(xyz)'); + static const leftParenthesisXyzRightParenthesis = EnumClass._(r'(xyz)'); + static const test = EnumClass._(r'TEST'); + static const testA = EnumClass._(r'TEST_A'); + static const testAAbc = EnumClass._(r'TEST_A_ABC'); + static const tESTA = EnumClass._(r'TEST_a'); + static const tEST = EnumClass._(r'tEST'); /// List of all possible values in this [enum][EnumClass]. static const values = [ abc, efg, - leftParenthesisXyzrightParenthesis, + leftParenthesisXyzRightParenthesis, + test, + testA, + testAAbc, + tESTA, + tEST, ]; static EnumClass? fromJson(dynamic value) => EnumClassTypeTransformer().decode(value); @@ -72,7 +82,12 @@ class EnumClassTypeTransformer { switch (data) { case r'_abc': return EnumClass.abc; case r'-efg': return EnumClass.efg; - case r'(xyz)': return EnumClass.leftParenthesisXyzrightParenthesis; + case r'(xyz)': return EnumClass.leftParenthesisXyzRightParenthesis; + case r'TEST': return EnumClass.test; + case r'TEST_A': return EnumClass.testA; + case r'TEST_A_ABC': return EnumClass.testAAbc; + case r'TEST_a': return EnumClass.tESTA; + case r'tEST': return EnumClass.tEST; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart index 898fae87bffa..bca1e2d81d44 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/enum_test.dart @@ -17,10 +17,10 @@ class EnumTest { required this.enumStringRequired, this.enumInteger, this.enumNumber, - this.outerenum, - this.outerenuminteger, - this.outerenumdefaultvalue, - this.outerenumintegerdefaultvalue, + this.outerEnum, + this.outerEnumInteger, + this.outerEnumDefaultValue, + this.outerEnumIntegerDefaultValue, }); EnumTestEnumStringEnum? enumString; @@ -31,7 +31,7 @@ class EnumTest { EnumTestEnumNumberEnum? enumNumber; - OuterEnum? outerenum; + OuterEnum? outerEnum; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -39,7 +39,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumInteger? outerenuminteger; + OuterEnumInteger? outerEnumInteger; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -47,7 +47,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumDefaultValue? outerenumdefaultvalue; + OuterEnumDefaultValue? outerEnumDefaultValue; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -55,7 +55,7 @@ class EnumTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - OuterEnumIntegerDefaultValue? outerenumintegerdefaultvalue; + OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue; @override bool operator ==(Object other) => identical(this, other) || other is EnumTest && @@ -63,10 +63,10 @@ class EnumTest { other.enumStringRequired == enumStringRequired && other.enumInteger == enumInteger && other.enumNumber == enumNumber && - other.outerenum == outerenum && - other.outerenuminteger == outerenuminteger && - other.outerenumdefaultvalue == outerenumdefaultvalue && - other.outerenumintegerdefaultvalue == outerenumintegerdefaultvalue; + other.outerEnum == outerEnum && + other.outerEnumInteger == outerEnumInteger && + other.outerEnumDefaultValue == outerEnumDefaultValue && + other.outerEnumIntegerDefaultValue == outerEnumIntegerDefaultValue; @override int get hashCode => @@ -75,13 +75,13 @@ class EnumTest { (enumStringRequired.hashCode) + (enumInteger == null ? 0 : enumInteger!.hashCode) + (enumNumber == null ? 0 : enumNumber!.hashCode) + - (outerenum == null ? 0 : outerenum!.hashCode) + - (outerenuminteger == null ? 0 : outerenuminteger!.hashCode) + - (outerenumdefaultvalue == null ? 0 : outerenumdefaultvalue!.hashCode) + - (outerenumintegerdefaultvalue == null ? 0 : outerenumintegerdefaultvalue!.hashCode); + (outerEnum == null ? 0 : outerEnum!.hashCode) + + (outerEnumInteger == null ? 0 : outerEnumInteger!.hashCode) + + (outerEnumDefaultValue == null ? 0 : outerEnumDefaultValue!.hashCode) + + (outerEnumIntegerDefaultValue == null ? 0 : outerEnumIntegerDefaultValue!.hashCode); @override - String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerenum=$outerenum, outerenuminteger=$outerenuminteger, outerenumdefaultvalue=$outerenumdefaultvalue, outerenumintegerdefaultvalue=$outerenumintegerdefaultvalue]'; + String toString() => 'EnumTest[enumString=$enumString, enumStringRequired=$enumStringRequired, enumInteger=$enumInteger, enumNumber=$enumNumber, outerEnum=$outerEnum, outerEnumInteger=$outerEnumInteger, outerEnumDefaultValue=$outerEnumDefaultValue, outerEnumIntegerDefaultValue=$outerEnumIntegerDefaultValue]'; Map toJson() { final json = {}; @@ -101,23 +101,23 @@ class EnumTest { } else { json[r'enum_number'] = null; } - if (this.outerenum != null) { - json[r'outerEnum'] = this.outerenum; + if (this.outerEnum != null) { + json[r'outerEnum'] = this.outerEnum; } else { json[r'outerEnum'] = null; } - if (this.outerenuminteger != null) { - json[r'outerEnumInteger'] = this.outerenuminteger; + if (this.outerEnumInteger != null) { + json[r'outerEnumInteger'] = this.outerEnumInteger; } else { json[r'outerEnumInteger'] = null; } - if (this.outerenumdefaultvalue != null) { - json[r'outerEnumDefaultValue'] = this.outerenumdefaultvalue; + if (this.outerEnumDefaultValue != null) { + json[r'outerEnumDefaultValue'] = this.outerEnumDefaultValue; } else { json[r'outerEnumDefaultValue'] = null; } - if (this.outerenumintegerdefaultvalue != null) { - json[r'outerEnumIntegerDefaultValue'] = this.outerenumintegerdefaultvalue; + if (this.outerEnumIntegerDefaultValue != null) { + json[r'outerEnumIntegerDefaultValue'] = this.outerEnumIntegerDefaultValue; } else { json[r'outerEnumIntegerDefaultValue'] = null; } @@ -147,10 +147,10 @@ class EnumTest { enumStringRequired: EnumTestEnumStringRequiredEnum.fromJson(json[r'enum_string_required'])!, enumInteger: EnumTestEnumIntegerEnum.fromJson(json[r'enum_integer']), enumNumber: EnumTestEnumNumberEnum.fromJson(json[r'enum_number']), - outerenum: OuterEnum.fromJson(json[r'outerEnum']), - outerenuminteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), - outerenumdefaultvalue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), - outerenumintegerdefaultvalue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), + outerEnum: OuterEnum.fromJson(json[r'outerEnum']), + outerEnumInteger: OuterEnumInteger.fromJson(json[r'outerEnumInteger']), + outerEnumDefaultValue: OuterEnumDefaultValue.fromJson(json[r'outerEnumDefaultValue']), + outerEnumIntegerDefaultValue: OuterEnumIntegerDefaultValue.fromJson(json[r'outerEnumIntegerDefaultValue']), ); } return null; @@ -443,13 +443,13 @@ class EnumTestEnumNumberEnum { double toJson() => value; - static const number1period1 = EnumTestEnumNumberEnum._('1.1'); - static const numberNegative1period2 = EnumTestEnumNumberEnum._('-1.2'); + static const number1Period1 = EnumTestEnumNumberEnum._('1.1'); + static const numberNegative1Period2 = EnumTestEnumNumberEnum._('-1.2'); /// List of all possible values in this [enum][EnumTestEnumNumberEnum]. static const values = [ - number1period1, - numberNegative1period2, + number1Period1, + numberNegative1Period2, ]; static EnumTestEnumNumberEnum? fromJson(dynamic value) => EnumTestEnumNumberEnumTypeTransformer().decode(value); @@ -488,8 +488,8 @@ class EnumTestEnumNumberEnumTypeTransformer { EnumTestEnumNumberEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case '1.1': return EnumTestEnumNumberEnum.number1period1; - case '-1.2': return EnumTestEnumNumberEnum.numberNegative1period2; + case '1.1': return EnumTestEnumNumberEnum.number1Period1; + case '-1.2': return EnumTestEnumNumberEnum.numberNegative1Period2; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart index 249f9c2401d7..55de1b12e981 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/fake_big_decimal_map200_response.dart @@ -13,8 +13,8 @@ part of openapi.api; class FakeBigDecimalMap200Response { /// Returns a new [FakeBigDecimalMap200Response] instance. FakeBigDecimalMap200Response({ - this.someid, - this.somemap = const {}, + this.someId, + this.someMap = const {}, }); /// @@ -23,32 +23,32 @@ class FakeBigDecimalMap200Response { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - num? someid; + num? someId; - Map somemap; + Map someMap; @override bool operator ==(Object other) => identical(this, other) || other is FakeBigDecimalMap200Response && - other.someid == someid && - _deepEquality.equals(other.somemap, somemap); + other.someId == someId && + _deepEquality.equals(other.someMap, someMap); @override int get hashCode => // ignore: unnecessary_parenthesis - (someid == null ? 0 : someid!.hashCode) + - (somemap.hashCode); + (someId == null ? 0 : someId!.hashCode) + + (someMap.hashCode); @override - String toString() => 'FakeBigDecimalMap200Response[someid=$someid, somemap=$somemap]'; + String toString() => 'FakeBigDecimalMap200Response[someId=$someId, someMap=$someMap]'; Map toJson() { final json = {}; - if (this.someid != null) { - json[r'someId'] = this.someid; + if (this.someId != null) { + json[r'someId'] = this.someId; } else { json[r'someId'] = null; } - json[r'someMap'] = this.somemap; + json[r'someMap'] = this.someMap; return json; } @@ -71,8 +71,8 @@ class FakeBigDecimalMap200Response { }()); return FakeBigDecimalMap200Response( - someid: num.parse('${json[r'someId']}'), - somemap: mapCastOfType(json, r'someMap') ?? const {}, + someId: num.parse('${json[r'someId']}'), + someMap: mapCastOfType(json, r'someMap') ?? const {}, ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart index 957a6b7c0415..b0edc2e38e14 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/format_test.dart @@ -24,7 +24,7 @@ class FormatTest { required this.byte, this.binary, required this.date, - this.datetime, + this.dateTime, this.uuid, required this.password, this.patternWithDigits, @@ -117,7 +117,7 @@ class FormatTest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? datetime; + DateTime? dateTime; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -160,7 +160,7 @@ class FormatTest { other.byte == byte && other.binary == binary && other.date == date && - other.datetime == datetime && + other.dateTime == dateTime && other.uuid == uuid && other.password == password && other.patternWithDigits == patternWithDigits && @@ -180,14 +180,14 @@ class FormatTest { (byte.hashCode) + (binary == null ? 0 : binary!.hashCode) + (date.hashCode) + - (datetime == null ? 0 : datetime!.hashCode) + + (dateTime == null ? 0 : dateTime!.hashCode) + (uuid == null ? 0 : uuid!.hashCode) + (password.hashCode) + (patternWithDigits == null ? 0 : patternWithDigits!.hashCode) + (patternWithDigitsAndDelimiter == null ? 0 : patternWithDigitsAndDelimiter!.hashCode); @override - String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, datetime=$datetime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; + String toString() => 'FormatTest[integer=$integer, int32=$int32, int64=$int64, number=$number, float=$float, double_=$double_, decimal=$decimal, string=$string, byte=$byte, binary=$binary, date=$date, dateTime=$dateTime, uuid=$uuid, password=$password, patternWithDigits=$patternWithDigits, patternWithDigitsAndDelimiter=$patternWithDigitsAndDelimiter]'; Map toJson() { final json = {}; @@ -234,8 +234,8 @@ class FormatTest { json[r'binary'] = null; } json[r'date'] = _dateFormatter.format(this.date.toUtc()); - if (this.datetime != null) { - json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); + if (this.dateTime != null) { + json[r'dateTime'] = this.dateTime!.toUtc().toIso8601String(); } else { json[r'dateTime'] = null; } @@ -288,7 +288,7 @@ class FormatTest { byte: mapValueOfType(json, r'byte')!, binary: null, // No support for decoding binary content from JSON date: mapDateTime(json, r'date', r'')!, - datetime: mapDateTime(json, r'dateTime', r''), + dateTime: mapDateTime(json, r'dateTime', r''), uuid: mapValueOfType(json, r'uuid'), password: mapValueOfType(json, r'password')!, patternWithDigits: mapValueOfType(json, r'pattern_with_digits'), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart index bf69f5c13600..b3a3f7cb8e0f 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/health_check_result.dart @@ -13,27 +13,27 @@ part of openapi.api; class HealthCheckResult { /// Returns a new [HealthCheckResult] instance. HealthCheckResult({ - this.nullablemessage, + this.nullableMessage, }); - String? nullablemessage; + String? nullableMessage; @override bool operator ==(Object other) => identical(this, other) || other is HealthCheckResult && - other.nullablemessage == nullablemessage; + other.nullableMessage == nullableMessage; @override int get hashCode => // ignore: unnecessary_parenthesis - (nullablemessage == null ? 0 : nullablemessage!.hashCode); + (nullableMessage == null ? 0 : nullableMessage!.hashCode); @override - String toString() => 'HealthCheckResult[nullablemessage=$nullablemessage]'; + String toString() => 'HealthCheckResult[nullableMessage=$nullableMessage]'; Map toJson() { final json = {}; - if (this.nullablemessage != null) { - json[r'NullableMessage'] = this.nullablemessage; + if (this.nullableMessage != null) { + json[r'NullableMessage'] = this.nullableMessage; } else { json[r'NullableMessage'] = null; } @@ -59,7 +59,7 @@ class HealthCheckResult { }()); return HealthCheckResult( - nullablemessage: mapValueOfType(json, r'NullableMessage'), + nullableMessage: mapValueOfType(json, r'NullableMessage'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart index 7a5b5ad0b058..edc224b79248 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/mixed_properties_and_additional_properties_class.dart @@ -14,7 +14,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { /// Returns a new [MixedPropertiesAndAdditionalPropertiesClass] instance. MixedPropertiesAndAdditionalPropertiesClass({ this.uuid, - this.datetime, + this.dateTime, this.map = const {}, }); @@ -32,25 +32,25 @@ class MixedPropertiesAndAdditionalPropertiesClass { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? datetime; + DateTime? dateTime; Map map; @override bool operator ==(Object other) => identical(this, other) || other is MixedPropertiesAndAdditionalPropertiesClass && other.uuid == uuid && - other.datetime == datetime && + other.dateTime == dateTime && _deepEquality.equals(other.map, map); @override int get hashCode => // ignore: unnecessary_parenthesis (uuid == null ? 0 : uuid!.hashCode) + - (datetime == null ? 0 : datetime!.hashCode) + + (dateTime == null ? 0 : dateTime!.hashCode) + (map.hashCode); @override - String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, datetime=$datetime, map=$map]'; + String toString() => 'MixedPropertiesAndAdditionalPropertiesClass[uuid=$uuid, dateTime=$dateTime, map=$map]'; Map toJson() { final json = {}; @@ -59,8 +59,8 @@ class MixedPropertiesAndAdditionalPropertiesClass { } else { json[r'uuid'] = null; } - if (this.datetime != null) { - json[r'dateTime'] = this.datetime!.toUtc().toIso8601String(); + if (this.dateTime != null) { + json[r'dateTime'] = this.dateTime!.toUtc().toIso8601String(); } else { json[r'dateTime'] = null; } @@ -88,7 +88,7 @@ class MixedPropertiesAndAdditionalPropertiesClass { return MixedPropertiesAndAdditionalPropertiesClass( uuid: mapValueOfType(json, r'uuid'), - datetime: mapDateTime(json, r'dateTime', r''), + dateTime: mapDateTime(json, r'dateTime', r''), map: Animal.mapFromJson(json[r'map']), ); } diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart index c93f3d57f55d..5183e0f98e49 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/model_file.dart @@ -13,7 +13,7 @@ part of openapi.api; class ModelFile { /// Returns a new [ModelFile] instance. ModelFile({ - this.sourceuri, + this.sourceURI, }); /// Test capitalization @@ -23,24 +23,24 @@ class ModelFile { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? sourceuri; + String? sourceURI; @override bool operator ==(Object other) => identical(this, other) || other is ModelFile && - other.sourceuri == sourceuri; + other.sourceURI == sourceURI; @override int get hashCode => // ignore: unnecessary_parenthesis - (sourceuri == null ? 0 : sourceuri!.hashCode); + (sourceURI == null ? 0 : sourceURI!.hashCode); @override - String toString() => 'ModelFile[sourceuri=$sourceuri]'; + String toString() => 'ModelFile[sourceURI=$sourceURI]'; Map toJson() { final json = {}; - if (this.sourceuri != null) { - json[r'sourceURI'] = this.sourceuri; + if (this.sourceURI != null) { + json[r'sourceURI'] = this.sourceURI; } else { json[r'sourceURI'] = null; } @@ -66,7 +66,7 @@ class ModelFile { }()); return ModelFile( - sourceuri: mapValueOfType(json, r'sourceURI'), + sourceURI: mapValueOfType(json, r'sourceURI'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart index c3942c6fdc82..a27a5682533e 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/number_only.dart @@ -13,7 +13,7 @@ part of openapi.api; class NumberOnly { /// Returns a new [NumberOnly] instance. NumberOnly({ - this.justnumber, + this.justNumber, }); /// @@ -22,24 +22,24 @@ class NumberOnly { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - num? justnumber; + num? justNumber; @override bool operator ==(Object other) => identical(this, other) || other is NumberOnly && - other.justnumber == justnumber; + other.justNumber == justNumber; @override int get hashCode => // ignore: unnecessary_parenthesis - (justnumber == null ? 0 : justnumber!.hashCode); + (justNumber == null ? 0 : justNumber!.hashCode); @override - String toString() => 'NumberOnly[justnumber=$justnumber]'; + String toString() => 'NumberOnly[justNumber=$justNumber]'; Map toJson() { final json = {}; - if (this.justnumber != null) { - json[r'JustNumber'] = this.justnumber; + if (this.justNumber != null) { + json[r'JustNumber'] = this.justNumber; } else { json[r'JustNumber'] = null; } @@ -65,7 +65,7 @@ class NumberOnly { }()); return NumberOnly( - justnumber: num.parse('${json[r'JustNumber']}'), + justNumber: num.parse('${json[r'JustNumber']}'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart index 7e2c588d7fec..5c7386821aa3 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/object_with_deprecated_fields.dart @@ -15,7 +15,7 @@ class ObjectWithDeprecatedFields { ObjectWithDeprecatedFields({ this.uuid, this.id, - this.deprecatedref, + this.deprecatedRef, this.bars = const [], }); @@ -41,7 +41,7 @@ class ObjectWithDeprecatedFields { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DeprecatedObject? deprecatedref; + DeprecatedObject? deprecatedRef; List bars; @@ -49,7 +49,7 @@ class ObjectWithDeprecatedFields { bool operator ==(Object other) => identical(this, other) || other is ObjectWithDeprecatedFields && other.uuid == uuid && other.id == id && - other.deprecatedref == deprecatedref && + other.deprecatedRef == deprecatedRef && _deepEquality.equals(other.bars, bars); @override @@ -57,11 +57,11 @@ class ObjectWithDeprecatedFields { // ignore: unnecessary_parenthesis (uuid == null ? 0 : uuid!.hashCode) + (id == null ? 0 : id!.hashCode) + - (deprecatedref == null ? 0 : deprecatedref!.hashCode) + + (deprecatedRef == null ? 0 : deprecatedRef!.hashCode) + (bars.hashCode); @override - String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedref=$deprecatedref, bars=$bars]'; + String toString() => 'ObjectWithDeprecatedFields[uuid=$uuid, id=$id, deprecatedRef=$deprecatedRef, bars=$bars]'; Map toJson() { final json = {}; @@ -75,8 +75,8 @@ class ObjectWithDeprecatedFields { } else { json[r'id'] = null; } - if (this.deprecatedref != null) { - json[r'deprecatedRef'] = this.deprecatedref; + if (this.deprecatedRef != null) { + json[r'deprecatedRef'] = this.deprecatedRef; } else { json[r'deprecatedRef'] = null; } @@ -105,7 +105,7 @@ class ObjectWithDeprecatedFields { return ObjectWithDeprecatedFields( uuid: mapValueOfType(json, r'uuid'), id: num.parse('${json[r'id']}'), - deprecatedref: DeprecatedObject.fromJson(json[r'deprecatedRef']), + deprecatedRef: DeprecatedObject.fromJson(json[r'deprecatedRef']), bars: json[r'bars'] is Iterable ? (json[r'bars'] as Iterable).cast().toList(growable: false) : const [], diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart index d9c4cc9887a0..bc591de9fab9 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/order.dart @@ -14,9 +14,9 @@ class Order { /// Returns a new [Order] instance. Order({ this.id, - this.petid, + this.petId, this.quantity, - this.shipdate, + this.shipDate, this.status, this.complete = false, }); @@ -35,7 +35,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? petid; + int? petId; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -51,7 +51,7 @@ class Order { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - DateTime? shipdate; + DateTime? shipDate; /// Order Status OrderStatusEnum? status; @@ -61,9 +61,9 @@ class Order { @override bool operator ==(Object other) => identical(this, other) || other is Order && other.id == id && - other.petid == petid && + other.petId == petId && other.quantity == quantity && - other.shipdate == shipdate && + other.shipDate == shipDate && other.status == status && other.complete == complete; @@ -71,14 +71,14 @@ class Order { int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + - (petid == null ? 0 : petid!.hashCode) + + (petId == null ? 0 : petId!.hashCode) + (quantity == null ? 0 : quantity!.hashCode) + - (shipdate == null ? 0 : shipdate!.hashCode) + + (shipDate == null ? 0 : shipDate!.hashCode) + (status == null ? 0 : status!.hashCode) + (complete.hashCode); @override - String toString() => 'Order[id=$id, petid=$petid, quantity=$quantity, shipdate=$shipdate, status=$status, complete=$complete]'; + String toString() => 'Order[id=$id, petId=$petId, quantity=$quantity, shipDate=$shipDate, status=$status, complete=$complete]'; Map toJson() { final json = {}; @@ -87,8 +87,8 @@ class Order { } else { json[r'id'] = null; } - if (this.petid != null) { - json[r'petId'] = this.petid; + if (this.petId != null) { + json[r'petId'] = this.petId; } else { json[r'petId'] = null; } @@ -97,8 +97,8 @@ class Order { } else { json[r'quantity'] = null; } - if (this.shipdate != null) { - json[r'shipDate'] = this.shipdate!.toUtc().toIso8601String(); + if (this.shipDate != null) { + json[r'shipDate'] = this.shipDate!.toUtc().toIso8601String(); } else { json[r'shipDate'] = null; } @@ -131,9 +131,9 @@ class Order { return Order( id: mapValueOfType(json, r'id'), - petid: mapValueOfType(json, r'petId'), + petId: mapValueOfType(json, r'petId'), quantity: mapValueOfType(json, r'quantity'), - shipdate: mapDateTime(json, r'shipDate', r''), + shipDate: mapDateTime(json, r'shipDate', r''), status: OrderStatusEnum.fromJson(json[r'status']), complete: mapValueOfType(json, r'complete') ?? false, ); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart index 5fc3c16cd56d..219967ad59fa 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/parent_with_nullable.dart @@ -14,26 +14,26 @@ class ParentWithNullable { /// Returns a new [ParentWithNullable] instance. ParentWithNullable({ this.type, - this.nullableproperty, + this.nullableProperty, }); ParentWithNullableTypeEnum? type; - String? nullableproperty; + String? nullableProperty; @override bool operator ==(Object other) => identical(this, other) || other is ParentWithNullable && other.type == type && - other.nullableproperty == nullableproperty; + other.nullableProperty == nullableProperty; @override int get hashCode => // ignore: unnecessary_parenthesis (type == null ? 0 : type!.hashCode) + - (nullableproperty == null ? 0 : nullableproperty!.hashCode); + (nullableProperty == null ? 0 : nullableProperty!.hashCode); @override - String toString() => 'ParentWithNullable[type=$type, nullableproperty=$nullableproperty]'; + String toString() => 'ParentWithNullable[type=$type, nullableProperty=$nullableProperty]'; Map toJson() { final json = {}; @@ -42,8 +42,8 @@ class ParentWithNullable { } else { json[r'type'] = null; } - if (this.nullableproperty != null) { - json[r'nullableProperty'] = this.nullableproperty; + if (this.nullableProperty != null) { + json[r'nullableProperty'] = this.nullableProperty; } else { json[r'nullableProperty'] = null; } @@ -70,7 +70,7 @@ class ParentWithNullable { return ParentWithNullable( type: ParentWithNullableTypeEnum.fromJson(json[r'type']), - nullableproperty: mapValueOfType(json, r'nullableProperty'), + nullableProperty: mapValueOfType(json, r'nullableProperty'), ); } return null; @@ -134,11 +134,11 @@ class ParentWithNullableTypeEnum { String toJson() => value; - static const childwithnullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); + static const childWithNullable = ParentWithNullableTypeEnum._(r'ChildWithNullable'); /// List of all possible values in this [enum][ParentWithNullableTypeEnum]. static const values = [ - childwithnullable, + childWithNullable, ]; static ParentWithNullableTypeEnum? fromJson(dynamic value) => ParentWithNullableTypeEnumTypeTransformer().decode(value); @@ -177,7 +177,7 @@ class ParentWithNullableTypeEnumTypeTransformer { ParentWithNullableTypeEnum? decode(dynamic data, {bool allowNull = true}) { if (data != null) { switch (data) { - case r'ChildWithNullable': return ParentWithNullableTypeEnum.childwithnullable; + case r'ChildWithNullable': return ParentWithNullableTypeEnum.childWithNullable; default: if (!allowNull) { throw ArgumentError('Unknown enum value to decode: $data'); diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart index 6d44804b9a63..806f91e41ace 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/pet.dart @@ -16,7 +16,7 @@ class Pet { this.id, this.category, required this.name, - this.photourls = const {}, + this.photoUrls = const {}, this.tags = const [], this.status, }); @@ -39,7 +39,7 @@ class Pet { String name; - Set photourls; + Set photoUrls; List tags; @@ -51,7 +51,7 @@ class Pet { other.id == id && other.category == category && other.name == name && - _deepEquality.equals(other.photourls, photourls) && + _deepEquality.equals(other.photoUrls, photoUrls) && _deepEquality.equals(other.tags, tags) && other.status == status; @@ -61,12 +61,12 @@ class Pet { (id == null ? 0 : id!.hashCode) + (category == null ? 0 : category!.hashCode) + (name.hashCode) + - (photourls.hashCode) + + (photoUrls.hashCode) + (tags.hashCode) + (status == null ? 0 : status!.hashCode); @override - String toString() => 'Pet[id=$id, category=$category, name=$name, photourls=$photourls, tags=$tags, status=$status]'; + String toString() => 'Pet[id=$id, category=$category, name=$name, photoUrls=$photoUrls, tags=$tags, status=$status]'; Map toJson() { final json = {}; @@ -81,7 +81,7 @@ class Pet { json[r'category'] = null; } json[r'name'] = this.name; - json[r'photoUrls'] = this.photourls.toList(growable: false); + json[r'photoUrls'] = this.photoUrls.toList(growable: false); json[r'tags'] = this.tags; if (this.status != null) { json[r'status'] = this.status; @@ -113,7 +113,7 @@ class Pet { id: mapValueOfType(json, r'id'), category: Category.fromJson(json[r'category']), name: mapValueOfType(json, r'name')!, - photourls: json[r'photoUrls'] is Iterable + photoUrls: json[r'photoUrls'] is Iterable ? (json[r'photoUrls'] as Iterable).cast().toSet() : const {}, tags: Tag.listFromJson(json[r'tags']), diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart index ac2f099a4df4..aeb25a138f07 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/special_model_name.dart @@ -13,7 +13,7 @@ part of openapi.api; class SpecialModelName { /// Returns a new [SpecialModelName] instance. SpecialModelName({ - this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket, + this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket, }); /// @@ -22,24 +22,24 @@ class SpecialModelName { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + int? dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override bool operator ==(Object other) => identical(this, other) || other is SpecialModelName && - other.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + other.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; @override int get hashCode => // ignore: unnecessary_parenthesis - (dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket == null ? 0 : dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket!.hashCode); + (dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket == null ? 0 : dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket!.hashCode); @override - String toString() => 'SpecialModelName[dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket=$dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket]'; + String toString() => 'SpecialModelName[dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket=$dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket]'; Map toJson() { final json = {}; - if (this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket != null) { - json[r'$special[property.name]'] = this.dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket; + if (this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket != null) { + json[r'$special[property.name]'] = this.dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket; } else { json[r'$special[property.name]'] = null; } @@ -65,7 +65,7 @@ class SpecialModelName { }()); return SpecialModelName( - dollarSpecialleftSquareBracketPropertyperiodNamerightSquareBracket: mapValueOfType(json, r'$special[property.name]'), + dollarSpecialLeftSquareBracketPropertyPeriodNameRightSquareBracket: mapValueOfType(json, r'$special[property.name]'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart index fd81a25bd83d..8e2316a619dc 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/test_inline_freeform_additional_properties_request.dart @@ -13,7 +13,7 @@ part of openapi.api; class TestInlineFreeformAdditionalPropertiesRequest { /// Returns a new [TestInlineFreeformAdditionalPropertiesRequest] instance. TestInlineFreeformAdditionalPropertiesRequest({ - this.someproperty, + this.someProperty, }); /// @@ -22,24 +22,24 @@ class TestInlineFreeformAdditionalPropertiesRequest { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? someproperty; + String? someProperty; @override bool operator ==(Object other) => identical(this, other) || other is TestInlineFreeformAdditionalPropertiesRequest && - other.someproperty == someproperty; + other.someProperty == someProperty; @override int get hashCode => // ignore: unnecessary_parenthesis - (someproperty == null ? 0 : someproperty!.hashCode); + (someProperty == null ? 0 : someProperty!.hashCode); @override - String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someproperty=$someproperty]'; + String toString() => 'TestInlineFreeformAdditionalPropertiesRequest[someProperty=$someProperty]'; Map toJson() { final json = {}; - if (this.someproperty != null) { - json[r'someProperty'] = this.someproperty; + if (this.someProperty != null) { + json[r'someProperty'] = this.someProperty; } else { json[r'someProperty'] = null; } @@ -65,7 +65,7 @@ class TestInlineFreeformAdditionalPropertiesRequest { }()); return TestInlineFreeformAdditionalPropertiesRequest( - someproperty: mapValueOfType(json, r'someProperty'), + someProperty: mapValueOfType(json, r'someProperty'), ); } return null; diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart index b6be541d49f9..395f9e38e043 100644 --- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart +++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_use_lower_camel_case/lib/model/user.dart @@ -15,12 +15,12 @@ class User { User({ this.id, this.username, - this.firstname, - this.lastname, + this.firstName, + this.lastName, this.email, this.password, this.phone, - this.userstatus, + this.userStatus, }); /// @@ -45,7 +45,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? firstname; + String? firstName; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -53,7 +53,7 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - String? lastname; + String? lastName; /// /// Please note: This property should have been non-nullable! Since the specification file @@ -86,33 +86,33 @@ class User { /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// - int? userstatus; + int? userStatus; @override bool operator ==(Object other) => identical(this, other) || other is User && other.id == id && other.username == username && - other.firstname == firstname && - other.lastname == lastname && + other.firstName == firstName && + other.lastName == lastName && other.email == email && other.password == password && other.phone == phone && - other.userstatus == userstatus; + other.userStatus == userStatus; @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (username == null ? 0 : username!.hashCode) + - (firstname == null ? 0 : firstname!.hashCode) + - (lastname == null ? 0 : lastname!.hashCode) + + (firstName == null ? 0 : firstName!.hashCode) + + (lastName == null ? 0 : lastName!.hashCode) + (email == null ? 0 : email!.hashCode) + (password == null ? 0 : password!.hashCode) + (phone == null ? 0 : phone!.hashCode) + - (userstatus == null ? 0 : userstatus!.hashCode); + (userStatus == null ? 0 : userStatus!.hashCode); @override - String toString() => 'User[id=$id, username=$username, firstname=$firstname, lastname=$lastname, email=$email, password=$password, phone=$phone, userstatus=$userstatus]'; + String toString() => 'User[id=$id, username=$username, firstName=$firstName, lastName=$lastName, email=$email, password=$password, phone=$phone, userStatus=$userStatus]'; Map toJson() { final json = {}; @@ -126,13 +126,13 @@ class User { } else { json[r'username'] = null; } - if (this.firstname != null) { - json[r'firstName'] = this.firstname; + if (this.firstName != null) { + json[r'firstName'] = this.firstName; } else { json[r'firstName'] = null; } - if (this.lastname != null) { - json[r'lastName'] = this.lastname; + if (this.lastName != null) { + json[r'lastName'] = this.lastName; } else { json[r'lastName'] = null; } @@ -151,8 +151,8 @@ class User { } else { json[r'phone'] = null; } - if (this.userstatus != null) { - json[r'userStatus'] = this.userstatus; + if (this.userStatus != null) { + json[r'userStatus'] = this.userStatus; } else { json[r'userStatus'] = null; } @@ -180,12 +180,12 @@ class User { return User( id: mapValueOfType(json, r'id'), username: mapValueOfType(json, r'username'), - firstname: mapValueOfType(json, r'firstName'), - lastname: mapValueOfType(json, r'lastName'), + firstName: mapValueOfType(json, r'firstName'), + lastName: mapValueOfType(json, r'lastName'), email: mapValueOfType(json, r'email'), password: mapValueOfType(json, r'password'), phone: mapValueOfType(json, r'phone'), - userstatus: mapValueOfType(json, r'userStatus'), + userStatus: mapValueOfType(json, r'userStatus'), ); } return null;