Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Revert "Use openapi 3.1.0 for schema generation" #6305

Merged
merged 1 commit into from
Feb 26, 2025
Merged
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
1 change: 0 additions & 1 deletion pulpcore/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@
"drf_spectacular.hooks.postprocess_schema_enums",
"pulpcore.openapi.hooks.add_info_hook",
],
"OAS_VERSION": "3.1.1",
"TITLE": "Pulp 3 API",
"DESCRIPTION": "Fetch, Upload, Organize, and Distribute Software Packages",
"VERSION": "v3",
Expand Down
8 changes: 4 additions & 4 deletions pulpcore/tests/functional/api/test_openapi_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from collections import defaultdict

JSON_SCHEMA_SPEC_PATH = os.path.join(
os.path.dirname(validation.__file__), "openapi_3_1_schema.json"
os.path.dirname(validation.__file__), "openapi_3_0_schema.json"
)


Expand All @@ -27,9 +27,9 @@ def openapi3_schema_spec():
def openapi3_schema_with_modified_safe_chars(openapi3_schema_spec):
openapi3_schema_spec_copy = copy.deepcopy(openapi3_schema_spec) # Don't modify the original
# Making OpenAPI validation to accept paths starting with / and {
properties = openapi3_schema_spec_copy["$defs"]["paths"]["patternProperties"]
properties["^/|{"] = properties["^/"]
del properties["^/"]
properties = openapi3_schema_spec_copy["definitions"]["Paths"]["patternProperties"]
properties["^\\/|{"] = properties["^\\/"]
del properties["^\\/"]

return openapi3_schema_spec_copy

Expand Down