In 5.0.1 the generated line in `ApiClient` was:
```
return RequestBody.create(MediaType.parse(contentType), (byte[]) obj);
```
in 5.1.0 it is:
```
return RequestBody.create((byte[]) obj, MediaType.parse(contentType));
```
Looks like this change was introduced in #8969, and requires a more recent version of OkHttp to compile in some (all?) circumstances.
* Fix parentSchema conditional
we cannot call `parent::` if parent isn't present. Everywhere else in the schema we're checking for `{{parentSchema}}` but here we're checking for `{{parent}}` which is causing errors when parent is not present
* Update samples
My understanding of the version 5 release of OpenAPI generator was that Java 7 support was dropped. Currently the Java client defaults to Java 7, Java 8 can be opted in with the `java8` config option. This removes the conditional logic in `build.gradle` around that config option and defaults to Java 8. This is to support #9151, up-to-date dependency versions rely on Java 8 and it's easier if that is the default.
To be clear, this changes behavior - previous default version was Java 7, this changes it to Java 8.
* [swift5] Fix additionalProps inner type
* [swift5] Add and use AnyCodable type instead of any
* [swift5] Use the original petstore w/fake models for testing default
* [swift5] Update swift-tools-version to 5.1
* [swift5] Update samples and docs
* [swift5] Add useClasses to use `final class` instead of `struct`
* [swift5] Always include CodingKeys enum
* [swift5] Implement model equals and hash functions
* [swift5] Encode `null` values
* [swift5] Test `useClasses` in urlsessionLibrary
* [swift5] Add a required nullable prop test case to 2_0/swift/petstore*.yaml
* [swift5] Update samples and docs
* [Kotlin][#9313] Make form params optional in Kotlin retrofit2 template.
* [Kotlin][#9313] Update sample files.
* [Kotlin] [#9313] Remove new line at the end of the mustache template
* Update Dockerfile.mustache
Using alpine instead of ubuntu for leaner Docker images.
Small fix for welcome message.
Changing default shell to `zsh` and fixing entrypoint.
* update samples
* move config, add new files
Co-authored-by: avbenavides <62693723+avbenavides@users.noreply.github.com>
* Update codegen config
* Add templates for Go Echo openapi-codegen
* Add the yaml config file!
* Add GoEchoServerCodegen.java.
This is the first iteration, it works but probably needs a lot of improvements.
* Update codegen, adds some comments.
* Update GoEchoServerCodegen.java
* Update GoEchoServerCodegen.java
* Update GoEchoServerCodegen.java and related yaml file
* Add the result of generate-samples.sh for CI purposes.
* Add the result of bin/utils/ensure-up-to-date for CI purposes.
* Update go-echo-server-petstore-new.yaml
Fix the outputdir
* Update in regard to result of ./bin/generate-samples.sh
* Update in regard to result of ./bin/generate-samples.sh
* Remove wrongly generated files
* Add correct generated files.
* Add changes regarding /bin/utils/ensure-up-to-date
* Update templates to include comments.
* Update/add result of ./bin/generate-samples.sh and ./bin/utils/export_docs_generators.sh
* add the Dockerfile and updated the README and others.
Signed-off-by: Yasuhiro ABE <yasu-abe@u-aizu.ac.jp>
* fixed the indent to follow the coding style guide.
Signed-off-by: Yasuhiro ABE <yasu-abe@u-aizu.ac.jp>
* revised.
Signed-off-by: Yasuhiro ABE <yasu-abe@u-aizu.ac.jp>
* feat(adapter): add BigDecimal kotlin support
this allows the kotlin client generator to support
BigDecimal values
Fixes#7196
* update samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [Java] [JavaJaxRS] Respect readOnly/writeOnly attribute markers
Generate jackson JsonProperty like following:
- `readOnly` is present in Spec: `@JsonProperty(value = "[name]", access = JsonProperty.Access.READ_ONLY)`
- `writeOnly` is present in Spec: `@JsonProperty(value = "[name]", access = JsonProperty.Access.WRITE_ONLY)`
Edge case: both are present -> Spec is invalid and generator cancels anyway with:
> org.openapitools.codegen.SpecValidationException: There were issues with the specification. The option can be disabled via validateSpec (Maven/Gradle) or --skip-validate-spec (CLI).
> | Error count: 1, Warning count: 1
> Errors:
> -attribute components.schemas.Example. writeOnly and readOnly are both present
* update samples
Co-authored-by: Michael Kroll <9883575+mickroll@users.noreply.github.com>
While inner enum classes from dataClass.mustache work fine, standalone enum classes lack `@JsonProperty` annotations so that Jackson uses names instead of values.
* 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
* [Java] [Native] Add response body to exception message
* [Java] [Native] Use default base URI if baseUri param is null
* [Java] [Native] Use default base URI if baseUri param is null
* Don't include read-only properties in Python examples.
When using a schema with read-only fields as API inputs, Python
generates examples for those: this excludes them.
* Fix tests
Motivation:
In Gradle 7.0 apply @Input and @Internal on property is forbidden.
Before Gradle 7.0 applying both on the same property is confusing. According to the documentation:
* @Input: Attached to a task property to indicate that the property specifies some input value for the task.
* @Internal: Attached to a task property to indicate that the property is not to be taken into account for up-to-date checking
* Added int arrays parsing in parameters. Respect the 'required' property.
* Replaced spaces with tabs
* Generate samples with new spacing
* Removed unused import
* Merged with latest master
* fix by mapping outside of class
* tests
* regeneration and tests
* server
* INDENT
* a
* enable mapping
* Revert "server"
This reverts commit 6fc9712fb550d258d0332df243ea5080565c6770.
* Samples regenerated
Co-authored-by: Justin Black <justin.a.black@gmail.com>