Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
silviogutierrez committed Jul 29, 2024
1 parent 4619bc8 commit c2de6b6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions reactivated/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def run_generations(skip_cache: bool = False) -> None:
generate_callback()

from .apps import generate_schema

generate_schema()


Expand Down
2 changes: 1 addition & 1 deletion reactivated/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.apps import AppConfig
from django.conf import settings

from . import extract_views_from_urlpatterns, generate, types
from . import extract_views_from_urlpatterns, types
from .serialization import create_schema, serialize
from .serialization.registry import (
definitions_registry,
Expand Down
8 changes: 2 additions & 6 deletions tests/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ def merge_all_of(json_input):
}
for to_merge in allOf:
dereferenced = (
schema.definitions[
to_merge["$ref"].replace("#/$defs/", "")
]
schema.definitions[to_merge["$ref"].replace("#/$defs/", "")]
if "$ref" in to_merge
else to_merge
)
Expand All @@ -119,9 +117,7 @@ def merge_all_of(json_input):
# In case the actual schema we're checking itself needs merging.
merged_schema = merge_all_of(schema.schema)

validate(
instance=converted, schema={"$defs": merged_definitions, **merged_schema}
)
validate(instance=converted, schema={"$defs": merged_definitions, **merged_schema})


@pytest.mark.django_db
Expand Down

0 comments on commit c2de6b6

Please sign in to comment.