* Fix for #15736 [TYPESCRIPT-FETCH] Subclassing components using discriminators fails to convert subclasses to JSON.
Added similar discriminator handling to ToJSON as was already in place for FromJSON.
The actual files changed are typescript-fetch/modelGeneric.mustache and typescript-fetch/apis.mustache.
Also, adjusted FromJSON a bit in an attempt to support multiple hierarchical levels of discriminators.
And fixed an issue with calling FromJSON from the map() function, which caused the index parameter getting inadvertently passed as the ignoreDiscriminator parameter.
Additionally, fixed failing "mvn integration-test -f samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml"
Moreover, added forceConsistentCasingInFileNames:false into tsconfig.json to make tests compile on OsX.
* Rolled back the changes related to the map() function calls in favor of using ToJSONTyped instead, as that is in line with how FromJSON is already implemented.
* feat (JAVA SPRING RESTCLIENT) 19406: Add single request parameter for Spring RestClient
Closes#19406
* chore (JAVA SPRING RESTCLIENT) 19406: Add new sample to jdk 17 tests
* fix (JAVA SPRING RESTCLIENT) 19406: Fix sample build
* fix: typescript-angular -> when model property name is sanitized, use instead original property name within quotes in mustache template
* fix: updated samples
* chore: added comment for hasSanitizedName
* add original tag, add dummy model for test
* update samples
---------
Co-authored-by: Davide Diaconu <davidediak@gmail.com>
* [Java] Add a new additional property to configure Jackson's `failOnUnknownProperties`
* Move `FAIL_ON_UNKNOWN_PROPERTIES` property to JavaClientCodegen
* Template `FAIL_ON_UNKNOWN_PROPERTIES` for other libraries beside retrofit2
* Default `failOnUnknownProperties` to false for all Java Client libraries
* Fix integration tests
Add the `failOnUnknownProperties: true` additional properties to generate the
expected mapper
* [java] Use @JsonFormat instead of @JsonSerialize so that JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN is respected and generates a String using BigDecimal#toPlainString instead of BigDecimal#toString
* Only add Jackson @JsonFormat if properties serializeBigDecimalAsString and jackson are enabled
* Do not verify if jackson is available when mapping imports as the property is not evaluated yet
* Removed unused JsonSerialize and ToStringSerializer
* Add global token based auth support (basic, bearer) for k6
* config files and generated code files after the changes
* Handle empty or null auth at path level
* files changed after update with master and run build
* [Rust Server] Add auto-generated CLI tool
* [Rust Server] Test multiple path parameters
* [Rust Server] Test boolean parameters and apostrophes
* [Rust Server] Test operation with two boolean parameters with same first letter
* [Rust Server] Test apostrophes in operation summary
* Update samples
* [Rust Server] Fix build errors with OpenSSL
* Update samples
* Update samples
* [typescript][angular] move app description from header license info to readme
* [typescript][angular] move app description from header license info to readme
* [Rust Server] Fix up model generation
- Correctly generate anyOf/oneOf models
- Fix up ToString / FromStr support
- Disable PartialOrd generation for anyOf/oneOf models
- Generate models for inline enums
- Support enums in headers, and vectors of models in headers
* [Rust Server] Add test for anyOf with additional properties
* Update samples
* [Rust Server] Tidy up logging
* test: fix broken python test
* fix: handle multiple file parameters
Previously an array of files was not handled correctly, despite the type
annotation implying it was.
* feat: handle filename,filedata tuples in file param
This allows for users to pass filenames with their data in file params,
which is useful for multipart formdata requests. Without this, the list
of files added in the previous commit would have the same filename for
all files (the parameter name).
* [Rust Server] Sort operations so that the ones with fewest params come first
This resolves things correctly per
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md#pathsObject
- "When matching URLs, concrete (non-templated) paths would be matched
before their templated counterparts."
* Update samples
* [Rust Server] Fix tabs vs spaces
---------
Co-authored-by: Rob Day <Robert.Day@metaswitch.com>
* [Rust Server] Allow configuration of multipart/form attachment size limit
multipart 0.14+ imposes a 8MB size limit on multipart/form bodies.
This allows that limit to be configured. The default is left as is.
This also improves error messages produced when handling multipart/form bodies.
* Update samples
* Add externCrateName property to rust hyper client
This is follows the lead of the rust hyper server generator and provides
an externCrateName. This is because the crate name used for importing
can be different from the package name, because dashes `-` get converted
to underscores `_`.
This allows us to write example code in rustdoc that compiles
successfully.
* Get the rustdoc examples to actually compile
* Make rust hyper client thread safe
* Fix compile time issue with reqwest client test
* Add a test for thread safety
* Generate rust hyper samples
* Use https for petstore api to fix client tests
http://petstore.swagger.io/v2 is 301 redirecting to
https://petstore.swagger.io/v2 and this is breaking posts to the API.
When the client recieves a redirect it does not resend the POST data,
instead it switches to GET. This is in line with how browsers behave
when encountering a 301 redirect on a POST request.
* Make rust hyper client structs `Sync` too
This trait is also helpful in making the api work well with threads.
* Use a getCrateName function instead of adding more state
* update samples
---------
Co-authored-by: Krishna Rajendran <krishna@emptybox.org>
* Fix server-writing docs for rust-server
Fix broken link in generated README for rust-server.
* Update samples
---------
Co-authored-by: Keith Wansbrough <Keith.Wansbrough@metaswitch.com>