* [dart-dio] Disable nullable fields by default
This is not in line with the OAS and will prevent future Dart nullabilty features (NNBD) from being useful as all types would be optional.
Users can still opt-in for this.
* [dart-dio] Properties are nullable when not required AND not nullable
* [dart][dart-dio] Support nullable/required fields
* properties in built_value need to be nullable when they are nullable in OAS or when they are not required in OAS
* built_value does not support serializing `null` values by default as it is based on a serialization format based on iterables/lists and not maps
* dart-dio uses the built_value json plugin to convert the built_value format to regular json
* by generating a custom serializer for each class we can add support for serializing `null` values if the property is required AND nullable in OAS
* this is a breaking change as not all properties in the models are nullable by default anymore
* Implement required/nullable for dart
* Changes for set types and enum names after rebase
* Add some comments and fix built_value fields with default being nullable
* More rebase changes and regenerate docs
* [dart][dart-dio] Improve prefixing of inner enums with classname
* prevent further name conflicts by correctly naming the enum, until now there could potentially occur conflicts e.g. 2x `MapTestInnerEnum` by renaming the `items` child property
* correctly set `enumName` to match `datatypeWithEnum`
* Unrelated test regeneration
* [typescript-fetch] handle uniqueItems correctly in model and api
uniqueItems produces Set instead of Array as type, but the corresponding code did not treat Set correctly
use `Array.from` and `new Set` to convert from Set to Array and vice versa, if uniqueItems is true.
related to https://github.com/OpenAPITools/openapi-generator/issues/8258, but only fixes typescript-fetch
* [typescript-fetch] update samples
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"
This reverts commit 56e2b1fb
* Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true"
This reverts commit 335c304d
* Fix#8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fix#8027 - import the auto generated supporting JSON class only when discriminator is needed
* Fixed typescript bug in models.mustache with for...in on an empty array.
When an empty array comes in, the current for...in syntax results in creating an empty object being created and added to the array. This is the output from receiving an empty array that gets deserialized, resulting in an object with undefined values.
Switching to a for i < array.length loop fixes this issue.
```
body: [
GroupCustomResource {
apiVersion: undefined,
kind: undefined,
spec: undefined,
metadata: undefined,
status: undefined,
'': undefined
}
]
```
* Fixed typescript deserialization bug that was adding non-existent entries to objects during deserialization.
When an object comes in, the current for...in syntax results in adding an undefined key/value pair to each nested object, with key being empty string and value being undefined. This is the output from receiving an object that gets deserialized.
Adding a check to see if attributeType.name exists before adding it to the deserialized object fixes this.
```
res.body of listGroup for saved group is [
GroupCustomResource {
apiVersion: 'v1',
kind: 'Group',
spec: GroupSpec {
name: 'TestDeploymentGroup67264',
tenancyId: 'tenancy',
description: 'TestGroup description',
'': undefined
},
metadata: { additionalProp1: {}, spectra: [Object] },
status: undefined,
'': undefined
}
]
```
* Fixed for array for loop in serialize and added truth check for deserialize
* Made for...in loop a for loop; gets rid of the need for the truth check
* Fixed serialze/deserialize for loops for arrays
Co-authored-by: Gary Blaser <gary.blaser@oracle.com>
* updated the regex used in the String.replace for parseDate() to more precisely target ISO-8601
* added the replace function call to the ES6 mustache file