* 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
* [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
* Add CORS support to python-flask server generator
* Documentation update and CORS support for other generators using the same base class
* Trivial sample changes
* Removes nulltype from python, updates samples
* Removes nulltype from the python requirements
* Removes nulltype import in models, moves requiredVars to optionalVars when approprieate