Skip to content

Commit

Permalink
[BUGFIX][dart-dio] add unknownEnumValue to JsonKey (OpenAPITools#19416)
Browse files Browse the repository at this point in the history
* [BUGFIX][dart-dio] add unknownEnumValue to JsonKey

* review fix

---------

Co-authored-by: Vasiliy Ditsyak <[email protected]>
  • Loading branch information
vasilich6107 and vasilich6107 authored Sep 15, 2024
1 parent abf9416 commit 7dcaece
Show file tree
Hide file tree
Showing 45 changed files with 156 additions and 134 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ class {{{classname}}} {
{{#defaultValue}}defaultValue: {{{defaultValue}}},{{/defaultValue}}
name: r'{{{baseName}}}',
required: {{#required}}true{{/required}}{{^required}}false{{/required}},
includeIfNull: {{#required}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/required}}{{^required}}false{{/required}}
includeIfNull: {{#required}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/required}}{{^required}}false{{/required}},
{{#isEnumOrRef}}
{{#enumUnknownDefaultCase}}
unknownEnumValue: {{{datatypeWithEnum}}}.unknownDefaultOpenApi,
{{/enumUnknownDefaultCase}}
{{/isEnumOrRef}}
)
{{/isBinary}}
{{#isBinary}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AdditionalPropertiesClass {

name: r'map_property',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -39,7 +39,7 @@ class AdditionalPropertiesClass {

name: r'map_of_map_property',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AllOfWithSingleRef {

name: r'username',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -40,7 +40,8 @@ class AllOfWithSingleRef {

name: r'SingleRefType',
required: false,
includeIfNull: false
includeIfNull: false,
unknownEnumValue: SingleRefType.unknownDefaultOpenApi,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Animal {

name: r'className',
required: true,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -39,7 +39,7 @@ class Animal {
defaultValue: 'red',
name: r'color',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ApiResponse {

name: r'code',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -41,7 +41,7 @@ class ApiResponse {

name: r'type',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -53,7 +53,7 @@ class ApiResponse {

name: r'message',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ArrayOfArrayOfNumberOnly {

name: r'ArrayArrayNumber',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ArrayOfNumberOnly {

name: r'ArrayNumber',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ArrayTest {

name: r'array_of_string',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -42,7 +42,7 @@ class ArrayTest {

name: r'array_array_of_integer',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -54,7 +54,7 @@ class ArrayTest {

name: r'array_array_of_model',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Capitalization {

name: r'smallCamel',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -47,7 +47,7 @@ class Capitalization {

name: r'CapitalCamel',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -59,7 +59,7 @@ class Capitalization {

name: r'small_Snake',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -71,7 +71,7 @@ class Capitalization {

name: r'Capital_Snake',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -83,7 +83,7 @@ class Capitalization {

name: r'SCA_ETH_Flow_Points',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -96,7 +96,7 @@ class Capitalization {

name: r'ATT_NAME',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Cat {

name: r'className',
required: true,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -44,7 +44,7 @@ class Cat {
defaultValue: 'red',
name: r'color',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -56,7 +56,7 @@ class Cat {

name: r'declawed',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Category {

name: r'id',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -39,7 +39,7 @@ class Category {
defaultValue: 'default-name',
name: r'name',
required: true,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ class ChildWithNullable {

name: r'type',
required: false,
includeIfNull: false
includeIfNull: false,
unknownEnumValue: ChildWithNullableTypeEnum.unknownDefaultOpenApi,
)


Expand All @@ -44,7 +45,7 @@ class ChildWithNullable {

name: r'nullableProperty',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -56,7 +57,7 @@ class ChildWithNullable {

name: r'otherProperty',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ClassModel {

name: r'_class',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DeprecatedObject {

name: r'name',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Dog {

name: r'className',
required: true,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -44,7 +44,7 @@ class Dog {
defaultValue: 'red',
name: r'color',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand All @@ -56,7 +56,7 @@ class Dog {

name: r'breed',
required: false,
includeIfNull: false
includeIfNull: false,
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class EnumArrays {

name: r'just_symbol',
required: false,
includeIfNull: false
includeIfNull: false,
unknownEnumValue: EnumArraysJustSymbolEnum.unknownDefaultOpenApi,
)


Expand All @@ -39,7 +40,8 @@ class EnumArrays {

name: r'array_enum',
required: false,
includeIfNull: false
includeIfNull: false,
unknownEnumValue: List<EnumArraysArrayEnumEnum>.unknownDefaultOpenApi,
)


Expand Down
Loading

0 comments on commit 7dcaece

Please sign in to comment.