-
Notifications
You must be signed in to change notification settings - Fork 324
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avoid unrelated schemaOverrides when building definition for sin…
…gle type (#589)
- Loading branch information
1 parent
ec3f098
commit 0a963ca
Showing
4 changed files
with
108 additions
and
11 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
test/programs/no-unrelated-definitions/schema.MyOtherObjectWithOverride.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"SomeOtherDefinition": { | ||
"type": "string" | ||
} | ||
}, | ||
"properties": { | ||
"sub": { | ||
"$ref": "#/definitions/SomeOtherDefinition" | ||
} | ||
}, | ||
"type": "object" | ||
} |
40 changes: 40 additions & 0 deletions
40
test/programs/no-unrelated-definitions/schema.program.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"MyObject": { | ||
"properties": { | ||
"sub": { | ||
"$ref": "#/definitions/SomeDefinition" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"MyOtherObject": { | ||
"properties": { | ||
"sub": { | ||
"$ref": "#/definitions/SomeOtherDefinition" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"SomeDefinition": { | ||
"properties": { | ||
"is": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"SomeOtherDefinition": { | ||
"properties": { | ||
"is": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"UnrelatedDefinition": { | ||
"type": "string" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters