-
Notifications
You must be signed in to change notification settings - Fork 330
Top-level $ref in 0.44.0 #391
New issue
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
Comments
Hmm. Is this and instance of the problem? If so, we may need to revert the pull request. |
From doing some local experiments, I apparently had misunderstood; it looks like a top-level I manually removed the top-level |
When I upgraded from typescript-json-schema 0.43.0 to 0.44.0, I noticed that AJV started giving a new warning when compiling the generated schema:
Sample TypeScript types:
The generated schema in 0.43.0 has a
definitions.Parent
section and also duplicates theParent
type's properties on the root schema. The generated schema in 0.44.0 has a top-level"$ref": "#/definitions/Parent"
property. If I understand the discussions at ajv-validator/ajv#1121 correctly, the top-level$ref
object is technically invalid.If I've misunderstood this, please let me know. Thanks!
The text was updated successfully, but these errors were encountered: