Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repos:
hooks:
- id: black
args: [--line-length=100]
language_version: python3.7
language_version: python3
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v1.2.3
hooks:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Changelog
=========


0.1.18 (2023-08-10)
---------------------

* fix python version specifier for setuptools>=67.0.0

0.1.17 (2020-03-03)
---------------------

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To set up `oasapi` for local development:

Now you can make your changes locally.

4. When you're done making changes run all the checks and docs builder with `tox <https://tox.readthedocs.io/en/latest/install.html>`_ one command::
4. When you're done making changes run all the checks and docs builder with `tox <https://tox.readthedocs.io/en/latest/installation.html>`_ one command::

tox

Expand Down
10 changes: 3 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Overview
* - docs
- |docs|
* - tests
- | |travis| |appveyor| |requires|
- | |travis| |appveyor|
| |codecov|
* - package
- | |version| |wheel| |supported-versions| |supported-implementations|
Expand All @@ -19,18 +19,14 @@ Overview
:target: https://readthedocs.org/projects/oasapi
:alt: Documentation Status

.. |travis| image:: https://api.travis-ci.org/sdementen/oasapi.svg?branch=master
.. |travis| image:: https://api.travis-ci.com/sdementen/oasapi.svg?branch=master
:alt: Travis-CI Build Status
:target: https://travis-ci.org/sdementen/oasapi

.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/sdementen/oasapi?branch=master&svg=true
:alt: AppVeyor Build Status
:target: https://ci.appveyor.com/project/sdementen/oasapi

.. |requires| image:: https://requires.io/github/sdementen/oasapi/requirements.svg?branch=master
:alt: Requirements Status
:target: https://requires.io/github/sdementen/oasapi/requirements/?branch=master

.. |codecov| image:: https://codecov.io/github/sdementen/oasapi/coverage.svg?branch=master
:alt: Coverage Status
:target: https://codecov.io/github/sdementen/oasapi
Expand Down Expand Up @@ -69,7 +65,7 @@ Python library for Web APIs leveraging OpenAPI/Swagger specification, enabling y
- [todo] rate/score quality of an OAS 2.0 document (documentation coverage, good practices,...)
- [todo] transform an OAS 2.0 document (add x-... items, rename paths, rewrite basePath, ...)
- [todo] add/remove securityDefinitions on an OAS 2.0 document


Free software license: BSD 3-Clause License

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def read(*names, **kwargs):

setup(
name="oasapi",
version="0.1.17",
version="0.1.18",
license="BSD-3-Clause",
description="Python library for Web APIs leveraging OpenAPI/Swagger specification",
long_description="%s\n%s"
Expand Down Expand Up @@ -67,7 +67,7 @@ def read(*names, **kwargs):
keywords=[
# eg: 'keyword1', 'keyword2', 'keyword3',
],
python_requires=">=3.6.*",
python_requires=">=3.6",
install_requires=["click", "jsonschema", "pyyaml", "jsonpath-ng", "deepmerge"],
extras_require={
# eg:
Expand Down
4 changes: 2 additions & 2 deletions src/oasapi/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
REFERENCE_SECTIONS = ["definitions", "responses", "parameters"]

# list of JSPATH for different structures
JSPATH_ENDPOINTS = parse(f"paths.*")
JSPATH_ENDPOINTS = parse("paths.*")
JSPATH_OPERATIONS = parse(f"paths.*.({'|'.join(OPERATIONS_LOWER)})")

JSPATH_SECURITY_GLOBAL = parse("security.[*].*")
Expand All @@ -27,7 +27,7 @@
JSPATH_SECURITY = Union(JSPATH_SECURITY_GLOBAL, JSPATH_SECURITY_OPERATION)

JSPATH_PARAMETERS_GLOBAL = parse("parameters.[*]")
JSPATH_PARAMETERS_PATH = parse(f"paths.*.parameters.[*]")
JSPATH_PARAMETERS_PATH = parse("paths.*.parameters.[*]")
JSPATH_PARAMETERS_OPERATION = parse(f"paths.*.({'|'.join(OPERATIONS_LOWER)}).parameters.[*]")
JSPATH_PARAMETERS = Union(
JSPATH_PARAMETERS_GLOBAL, Union(JSPATH_PARAMETERS_PATH, JSPATH_PARAMETERS_OPERATION)
Expand Down
8 changes: 4 additions & 4 deletions src/oasapi/jspaths.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

# list of JSPATH for different structures

JSPATH_INFO = parse(f"info")
JSPATH_ENDPOINTS = parse(f"paths.*")
JSPATH_INFO = parse("info")
JSPATH_ENDPOINTS = parse("paths.*")
JSPATH_OPERATIONS = Child(JSPATH_ENDPOINTS, parse(f"({'|'.join(OPERATIONS_LOWER)})"))
JSPATH_OPERATION_RESPONSES = Child(JSPATH_OPERATIONS, parse("responses"))
JSPATH_OPERATIONID = Child(JSPATH_OPERATIONS, parse("operationId"))
JSPATH_OPERATION_TAGS = Child(JSPATH_OPERATIONS, parse(f"tags"))
JSPATH_OPERATION_TAGS = Child(JSPATH_OPERATIONS, parse("tags"))
JSPATH_SECURITY_OPERATION = Child(JSPATH_OPERATIONS, parse("security.[*].*"))
JSPATH_SECURITY_GLOBAL = parse("security.[*].*")
JSPATH_SECURITY = Union(JSPATH_SECURITY_GLOBAL, JSPATH_SECURITY_OPERATION)
JSPATH_PARAMETERS_GLOBAL = parse("parameters.[*]")
JSPATH_PARAMETERS_PATH = parse(f"paths.*.parameters.[*]")
JSPATH_PARAMETERS_PATH = parse("paths.*.parameters.[*]")
JSPATH_PARAMETERS_OPERATION = Child(JSPATH_OPERATIONS, parse("parameters.[*]"))
JSPATH_PARAMETERS = Union(
JSPATH_PARAMETERS_GLOBAL, Union(JSPATH_PARAMETERS_PATH, JSPATH_PARAMETERS_OPERATION)
Expand Down
4 changes: 2 additions & 2 deletions src/oasapi/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _check_parameter(param: Dict, path_param):
events.add(
ParameterDefinitionValidationError(
path=path_param,
reason=f"The parameter is required yet it has a default value",
reason="The parameter is required yet it has a default value",
parameter_name=name,
)
)
Expand All @@ -107,7 +107,7 @@ def _check_parameter(param: Dict, path_param):
events.add(
ParameterDefinitionValidationError(
path=path_param,
reason=f"The parameter is of type 'array' but is missing an 'items' field",
reason="The parameter is of type 'array' but is missing an 'items' field",
parameter_name=name,
)
)
Expand Down