%global _empty_manifest_terminate_build 0 Name: python-openapi-schema-validator Version: 0.4.4 Release: 1 Summary: OpenAPI schema validation for Python License: BSD-3-Clause URL: https://github.com/python-openapi/openapi-schema-validator Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f6/bc/ea1c532bba227c61cf57f228790b3544e73fa1f82832bb59f3272672d239/openapi_schema_validator-0.4.4.tar.gz BuildArch: noarch Requires: python3-jsonschema Requires: python3-rfc3339-validator Requires: python3-sphinx Requires: python3-sphinx-immaterial %description ************************ openapi-schema-validator ************************ .. image:: https://img.shields.io/pypi/v/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://travis-ci.org/python-openapi/openapi-schema-validator.svg?branch=master :target: https://travis-ci.org/python-openapi/openapi-schema-validator .. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-schema-validator/master.svg?style=flat :target: https://codecov.io/github/python-openapi/openapi-schema-validator?branch=master .. image:: https://img.shields.io/pypi/pyversions/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://img.shields.io/pypi/format/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://img.shields.io/pypi/status/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator About ##### Openapi-schema-validator is a Python library that validates schema against: * `OpenAPI Schema Specification v3.0 `__ which is an extended subset of the `JSON Schema Specification Wright Draft 00 `__. * `OpenAPI Schema Specification v3.1 `__ which is an extended superset of the `JSON Schema Specification Draft 2020-12 `__. Documentation ############# Check documentation to see more details about the features. All documentation is in the "docs" directory and online at `openapi-schema-validator.readthedocs.io `__ Installation ############ Recommended way (via pip): .. code-block:: console pip install openapi-schema-validator Alternatively you can download the code and install from the repository: .. code-block:: console pip install -e git+https://github.com/python-openapi/openapi-schema-validator.git#egg=openapi_schema_validator Usage ##### To validate an OpenAPI v3.1 schema: .. code-block:: python from openapi_schema_validator import validate # A sample schema schema = { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "age": { "type": ["integer", "null"], "format": "int32", "minimum": 0, }, "birth-date": { "type": "string", "format": "date", }, "address": { "type": 'array', "prefixItems": [ { "type": "number" }, { "type": "string" }, { "enum": ["Street", "Avenue", "Boulevard"] }, { "enum": ["NW", "NE", "SW", "SE"] } ], "items": False, } }, "additionalProperties": False, } # If no exception is raised by validate(), the instance is valid. validate({"name": "John", "age": 23, "address": [1600, "Pennsylvania", "Avenue"]}, schema) validate({"name": "John", "city": "London"}, schema) Traceback (most recent call last): ... ValidationError: Additional properties are not allowed ('city' was unexpected) By default, the latest OpenAPI schema syntax is expected. For more details read about `Validation `__. Related projects ################ * `openapi-core `__ Python library that adds client-side and server-side support for the OpenAPI. * `openapi-spec-validator `__ Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0 specification %package -n python3-openapi-schema-validator Summary: OpenAPI schema validation for Python Provides: python-openapi-schema-validator BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-openapi-schema-validator ************************ openapi-schema-validator ************************ .. image:: https://img.shields.io/pypi/v/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://travis-ci.org/python-openapi/openapi-schema-validator.svg?branch=master :target: https://travis-ci.org/python-openapi/openapi-schema-validator .. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-schema-validator/master.svg?style=flat :target: https://codecov.io/github/python-openapi/openapi-schema-validator?branch=master .. image:: https://img.shields.io/pypi/pyversions/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://img.shields.io/pypi/format/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://img.shields.io/pypi/status/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator About ##### Openapi-schema-validator is a Python library that validates schema against: * `OpenAPI Schema Specification v3.0 `__ which is an extended subset of the `JSON Schema Specification Wright Draft 00 `__. * `OpenAPI Schema Specification v3.1 `__ which is an extended superset of the `JSON Schema Specification Draft 2020-12 `__. Documentation ############# Check documentation to see more details about the features. All documentation is in the "docs" directory and online at `openapi-schema-validator.readthedocs.io `__ Installation ############ Recommended way (via pip): .. code-block:: console pip install openapi-schema-validator Alternatively you can download the code and install from the repository: .. code-block:: console pip install -e git+https://github.com/python-openapi/openapi-schema-validator.git#egg=openapi_schema_validator Usage ##### To validate an OpenAPI v3.1 schema: .. code-block:: python from openapi_schema_validator import validate # A sample schema schema = { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "age": { "type": ["integer", "null"], "format": "int32", "minimum": 0, }, "birth-date": { "type": "string", "format": "date", }, "address": { "type": 'array', "prefixItems": [ { "type": "number" }, { "type": "string" }, { "enum": ["Street", "Avenue", "Boulevard"] }, { "enum": ["NW", "NE", "SW", "SE"] } ], "items": False, } }, "additionalProperties": False, } # If no exception is raised by validate(), the instance is valid. validate({"name": "John", "age": 23, "address": [1600, "Pennsylvania", "Avenue"]}, schema) validate({"name": "John", "city": "London"}, schema) Traceback (most recent call last): ... ValidationError: Additional properties are not allowed ('city' was unexpected) By default, the latest OpenAPI schema syntax is expected. For more details read about `Validation `__. Related projects ################ * `openapi-core `__ Python library that adds client-side and server-side support for the OpenAPI. * `openapi-spec-validator `__ Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0 specification %package help Summary: Development documents and examples for openapi-schema-validator Provides: python3-openapi-schema-validator-doc %description help ************************ openapi-schema-validator ************************ .. image:: https://img.shields.io/pypi/v/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://travis-ci.org/python-openapi/openapi-schema-validator.svg?branch=master :target: https://travis-ci.org/python-openapi/openapi-schema-validator .. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-schema-validator/master.svg?style=flat :target: https://codecov.io/github/python-openapi/openapi-schema-validator?branch=master .. image:: https://img.shields.io/pypi/pyversions/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://img.shields.io/pypi/format/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator .. image:: https://img.shields.io/pypi/status/openapi-schema-validator.svg :target: https://pypi.python.org/pypi/openapi-schema-validator About ##### Openapi-schema-validator is a Python library that validates schema against: * `OpenAPI Schema Specification v3.0 `__ which is an extended subset of the `JSON Schema Specification Wright Draft 00 `__. * `OpenAPI Schema Specification v3.1 `__ which is an extended superset of the `JSON Schema Specification Draft 2020-12 `__. Documentation ############# Check documentation to see more details about the features. All documentation is in the "docs" directory and online at `openapi-schema-validator.readthedocs.io `__ Installation ############ Recommended way (via pip): .. code-block:: console pip install openapi-schema-validator Alternatively you can download the code and install from the repository: .. code-block:: console pip install -e git+https://github.com/python-openapi/openapi-schema-validator.git#egg=openapi_schema_validator Usage ##### To validate an OpenAPI v3.1 schema: .. code-block:: python from openapi_schema_validator import validate # A sample schema schema = { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "age": { "type": ["integer", "null"], "format": "int32", "minimum": 0, }, "birth-date": { "type": "string", "format": "date", }, "address": { "type": 'array', "prefixItems": [ { "type": "number" }, { "type": "string" }, { "enum": ["Street", "Avenue", "Boulevard"] }, { "enum": ["NW", "NE", "SW", "SE"] } ], "items": False, } }, "additionalProperties": False, } # If no exception is raised by validate(), the instance is valid. validate({"name": "John", "age": 23, "address": [1600, "Pennsylvania", "Avenue"]}, schema) validate({"name": "John", "city": "London"}, schema) Traceback (most recent call last): ... ValidationError: Additional properties are not allowed ('city' was unexpected) By default, the latest OpenAPI schema syntax is expected. For more details read about `Validation `__. Related projects ################ * `openapi-core `__ Python library that adds client-side and server-side support for the OpenAPI. * `openapi-spec-validator `__ Python library that validates OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and OpenAPI 3.0 specification %prep %autosetup -n openapi-schema-validator-0.4.4 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-openapi-schema-validator -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Fri Apr 21 2023 Python_Bot - 0.4.4-1 - Package Spec generated