2018-08-01 06:22:42 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-openapi-spec-validator
|
|
|
|
|
#
|
2025-07-14 12:28:17 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-08-01 06:22:42 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-10 14:31:33 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-08-01 06:22:42 +00:00
|
|
|
#
|
|
|
|
|
|
2018-08-08 11:35:20 +00:00
|
|
|
|
2023-06-14 06:23:39 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-08-01 06:22:42 +00:00
|
|
|
Name: python-openapi-spec-validator
|
2025-07-14 12:28:17 +00:00
|
|
|
Version: 0.7.2
|
2018-08-01 06:22:42 +00:00
|
|
|
Release: 0
|
2018-08-08 14:55:50 +00:00
|
|
|
Summary: Python module for validating OpenAPI Specs against Swagger and OAS3
|
2018-08-01 06:22:42 +00:00
|
|
|
License: Apache-2.0
|
2018-08-08 11:35:20 +00:00
|
|
|
URL: https://github.com/p1c2u/openapi-spec-validator
|
2023-05-09 20:47:25 +00:00
|
|
|
Source: https://github.com/p1c2u/openapi-spec-validator/archive/%{version}.tar.gz#/openapi-spec-validator-%{version}-gh.tar.gz
|
2023-07-25 06:13:20 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
2022-03-28 16:00:35 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2023-05-09 20:47:25 +00:00
|
|
|
BuildRequires: %{python_module poetry-core}
|
2018-08-01 06:22:42 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2023-05-09 20:47:25 +00:00
|
|
|
Provides: python-openapi_spec_validator
|
2023-07-30 09:40:47 +00:00
|
|
|
Requires: (python-jsonschema >= 4.18 with python-jsonschema < 5)
|
2023-12-17 02:25:26 +00:00
|
|
|
Requires: (python-jsonschema-path >= 0.3.1 with python-jsonschema-path < 0.4)
|
2023-07-30 09:40:47 +00:00
|
|
|
Requires: (python-lazy-object-proxy >= 1.7.1 with python-lazy-object-proxy < 2)
|
|
|
|
|
Requires: (python-openapi-schema-validator >= 0.6.0 with python-openapi-schema-validator < 0.7)
|
2023-05-09 20:47:25 +00:00
|
|
|
%if %{python_version_nodots} < 39
|
|
|
|
|
Requires: python-importlib-resources >= 5.8.0
|
|
|
|
|
%endif
|
2018-08-01 06:22:42 +00:00
|
|
|
Requires(post): update-alternatives
|
2025-07-14 12:28:17 +00:00
|
|
|
Requires(postun): update-alternatives
|
2018-08-08 11:35:20 +00:00
|
|
|
BuildArch: noarch
|
2020-12-21 16:40:30 +00:00
|
|
|
# SECTION test requirements
|
2023-05-09 20:47:25 +00:00
|
|
|
BuildRequires: %{python_module importlib-resources >= 5.8.0 if %python-base < 3.9}
|
2023-07-30 09:40:47 +00:00
|
|
|
BuildRequires: %{python_module jsonschema >= 4.18 with %python-jsonschema < 5}
|
2023-12-17 02:25:26 +00:00
|
|
|
BuildRequires: %{python_module jsonschema-path >= 0.3.1 with %python-jsonschema-path < 0.4}
|
2023-07-30 09:40:47 +00:00
|
|
|
BuildRequires: %{python_module lazy-object-proxy >= 1.7.1 with %python-lazy-object-proxy < 2}
|
|
|
|
|
BuildRequires: %{python_module openapi-schema-validator >= 0.6.0 with %python-openapi-schema-validator < 0.7}
|
2020-12-21 16:40:30 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
# /SECTION
|
2018-08-01 06:22:42 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
OpenAPI Spec Validator is a Python library that validates
|
|
|
|
|
OpenAPI Specs against the OpenAPI 2.0 (aka Swagger) and
|
|
|
|
|
OpenAPI 3.0.0 specification. The validator aims to check
|
|
|
|
|
for full compliance with the Specification.
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-10-05 05:24:57 +00:00
|
|
|
%autosetup -p1 -n openapi-spec-validator-%{version}
|
2018-08-01 06:22:42 +00:00
|
|
|
|
|
|
|
|
%build
|
2022-03-28 16:00:35 +00:00
|
|
|
%pyproject_wheel
|
2018-08-01 06:22:42 +00:00
|
|
|
|
|
|
|
|
%install
|
2022-03-28 16:00:35 +00:00
|
|
|
%pyproject_install
|
2018-08-01 06:22:42 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/openapi-spec-validator
|
2018-12-10 14:31:33 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2018-08-01 06:22:42 +00:00
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%python_install_alternative openapi-spec-validator
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative openapi-spec-validator
|
|
|
|
|
|
2018-08-08 11:35:20 +00:00
|
|
|
%check
|
2022-03-28 16:00:35 +00:00
|
|
|
sed -i 's:tool.pytest.ini_options:hide:' pyproject.toml
|
2022-10-05 05:24:57 +00:00
|
|
|
%pytest -m 'not network'
|
2018-08-08 11:35:20 +00:00
|
|
|
|
2018-08-01 06:22:42 +00:00
|
|
|
%files %{python_files}
|
2022-03-28 16:00:35 +00:00
|
|
|
%doc README.rst
|
2018-08-01 06:22:42 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%python_alternative %{_bindir}/openapi-spec-validator
|
2023-05-09 20:47:25 +00:00
|
|
|
%{python_sitelib}/openapi_spec_validator
|
|
|
|
|
%{python_sitelib}/openapi_spec_validator-%{version}.dist-info
|
2018-08-01 06:22:42 +00:00
|
|
|
|
|
|
|
|
%changelog
|