Files
python-openapi-schema-valid…/python-openapi-schema-validator.spec
Steve Kowalik bc17985d9d - Update to 0.6.0:
* Compatibility with jsonschema 4.18 #72
  * Python 3.7 support dropped #84
  * OAS30Validator no longer accept read and write properties. Use
    OASReadValidator and OAS30WriteValidator instead. #85
  * Formats raise error for other types fix #67
  * Format validators ignore other types and pass (in accordance with the
    specification)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-openapi-schema-validator?expand=0&rev=15
2023-07-25 06:13:04 +00:00

72 lines
2.4 KiB
RPMSpec

#
# spec file for package python-openapi-schema-validator
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-openapi-schema-validator
Version: 0.6.0
Release: 0
Summary: OpenAPI schema validator for Python
License: BSD-3-Clause
URL: https://github.com/p1c2u/openapi-schema-validator
Source: https://github.com/p1c2u/openapi-schema-validator/archive/%{version}.tar.gz#/openapi-schema-validator-%{version}-gh.tar.gz
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module poetry-core}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Provides: python-openapi_schema_validator = %{version}-%{release}
Requires: python-jsonschema >= 4.18
Requires: python-jsonschema-specifications >= 2023.5
Requires: python-rfc3339-validator
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module jsonschema >= 4.18}
BuildRequires: %{python_module jsonschema-specifications >= 2023.5}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module rfc3339-validator}
# /SECTION
%python_subpackages
%description
Openapi-schema-validator is a Python library that validates
schema against the OpenAPI Schema Specification v3.0 which
is an extended subset of the JSON Schema Specification
Wright Draft 00.
%prep
%autosetup -p1 -n openapi-schema-validator-%{version}
sed -i 's:tool.pytest.ini_options:hide:' pyproject.toml
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%doc README.rst
%license LICENSE
%{python_sitelib}/openapi_schema_validator-%{version}.dist-info
%{python_sitelib}/openapi_schema_validator
%changelog