amati 0.2.22__tar.gz → 0.2.23__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amati-0.2.23/.python-version +1 -0
- {amati-0.2.22 → amati-0.2.23}/Dockerfile +1 -1
- {amati-0.2.22 → amati-0.2.23}/PKG-INFO +1 -1
- {amati-0.2.22 → amati-0.2.23}/amati/amati.py +1 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/media.py +2 -1
- {amati-0.2.22 → amati-0.2.23}/amati/file_handler.py +1 -1
- {amati-0.2.22 → amati-0.2.23}/bin/checks.sh +2 -2
- amati-0.2.23/bin/upgrade-python.sh +16 -0
- {amati-0.2.22 → amati-0.2.23}/pyproject.toml +6 -8
- {amati-0.2.22 → amati-0.2.23}/scripts/setup_test_specs.py +1 -1
- {amati-0.2.22 → amati-0.2.23}/uv.lock +1 -1
- amati-0.2.22/.python-version +0 -1
- {amati-0.2.22 → amati-0.2.23}/.dockerignore +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/dependabot.yml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/checks.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/codeql.yml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/coverage.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/data-refresh.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/dependency-review.yml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/publish.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/scorecards.yml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.github/workflows/tag-and-create-release.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/.gitignore +0 -0
- {amati-0.2.22 → amati-0.2.23}/.pre-commit-config.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/LICENSE +0 -0
- {amati-0.2.22 → amati-0.2.23}/README.md +0 -0
- {amati-0.2.22 → amati-0.2.23}/SECURITY.md +0 -0
- {amati-0.2.22 → amati-0.2.23}/TEMPLATE.html +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/__init__.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/files/http-status-codes.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/files/iso9110.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/files/media-types.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/files/schemes.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/files/spdx-licences.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/files/tlds.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/http_status_code.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/iso9110.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/media_types.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/refresh.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/schemes.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/spdx_licences.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_data/tlds.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_error_handler.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_logging.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/_resolve_forward_references.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/exceptions.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/__init__.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/_custom_types.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/commonmark.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/email.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/http_status_codes.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/iso9110.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/json.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/oas.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/spdx_licences.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/fields/uri.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/grammars/oas.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/grammars/rfc6901.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/grammars/rfc7159.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/model_validators.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/py.typed +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/validators/__init__.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/validators/generic.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/validators/oas304.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/amati/validators/oas311.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/bin/startup.sh +0 -0
- {amati-0.2.22 → amati-0.2.23}/bin/uv-upgrade-from-main.sh +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/__init__.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/.amati.tests.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/DigitalOcean-public.v2.errors.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/api.github.com.yaml.errors.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/next-api.github.com.yaml.errors.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/openapi.yaml +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/openapi.yaml.gz +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/data/redocly.openapi.yaml.errors.json +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/__init__.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_email.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_http_status_codes.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_iso9110.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_media.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_oas.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_spdx_licences.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/fields/test_uri.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/helpers.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/model_validators/test_all_of.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/model_validators/test_at_least_one.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/model_validators/test_if_then.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/model_validators/test_only_one.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/test_amati.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/test_external_specs.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/test_logging.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/validators/__init__.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/validators/test_generic.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/validators/test_licence_object.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/validators/test_security_scheme_object.py +0 -0
- {amati-0.2.22 → amati-0.2.23}/tests/validators/test_server_variable_object.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.14.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amati
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.23
|
|
4
4
|
Summary: Validates that a .yaml or .json file conforms to the OpenAPI Specifications 3.x.
|
|
5
5
|
Project-URL: Homepage, https://github.com/ben-alexander/amati
|
|
6
6
|
Project-URL: Issues, https://github.com/ben-alexander/amati/issues
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Validates a media type or media type range according to RFC7321
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
from annotationlib import get_annotations
|
|
5
6
|
from typing import cast
|
|
6
7
|
|
|
7
8
|
from abnf import ParseError
|
|
@@ -55,7 +56,7 @@ class MediaType(_Str):
|
|
|
55
56
|
media_type = rfc7231.Rule("media-type").parse_all(value)
|
|
56
57
|
|
|
57
58
|
for node in media_type.children:
|
|
58
|
-
if node.name in self.
|
|
59
|
+
if node.name in get_annotations(self.__class__):
|
|
59
60
|
self.__dict__[node.name] = node.value
|
|
60
61
|
|
|
61
62
|
except ParseError as e:
|
|
@@ -6,6 +6,6 @@ pytest --cov-report term-missing --cov=amati tests
|
|
|
6
6
|
pytest --doctest-modules amati/
|
|
7
7
|
pyright --verifytypes amati --ignoreexternal
|
|
8
8
|
docker build -t amati -f Dockerfile .
|
|
9
|
-
cd
|
|
9
|
+
cd .amati/test-specs/swagger/src/main/resources/ || exit
|
|
10
10
|
docker run -v "$(pwd):/data" amati -d /data --consistency-check
|
|
11
|
-
cd
|
|
11
|
+
cd - || exit
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Upgrades the Python version
|
|
4
|
+
# Steps:
|
|
5
|
+
# 1. Run this script
|
|
6
|
+
# 2. Upgraed the Dockerfile to match the new version
|
|
7
|
+
# 3. Run sh bin/checks.sh to ensure everything is working
|
|
8
|
+
# 4. Commit the changes and push
|
|
9
|
+
|
|
10
|
+
deactivate || true
|
|
11
|
+
uv self update
|
|
12
|
+
uv python upgrade "$1"
|
|
13
|
+
uv python pin "$1"
|
|
14
|
+
uv venv
|
|
15
|
+
. .venv/bin/activate
|
|
16
|
+
uv sync --all-groups
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "amati"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.23"
|
|
4
4
|
description = "Validates that a .yaml or .json file conforms to the OpenAPI Specifications 3.x."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -51,13 +51,6 @@ dev = [
|
|
|
51
51
|
"ruff>=0.12.1",
|
|
52
52
|
]
|
|
53
53
|
|
|
54
|
-
[tool.isort]
|
|
55
|
-
src_paths = ["amati", "tests"]
|
|
56
|
-
known_first_party=["amati"]
|
|
57
|
-
known_third_party=["pytest","pydantic","yaml","abnf", "rfc3987"]
|
|
58
|
-
extra_standard_library=["typing_extensions"]
|
|
59
|
-
profile="black"
|
|
60
|
-
|
|
61
54
|
[tool.coverage.run]
|
|
62
55
|
relative_files=true
|
|
63
56
|
omit=[
|
|
@@ -99,3 +92,8 @@ select = [
|
|
|
99
92
|
"UP", # pyupgrade
|
|
100
93
|
]
|
|
101
94
|
extend-fixable = ["UP015"]
|
|
95
|
+
|
|
96
|
+
[tool.ruff.lint.isort]
|
|
97
|
+
known-first-party=["amati"]
|
|
98
|
+
known-third-party=["pytest","pydantic","yaml","abnf", "rfc3987"]
|
|
99
|
+
extra-standard-library=["typing_extensions", "annotationlib", "compression"]
|
amati-0.2.22/.python-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.13.7
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|