* 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
* Changes python-experimental types to classes, adds additionalalproperties handling
Adds model_utils update, updates model.mustache
Updates api.mustache and uses model_to_dict in model_normal.mustache
Updates requirements.mustache for PythonClientExperimental
Passes through check_type when deserializing models
Converts types from strings to classes in PythonClientExperimentalCodegen.java and PythonTest.java
Creates PythonClientExperimentalTest.java
Updates toInstantiationType to use ModelUtils.xxx
Corrects docstring descriptions of response_type
Updates python-experimental typing, partially fixes deserialization tests
Adds fixes for some of the deserialization tests
Fixes deserialization tests
Switches model teplates to use allVars so allof props will be included
Fixes tests.test_enum_arrays
Fixes test_to_str
Adds additional_properties_type, fixes teast_todict in test_map_test.py
Correctly check the type of _request_timeout values
Fixes test_upload_file test
Turns off coercion when instantiating model types with client data
Updates file handling to input and output an open file object
Fixes linting errors
Adds fixes for python2 tests, linting fixes
Adds additionalproperties to docs + tests
Regenerates python-experimatal client
* Regenerates python-experimental client
* Updates windows python-experimental bat file
* Fixes addModelImport so client generation will work with the v2 spec
* Reverts PythonClientCodegen.java
* Acutally revert PythonClientCodegen.java
* Updates the sample example for file_type in docs
* Silences line too long error for python models so CI tests pass
* Fixes handling of file uploads, adds tests for uploading files
* Removes comment
* Fixes mock installation in python2
* Limit mock addition to python-experimental test requirements only
* Removes SmartBear copyright line
* InlineResolver to flatten callback operations
Signed-off-by: lwlee2608 <lwlee2608@gmail.com>
* clone from VertxServerCodegen, to new VertxWebServerCodegen
* fix compilation error in VertxWebCodegn
* Start working on VertxWebServerCodegen, adding support files
* add server api handler
* add server api and fix yaml spec file generation
* link api to apiHandler
* convert vertx parameters into API model
* add support to multipart/form-data upload files
* ability to set http status code from ApiImpl
* replace rootPackage with invokerPackage
* add readme and sample
* fix circleCi error
* override file to FileUpload in typeMapping, no need to override from fromOperation(). Also remove unused annotation import from model
* remove smartBear software copyright
* use {{artifactVersion}} instead of hardcode version in readme
* add -t flag in generation script
* add generated vertx-web server to master pom for testing
* [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
* [docs] Updating docsite outputs to be browsable on Github as well
* Fix links to other files
Suffix `.md` was needed to make links works
* [docs] Add clarification to differences between customization and templating docs
* [docs] Collapsible side bar, scroll to top, minor enhancements
* [kotlin] add option for non public api
* [kotlin] update petstores
* [kotlin] add missing script to kotlin-client-all.sh
* [kotlin] update pet projects
* [kotlin] remove public modifier
* [kotlin-client] inline visibility modifier
* [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
* Clean up samples directory before fixing tests
- removed from samples/client/petstore/dart2 :
- purge_test.sh (doesn't seem to be used and not helpful)
- openapi folder (is to be re-generated with more meaningful name)
- updated dart2-petstore.sh to generate client library with new name
- used updated shell script to re-generate client library
- updated CI/.drone.yml to use the new client library for tests
* Update petstore tests to use faked http client
- skipped all of the tests that hit a live endpoint
- made a fake http client that can be set to check for expected values
and/or return a provided response
- added some files with test data recorded from live api calls
- updated the README to reflect changes to tests
* Update .drone.yml so CI will run the tests
* feat: allow creation of kotlin data classes that implement java.io.Serializable, by adding the config option serializableModel=(true|false)
* docs: add markdown docu for new configOption serializableModel
* fix: do not use parcelize in script
* update kotlin samples
* add the option, update the doc
* [C++][Pistache] Simplified model template
* [C++][Pistache] Fix for addExternalLibs option
CMake would fail with addExternalLibs set to false
since it'd try to add depenency to not-existing targets
* [C++][Pistache] Update cpp-pistache-server-petstore.sh
* [C++][Pistache] Update Petstore sample
* [C++][Pistache] Update documentation
As we discovered in #3463, there are various bits of the rust client generator that are currently untested. This PR adds tests for various generator-specific types, and also files.
Follows the example of the rust-server generator for making it easy to add new test specs. This should make it easier for future contributors to make sure that their contributions are tested
* Python-experimental adds model_utils module, refactors python api class
* Fixes python-experimental so the sample sare generated in the petstore_api folder
* FIxes python samples tests
* Updates python and python-experimental tests
* Fixes python-experimental tests
* Adds newlines back to python templates + samples
* Reverts files with newline tweaks back to master branch versions
* Fixes indentation errors in python-experimental api_client
* Removes unused files
* Python files now generated in correct folders
* Adds logging when the user tries to set generateAliasAsModel in python-experimental
* Fixes typo
* basic asciidoc markup generation
* asciidoc markup include processing with mustache filter
* asciidoc tests, separate include filters
* asciidoc petstore sample
* add asciidoc generator to readme
* test asciidoc generator for all include files with own json spec.
* link fillter to link generated test data into asciidoc markup
* fix and cleanup names asciidoc tests.
* fix travis build error, removed windows line endings from mustache asciiidoc templates.
* asciidoc generator: comment and reduce visibility of helper method (fix dron build)
* asciidoc: windows linefeed again (fix travis ci)
* asciidoc generator: remove \t and format again.
* fix ascidoc generator ci builds ... ongoing..
* asciidoc: add generator .md files, unix line ending.
* 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 2a2eefe93d.
* 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 2a2eefe93d)
* 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
* Fixes NPE when no outputDir is set
* Fix behaviors of default values for values not provided by user
* Easier handling of default behavior in settings.
* Fixes for dynamic config deserialization (specifically, ruby client sample fix)
* Tests for WorkflowSettings (defaults, modified defaults, nulls)
* Test modification of WorkflowSettings defaults for both class constructor and builder
* move tests to drone.io
* ls dir
* debug
* use bash
* use jdk 11 image
* move tests to drone.io
* use maven wrapper
* comment out scripts in circleci
* update dart samples
* remove commented tests
* update dart samples
Prefix generated request interface names with API classname rather than
using namespaces, because namespaces are not well-supported by some
tooling (in particular, Babel).
* 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