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

Preparation for v3.3.0 relase #265

Merged
merged 5 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .circleci/parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ elif [ "$JOB_ID" = "testPythonClientSamples" ]; then
(cd samples/client/3_1_0_unit_test/python && make test)
(cd samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python && make test)
(cd samples/client/openapi_features/security/python && make test)
(cd samples/client/3_1_0_json_schema/python && make test)

else
echo "Running job $JOB_ID"
Expand Down
64 changes: 30 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project is a code generator that focuses on supporting all openapi and json

## Overview
OpenAPI JSON Schema Generator allows auto-generation of API client libraries (SDK generation) given an
[OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification) (3.0.0-[3.1.0*](#preliminary-310-spec-support) are supported).
[OpenAPI Document](https://github.com/OAI/OpenAPI-Specification) (3.0.0-[3.1.0*](#openapi-v310-support) are supported).
This project focuses on making the output 100% compliant with openapi + JSON schema specs.
The goal is to fully support everything defined in openapi + the included JSON schema specs
so developers can use all of those features.
Expand All @@ -23,7 +23,7 @@ You can join us here: https://discord.gg/mHB8WEQuYQ

## Reasons To Use the Python Generator

- [3.1.0*](#preliminary-310-spec-support) - 3.0.0 spec support
- v3.0.0 - [v3.1.0*](#openapi-v310-support) OpenAPI Specification support
- Type hints on
- schema payload inputs in SomeSchema.validate ![validate screen capture](docs/schema_validate.gif)
- Note: to make input dictionaries TypedDicts like the Money.validate example, set additionalProperties to false in the schema in your openapi document
Expand All @@ -40,7 +40,7 @@ You can join us here: https://discord.gg/mHB8WEQuYQ
- passing mypy tests means that this generator could be ported into compiled languages like java/kotlin/golang
- [Autogenerated thorough testing of json schema keyword features in models and endpoints](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/3_0_3_unit_test/python/test) which come from the [json schema test suite](https://github.com/json-schema-org/JSON-Schema-Test-Suite)
- [Tests are passing in CI](https://app.circleci.com/pipelines/github/openapi-json-schema-tools/openapi-json-schema-generator?branch=master)
- [Test endpoints are tagged by the relevant keyword like type/format/allOf 36 keywords and counting](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/3_1_0_unit_test/python/docs/apis/tags)
- [Test endpoints are tagged by the relevant keyword like type/format/allOf 39 keywords and counting](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/tree/master/samples/client/3_1_0_unit_test/python/docs/apis/tags)
- Code re-use built in from the ground up
- components/schemas/headers etc are generated as separate classes and imported when used via $ref
- Openapi spec inline schemas supported at any depth in any location
Expand All @@ -59,10 +59,10 @@ And many more!
- [Docs for the python generator](docs/generators/python.md)
- [generated client sample code](samples/client/petstore/python)
- [Openapi v3.0.3 general petstore spec, general features](src/test/resources/3_0/python/petstore_customized.yaml)
- [generated v3.0.3 unit test client sample code](samples/client/3_0_3_unit_test/python)
- [Openapi json schema v3.0.3 unit test spec](src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml)
- [generated v3.1.0 unit test client sample code](samples/client/3_1_0_unit_test/python)
- [Openapi json schema v3.1.0 unit test spec](src/test/resources/3_1/unit_test_spec/3_1_0_unit_test_spec.yaml)
- [generated v3.0.3 unit test client sample code](samples/client/3_0_3_unit_test/python)
- [Openapi json schema v3.0.3 unit test spec](src/test/resources/3_0/unit_test_spec/3_0_3_unit_test_spec.yaml)

### Can I build here?

Expand Down Expand Up @@ -94,35 +94,31 @@ Submit a PR if you want to add a new server scaffold, client sdk, or documentati

The OpenAPI Specification has undergone 3 revisions since initial creation in 2010. The openapi-json-schema-generator project has the following compatibilities with the OpenAPI Specification:

| OpenAPI JSON Schema Generator Version | OpenAPI Spec compatibility |
|---------------------------------------|--------------------------------------------------|
| 3.1.0+ | 3.0.0 - [3.1.0*](#preliminary-310-spec-support) |
| 3.0.0 | 3.0.0 - 3.0.3 |
| 2.0.3 | 3.0.0 - 3.0.3 |
| 2.0.2 | 3.0.0 - 3.0.3 |
| 2.0.1 | 3.0.0 - 3.0.3 |
| 2.0.0 | 3.0.0 - 3.0.3 |
| 1.0.4 | 3.0.0 - 3.0.3 |
| 1.0.3 | 3.0.0 - 3.0.3 |
| 1.0.2 | 3.0.0 - 3.0.3 |
| 1.0.1 | 3.0.0 - 3.0.3 |
| 1.0.0 | 3.0.0 - 3.0.3 |

#### Preliminary 3.1.0 spec support
Preliminary 3.1.0 spec support includes these new 2020-12 json schema keywords:
1. type (array of types supported in addition to one non-array value)
2. const: only string values are working because of bugs in swagger parser
3. contains
4. dependentRequired
5. dependentSchemas
6. maxContains
7. minContains
8. patternProperties
9. prefixItems
10. propertyNames
11. unevaluatedItems
12. unevaluatedProperties

| OpenAPI JSON Schema Generator Version | OpenAPI Spec compatibility |
|---------------------------------------|----------------------------------------------|
| 3.3.0 | 3.0.0 - [3.1.0*](#openapi-v310-support) |
| 3.1.0 - 3.2.1 | 3.0.0 - [3.1.0](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/3.1.0/docs/generators/python.md#schema-feature) |
| 1.0.0 - 3.0.0 | 3.0.0 - 3.0.3 |

#### OpenAPI v3.1.0 support
OpenAPI v3.1.0 specification support includes these new/updated 2020-12 json schema keywords:
1. const: only string values are working because of bugs in swagger parser
2. contains
3. dependentRequired
4. dependentSchemas
5. else
6. if
7. maxContains
8. minContains
9. patternProperties
10. prefixItems
11. propertyNames
12. then
13. type (array of types supported in addition to one non-array value)
14. unevaluatedItems
15. unevaluatedProperties

Note: these features can also be seen in the generator documentation [schema features](docs/generators/python.md#schema-feature)

### Build Projects

Expand Down
5 changes: 0 additions & 5 deletions bin/generate_samples_configs/python_3_1_0_json_schema.yaml

This file was deleted.

67 changes: 0 additions & 67 deletions samples/client/3_1_0_json_schema/python/.gitignore

This file was deleted.

15 changes: 0 additions & 15 deletions samples/client/3_1_0_json_schema/python/.gitlab-ci.yml

This file was deleted.

23 changes: 0 additions & 23 deletions samples/client/3_1_0_json_schema/python/.openapi-generator-ignore

This file was deleted.

125 changes: 0 additions & 125 deletions samples/client/3_1_0_json_schema/python/.openapi-generator/FILES

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions samples/client/3_1_0_json_schema/python/.travis.yml

This file was deleted.

13 changes: 0 additions & 13 deletions samples/client/3_1_0_json_schema/python/Makefile

This file was deleted.

Loading