Skip to content

fix: OpenAPI schema validation issues. #568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 19, 2022

Conversation

dbanty
Copy link
Collaborator

@dbanty dbanty commented Jan 18, 2022

Based on (and replacing) #426.

BREAKING CHANGE: Validation of OpenAPI documents is now more strict.

Nementon and others added 12 commits May 13, 2021 13:14
  - anyOf, allOf, oneOf now default to `None` instead
    of `[]`
  - Mypy do not well support it to declare `undefined` value
  - For support of OAI vendor extension
# Conflicts:
#	openapi_python_client/schema/openapi_schema_pydantic/components.py
#	openapi_python_client/schema/openapi_schema_pydantic/contact.py
#	openapi_python_client/schema/openapi_schema_pydantic/discriminator.py
#	openapi_python_client/schema/openapi_schema_pydantic/encoding.py
#	openapi_python_client/schema/openapi_schema_pydantic/example.py
#	openapi_python_client/schema/openapi_schema_pydantic/external_documentation.py
#	openapi_python_client/schema/openapi_schema_pydantic/header.py
#	openapi_python_client/schema/openapi_schema_pydantic/info.py
#	openapi_python_client/schema/openapi_schema_pydantic/license.py
#	openapi_python_client/schema/openapi_schema_pydantic/link.py
#	openapi_python_client/schema/openapi_schema_pydantic/media_type.py
#	openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py
#	openapi_python_client/schema/openapi_schema_pydantic/oauth_flows.py
#	openapi_python_client/schema/openapi_schema_pydantic/open_api.py
#	openapi_python_client/schema/openapi_schema_pydantic/operation.py
#	openapi_python_client/schema/openapi_schema_pydantic/parameter.py
#	openapi_python_client/schema/openapi_schema_pydantic/path_item.py
#	openapi_python_client/schema/openapi_schema_pydantic/reference.py
#	openapi_python_client/schema/openapi_schema_pydantic/request_body.py
#	openapi_python_client/schema/openapi_schema_pydantic/response.py
#	openapi_python_client/schema/openapi_schema_pydantic/schema.py
#	openapi_python_client/schema/openapi_schema_pydantic/security_scheme.py
#	openapi_python_client/schema/openapi_schema_pydantic/server.py
#	openapi_python_client/schema/openapi_schema_pydantic/server_variable.py
#	openapi_python_client/schema/openapi_schema_pydantic/tag.py
#	openapi_python_client/schema/openapi_schema_pydantic/xml.py
@codecov
Copy link

codecov bot commented Jan 18, 2022

Codecov Report

Merging #568 (1bbbc98) into main (821dac8) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #568   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        49    +1     
  Lines         1674      1713   +39     
=========================================
+ Hits          1674      1713   +39     
Impacted Files Coverage Δ
...penapi_python_client/parser/properties/__init__.py 100.00% <100.00%> (ø)
..._python_client/parser/properties/model_property.py 100.00% <100.00%> (ø)
..._client/schema/openapi_schema_pydantic/__init__.py 100.00% <100.00%> (ø)
..._client/schema/openapi_schema_pydantic/callback.py 100.00% <100.00%> (ø)
...lient/schema/openapi_schema_pydantic/components.py 100.00% <100.00%> (ø)
...n_client/schema/openapi_schema_pydantic/contact.py 100.00% <100.00%> (ø)
...nt/schema/openapi_schema_pydantic/discriminator.py 100.00% <100.00%> (ø)
..._client/schema/openapi_schema_pydantic/encoding.py 100.00% <100.00%> (ø)
...n_client/schema/openapi_schema_pydantic/example.py 100.00% <100.00%> (ø)
.../openapi_schema_pydantic/external_documentation.py 100.00% <100.00%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 821dac8...1bbbc98. Read the comment docs.

@dbanty dbanty merged commit 0101a03 into main Jan 19, 2022
@dbanty dbanty deleted the fix/oai-schema-validation-false-positives branch January 19, 2022 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants