|
20 | 20 | </div> |
21 | 21 |
|
22 | 22 | ## Overview |
23 | | -OpenAPI JSON Schema Generator allows auto-generation of API client libraries (SDK generation) with a focus on JSON Schema given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (both 2.0 and 3.0 are supported). Currently, the following languages/frameworks are supported: |
| 23 | +OpenAPI JSON Schema Generator allows auto-generation of API client libraries (SDK generation) with a focus on JSON Schema given an [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (3.0 are supported). Currently, the following languages/frameworks are supported: |
24 | 24 |
|
25 | 25 | - python |
26 | 26 |
|
27 | 27 |
|
| 28 | +## Why this repo exists |
| 29 | +From 2019 to now, 2022, I (@spacether) focused on improving the python client code generator in openapi-generator and added: |
| 30 | +- code to always check schema constraints defined in specs |
| 31 | +- multiple request and response body content type handling |
| 32 | +- parameter style handling |
| 33 | +- type hints everywhere |
| 34 | + |
| 35 | +In openapi v3.0.0 and onward, schemas are in components, and schemas define request bodies, response bodies, and parameter values. |
| 36 | +The contributions that I made allow the user to bring any spec to the generator, and the schema constraints and |
| 37 | +validations will always be checked. In other generators when payload types != object/array constraints are |
| 38 | +sometimes omitted and not checked. |
| 39 | +The python generator checks schema constraints when: |
| 40 | +- instantiation models |
| 41 | +- sending data to the server |
| 42 | +- receiving data from the server |
| 43 | +- and I verified that by [creating a v3.0.3 unit test spec that contains most json schema tests](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml) that has [auto generated positive and negative model and enpoint tests](https://github.com/OpenAPITools/openapi-generator/tree/master/samples/openapi3/client/3_0_3_unit_test/python/test) which are [passing](https://app.circleci.com/pipelines/github/OpenAPITools/openapi-generator/19756/workflows/55132a87-a1b7-46f2-975c-509730833eab/jobs/50107) |
| 44 | + |
| 45 | +Recently though, @wing328 decided that because the python generator is focused on checking all json schema constraints, |
| 46 | +which differs from how the other generators work, that the python should not be in the openapi-generator repo. |
| 47 | +So he is requiring that I move the python generator into a separate repo. |
| 48 | +My preference is to keep the generator in openapi-generator. I think that devs should be |
| 49 | +allowed to build generators that fully conform to openapi + json schema constraints there. |
| 50 | +If you have thoughts on this, please let the openapi-generator community know at: |
| 51 | +- In the [openapi-generator general Slack channel](https://join.slack.com/t/openapi-generator/shared_invite/zt-12jxxd7p2-XUeQM~4pzsU9x~eGLQqX2g) |
| 52 | +- As comments in [The PR making python-experimental the primary python generator, and mentioning the new project](https://github.com/OpenAPITools/openapi-generator/pull/13501) |
| 53 | + |
| 54 | +If this is the only way to continue my work then I will develop and distribute code in this repo. |
| 55 | + |
28 | 56 | ## Table of contents |
29 | 57 |
|
30 | 58 | - [OpenAPI JSON Schema Generator](#openapi-json-schema-generator) |
@@ -59,7 +87,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20 |
59 | 87 | | OpenAPI JSON Schema Generator Version | Release Date | Notes | |
60 | 88 | | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- | |
61 | 89 | | 1.0.0 (first stable release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-json-schema-generator-cli/1.0.0-SNAPSHOT/) | TBD | First release | |
62 | | -OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0 |
| 90 | +OpenAPI Spec compatibility: 3.0 |
63 | 91 |
|
64 | 92 |
|
65 | 93 | ## [1.2 - Artifacts on Maven Central](#table-of-contents) |
|
0 commit comments