* add float as reserved world
* clean up
* update samples
* Update modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPythonCodegen.java
Co-authored-by: Jonathan Ballet <jon@multani.info>
* update doc
* uncomment test
---------
Co-authored-by: Jonathan Ballet <jon@multani.info>
* fix: remove option supportPython2.
[python-flask][python-aiohttp][python-blueplanet]
* fix: update samples
* test only python servers
* fix(tests): downgrade pytest version to ensure compatibility with python3.6 [python-flask][python-aiohttp]
* Revert "fix(tests): downgrade pytest version to ensure compatibility with python3.6 [python-flask][python-aiohttp]"
This reverts commit 9f47db2f87d1faea6863f4fa5f7c97ddba985879.
* test in circlei
* run commands directly
* test in node 1
* update makefile
* fix Makefile
* fix test
* revert some changes, remove python server tests from travis
Co-authored-by: Kevin Bannier <kevinbannier1@gmail.com>
* Adds UUID to python-exp, allows uuid models to be generated
* Adds test_UUIDString uuid model test
* Fixes uuid properties in python-exp, changes maps to object data type, adds uuid data type
* Adds maps data type back in
* Adds missing Null and AnyType definitions and adds them to python-experimental
* Generator docs updated, added missing uuid, null, anytype, and object
* Adds uuid support description
* Docs updated
* Revert "Revert "Has generators set default template engine (#11245)" (#11316)"
This reverts commit 57987424a4eaa22d73337388489cd86d7f42a023.
* Only loads in the default template engine if the config file contains the generatorName
* Only sets templatingEngineName using condif default in one place
* Adds config files that lack generatorName
* Revert "Adds config files that lack generatorName"
This reverts commit 7dafc93c0f02c037d9be5d2c0a3ee7377c8b479d.
* Adds generator default templating engine to the generator metadata
* Adds generatorLanguageVersion and uses it in python generators
* Regenerates docs
* Adds stability to generator docs
* Triple braces generatorLanguageVersion
* Regenerates samples
* Fixes the python-experimental setup.py file so it works with generatorLanguageVersion
* Updates generators readme
* Refactors generator md creation, adds generateMdMetadata
* Removes extra space
* Adds docs updates
* Fixes table definition for metadata
* Docs update
* Docs update
* Updates title, removes sidebar_label because it was not doing anything on pages like https://openapi-generator.tech/docs/generators/android
* Docs updated
* Add CORS support to python-flask server generator
* Documentation update and CORS support for other generators using the same base class
* Trivial sample changes
* Move java specific import mappers to java specific code gen
* Use JVM specific import mappers in kotlin, scala, groovy
* Update generators docs
* Add autogenerated files
* Mustache template should use invokerPackage tag to generate import
* Add a unit test for allOf and additionalProperties
* Fix getAdditionalProperties
* Add code comments
* Add code comments
* set nullable for additionalproperties
* add variants of additionalProperties
* Add more unit tests
* Handle additionalProperties for composed schemas
* improve code comments
* Add code comments
* Add code comments
* Add code comments
* Add code comments
* Add code comments
* Add assertions in unit tests
* Add new property to support the 'additionalProperties' keyword with composed schemas
* run sample scripts
* fix unit tests to handle additionalProperties
* Handle additional properties and composed schema
* Handle additional properties and composed schema
* Add support for additionalProperties and composed schema
* Format java code
* Add more unit tests for Python
* Handle reference in additionalProperty keyword
* Handle reference in additionalProperty keyword
* Add use case for additionalProperties and reference
* run sample scripts
* resolve schema reference
* Add OpenAPI argument
* Add OpenAPI argument
* Add OpenAPI argument
* Add OpenAPI argument
* Add OpenAPI argument
* Handle additional property keyword with reference
* Handle additional property keyword with reference
* Handle additional property keyword with reference
* Handle additional property keyword with reference
* add additionalproperties attribute with boolean values
* Run sample scripts
* handle additional properties
* Handle additionalProperties boolean values
* Run sample scripts
* fix javadoc issues
* fix javadoc issues
* Add Locale to String.toLowerCase
* execute sample scripts
* handle additional properties
* Add code comments
* Handle imports of referenced models in additional properties
* Handle isNullable class
* handle nullable type
* improve documentation, run sample scripts
* improve documentation, run sample scripts
* execute sample scripts
* execute sample scripts
* Execute sample scripts
* Run samples scripts
* set legacyAdditionalPropertiesBehavior to true by default, except python
* create separate yaml file to avoid having lots of changes in the pr
* create separate yaml file to avoid having lots of changes in the pr
* create separate yaml file to avoid having lots of changes in the pr
* create separate yaml file to avoid having lots of changes in the pr
* create separate yaml file to avoid having lots of changes in the pr
* create separate yaml file to avoid having lots of changes in the pr
* Change name of CLI option
* Generate doc
* Add TODO statement
* add code comments
* run samples scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* refactor cli option for additional properties
* refactor cli option for additional properties
* run samples scripts
* run sample scripts
* run sample scripts
* run sample scripts
* run sample scripts
* Add yaml comments
* small refactor
* small refactor
* run sample scripts
* run sample scripts
* fix unit tests
* Set disallowAdditionalPropertiesIfNotPresent flag
* reduced size of test yaml file
* simplify code and add imports directly
* rename some of the properties used in tests
* Handle more scenarios for nullable types
* add code comments
* Adds *args input to __init__ method to fix test testFruitNullValue
* Resolve merge issues
* run samples scripts
* run doc generator
* fix merge conflicts
Co-authored-by: Justin Black <justin.a.black@gmail.com>
* [REQ][JAVA]: Add option to generate arrays with "uniqueItems" true as Sets rather than Lists
- Update Java code generation to use sets instead of lists when uniqueItems is set to true
- Add import resolution for sets
- Add tests and fix broke tests
resolve#5254
* Update Javascript, Perl, Python and Ruby to preserve current functionality.
* Switch set implementation to LinkedHashSet
* Fix missing import for uniqueItems used on param.
* Fix missing import and return type for responses with uniqueItems
* Fix default values for array of enum
* Update generated samples
* fix merge issue
* Update generated samples
Co-authored-by: William Cheng <wing328hk@gmail.com>
* Adds addComposedMappedModels and testComposedSchemaOneOfDiscriminatorMap
* Requires that discriminators be required properties
* Strengthens discriminaotr validation, adds better error messages, adds schema oneof samples
* Adds oneOf and anyOf invalidDiscriminator tests
* Updates incorrect addOneOfInterfaceModel invocation
* Runs ensure-up-to-date
* Adds updates from Sebastien Rosset
* Removes newlines
* Uses df.isString
* Fixes tests be correctly setting df.isString
* Updates discriminatorExplicitMappingVerbose description per PR feedback
* Adds description of how mappedModels is populated
* Adds the suggestion exception raising when a MappedModel mappingName is null
* Actually resolves merge conflicts
* Switches two methods to package private because they are needed for testing
* Allow nulls in MappedModel.getMappingName
* Updates CLI flag name to legacyDiscriminatorBehavior, default=true
Co-authored-by: William Cheng <wing328hk@gmail.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:
9adfedbfbb45c7059e64b3d9a285710bded4fb62
17ee990baaa80585242c7a07d64e2be4888fcfd0
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.
* [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
* Flatten feature sets for display
* [cli] Add feature set output to config-help
This includes markdown and plain text outputs for config-help.
* [docs] FeatureSet on generator docs
* [config-help] Sort all outputs
* Remove old/stale generator docs (these have been renamed previously)
* Sort config doc outputs, making it easier to find relevant info
* Fixes cliOptions duplicates
Erlang client/proper improperly set the version option as packageName
(causing duplicate for packageName).
The java and swift option removals are because the options are added in
parent classes, resulting in duplication of the options.
* Add --github-nested-index for generating docs/generators/README.md
* 📝 Regenerate generator docs
* Switches python generators to use pytest, useNose CLI option added if to allow nose to be used instead
* Adds ensure-up-to-date changes
* Adds setup.cfg to python clients so we can configure nose when useNose=true
* Adds fix for python-aiohttp testing, adds files missing from ensure-up-to-date
* [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