6 Commits

Author SHA1 Message Date
Justin Black
ee0686e13f
Python-exp clean up model classnames (#7054)
* Adds lazy_import, removes python-exp java class renaming code, partial removal of getPythonClassName call sites

Fixes PythonClientExperimentalTest.java

Python-exp smaples regeneration

Revers makefile

Reverst pom.xml

Fixes model imports in models.__init__

Updates docstring, omits lazy import in additional properties if we dont need it

Improves additional_properties_type assignment if None

Removes getPythonClassName

Fixes python-exp tests

* Removes unused makefiles
2020-07-27 18:35:41 -07:00
Justin Black
0e0f8eb74c
[python-experimental] Removes python2 (#6991)
* Removes future from python-exp v3 sample

* Removes future from python-exp v2 sample

* Deletes future from remaining python-exp files

* Removes six from python-exp templates

* Removes six from python-exp samples

* Removes mock from python-exp

* Python-exp switched to py3

* Removes python 2.7 for python-exp ci testing

* Requires python>=3.3 for python-exp

* Reverts unnecessary changes to two templates
2020-07-19 09:45:56 -07:00
Justin Black
d8c422398e
[python-experimental] Quicken package loading (#6437)
* apis and models contains all apis and models, omits loading them in the package namespace

* Runs git add -a and commits it

* Fixes test_outer_enum.py

* Fixes test_fruit.py

* Updates test_fruit and test_mammal

* Fixes test_parent_pet

* Updates test_discard_unknown_properties.py

* Updates test_deserialization.py

* Updates v2 docs md files for apis + the readme

* Fixes v2 tests

* v2 doc updates

* Updates v3 docs

* Reverts python_doc_auth_partial.mustache

* Adds sys to v3 tests

* Adds FILES update

Co-authored-by: Justin Black <justinblack@justins-air.lan>
2020-06-01 00:25:37 -07:00
Sebastien Rosset
fa37a696a8
[python-experimental] Raise builtin AttributeError instead of custom ApiKeyError (#6229)
* Use AttributeError instead of ApiKeyError because that's what the hasattr builtin function uses

* Use AttributeError instead of ApiKeyError because that's what the hasattr builtin function uses

* fix unit tests

* create ApiAttributeError exception

* fix formatting

* run samples scripts
2020-05-10 19:02:41 -07:00
Justin Black
cbc006a938
Adds memoization and deserialization through 2 or more discriminators (#6124)
* Adds cached_property decorator, adds feature to move through n discriminators

* Adds v3 sample with 2 discriminators

* Adds tests of Shape, Tringle, and Quadrilateral traveling through 2 discriminators

* Adds test_deserialization.py:test_deserialize_shape

* Simplifes XTriangle sample spec schemas

* Simplifies Shape schema definition, updates go+python-experimental samples

* Fixes python-experimental test_dog tests

* Separates off python-experimental spec
2020-05-03 11:44:04 -07:00
Justin Black
789f1a06f0 [Python] Adds allOf/oneOf/anyOf composed models (#4446)
* Adds composed model support for allOf oneOf anyOf

* Moves discriminator into discriminator() class method, adds test_deserialize_lizard, adds setting discriminator using allOf schema
2019-12-14 21:18:41 -05:00