This allows specifying a different formatString for parsing than for rendering, which is useful because padding widths are not supported in `parseTimeMSource`
* 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
* [jaxrs-spec] add quarkus application server
* [jaxrs-spec] add thorntail
* [jaxrs-spec] add openliberty
* [quarkus] update to 0.20.0
* Add helidon
* Update quarkus version
* Update quarkus to 0.22.0
* Update documentation
* Force "useSwaggerAnnotations" to be false when quarkus, thorntail,
openliberty or helidon are used
* [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
* 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
Prefix generated request interface names with API classname rather than
using namespaces, because namespaces are not well-supported by some
tooling (in particular, Babel).
* fix(csharp-netcore): Fixing the build issues
* fix(csharp-netcore): Fixing the build issues
* fix(csharp-netcore): Fixing the Pet project
* fix(csharp-netcore): help fixes
* 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.
* [core] Initial support for server variable overrides
* [gradle] Support user overrides for serverVariables
* [core] Clarify server variable overrides, and propagate them to templates in the "servers" array
* create nodejs express esrver
* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet
* 1st commit of the express.js module. Express server working, api-docs loads properly. No real paths yet (#2839)
* Working Express server with successful routing to controllers.
* rewrote controllers and services. Haven't tested yet
* controllers and services have passed tests successfully
* Added documentation
* Added documentation
* Support for openApi v3, using 'express-openapi-validator' for parsing and validation, and an internal router to pass arguments to controllers and services. /controllers/Pet.js and /services/PetService.js should be used for reverse engineering for future codegen script
* update generator and template
* update samples
* more update
* update service, controller
* add vendor extensions
* some updates to adapt to changes in the generator (removing references to swager); some work on handling file uploads; some work on tests
* Update NodeJS server generator and templates based on new output (#3261)
* update generator and template
* update samples
* more update
* update service, controller
* add vendor extensions
* update doc
* Changed routing code to follow the following convention:
Each path operation has a 'x-openapi-router-controller' and 'x-openapi-router-service'. Automated files will be placed under /controllers and /services respectively.
Controller file names will end with 'Controller.js'.
Removed swaggerRouter, replaced it with openapiRouter
Routing works and simple tests show a return of 200 to requests.
* [nodejs-express-server] various updates, fixes (#3319)
* various fix
* remove dot from service
* add space
* better method empty argument
* remove test service (#3379)
* add new doc
* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData
2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.
* 1. routingTests.js runs through all operations described in openapi.yaml and tries calling them, expecting 200 in return. Currently not all tests pass - not supporting xml, and problems with formData (#3442)
2. Removed old testing files.
3. Added model files - contain data and structure as defined in openapi.yaml. Model.js has static methods relevant to all model files.
4. Changed openapi.yaml to allow running tests easily.
* added model classes. Currently as a concept only. Seems like won't be in use
* Updated README.md to be a detailed description of the project.
Removed test files that are not needed.
Removed utils/writer.js which is not needed, and the references to it in the codegen files
* Removed redundant file app.js - this file has no benefit at this point. index.js now calls ExpressServer.js directly. Updated files that used to call app.js. Updated README.md accordingly
Added a path to call the openapi.yaml, and a test file for all endpoints that are not in the openapi.yaml, ensuring that they return 200. Updated README.md accordingly
* Remove test controller (#3575)
* remove test controller
* add back changes to templates
* remove app.js
* update wording
* WIP: add faraday support to Ruby client
* update samples
* bin/console
* https only
* ruby-faraday: Add a gemspec template for faraday
* Add a test for ruby-faraday client options
* Remove Gemfile.lock from ruby-client-faraday
* Implement faraday client
* Problem: can't use Faraday library for ruby clients
Solution: add support for Faraday library
This patch builds on the work started by @meganemura
* Problem: Faraday is set as default library
Solution: Make Typhoeus default
This patch also updates the api_client template for Faraday to include query params with requests.
* Default outputFile value is `openapi/openapi.yaml`.
* Mustache Lambdas documentation.
* Default OpenAPIYamlGenerator outputFile value is `openapi/openapi.yaml`.
* Début d'un générateur pour OCaml.
* Ajout du script bash de generation pour OCaml.
* Implémentation de la partie model du générateur OCaml.
* Suppression du fichier Model.mustache.
* Légère modification dans le générateur OCaml.
* Début d'implémentation de la génération des opérations.
* Avancées dans l'implémenatation des opérations.
* Avancée dans la gestion des enums : reste à traiter le fait que Yojson sérialize les variants comme des tableaux JSON.
* Prise en compte du fait que Yojson représente les variants constants sous forme d'un tableau JSON contenant une unique string.
* Utilisation des variants polymorphe pour les enums car il se peut que plusieurs énumérations partagent des valeurs communes ce que ne permettent pas les variants ordinaires au sein d'un même module.
* Avancées dans le générateur de code OCaml : le code produit compile et prendre en compte les pathParams, les queryParams, les headersParams, les bodyParams et la réponse JSON. Manque le support du multipart, du form encoded et des mécanismes d'authentification.
* More tests.
* Correction de problèmes dans la génération mis en évidence par l'utilisation d'un fichier OAS plus gros et complexe que Petstore.
* Mapping du case Error de Ppx_deriving_yojson_runtime.ok_error vers l'exception Failure pour avoir des types plus simples et non dépendants de Pppx_deriving_yoson_runtime dans les APIs générées.
* Ajout de la génération des fichiers d'interfaces .mli pour les APIs.
* Ajout du support des parametres de type x-www-form-urlencoded.
* Le paramètres d'url de type number étaient mal gérés.
* Cleanup.
* Replace block comment start and end sequences in input text.
* Make apis calls without a return type return unit rather than Yojson.Safe.t.
* Make modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml generate properly.
* Added generated code for modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml.
* Better handling of enums and map container and better sanitizing of generated identifiers to support all the corner cases present in modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml.
* Correcting a violation : using toLowerCase without relying on the default Locale.
* Changed authoring in partial_header.mustache.
* Deleted commented code.
* Collect enum schemas in items properties of operation parameters in the case of ArraySchema parameters. This allows correct processing of modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml.
* Collect enums also in additional properties schemas of operation parameters in the case of MapSchema parameters (if this type of parameter can is allowed).
* Removed copy-pasted Copyright notice from SmartBear.
* update doc
* Use Locale.ROOT instead of Locale.ENGLISH for toLowerCase calls.
* Make GET operations with body generate compilable code.
* Updated ocaml-client generated samples using the latest version of the OCaml code generator.
* Added [@default None] for record fields with option types so that if those fields are missing at deserialization time, None is assumed.
* Added support of api keys in query params.
* Updated generated ocaml samples to reflect latest changes in templates.
* Added [@default] on enum record fields for which the enum type has only one accepted value so that those fields can be deserialized even if the value is absent of the json payload.
* Delete useless space character in template.
* Added proper handling of http response codes.
* Updated generated ocaml samples to reflect latest changes in templates.
* Fix 3349 : Proposition to follow spec closely
* Fix#3349 : Changes suggested by code review. Add an option for the single request parameter.
* Fix#3349 : Add sample with the use of the single request parameter
* Fix#3349 : Small fix that wasn't passing the tests
* Fix#3349 : Remove cariage return that might create an error
* Fix#3349 : Add chmod to make new sh file executable and fix the CircleCI issue
* Fix#3349 : Add windows sample generation
* Fix#3349 : Rename everything because of default value change
* Fix#3349 : Indentation fix
* Fix#3349 : Add 755 to typescript-fetch-petstore-multiple-parameters.sh
* Fix#3349 : Auto generation of the documentations
* Fix#3349 : Revert back a change that was auto-generated.
The defaults configured for GENERATOR_HOST didn't really make sense.
When running the docker container with `-P`, GENERATOR_HOST defaulted to
http://localhost. This caused download links for generated client/server
code to be incorrect. For most cases, there's no reason to provide
GENERATOR_HOST as the code already figures the appropriate
scheme/host/port from the originating request.
GENERATOR_HOST could still be used for more complex deployment
scenarios, for instance if a specific server is configured as a file
server. I haven't tested this scenario, and it may require mounting /tmp
as a volume when running within a container.
* Adds python-experimental generator
* Adds python-experimental samples folder which uses its own v2 spec
* Adds enusre-up-to-date updates
* Removes samples/client/petstore/perl/t/AnotherFakeApiTest.t
* Removes comment line from python-experimental generator
* Reverts perl docs file
* Updates perl sample client
* Adds python-experimental to pom.xml
* Copies the python test foldeers tests and testfiles into python-experimental
* Copies python test folder into python-experimental
* Moves python testing from Travis (samples pom.xml profile) to Circlci (samples.circleci pom.xml profile)
* Adds python-experimental pom.xml
* Adds python-experimental makefile and .sh files
* Chenges python-experimental to use gitignored venv rather than .venv which is not ignored when testing
* Adds dev-requiremnts.txt and removes .travis.yml from python-experimental so CI tests will pass
* Moves python-experimental from CicleCI to Travis to get support for multiple python environments
* Updates generator java comment so CI tests will run over again
* feat(r): Added handling exception with ApiException class and document generation
* feat(r):enhancements to exception handling and documentation
* fix(r): fixes and reverting the man folder
* fix(r): minor fix of import statement
* fix(r): generated the docs file
* fix(r) minor doc casing fixes
* First set of fixes to support ver 3.0, useswashbuckle does not work yet
* Fix swashbuckle issues iwth aspnetcore 3.0
* Use default routing for 2.2 and turn off default for 3.0
* fix up documentation
* PR Feedback and wrong name in mustache file
* Fix for 2.1 usage too
* Change isFramework to useFrameworkReference as name to make thngs explicitly clear. Also fix small messages for the review comments
* Make JSON.NET version configurable
* Activate endpoint routing and use camel case NamingStrategy
* Make Newtonsoft version configurable to match ASP.NET Core preview 5
* Fix spelling of an option, remove a duplicate call and update docs
* kotlin spring : add reactivity via kotlin's coroutines
* add kotlin spring boot reactive samples
* bug : fix spring version and import for coroutines
* remove exception handler for reactive (webflux doesn't support it)
* add spring milestone repository to maven pom
* add reactive type for list in Api and ApiImpl methodes for mathching body responsive parameter
* fix baseType for ArraySchema
* regenerate samples
* updating documentation
* [JAVA] fix artifactVersion is not taken from specification when not provided by generator option
* update jaxrs-spec samples
* update docs generator jaxrs
* add apiSuffix configuration
* Add default value for Api suffix
* remove overriding method toApiName
* refactor the global option apiSuffix to kotlin specific feature
* add missing Option for apiSuffix
* extend readme.md for apiSuffix configuration
* update doc
* add testcase
* [Java] improve docs with adding default value for additional properties
* remove using File.separator for sourceFolder/projectTestFolder path
* Improve artifactId and artifactVersion description
* update doc java pkmst and sample
* [feat] Intro GeneratorMetadata (stability index)
GeneratorMetadata offers an immutable object created via Builder pattern
which allows generators to explicitly define their stability (stable,
beta, experimental, deprecated) as well as a message to be shown during
generation.
This is a step toward:
* Fleshing out the "Core" artifact (#845)
* Providing a place to encapsulate feature-oriented metadata (#840)
* Providing a means to communicate end of life scheduling (#116)
This new structure, specifically the Stability property, allows us to
offer future enhancements such as allowing users to filter down to only
"Stable" generators via CLI, and eventually any compat table (see #503).
* Mark deprecated generators as deprecated in-code
* Re-export docs/generators.md
* Beta server stub generator for F#/Giraffe (#2705)
* first commit for F#/Giraffe
use CLI generator
work on handlers
add binding to url params
add parameter declaration to handler & fix array types
order models by dependency and add tests
add oauth handlers
add service generation
add service implementation
return json for map types and add all return types to service implementation
pare down record types for readability
move implementations to impl folder
fix additional handler invocation
remove logging
remove open api type provider package reference
add sane defaults for OAuth
add readme and reorganize files for easier ignore
fix oauth checks and move login to default template
typedef operation body params as model
add API test templates
fix test templates
set project & other folders when packageName is set
add ignore to test pipes
add ignore for oauth to hide compile warnings
escape model types for generic dictionaries
remove Boolean object from primitives
fix handler and param templates for multiple path params
remove "Model" from model module names and fix import mapping for dictionary
add package name to model imports
change model templates to use imports
move login to CustomHandlers
raise exception where oauth not properly configured
allow webhost configuration from CustomHandlers
remove explicit support for nullable types and render option in template instead
move Cookie options to CustomHandlers
add header params
integrate api key provider
add nullable to datetime types
fix test generation and pretty up model folder
add context path to handler test template
dont copy spec file
remove superseded copyright notices
remove superseded copyright notices
* remove carriage return in fsharp template
* remove superseded sample output directory
* fix bash build script
* update generated sample
* update documentation
* add new file
* fix compile issues
* [all] Adds strict spec option
Introduces an option to allow user customization of strict specification
behaviors. For instance, OpenAPI 3.x requires a path object name to be
prefixed with '/' so we append any missing '/', but this may not be
desirable to some users or generators. In this commit, this fix specifically is
the only modification affected.
* Clarify strict-spec docs, add option to README.md
* Update CLI options in docs/usage.md
* [cli] Support packageName as global option
CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.
This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.
* [gradle] Add packagName as global option
This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
* Improve CONTRIBUTING.md
Indicate that bin/openapi3 scripts should be executed too.
Try to clarify how to run tests:
* use in sample a client for which tests exist
* explain where to run the command and how to find the artifactId
* Update contributing.md by running copy-to-website
* Add first cutasync support and small cleanups
* Add apiPackage, modePacke to use for namespaces, for library don't generate wwwroot and dont make model class partial and default to no swashbuckle, , workarodun empty string cliOption
* Update docs
* Don't add async for library
* Fix generated program for async and task
* Default models names space should be <package>.Models
* Remove commented out code
* Remove unnecessary code, fix a comparison and add an else fo an if statment.
* Update docs
* [BUG][php-symfony] Fix alias generation
* fix
* add bundle alias option and alias logic when it is not defined
* run bin/utils/ensure-up-to-date to update php-symfony.md
* [Doc] Better highlight of generators docs page with generators specific parameters
* [Doc] Better highlight of generators docs page with generators specific parameters