* added jackson as supported serialization library for retrofit2; resolves#7435
* Jackson support for retrofit2 library: Adjusted ApiClient to respectively include only gson or jackson specific conversion support depending on which serialization framework is selected
* Jackson support for retrofit2 library: Adjusted dependencies to respectively only include those necessary for gson or jackson depending on which serialization framework is selected
* reorder converter factory additions to have minimal change
* -: skipping gson-fire dependency when gson is not selected
* -: Jackson support for retrofit2 library: since useplayws implies jackson usage, only adding dependencies via useplayws that are specific to it
* Jackson support for retrofit2 library: fixed whitespace issue in generated api clients
* Jackson support for retrofit2 library: removed duplicated play26 dependency version property
* Jackson support for retrofit2 library: update to play26 example as that had gson dependencies but does not seem to use it and now fully relies on the jackson setting to control the respective dependencies; play version property and dependency changed place because the jackson dependencies are grouped together and the play26 ones are placed after
* Jackson support for retrofit2 library: adjusting dependencies also for gradle file
* -: moved jackson databind version out of jackson section since it is used independently of jackson support it seems
* -: update gradle dependencies to match changes in maven dependencies
* Improve Add Async - Spring Cloud test
By testing the generated code.
This will be used to detect regressions.
* Spring: Fix reactive return type for list
Fix for #16883.
When *reactive* is enabled and response entities is *disabled*,
use `Flux<Item>` to stream the output instead of `Mono<Flux<Item>>`
With Spring Reactive, the expected return type for an array of item is
`Flux<Item>`.
Without this patch, the generated code is `Mono<Flux<Item>>`.
This is fixed by introducing specific handling for return types when
reactive is enabled.
In particular, "responseWrapper" is not used anymore in such situations.
* Fix methodBody
* Fix invalid test
* Fix SSE
* Fix methodBody when isArray and useResponseEntity
* methodBody: Flux.empty() instead of s -> {}
``EntityUtils#toString`` automatically selects the correct encoding based on the received request.
Scanner currently uses the JVM default encoding, which doesn't always work.
* Update csharp oneOf and anyOf mustache templates to accept primitive, object, and array types when deserializing
Add bug openapi spec
Remove generated files
Add test endpoints
Generate base on spec
Remove issue spec as it is moved into sample test spec
Add back in number and int
Round trip anyOf/oneOf serialization tests
Generate classes with int/num types
Do through converter instead of object ctor
Regen models
Use convert methods
Regen models
Test data
Add enum
Remove enums
Regenned models
* update sha256
* use new spec
* skip tests
* update workflow
* fix
---------
Co-authored-by: Ruben Aguilar <ruben.aguilar@forgeglobal.com>
* [okhttp-gson] Make initializer block for GSON builder static #16860
Make initializer block for GSON builder static, see #16860
* update sapmles
---------
Co-authored-by: Andre Wachsmuth <awa@xima.de>
* feat(client): support ability to disable boxed models
Add new additional property `avoidBoxedModels` which can be configured to avoid `Box<..>` of models.
It's very nice to have such config, because it doesn't make a lot of sense for really simple models.
* test: rollback config of existed test
* Fixed invalid extraction of response body in kotlin-client jvm-spring-*
* Generated echo-api for kotlin-jvm-spring-3-restclient
* Specific echo-api for Kotlin without allOf/anyOf
* Specific echo-api for Kotlin without allOf/anyOf
* Generated all samples
* Added kotlin-jvm-spring-3-restclient sample to workflow
* Fixed syntax problem
* [kotlin] Fixed multiple problems with default values
* [kotlin] Removed old commented code
* [kotlin] Generated new samples after merge with master
* [kotlin] ensure-up-to-date
* fix(rust): discriminator mapping to serde rename
Discriminator mapping has been ignored in some cases.
Even existing samples had wrong definition in some cases
This PR addresses this
* fix(rust): `oneOf` generation for client
Solves #17869 and #17896 and also includes unmerged $17898
Unfortunately it affects quite a lot of code, but we can see that only client-side models were affected by re-generation.
I tried to split this PR to several, but they're really coupled and hard to create a chain of PRs.
* fix: indentation in `impl Default`
* missing fixes
* fix: correct typeDeclaration with unaliased schema
* style: improve indentation for models
* fix: user toModelName for aliases of oneOf
* refactor: unify `getTypeDeclaration` for rust
* cover the case when `mapping` has the same `ref` for different mapping names
* test: add test for previous change
* style: remove extra qualified path to models
* add some comments
* fix(build): use method of `List` instead of specific for `LinkedList`
* add feature to generate only interface files
* generate sample
* add workflow file foe go gin service
* add workflow file foe go gin service
* add workflow file foe go gin service
* update samples
* fix(rust): simplify None logic
Used to be a code path (where isFreeFormObject and something else) where we could end up with two `: None` `: None`'s
This does add the None for the !required && !isArray && !isMap && !isNullable case (where nothing would have been printed before.
Above for the type on the individual vars inside the struct definition the logic is simply if not required then it's optional.
If it's optional we want a None when creating a new struct.
* ci: add tests for failure
* Use `exists()` to check for existing properties.
* Generate Petstore code.
* Fix use of `null` instead of `undefined`.
* Enhance function code.
* Regenerate Petstore code.
* Use `exists()` in generated API clients.
* Use `exists()` in generated API clients.
* Refer to properties differently.
Even though `title` is technically for the title of the API itself,
it's possible to set it for properties as well.
Right now, the `title` property is available in templates for regular properties,
but for ref-properties it gets lost right here.
This seemed rather surprising to me, so I think it's better to fix.
* Adds Collapse Spec Optionss to Maven Plugin
* Adds a collapsedSpec option to the maven plugin that produces a single-file representation of the spec in the output directory.
* Adds a includeCollapsedSpecInArtifacts option to the maven plugin that adds the collapsed spec file to the maven artifacts.
* Address Feedback Round 1
* Adds the new options to the maven plugin README.md.
* Fixes Unit Tests
* Corrects the casing of one of the schema files that was causing the tests to fail.