* [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
AutoRefactor cleanup 'AnnotationCleanUp' applied by erefactor:
Simplifies annotation uses:
- empty parentheses will be removed from annotations,
- single members named "value" will be removed from annotations and
only the value will be left.
For AutoRefactor see https://github.com/JnRouvignac/AutoRefactor
For erefactor see https://github.com/cal101/erefactor
- add missing 'use Swagger.Streams;' clause
- add Style_Checks pragma to fix style compilation warnings in generated Ada code
- fix spurious spaces in licence headers that cause Ada style compilation warning
- update the default GNAT project config
* [dart][dart-dio] Add support for set types
* copy `uniqueItems` usage from 2.0 fake spec to `3.0`
* add support for sets in parameters, responses and properties
* Regenerate all other samples
* Fix broken tests due to invalid cast
* Update documentation
* Regenerate samples
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Remove redundant Rust use statement
* Return errors only for 4xx and 5xx in Rust reqwest
Since 1xx and 3xx are perfectly valid status codes the client might
need to handle.
see: https://docs.rs/reqwest/0.11.0/reqwest/struct.StatusCode.html#method.is_informational
* Regenerate samples
Co-authored-by: Gabriel Féron <feron.gabriel@gmail.com>
* [rust-server] Add support for Bearer auth
- Added bearer auth to the security features for rust server
- Supplemented the basic auth condition in the context template to handled basic auth and bearer auth separately.
- Repurpose an exising sample to confirm the code generation works as expected.
* Update docs
* Update readme for bearer tokens
* [Rust Server] Support Cargo Metadata Configuration
This adds support for publish, repository, documentation and homepage metadata.
* [Rust Server] Test Cargo Metadata configuration