merge original#6
Merged
bflamand merged 302 commits intobflamand:masterfrom Apr 20, 2021
Merged
Conversation
…ror (#8737) * [python][template] move _path_to_item of simple init up so its avaliable for missing default errors * update generated examples
* Make all loggers non-static Reduces memory usage on startup by between 2 and 4 MB * Fix compile error in some autogenerated? module
* fix unique parameter naming * add tests
* Fix #8710 Signed-off-by: Francesco Guardiani <[email protected]> * Reintroduced default constructor Signed-off-by: Francesco Guardiani <[email protected]> * Deprecated Signed-off-by: Francesco Guardiani <[email protected]>
* add monitoring for tabs in the templates * rename script * add detect_tab_in_templates.sh * rearrange tests * add kotlin folders * move test to circleci * restore .travis.yml * fix grep
* Add support for arrays of enums for Rust * Rust: Use HashSet if uniqueItems is true
* use Files.createTempFile to address security concerns * Update modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java Co-authored-by: Jonathan Leitschuh <[email protected]> Co-authored-by: Jonathan Leitschuh <[email protected]>
* use Files.createTempFile in maven plugin to avoid security issues * error check when creating a folder
* Qt client handle deprecated * Update sample * update VERSION Co-authored-by: William Cheng <[email protected]>
#8812) * [dart][dart-dio] Remove manual json encode/decode calls in API classes Dio automatically adds a default transformer which does call `json.encode` and `json.decode` when the content-type is `application/json`. When the content-type is different, then it is up to the consumer to configure the Dio instance correctly to support custom content-types. Also tests!!! * [dart] Constraint test library to < 1.16.0 as it requires Dart 2.12.0 * Fix more constraint problems for the new test project
Go generation didn't properly named base type in `getSchemaType`, which ends up breaking some doc generation.
* [GO] use latest available oauth2 version * update samples Co-authored-by: William Cheng <[email protected]>
* create python abstract base class * refactor AbstractPythonConnexionServerCodegen * update doc
…8811) * (nestjs) removed unused basePath from api.service template 8810 * Update modules/openapi-generator/src/main/resources/typescript-nestjs/api.service.mustache Co-authored-by: Esteban Gehring <[email protected]> * added missing parenthesis on Global() decorator Co-authored-by: Esteban Gehring <[email protected]>
…ble (#8789) * Add Dart configuration flag to set new generator * Change templates to add json_serializable generator * Fix dart tests * Add custom serialization for standard generator * this change opens us a way to allow adding more than 2 generators * Add sample project for json_serializer * Use basename for json field name * Update samples with basename as json key * Update dart generator docs * Create AbstractDartCodegen class * Update docs, dart-dio and dart-jaguar dont get json_serializable yet * Deduplicate method calls * Dix dart-dio generation * Revert formatting change in dart mustache * Fix formatting changes again * Improve dart serialization documentation specify default serializer * Better name for cli option * Rename default dart generator to 'native' * Another attempt to reduce whitespace noise * Fix api-client and api-helper * Rename default serialization mode to include word serialization * Remove trailing whitespace in enums
* [dart][dart-dio] Refactor API template * first construct a `RequestOptions` instance with all parameters etc. inline * then construct and serialize the body data * then send the request and await the response * then deserialize the response * always use the `specifiedType` for built_value (de)serialization instead of a mix of ways (this does the same as finding the serializer directly) * use indent of 2 spaces (as per Dart convention) * prefix all local variables to prevent name clashes with parameters * Add tests that (de)serialize collections and add API key header
…8826) * Fix parameter Name= missing. * Update samples * Fix wrong name in template * Update samples again
When a GET/PUT/POST operations includes queryParams, then the feign generator wrongly generates the Basename instead of the paramName. That leads to
a java.illegalstateException ("Body parameters cannot be used with form parameters") in Feign Contract when attempting to invoke the Method.
i.e: a generated feign client:
public interface PersonClientTest extends RestApi {
@RequestLine("GET /personen/{kundenNummer}?mitUnterstruktur={mitUnterstruktur}")
@headers({
"Accept: application/json",
"If-None-Match: {ifNoneMatch}"
})
PersonOut getPersonByKundenNummer(@param(value="kundenNummer", expander=ParamExpander.class) String kundenNummer, @param(value="If-None-Match", expander=ParamExpander.class) String ifNoneMatch, @param(value="mitUnterstruktur", expander=ParamExpander.class) Boolean mitUnterstruktur);
}
in the headers:
"If-None-Match: {ifNoneMatch}"
but in the method:
@param(value="If-None-Match", expander=ParamExpander.class) String ifNoneMatch
the value should be ifNoneMatch instead of "If-None-Match"
* Improve CMake * Don't link ssl and crypto only for apple * update samples Co-authored-by: William Cheng <[email protected]>
* Added JSON-B support. * Mention jsonb in docs
EclipseJdt cleanup 'RemoveUnnecessaryCast' applied by erefactor. For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php For erefactor see https://github.com/cal101/erefactor
EclipseJdt cleanup 'RemoveRedundantSemicolons' applied by erefactor. For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php For erefactor see https://github.com/cal101/erefactor
* Fix OCaml enum returnType in of_json.mustache * update samples (ocaml, python) Co-authored-by: William Cheng <[email protected]>
* Make nullable fix on all vars in Go This applies the Nullable change to all variables on the model, instead of just the ones in vars. * Add sample showing the issue
* fix by mapping outside of class * tests * regeneration and tests * server * INDENT * a * enable mapping * Revert "server" This reverts commit 6fc9712. * Samples regenerated Co-authored-by: Justin Black <[email protected]>
* 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
* use warning instead of throwing exceptions * comment out tests
* Add homepage option to pubspec.yaml package validation fails when trying to publish to pub.dev See: https://dart.dev/tools/pub/pubspec Blocking bigpanther/trober#108 cc: @kuhnroyal * Add missing fields * Update templates and generate samples Co-authored-by: Harsimran Singh Maan <[email protected]>
Recursive validate non primitive objects
* [dart][dart-dio] Add built_value date support w/o timemachine * Test improvements * Fix lists of dates not working
* multi arch build * fix buildx * use openjdk * fix bash install * remove armv7 * remove arm64 * use jre 11 * add v8 * skip bash install * add back tests * remove v8 * minor change * fix tag and push * fix tag * skip pull request for dockerhub push
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
* 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
#9143) * fix kotlin enum serialization * fix kotlin serialization compiler warning * change 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 56e2b1f * Revert "Fix #8027 - import the auto generated supporting JSON class only when generateSupportingFiles is true" This reverts commit 335c304 * 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
While inner enum classes from dataClass.mustache work fine, standalone enum classes lack `@JsonProperty` annotations so that Jackson uses names instead of values.
* [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 <[email protected]>
* Refactor on constructors Updated samples Fixed a bug of previous commit Refactor on constructors * Fixed indentation in source code * Updated samples * Marked constructors with obsolete * Updated obsolete constructors messages * Updated samples
* 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 <[email protected]>
* resolve merge conflicts * use + in type mapping, add tests * add new test spec
* Support File responses for Kotlin client * Regen samples * Reset version * Fix file class check * Add imports * use Files.createTempFile instead * better tmp file naming Co-authored-by: Mischa Spiegelmock <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.For Windows users, please run the script in Git BASH.
master,5.1.x,6.0.x