Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Commit 0049b6a

Browse files
committed
Readme updated
1 parent 5ea904b commit 0049b6a

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,39 @@
2020
</div>
2121

2222
## 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:
2424

2525
- python
2626

2727

28+
## Why this repo exists
29+
From 2019 to now, 2022, I (@spacether) have been focused on making the python client code 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+
Those 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+
2856
## Table of contents
2957

3058
- [OpenAPI JSON Schema Generator](#openapi-json-schema-generator)
@@ -59,7 +87,7 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
5987
| OpenAPI JSON Schema Generator Version | Release Date | Notes |
6088
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
6189
| 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
6391

6492

6593
## [1.2 - Artifacts on Maven Central](#table-of-contents)

0 commit comments

Comments
 (0)