* Ensure CLI-level generator settings are available in additional properties
* Initial conversion to yaml configs
Configs prefix with 1- need to be manually evaluated.
* Add "other" configs not in ensure-up-to-date
* Add other/openapi3 files
* Cleanup all generation scripts
* Clean up: add missed configs and fix some openapi 3 diffs
* Move generate-samples script, error on batch failures
* Temporarily disable elm which requires skip validation of spec
* CI updates (todo: run all generators through appveyor or move to github workflows)
* Add success count to batch generation command output
* [samples] Regenerate
* Remove bin/windows
* Generate swift5 samples in bitrise
* Expand user input glob pattern
* Regenerate samples
* Update PR template
* Support config based generateAliasAsModel
* [samples] Regenerate
* [rust] Generate as alias for all samples configs
* [csharp] Move test staged file changes to in-directory
* Include "live" test files and ignore test cache files from samples.ci
* Remove concept of samples.ci staging
Generators support .openapi-generator-ignore, allowing maintainers to
explicitly ignore the regeneration of files which have been modified.
Note that the tooling does not overwrite test files whenever those files
exist, and it's not entirely necessary to add test files to the ignore
file.
* Re-add meta generator scripts
* Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines
* [csharp] Regenerate sample
* Set generateAliasAsModel CodegenConfigurator#toContext
This ensures the property (which is effectively a thread-local) gets set
as expected if the caller resets GlobalSettings as is done in the
GenerateBatch command.
* [rust] Regenerate samples
* Re-enable elm
* [java] Support OffsetDateTime example, fail ensures script on any generation error
* [samples] Regenerate
* Fix jersey2-java8 ignore file
* Fix elm spec validation
* Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci)
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Mustache template should use invokerPackage tag to generate import
* fix typo, fix script issue, add log statement for troubleshooting
* Add java jersey2 samples with OpenAPI doc that has HTTP signature security scheme
* Add sample for Java jersey2 and HTTP signature scheme
* Add unit test for oneOf schema deserialization
* Add unit test for oneOf schema deserialization
* Add log statements
* Add profile for jersey2
* Temporarily disable unit test
* Temporarily disable unit test
* fix typo in pom.xml
* fix duplicate jersey2 samples
* fix duplicate jersey2 samples
* fix duplicate artifact id
* fix duplicate jersey2 samples
* run samples scripts
* migrate all scala generators to use oas3
* add back pom.xml for scala-sttp
* skip form model in scalaz
* fix scala lagom tests
* add new files
* skip form models in scala finch petstore
* update samples
* remove scala version in parent pom
* test ps petstore in appveyor
* fix command
* build and import
* fix import module
* fix import
* skip module import
* run multiple commands
* move to test script
* test ps exit
* fix exit
* check last status code
* clean tests
* exit last code
* add import
* change dir
* skip build failure
* fix check
* trigger build failure
* fail fast
* restore c# test
* new line comment
* add powershell exp to ensure up to date script
* [feature] Log "debounce" filter to remove spam.
* [log] slf4j-simple should be optional
This also sets the default log level to ERROR during CI builds for many
mvn invocations. This should reduce noise in the logs.
* [log] Rely only on mvn loglevel=error for now
* [cli] Clean up unused dependency
* [log] Change level to error/warn in more CI
* fix go compilation error for properties of type map and array
* fix go compilation error for properties of type date and datetime
* add missing shell script to bin/utils/ensure-up-to-date
* add missing shell script to bin/utils/ensure-up-to-date
* add missing shell script to bin/utils/ensure-up-to-date
* fix issue with 'date' type
* fix time import problem
* Add missing pom.xml files for golang
* Add missing unit test files for golang
* Add missing unit test files for golang. Must use class name prefix for enums
* Fix unit tests for go-experimental in OAS3
* Fix unit tests for go-experimental in OAS3
* Add code comments in codegen
* Fix compilation errors of generated go code
* Fix compilation errors of generated go code
* remove antihax from go-experimental, it is no longer used
* copy python testfile for ut purpose
* add error checkout in unit tests
* add unit tests
* add code comments
* move test foo.png file to correct location
* run samples scripts
* run samples scripts
* [elm] Remove support for Elm 0.18
* [elm] Drop `Main.elm`
* [elm] Put all models in a single file
* [elm] Put generated code in `Api` package
* [elm] Introduce Request type for operations
* [elm] Generate list of enum variants
* [elm] Make default Time module
* [elm] Small improvements & fixes
* [elm] Improve support for allOf
* All of types are now nested;
* Adding a discriminator creates a custom type wrapping all variants
and a 'catch-all' fallback variant.
* [elm] Add support for recursive types
* [elm] Add catch-all type for allOf
* [elm] Drop support for post-processing of files
* [elm] Only import required packages
* [elm] Handle reserved and unsafe words
* [elm] Minor improvements
* [elm] Add support for integer enums
* [elm] Remove additional slash in path
* [elm] Add link to docs
* [elm] Update CI test file & scripts
* Validation script batches only samples
In this change, the validation script will batch only sample generation.
For meta and documentation, it will always be iterative.
Also made changes to meta-codegen*.sh so conditionals which may invoke
maven are explicitly rooted.
* [ci] batch python-experimental, include new springboot option
bin/elm-petstore-all.sh invokes elm-petstore.sh and
elm-0.18-petstore.sh. Both of these define `ELM_POST_PROCESS_FILE` for
post-processing the generated files. If a user doesn't have elm-format
installed, they may not realize that ensure-up-to-date has failed which
causes CI to fail due to differences in the ELM generated outputs.
This confusion can lead to a lot of downtime for contributors. For
example, I encountered this while adding feature set information to all
generators. I thought I had introduced the error and spent too long
looking through my changeset and re-running `ensure-up-to-date`
in the background before noticing the failed output. I was able to
generate proper output by installing elm-format. With 80+ languages/frameworks
and a rule for contributors to unblock CI by re-generating any failed
samples, it's not feasible (in some cases, not possible) to ask
contributors to install tooling specific post-processors. We'll have to
rely on elm contributors to run the script manually.
Ideally, elm generator templates should be updated to have properly
formatted outputs as a default.
We may want to consider documenting standards of what we put in the
scripts under bin/*sh and bin/utils/ensure-up-to-date, one of those
standards being that we omit toolchain specific post-processors.
* better test for go-api-server
* better test for go gin server
* fix go-api-server test
* fix folder path
* remove red test
* update test files
* update script with gofmt
* update windows batch files
* discard changes before running ensure-up-to-date
* add go-api-server to ensure uptodate script
* [Slim4] Copy Slim3 generator as starting point
* [Slim4] Add psr7Implementation generator option
Slim supports PSR-7 interfaces for its Request and Response objects.
Slim provides its own PSR-7 implementation so that it works out of the
box.
However, you are free to replace Slim’s default PSR-7 objects with
a third-party implementation.
[Ref] https://www.slimframework.com/docs/v4/concepts/value-objects.html
* [Slim4] Handle psr7Implementation generator option
It somehow ended up with composerPackages and composerDevPackages
codegen variables and two additional functions. Hope, it's not too much.
* [Slim4] Extend from Slim3 generator
* [Slim4] Bump PHP Slim Framework version to 4.0.0
* [Slim4] Bump required PHP version to 7.1
[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)
* [Slim4] Remove app settings
Slim’s App settings used to be a part of the container and they have
now been decoupled from it.
[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)
* [Slim4] Set container argument optional
Slim uses an optional dependency container to prepare, manage,
and inject application dependencies.
Slim supports containers that implement PSR-11
like [PHP-DI](http://php-di.org/doc/frameworks/slim.html).
[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)
* [Slim4] Change response body write
You can't write to response instance directly anymore,
need to retrieve body object first.
[Doc](https://www.slimframework.com/docs/v4/objects/response.html#the-response-body)
* [Slim4] Change Slim\App constructor
[Upgrade Guide](https://www.slimframework.com/docs/v4/start/upgrade.html)
* [Slim4] Refactor token authentication options
User can provide array or Container as constructor argument from now.
Small refactoring required to retrieve authentication options from
that argument.
* [Slim4] Add PSR-7 implementation codegen flags
This approach seems more flexible to me.
User can customize templates in favor of chosen PSR7 implementation.
It's easier to change Composer packages and their versions.
* [Slim4] Add JsonBodyParserMiddleware
Slim4 doesn't parse JSON body, need to add suggested middleware.
Ref: https://www.slimframework.com/docs/v4/objects/request.html#the-request-body
* [Slim4] Remove request's deprecated methods usage
Since Slim 4.0.0 ServerRequest implementation doesn't have
getQueryParam and getParsedBodyParam methods anymore.
* [Slim4] Use getUploadedFiles for multipart request
isMultipart codegen property is always false so far.
Hope that bug will be fixed soon.
* [Slim4] Add samples
* [CLI] Initial implementation for batch generation
Allows for generating multiple outputs via config. Just specify multiple
config files on command line.
Intent for this is to reduce CI times to generate outputs as well as to
reduce time for users to run ensure-up-to-date to meet PR standards.
Example command:
openapi-generator batch --includes-base-dir `pwd` --fail-fast -- bin/ci/*
---
As part of this implementation, the batch command support a customized
JSON key, `!include`. If this key's value refers to an existing file,
that file's contents are "unwrapped" into the config during
deserialization. This allows us to easily point to the same configs used
by our sample scripts without modifying the CLI generate task's switches
or assumptions.
* Allow for path-relative outputs
* Add batch JSON objects
* Include INFO log about threads used and includes/root
* Ensure GlobalSettings.reset()
* Improved thread-safety of ModelUtils
* First version of Nim Client
* Add some codes
* Add some codes
* Add some codes
* Add some codes
* Add some codes
* First version of Nim Client
* Add some codes
* Add some codes
* [Dart] Fix README template and update testing doco (#3809)
* [Dart] Fix README template and update testing doco
- deleted redundant shell script
- fixed and updated README template
- updated test package and moved to a dev_dependency
- removed old unused dev_dependency packages
- updated testing documentation in petstore sample
* Remove references to dart-flutter-petstore.sh
* Fix typos
* Fix typo
* Support custom git repository (#3757)
* add gitHost param to GeneratorSettings and related
* parameterize gitHost in READMEs
* parameterize gitHost in go.mod
* parameterize gitHost in git_push
* update petstore samples
* run ./bin/utils/export_docs_generators.sh
* run meta-codehen.sh
* Revert "run meta-codehen.sh"
This reverts commit d6d579f6159186531257cdfdd73b9caf9e9ffeba.
* Revert "run ./bin/utils/export_docs_generators.sh"
This reverts commit 1b81538198d4319fd1b4e97447303e3cc0e8dc99.
* Revert "update petstore samples"
This reverts commit f513add88396707f6991ae2e4920359583ec88f1.
* run ensure-up-to-date
* Add links to article and video (#3820)
* Better Go code format (#3819)
* better varible naming
* better comments
* better code format for go experimental client
* better comment, update samples
* Add some codes
* Add some codes
* Add some codes
* Add gRPC Protobuf schema generator (#3818)
* add grpc protobuf generator
* update doc
* add new doc
* add windows batch, comment out root proto
* 1792 fix remote spec handling and hash calculation (#3440)
* fixed bug where nullApi.java would be generated. Instead, generated DefaultApi.java to match the default path /{pathParam} (#3821)
* Revert "1792 fix remote spec handling and hash calculation (#3440)"
This reverts commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04.
* Add nickmeinhold to Dart technical committee (#3830)
* Bug #2845 typescript angular inheritance (#3812)
* issue #2845: enable 'supportsMultipleInheritance' on typescript angular client codegen
- note I reran ./bin/openapi3/typescript-angular-petstore-all.sh and no changes occurred.
this suggests to me that the petstore.yaml sample should be improved to make use of the
anyOf / allOf / oneOf keywords, in order to better show the effects of changes on generated code.
* issue #2845: run ./bin/openapi3/typescript-angular-petstore-all.sh
* run `mvn clean package && ./bin/typescript-angular-petstore-all.sh`
* revert extranous files
* fix warnings in csharp-netcore client (#3831)
* Add missing files to the form request (#3834)
* [client][go] avoid duplicated reflect imports (#3847)
* Following up for #3440 (1792 fix remote spec handling and hash calculation) (#3826)
* This patch fixes the bug that we cannot access to remote files when checking file updates.
Following up #3440, supporting auth.
* 1792 fix remote spec handling and hash calculation (#3440)
(cherry picked from commit 2a2eefe93d81b8d253745b8adb002ab2cb9eee04)
* fix detecting remote file / local file logic while finding the hash file, taking care of IllegalArgumentException for local files.
* add testcase
* Add a link (#3850)
* Add Element AI to the list (#3856)
* maven-plugin-plugin 3.6.0 (#3854)
* [Java][okhttp-gson] fix failure to deserialize floats (#3846)
* fixed bug where nullApi.java would be generated. Instead, generated DefaultApi.java to match the default path /{pathParam}
* fix to bug #3157
* update samples
* Adds Http Info To Dart Api (#3851)
* [C++][Pistache] Add missing setter for arrays (#3837)
* [C++][Pistache] Add missing setter for arrays
Fixes#3769
* [C++][Pistache] Update Petstore sample
* typescript-inversify: improve check for required parameters, support multiple media types (#3849)
* [typescript-inversify] Allow falsy parameters
A required parameter to an api method must not be `null` or `undefined`.
It can be any other falsy value, e.g. `""`, `0` or `false` though. This
change makes sure an error is only thrown in the former case and not in
the latter.
* [typescript-inversify] Handle multiple media types
The Accept and Content-Type HTTP headers can contain a list of media
types. Previously all but the first media type in the api definition
were ignored. Now the headers are properly generated.
* [typescript-inversify] Fix http client interface
The api service methods allow the `body` parameter to be optional. The
parameter is then passed to an `IHttpClient`. So it needs to be optional
there as well.
Also fixed the sample implementation `HttpClient`.
Fixes#3618.
* [typescript-inversify] Regenerate Petstore sample
* [typescript-inversify] Use more explicit null check
This does not change the semantic of the generated code, but makes it more explicit.
Co-Authored-By: Esteban Gehring <esteban.gehring@gmail.com>
* [typescript-angular] allow empty string basePath (#3489)
* [typescript-angular] Fixing #2731 - empty string basePath
* typescript-angular: refactor base path configuration
* typescript-angular: refactor base path configuration
* Fix/r/serialization fix and minor 3xx resp fix (#3817)
* fix(qlik): fix for minor serialization bug
* fix(r): add petsore generated classes
* fix(r): indendation fixes
* typescript-axios: Fix baseoptions (#3866)
* Fixed missing baseOptions of typescript-axios.
The typescript-axios template was missing the baseOptions setting when building an API Configuration. Set it.
* update sample.
* re-generate typescript axios samples
* Rename gRPC generator to "protobuf-schema" (#3864)
* rename grpc generator to protobuf-schema
* update doc
* Prepare v4.1.2 release (#3873)
* update samples
* update date
* fix version in readme
* BugFix #2053 Spring Boot fails to parse LocalDate query parameter (#3860)
Adds the format annotation so that Spring is able to serialize OpenApi date/date-time format into LocalDate/OffsetDateTime.
* update doc, samples (#3875)
* update stable release
* Update the batch for Windows
* Add a test snippet
* Update ensure-up-to-date
* Add Nim to README.md
* Ran ensure-up-to-date to pass CircleCI tests
* test dart 1x in drone
* update dart image
* trigger build failure
* Revert "trigger build failure"
This reverts commit d565f348ba120d9111b7ad2c6f7e3ad077197a26.
* add dart 2 test
* update build runner version
* test dart2
* only test dart jaguar
* remove pubspec.lock
* better wording
* use pub run test
* revert changes in build_runner
* update test in pom.xml
* update samples
* add dart scripts to ensure up-to-date
* Filter deprecated generators from CLI list by default.
* [gradle] Exclude deprecated generators from list by default, add "include" option to allow for customization of list task.
* Update scripts to support the --include option of the list command
* Update gradle/cli docs for generators listing with "include" option.
* Add Flow import to kotlin spring reactive
* Add runBlockingTest to api tests
* Add kotlin-springboot-petstore-server-reactive.sh to ensure-up-to-date
* add reactive check for runBlockingTest
* Samples