We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I use the option references in combination with "$ref": "my.schema"?
The text was updated successfully, but these errors were encountered:
Create a separate file somewhere that contains a list of schemas you want to reference. For example, myDefinitions.json that might look like this:
[ { "id": "someThing", "type": "string", "enum": ["foo", "bar"] } ]
Then in the grunt config for the task target do this:
grunt.initConfig({ jsonschema_faker: { target: { src: ['anotherThingSchema.json'], dest: '...', options: { references: ['path/to/myDefinitions.json'] // this value is passed to grunt.file.expand } } } })
Now you can reference the schemas defined in myDefinitions.json by their id in anotherThingSchema.json like this {"$ref": "someThing"}.
{"$ref": "someThing"}
Sorry, something went wrong.
No branches or pull requests
How do I use the option references in combination with "$ref": "my.schema"?
The text was updated successfully, but these errors were encountered: