Skip to content

Fix external JSON Schema reference resolution by preserving resource scopes and base URIs - #359

Merged
Martin Aeschlimann (aeschli) merged 1 commit into
mainfrom
aeschli/loyal-dog-647
Sep 1, 2026
Merged

Fix external JSON Schema reference resolution by preserving resource scopes and base URIs#359
Martin Aeschlimann (aeschli) merged 1 commit into
mainfrom
aeschli/loyal-dog-647

Conversation

@aeschli

Copy link
Copy Markdown
Collaborator
  • Preserves effective $id values so relative references resolve against the correct resource.
  • Distinguishes embedded $id resources to retain $dynamicRef behavior.
  • Safely handles external redirect chains, fragments, and cycles.

Tests:

  • Introduced a new OpenAPI 3.2 schema file for validation.
  • Updated schema mappings in tests to include OpenAPI 3.2 schemas.
  • Added tests to validate OpenAPI 3.0, 3.1, and 3.2 schemas.
  • Implemented tests for resolving relative $refs and handling nested schemas.

…ting $defs collisions.

- Preserves effective $id values so relative references resolve against the correct resource.
- Distinguishes embedded $id resources to retain $dynamicRef behavior.
- Safely handles external redirect chains, fragments, and cycles.

Tests:
- Introduced a new OpenAPI 3.2 schema file for validation.
- Updated schema mappings in tests to include OpenAPI 3.2 schemas.
- Added tests to validate OpenAPI 3.0, 3.1, and 3.2 schemas.
- Implemented tests for resolving relative $refs and handling nested schemas.
@aeschli Martin Aeschlimann (aeschli) changed the title - Isolates modern external schemas instead of flattening them, preventing $defs collisions. Fix external JSON Schema reference resolution by preserving resource scopes and base URIs Sep 1, 2026
@aeschli
Martin Aeschlimann (aeschli) merged commit 2ff90f8 into main Sep 1, 2026
6 checks passed
@aeschli
Martin Aeschlimann (aeschli) deleted the aeschli/loyal-dog-647 branch September 1, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants