Describe the bug
The schema preprocessing pipeline does not correctly rewrite external $ref values containing JSON Pointer fragments.
A reference without a fragment, such as child.json, is correctly rewritten to child_create_request.json.
However, a reference containing a fragment, such as child.json#/$defs/item, is skipped and continues to reference the base schema.
To Reproduce
- Define a parent schema containing an external reference
{ "properties": { "child": { "$ref": "child.json#/$defs/item" } } }
- Configure child.json to generate a create request variant.
- Run the schema preprocessing pipeline.
- Inspect the resulting $ref value.
The reference remains unchanged:
child.json#/$defs/item
The generated request schema therefore references the base child schema instead of its request variant.
Expected behavior
The external file component should be rewritten to the generated request variant while preserving the original fragment:
child_create_request.json#/$defs/item
Purely local references must remain unchanged:
#/$defs/local
Screenshots
No response
Additional context
No response
Code of Conduct
Describe the bug
The schema preprocessing pipeline does not correctly rewrite external $ref values containing JSON Pointer fragments.
A reference without a fragment, such as child.json, is correctly rewritten to child_create_request.json.
However, a reference containing a fragment, such as child.json#/$defs/item, is skipped and continues to reference the base schema.
To Reproduce
{ "properties": { "child": { "$ref": "child.json#/$defs/item" } } }The reference remains unchanged:
child.json#/$defs/itemThe generated request schema therefore references the base child schema instead of its request variant.
Expected behavior
The external file component should be rewritten to the generated request variant while preserving the original fragment:
child_create_request.json#/$defs/itemPurely local references must remain unchanged:
#/$defs/localScreenshots
No response
Additional context
No response
Code of Conduct