forked from loafle/openapi-generator-original
2 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
f7f41410e7
|
[codegen][python-experimental] Composed schema with additionalProperties (#6290)
* 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> |
||
|
04ff319502
|
[python-experimental] Support schema property which has $ref to 'oneOf' schema and child schema is null type (#6275)
* Handle null type * Handle null type * Handle null type. Add 'null' type in the OAS document for testing purpose * Handle null type. Add 'null' type in the OAS document for testing purpose * Handle null type. Add 'null' type in the OAS document for testing purpose * Handle null type. Add 'null' type in the OAS document for testing purpose * Handle null type. Add 'null' type in the OAS document for testing purpose * Handle null type. Add 'null' type in the OAS document for testing purpose * improve documentation * Handle 'null' type * Handle 'null' type. Add unit tests * Add NullType for go * Add NullType for go * fix modeling of AnyType for go-experimental * execute scripts in bin directory * Add review comments * Add 'null' type in oneOf * Improve OAS YAML file for golang openapi3 samples * 'Any type' includes the null value, so 'isNullable' should be set to TRUE * 'Any type' includes the null value, so 'isNullable' should be set to TRUE * Handle AnyType and NullType * handle anytype for go-experimental * Log warning instead of error * anyOf/oneOf * Change x-golang-is-container extension to x-golang-has-wrapper * Add code comments * Handle Object and any type * Handle Object and any type * Handle object and any type * add code comments * handle additional properties * handle additional properties * handle additional properties * handle anytype and objecttype for go-exerimental * Move golang changes to a separate branch * Move golang changes to a separate branch * Better names for the OAS document test properties * Move golang changes to a separate branch * Run samples scripts * Run samples scripts * fix unit test issues * Handle none type * Fix index out of range exception * fix formatting issues * fix formatting issues * fix formatting issues. Finally figured out how to check formatting in local workspace * fix formatting issues * Add reference to oneOf schema * Add model showing unit test failure with ref to oneOf schema * Updates get_discriminator_class to return visited_composed_classes * Fixes broken test, adds is_valid_type * run samples scripts * move unit test to test_drawing.py file * Add more unit tests * invoke git pull from spacether fork * invoke git pull from spacether fork * Improve unit tests * Add is_nullable_type util function * Add unit test for null value * Add 'ShapeOrNull' type to handle the oneOf/anyOf scenario when the child schema is the null type * Support schema property which has to 'oneOf' schema and child schema is null type * Support schema property which has to 'oneOf' schema and child schema is null type * Support schema property which has to 'oneOf' schema and child schema is null type * Mustache template should use invokerPackage tag to generate import * handle null type in oneOf/anyOf * handle null type in oneOf/anyOf * Add more unit test for nullable shape * resolve merge conflicts * resolve merge conflicts * handle null type in oneOf/anyOf Co-authored-by: Justin Black <justin.a.black@gmail.com> |