Created by: spacether
This PR was written to resolve https://github.com/OpenAPITools/openapi-generator/issues/6402 In this PR we have:
- created apis and models python modules which contains all apis and models
- individual apis and models are in the api and model packages
- stopped loading in models when loading the package {{packageName}} for example petstore_api
- updated all our tests to selectively only load the models that they need, so the models package is not used in samples testing
- adds the exception ApiAttributeError into the root package namespace because it was missing
- readme and api docs samples updated to use the .model and .api imports
@sebastien-rosset
The load time change in loading petstore_api in the v3 samples directory is:
- master branch time to load petstore_api in python3.7.0, load_time=0.759689
- this PR's time to load petstore_api in python3.7.0, load_time=0.40
Load time should scale directly with memory usage. When loading the root package we should no longer see the RecursionError
-
Read the contribution guidelines. -
If contributing template-only or documentation-only changes which will change sample output, build the project before. -
Run the shell script(s) under ./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc). -
File the PR against the correct branch: master
,4.3.x
,5.0.x
. Default:master
. -
Copy the technical committee to review the pull request if your PR is targeting a particular programming language.
Python technical committee: @taxpon (2017/07) @frol (2017/07) @mbohlool (2017/07) @cbornet (2017/09) @kenjones-cisco (2017/11) @tomplus (2018/10) @Jyhess (2019/01) @arun-nalla (2019/11) @spacether (2019/11)