Some APIs have a model called "Index" which would create a file
"Index.ts" which would override "index.ts" on case-insensitive file
systems (e.g. macOS, some Windows versions). Make "Index" a reserved
word to prevent this clash.
* Add 'discriminatorCaseSensitive' property
* Discriminator value lookup should not be case insensitive
* fix typo
* run scripts
* execute ./bin/utils/export_docs_generators.sh
* fix discriminator mapping, add code comments
* Updating packages version (#5313)
* Add support to RestSharp version 106.10.1
Restsharp 106.10.1 needs the Content Lenght as a parameter to AddFile method
* Updating RestSharp Version
Updating RestSharp Version
* Update netcore_project.mustache
* Update netcore_testproject.mustache
* Update Project.mustache
* Updating packages version
Updating packages version
* Updating packages version
Updating packages version
* Updating packages version
Updating packages version
* Updating packages version
Updating packages version
* Updating packages version
Updating packages version
* Updating packages version
Updating packages version
* Execute task async obsolete
Use ExecuteAsync instead
* update csharp samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* [csharp] Library upgrade fix (#5848)
* On .net45 framework, Restsharp version is updated to 106.10.1 Otherwise, it stays on version 105.1.0
* Added additionalProperties for library versions and target frameworks
* Removed unused properties
* Added an additional property to test for a specific version of RestSharp
* Updated csharp samples
* Fixed nuspec.mustache to use library specific additional properties
* Updated csharp samples
* Updating CI/samples.ci csharp petstore test project file.
* Updated csharp.md
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
* [csharp-client] Restored tests on csharp samples (#5879)
* Restored tests on csharp samples
* Restored a reference to the file used to test file uploads
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
* update samples
Co-authored-by: Igor Quirino <iquirino91@gmail.com>
Co-authored-by: Bouillie <34162532+Bouillie@users.noreply.github.com>
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
* python server: Add pythonSrcRoot option
This will allow the python project to be in a subdirectory (as specified
in pythonSrcRoot). That could mean following the src layout with sources
under src/ or lib/. Multi-language projects might use a sub directory
like python/, or whatever makes sense for the project.
By default, the pythonSrcRoot is "", meaning the existing behavior is
the default.
* python server: update template files to support pythonSrcRoot
* python server: update docs to add pythonSrcRoot option
* python server: add pythonSrcRoot sample script
* python server: build sample srclayout project
* [Python] copy test files preserving history
* [Python] Make a conflict to preserve file copy history
* [Python] customize pom.xml for src layout tests
* [Python] add python-aiohttp-srclayout tests
* [Python] Fix server tests by updating requirements
Reverts the PR that disabled python2 server tests:
https://github.com/OpenAPITools/openapi-generator/pull/4949
Reverts commits that disabled python3 server tests:
9adfedbfbb17ee990baa
Issue about the python 3 tests:
https://github.com/OpenAPITools/openapi-generator/issues/5235
I couldn't find an issue about the python2 tests being disabled.
I'm guessing build errors like the following were the trigger:
https://travis-ci.org/github/OpenAPITools/openapi-generator/builds/634238181
Let's see what breaks!
* [Python] Copy setup.py to python-aiohttp
* [Python] Save history while copying setup.py to python-aiohttp
* [Python] Add aiohttp server setup.py
* [Python] Fix python server tests with src layout
* [Python] bump Flask-Testing version
* [Python] Pin pyyaml for py2.7 flask server
* [Python] simplify flask server requirements
* consolidate server tests
* [Python] rebuild python server samples
* [Python] Fix python server requirements for older pythons
Documented minimum python version for our aiohttp server is 3.5.
Documented minimum python version for our flask server is 3.4.
Connexion 2.3 is the last version to support python 3.4 and 3.5, so fix
the version pinning to correctly select <=2.3 for these EOL python
versions. Newer pythons should get the latest if possible as there many
relevant bug fixes.
Werkzeug also needs to be pinned for these old versions in the aiohttp
server just like for the flask server.
3.4 and 3.5 are EOL. We really should increase the minimum supported
version, but that is for another PR to do.
* Scala akka-http server base implementation
* [scala-akka-http-server] petStore samples
* Improved the formatting of generated files
* Updated scala-akka-http server samples
* [scala-akka-http-server] the groupId, artifactId and artifactVersion default value are used as intended.
* Fixed the default operation not being correctly generated on parameterless operations
* Added build.sbt.mustache supporting file
* Updated scala-akka-http server samples
* ScalaAkkaHttpServer: Fixed a String.format call to use Locale.ROOT for locale
* [scala-akka-http-server] Fixed defaultValue being escaped during generation
* Added scala-akka-http.md
* Replaced all "⇒" character with "=>" to retain compatibility with scala 2.13
* [scala-akka-http] Added a config option akkaHttpVersion
It's set in the generated build.sbt.
* Updated scala-akka-http server samples
* [scala-akka-http] More accurate akkaHttpVersion parsing
* Updated scala-akka-http.md
* [scala-akka-http] Changed the akka-http version check to fix the generation of StringDirectives
* Updated scala-akka-http samples
* updated scala-akka-http.md
Co-authored-by: Olivier Leonard <oleonard@ankama.com>
* [cli] Some CLI improvements…
* Introduce --version
* Introduce --help
* Add --sha to version command for short SHA display
* Output Version and SHA details
* In new --version output, display repo and doc site
Additional cleanup to suppress warnings and code quality.
* [docker] Adds labels for metadata
This adds image labels to store metadata on the online and cli docker
images, using standard labels:
* org.opencontainers.image.created
* org.opencontainers.image.revision
* org.opencontainers.image.title
* org.opencontainers.image.version
These can be inspected via 'docker inspect IMAGE_NAME' and may be useful
in tooling/automation or bug reports submitted by users.
For more details on these labels, see:
https://github.com/opencontainers/image-spec/blob/master/annotations.md
* Include version --full for equiv to --version
* Fix code generation for free-form objects in go-experimental
* Execute scripts in bin directory
* Add more use cases for open-ended types
* Add more use cases for open-ended types
* Add more use cases for open-ended types
* add code comments
* Better name for test properties
* handle scenario when type is arbitrary
* handle interface{} scenario
* handle interface{} scenario
* add helper function isAnyType
* isAnyType function
* implementation of isAnyType function
* fix javadoc issue
* handle interface{} scenario
* use equals comparison instead of ==
* merge from master
* Add code documentation
* add code comments, remove unused min/max attribute, fix equals method
* Handle 'anytype' use case
* add code comments
* override postProcessModelProperty to set vendor extension
* Use vendorExtensions.x-golang-is-container
* fix compilation error of generated code
* fix compilation error of generated code
* fix compilation error of generated code
* [scala][akka-http-client] java8 dates support
* scala-akka readme doc updated
* DateSerializers renamed
* rename serializers
* move date-library option to abstractScala
* generators docs updated
* enum defined for date libraries
* Backport to scala-http-client
* fix scala-akka-client date serializers
* fix typo in docs
* switch scala templates to java8 (jsr-310) date library by default
* update scala samples with java8 date library
* update scala generators docs with java8 default date library
* fix scala-play-server generator cli options as only java8 dateLibrary supported
* fix scalaz DateTimeCodecs template to support java8
* scalaz ci test againt java7 removed as it generate scala 2.11.8 client which is java8 based
* [C++][Pistache] Use reserved words to replace incorrect names
discard old decision to truncate reservedWords
* [C++][Pistache] Update struct model to use name instead of baseName
* [C++][Pistache] Update Petstore sample
* [C++] Add option to have lowercase variables
* [C++] Update generated docs
* stripped parameter enabled for all scala based generators
* scala samples updated
* docs generators updated
* fix scalatra. regenerated by openapi3 script.
manually removed enum default value from scalatra example due bug in schema extraction
* scala-sttp-client template
* invoker for sttp fixed and tests added
* clean up pet api test from redunant comments
* docs updated
* fix artefact name, model comments and redunant generic
* code optimization
* cross scala versions 2.11 2.12 2.13
* date serializers extracted and joda enabled as default
* basic and bearer authorization added, apikey in query supported
* [typescript] Clean up modelPropertyNaming across generators
Fixes https://github.com/OpenAPITools/openapi-generator/issues/2976
Generators without runtime models conversion use "original" property naming by default. It's still possible to change it via cli options
Generators with runtime conversion keep using "camelCase"
* Refactoring: use enum instead of string for modelPropertyNaming
* Restore the original camelCase for var names, decouple it from property names
* Swap toParamName and toVarName logic (looks like I've mistaken them)
* Regenerate docs
* Remove a no longer used private method
* 👕🎨 Minor refactor DefaultGenerator
This cleans up some lint warnings and improve general code cleanliness
of DefaultGenerator.
Specifically:
* logger strings are now using the built-in log formatter rather than
constructing new strings regardless of log level.
* Diamond operators are used where possible
* Some long-unused commented code has been removed
* Lambdas are used where possible
* Redundant operations are merged (HashMap constructor used rather than
subsequent putAll on a collection, for example)
* [cli][core] Add support for dry-run and display
CLI now supports `--dry-run`, which will output a file change status
similar to git status --porcelain.
The user may also specify `--verbose` for a one-liner below each file
explaining why the change operation might take place.
* [maven] improve documentation regarding depedencies issues
* Improve english on the documentation
Co-Authored-By: Jim Schubert <james.schubert@gmail.com>
* Improve the english on the documentation
Co-Authored-By: Jim Schubert <james.schubert@gmail.com>
Co-authored-by: Jim Schubert <james.schubert@gmail.com>
* [doc] Fix level 2 header on cutomization.md
* [doc] Specify https on API/online link
* [docs] Invert github/twitter links in dark mode
* [doc] Pin version for alpha release artifacts
* [docs] Upgrade to Docusaurus 2
Due to formatting issues with Docusaurus 1 and code blocks, and upcoming
4.3 and 5.0 releases, this is an upgrade to have more control over
formatting and other functionality.
This adds behavior to have light/dark themes.
As a consequence of upgrading, columnar format on ul element in
generated generator docs had to be moved to css. This will not impact
users viewing the markdown on GitHub because it didn't display the
column format.
This upgrade should improve syntax highlighting and performance.
* Fix user page layout, choose theme with clear diff colors
* [typescript-fetch] Make additional properties access safer
Instead of asserting that any key access returns a valid property, force
the consumer to check that the value is defined.
* Update tests
* Put null-safe additional props behind and flag and share
* Undo over copy
* Update docs
* Rearrange code
* Move to unit tests