Skip to content

Replace reference object type with another schema path #436

Closed Answered by CarstenWickner
PintOfBitter asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @PintOfBitter,

what you're proposing is strictly speaking an invalid JSON schema. There are only a handful of supported values for the type keyword. https://json-schema.org/understanding-json-schema/reference/type
It's not meant to be overridden with custom references to external schemas. The $ref keyword supports that kind of thing.


Since others have asked for similar things, there is already an example for introducing external references here: ExternalRefPackageExample
If you search for it here on the repository, you'll see the few issues/discussions raised on that topic.

Your target schema file for the student would then more look like this:

{ 
    "type": "object",
    "properties":…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PintOfBitter
Comment options

Answer selected by PintOfBitter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants