summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 09:59:50 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 09:59:50 +0000
commitaa5802da61f325a813818f458e36b16c57520504 (patch)
tree83b130854996bde31736a684ab8fda5ff4da42b0
parent72c62591b565f97068ee542e56748ced9d7c2b20 (diff)
automatic import of python-openapi-spec-validator
-rw-r--r--.gitignore1
-rw-r--r--python-openapi-spec-validator.spec419
-rw-r--r--sources1
3 files changed, 421 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..0a5c841 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/openapi_spec_validator-0.5.6.tar.gz
diff --git a/python-openapi-spec-validator.spec b/python-openapi-spec-validator.spec
new file mode 100644
index 0000000..22bed2c
--- /dev/null
+++ b/python-openapi-spec-validator.spec
@@ -0,0 +1,419 @@
+%global _empty_manifest_terminate_build 0
+Name: python-openapi-spec-validator
+Version: 0.5.6
+Release: 1
+Summary: OpenAPI 2.0 (aka Swagger) and OpenAPI 3 spec validator
+License: Apache-2.0
+URL: https://github.com/python-openapi/openapi-spec-validator
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/95/aa/2d7e69a06bf8680b358df0c2ad9f4a757bbd388ef5b8f249576457b5a171/openapi_spec_validator-0.5.6.tar.gz
+BuildArch: noarch
+
+Requires: python3-jsonschema
+Requires: python3-openapi-schema-validator
+Requires: python3-requests
+Requires: python3-importlib-resources
+Requires: python3-jsonschema-spec
+Requires: python3-lazy-object-proxy
+Requires: python3-sphinx
+Requires: python3-sphinx-immaterial
+
+%description
+**********************
+OpenAPI Spec validator
+**********************
+
+.. image:: https://img.shields.io/pypi/v/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://travis-ci.org/python-openapi/openapi-spec-validator.svg?branch=master
+ :target: https://travis-ci.org/python-openapi/openapi-spec-validator
+.. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-spec-validator/master.svg?style=flat
+ :target: https://codecov.io/github/python-openapi/openapi-spec-validator?branch=master
+.. image:: https://img.shields.io/pypi/pyversions/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://img.shields.io/pypi/format/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://img.shields.io/pypi/status/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+
+About
+#####
+
+OpenAPI Spec Validator is a Python library that validates OpenAPI Specs
+against the `OpenAPI 2.0 (aka Swagger)
+<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__,
+`OpenAPI 3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
+and `OpenAPI 3.1 <https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md>`__
+specification. The validator aims to check for full compliance with the Specification.
+
+
+Documentation
+#############
+
+Check documentation to see more details about the features. All documentation is in the "docs" directory and online at `openapi-spec-validator.readthedocs.io <https://openapi-spec-validator.readthedocs.io>`__
+
+
+Installation
+############
+
+.. code-block:: console
+
+ pip install openapi-spec-validator
+
+Alternatively you can download the code and install from the repository:
+
+.. code-block:: bash
+
+ pip install -e git+https://github.com/python-openapi/openapi-spec-validator.git#egg=openapi_spec_validator
+
+
+Usage
+#####
+
+CLI (Command Line Interface)
+****************************
+
+Straight forward way:
+
+.. code-block:: bash
+
+ openapi-spec-validator openapi.yaml
+
+pipes way:
+
+.. code-block:: bash
+
+ cat openapi.yaml | openapi-spec-validator -
+
+docker way:
+
+.. code-block:: bash
+
+ docker run -v path/to/openapi.yaml:/openapi.yaml --rm p1c2u/openapi-spec-validator /openapi.yaml
+
+or more pythonic way:
+
+.. code-block:: bash
+
+ python -m openapi_spec_validator openapi.yaml
+
+For more details, read about `CLI (Command Line Interface) <https://openapi-spec-validator.readthedocs.io/en/latest/cli.html>`__.
+
+Python package
+**************
+
+.. code:: python
+
+ from openapi_spec_validator import validate_spec
+ from openapi_spec_validator.readers import read_from_filename
+
+ spec_dict, spec_url = read_from_filename('openapi.yaml')
+
+ # If no exception is raised by validate_spec(), the spec is valid.
+ validate_spec(spec_dict)
+
+ validate_spec({'openapi': '3.1.0'})
+
+ Traceback (most recent call last):
+ ...
+ OpenAPIValidationError: 'info' is a required property
+
+For more details, read about `Python package <https://openapi-spec-validator.readthedocs.io/en/latest/python.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 v3.0 and OpenAPI v3.1 specification.
+* `openapi-schema-validator <https://github.com/python-openapi/openapi-schema-validator>`__
+ Python library that validates schema against the OpenAPI Schema Specification v3.0 and OpenAPI Schema Specification v3.1.
+
+License
+#######
+
+Copyright (c) 2017-2023, Artur Maciag, All rights reserved. Apache v2
+
+
+%package -n python3-openapi-spec-validator
+Summary: OpenAPI 2.0 (aka Swagger) and OpenAPI 3 spec validator
+Provides: python-openapi-spec-validator
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-openapi-spec-validator
+**********************
+OpenAPI Spec validator
+**********************
+
+.. image:: https://img.shields.io/pypi/v/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://travis-ci.org/python-openapi/openapi-spec-validator.svg?branch=master
+ :target: https://travis-ci.org/python-openapi/openapi-spec-validator
+.. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-spec-validator/master.svg?style=flat
+ :target: https://codecov.io/github/python-openapi/openapi-spec-validator?branch=master
+.. image:: https://img.shields.io/pypi/pyversions/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://img.shields.io/pypi/format/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://img.shields.io/pypi/status/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+
+About
+#####
+
+OpenAPI Spec Validator is a Python library that validates OpenAPI Specs
+against the `OpenAPI 2.0 (aka Swagger)
+<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__,
+`OpenAPI 3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
+and `OpenAPI 3.1 <https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md>`__
+specification. The validator aims to check for full compliance with the Specification.
+
+
+Documentation
+#############
+
+Check documentation to see more details about the features. All documentation is in the "docs" directory and online at `openapi-spec-validator.readthedocs.io <https://openapi-spec-validator.readthedocs.io>`__
+
+
+Installation
+############
+
+.. code-block:: console
+
+ pip install openapi-spec-validator
+
+Alternatively you can download the code and install from the repository:
+
+.. code-block:: bash
+
+ pip install -e git+https://github.com/python-openapi/openapi-spec-validator.git#egg=openapi_spec_validator
+
+
+Usage
+#####
+
+CLI (Command Line Interface)
+****************************
+
+Straight forward way:
+
+.. code-block:: bash
+
+ openapi-spec-validator openapi.yaml
+
+pipes way:
+
+.. code-block:: bash
+
+ cat openapi.yaml | openapi-spec-validator -
+
+docker way:
+
+.. code-block:: bash
+
+ docker run -v path/to/openapi.yaml:/openapi.yaml --rm p1c2u/openapi-spec-validator /openapi.yaml
+
+or more pythonic way:
+
+.. code-block:: bash
+
+ python -m openapi_spec_validator openapi.yaml
+
+For more details, read about `CLI (Command Line Interface) <https://openapi-spec-validator.readthedocs.io/en/latest/cli.html>`__.
+
+Python package
+**************
+
+.. code:: python
+
+ from openapi_spec_validator import validate_spec
+ from openapi_spec_validator.readers import read_from_filename
+
+ spec_dict, spec_url = read_from_filename('openapi.yaml')
+
+ # If no exception is raised by validate_spec(), the spec is valid.
+ validate_spec(spec_dict)
+
+ validate_spec({'openapi': '3.1.0'})
+
+ Traceback (most recent call last):
+ ...
+ OpenAPIValidationError: 'info' is a required property
+
+For more details, read about `Python package <https://openapi-spec-validator.readthedocs.io/en/latest/python.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 v3.0 and OpenAPI v3.1 specification.
+* `openapi-schema-validator <https://github.com/python-openapi/openapi-schema-validator>`__
+ Python library that validates schema against the OpenAPI Schema Specification v3.0 and OpenAPI Schema Specification v3.1.
+
+License
+#######
+
+Copyright (c) 2017-2023, Artur Maciag, All rights reserved. Apache v2
+
+
+%package help
+Summary: Development documents and examples for openapi-spec-validator
+Provides: python3-openapi-spec-validator-doc
+%description help
+**********************
+OpenAPI Spec validator
+**********************
+
+.. image:: https://img.shields.io/pypi/v/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://travis-ci.org/python-openapi/openapi-spec-validator.svg?branch=master
+ :target: https://travis-ci.org/python-openapi/openapi-spec-validator
+.. image:: https://img.shields.io/codecov/c/github/python-openapi/openapi-spec-validator/master.svg?style=flat
+ :target: https://codecov.io/github/python-openapi/openapi-spec-validator?branch=master
+.. image:: https://img.shields.io/pypi/pyversions/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://img.shields.io/pypi/format/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+.. image:: https://img.shields.io/pypi/status/openapi-spec-validator.svg
+ :target: https://pypi.python.org/pypi/openapi-spec-validator
+
+About
+#####
+
+OpenAPI Spec Validator is a Python library that validates OpenAPI Specs
+against the `OpenAPI 2.0 (aka Swagger)
+<https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`__,
+`OpenAPI 3.0 <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md>`__
+and `OpenAPI 3.1 <https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md>`__
+specification. The validator aims to check for full compliance with the Specification.
+
+
+Documentation
+#############
+
+Check documentation to see more details about the features. All documentation is in the "docs" directory and online at `openapi-spec-validator.readthedocs.io <https://openapi-spec-validator.readthedocs.io>`__
+
+
+Installation
+############
+
+.. code-block:: console
+
+ pip install openapi-spec-validator
+
+Alternatively you can download the code and install from the repository:
+
+.. code-block:: bash
+
+ pip install -e git+https://github.com/python-openapi/openapi-spec-validator.git#egg=openapi_spec_validator
+
+
+Usage
+#####
+
+CLI (Command Line Interface)
+****************************
+
+Straight forward way:
+
+.. code-block:: bash
+
+ openapi-spec-validator openapi.yaml
+
+pipes way:
+
+.. code-block:: bash
+
+ cat openapi.yaml | openapi-spec-validator -
+
+docker way:
+
+.. code-block:: bash
+
+ docker run -v path/to/openapi.yaml:/openapi.yaml --rm p1c2u/openapi-spec-validator /openapi.yaml
+
+or more pythonic way:
+
+.. code-block:: bash
+
+ python -m openapi_spec_validator openapi.yaml
+
+For more details, read about `CLI (Command Line Interface) <https://openapi-spec-validator.readthedocs.io/en/latest/cli.html>`__.
+
+Python package
+**************
+
+.. code:: python
+
+ from openapi_spec_validator import validate_spec
+ from openapi_spec_validator.readers import read_from_filename
+
+ spec_dict, spec_url = read_from_filename('openapi.yaml')
+
+ # If no exception is raised by validate_spec(), the spec is valid.
+ validate_spec(spec_dict)
+
+ validate_spec({'openapi': '3.1.0'})
+
+ Traceback (most recent call last):
+ ...
+ OpenAPIValidationError: 'info' is a required property
+
+For more details, read about `Python package <https://openapi-spec-validator.readthedocs.io/en/latest/python.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 v3.0 and OpenAPI v3.1 specification.
+* `openapi-schema-validator <https://github.com/python-openapi/openapi-schema-validator>`__
+ Python library that validates schema against the OpenAPI Schema Specification v3.0 and OpenAPI Schema Specification v3.1.
+
+License
+#######
+
+Copyright (c) 2017-2023, Artur Maciag, All rights reserved. Apache v2
+
+
+%prep
+%autosetup -n openapi-spec-validator-0.5.6
+
+%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-spec-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.5.6-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..c0fdd9e
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1ca037876d0608dbf9bf0f6a6b71426f openapi_spec_validator-0.5.6.tar.gz