-
Notifications
You must be signed in to change notification settings - Fork 830
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
Add JSON Schema that is v1.1 compliant #1603
base: gh-pages
Are you sure you want to change the base?
Conversation
great job! thanks for handling this! |
According to this PR #1127, i've added a schema to validate requests that update a resource or relationship. |
Actually, the JSON schema for v1.0 uses the draft-07 version. |
1.1 should be latest jsonschema compliant, like openAPI 3.1 does, IMHO. |
Could someone tell me what is missing for this PR to be merged ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing typo found during CI integration with Drupal's dictionary. s/forbiden/forbidden
_schemas/1.1/schema.json
Outdated
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/relationshipsForbidenMemberName" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$ref": "#/definitions/relationshipsForbidenMemberName" | |
"$ref": "#/definitions/relationshipsForbiddenMemberName" |
_schemas/1.1/schema.json
Outdated
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/relationshipsForbidenMemberName" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"$ref": "#/definitions/relationshipsForbidenMemberName" | |
"$ref": "#/definitions/relationshipsForbiddenMemberName" |
_schemas/1.1/schema.json
Outdated
}, | ||
"unevaluatedProperties": false | ||
}, | ||
"relationshipsForbidenMemberName": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"relationshipsForbidenMemberName": { | |
"relationshipsForbiddenMemberName": { |
Corrected. |
@dgeb can we consider this for 1.1? |
@jelhan can you take a look here please? |
To be honest I'm not an expert for JSON schema. But I agree that we need to improve in that regard. Thanks a lot for following up. Personally I would feel much more comfortable with reviewing if we would have some test coverage for the schema. Like having a set of JSON:API documents, which are validated with the schema in CI. Also it's unclear to me how we could version the schema. v1.1 is not stable yet formally. We might need at least two schemas: one for the current stable version and one for the upcoming version. We may want to setup such an infrastructure before moving forward. |
Just had a look at the proposed changes in this PR and noticed that it is already addressing some points I raised above. Seems to be a great starting point! 👏 |
yes there is another PR for the v1.0 :) #1600 |
I really appreciate this work and its importance for the spec. In my opinion, an official schema is not a blocker for the v1.1 release but it would be ideal to release both simultaneously. I think we stand a good chance to finalize the schema in the same time frame that the final v1.1 RC is being reviewed, without delaying either. |
thats a reasonable plan |
7eeae6a
to
e90b970
Compare
Add meta member to all test files with informations about errors present in the document.
Is there anything that is blocking this PR? :) Should I do something? Thank you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can move with it after we complete merging the schema for v1.0
in fact we can move with it in 1.1 branch as well. in case v 1.0 need more work? |
We must validate and merge v1.0 before merging it in 1.1 branch because this PR uses the validation script that is introduced in the #1600 (./_schemas/scripts/validator.js). |
Ok great. Lets complete the v1.0 first |
I've only added sample files in relation with the new features of the 1.1 version.
I still have to add the rules regarding the @-members and the extension members.
Coming soon...