summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 10:20:02 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 10:20:02 +0000
commit4c64115c0f24b03bb30980c43f49b68216dfe9ab (patch)
treeb816ba3e8aba0a32fe457a316bd9eb735583098d
parent7bee299309543c6a4048028e67377a9410326035 (diff)
automatic import of python-openapi-schema-validator
-rw-r--r--.gitignore1
-rw-r--r--python-openapi-schema-validator.spec403
-rw-r--r--sources1
3 files changed, 405 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..455525f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/openapi_schema_validator-0.4.4.tar.gz
diff --git a/python-openapi-schema-validator.spec b/python-openapi-schema-validator.spec
new file mode 100644
index 0000000..4803d9f
--- /dev/null
+++ b/python-openapi-schema-validator.spec
@@ -0,0 +1,403 @@
+%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 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject>`__ which is an extended subset of the `JSON Schema Specification Wright Draft 00 <http://json-schema.org/>`__.
+* `OpenAPI Schema Specification v3.1 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schemaObject>`__ which is an extended superset of the `JSON Schema Specification Draft 2020-12 <http://json-schema.org/>`__.
+
+
+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 <https://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 <https://openapi-schema-validator.readthedocs.io/en/latest/validation.html>`__.
+
+Related projects
+################
+* `openapi-core <https://github.com/python-openapi/openapi-core>`__
+ Python library that adds client-side and server-side support for the OpenAPI.
+* `openapi-spec-validator <https://github.com/python-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 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject>`__ which is an extended subset of the `JSON Schema Specification Wright Draft 00 <http://json-schema.org/>`__.
+* `OpenAPI Schema Specification v3.1 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schemaObject>`__ which is an extended superset of the `JSON Schema Specification Draft 2020-12 <http://json-schema.org/>`__.
+
+
+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 <https://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 <https://openapi-schema-validator.readthedocs.io/en/latest/validation.html>`__.
+
+Related projects
+################
+* `openapi-core <https://github.com/python-openapi/openapi-core>`__
+ Python library that adds client-side and server-side support for the OpenAPI.
+* `openapi-spec-validator <https://github.com/python-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 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#schemaObject>`__ which is an extended subset of the `JSON Schema Specification Wright Draft 00 <http://json-schema.org/>`__.
+* `OpenAPI Schema Specification v3.1 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.1.0.md#schemaObject>`__ which is an extended superset of the `JSON Schema Specification Draft 2020-12 <http://json-schema.org/>`__.
+
+
+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 <https://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 <https://openapi-schema-validator.readthedocs.io/en/latest/validation.html>`__.
+
+Related projects
+################
+* `openapi-core <https://github.com/python-openapi/openapi-core>`__
+ Python library that adds client-side and server-side support for the OpenAPI.
+* `openapi-spec-validator <https://github.com/python-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
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.4.4-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..1c8320d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+c4f1228d7b6b717a5247135b328f45c9 openapi_schema_validator-0.4.4.tar.gz