-
Notifications
You must be signed in to change notification settings - Fork 44
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
References are broken for JSON schema (0.4.0) #121
Comments
Thank you for reporting this. Yes, you are right. it should be something like this:
I noticed that a while ago but I've been busy. Feel free to create a PR for this. |
The output will be like this now:
|
Awesome, thanks for the quick response @aminalaee! Just plugged the branch into my project and can confirm it's working as expected now. Hoping for a release soon. 😄 |
Thank you for reporting this 👍 |
It's released now. |
Checklist
master
.Describe the bug
Quoting the following change from the changelog for 0.4.0:
Currently I'm facing the issue that when a typesystem schema contains a reference, it will not be resolvable in the resulting JSON Schema.
I made an example based on https://github.com/encode/typesystem/blob/master/docs/references.md.
To reproduce
I'm simply trying to get a JSON Schema out of the defined
album_schema
.Expected behavior
Receive a JSON Schema output that contains the correct
$ref
which makes it resolvable.Actual behavior
JSON Schema output that contains a
definitions
key which is not in line with the new syntax (i.e.:"$ref": "#/components/schemas/Artist"
)With the newly generated reference syntax ("
#/components/schemas/Artist
"), shouldn't the document contain the elements "components" as well as "schemas" and respectively "Artist" in this example?Environment
The text was updated successfully, but these errors were encountered: