Skip to content
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

Open
wants to merge 11 commits into
base: gh-pages
Choose a base branch
from

Conversation

VGirol
Copy link
Contributor

@VGirol VGirol commented Jan 18, 2022

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...

@auvipy
Copy link

auvipy commented Jan 19, 2022

great job! thanks for handling this!

@VGirol
Copy link
Contributor Author

VGirol commented Jan 24, 2022

According to this PR #1127, i've added a schema to validate requests that update a resource or relationship.

@VGirol
Copy link
Contributor Author

VGirol commented Feb 8, 2022

Actually, the JSON schema for v1.0 uses the draft-07 version.
Do we keep this version ? Or do i need to upgrade to the latest version (2020-12) ?

@auvipy
Copy link

auvipy commented Feb 8, 2022

1.1 should be latest jsonschema compliant, like openAPI 3.1 does, IMHO.

@VGirol
Copy link
Contributor Author

VGirol commented May 7, 2022

Could someone tell me what is missing for this PR to be merged ?

Copy link
Contributor

@bradjones1 bradjones1 left a 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

"type": "object",
"allOf": [
{
"$ref": "#/definitions/relationshipsForbidenMemberName"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$ref": "#/definitions/relationshipsForbidenMemberName"
"$ref": "#/definitions/relationshipsForbiddenMemberName"

"type": "object",
"allOf": [
{
"$ref": "#/definitions/relationshipsForbidenMemberName"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"$ref": "#/definitions/relationshipsForbidenMemberName"
"$ref": "#/definitions/relationshipsForbiddenMemberName"

},
"unevaluatedProperties": false
},
"relationshipsForbidenMemberName": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"relationshipsForbidenMemberName": {
"relationshipsForbiddenMemberName": {

@VGirol
Copy link
Contributor Author

VGirol commented May 10, 2022

Corrected.

@auvipy
Copy link

auvipy commented Jun 10, 2022

@dgeb can we consider this for 1.1?

@auvipy
Copy link

auvipy commented Aug 4, 2022

@jelhan can you take a look here please?

@jelhan
Copy link
Contributor

jelhan commented Aug 4, 2022

@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.

@jelhan
Copy link
Contributor

jelhan commented Aug 4, 2022

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! 👏

@auvipy
Copy link

auvipy commented Aug 5, 2022

yes there is another PR for the v1.0 :) #1600

@dgeb
Copy link
Member

dgeb commented Aug 5, 2022

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.

@auvipy
Copy link

auvipy commented Aug 5, 2022

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

@VGirol VGirol force-pushed the schema-1.1 branch 3 times, most recently from 7eeae6a to e90b970 Compare August 12, 2022 22:17
Add meta member to all test files with informations about errors present in the document.
@VGirol
Copy link
Contributor Author

VGirol commented Mar 23, 2023

Is there anything that is blocking this PR? :) Should I do something? Thank you

Copy link

@auvipy auvipy left a 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

@auvipy
Copy link

auvipy commented Nov 13, 2023

in fact we can move with it in 1.1 branch as well. in case v 1.0 need more work?

@VGirol
Copy link
Contributor Author

VGirol commented Nov 13, 2023

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).

@auvipy
Copy link

auvipy commented Nov 13, 2023

Ok great. Lets complete the v1.0 first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants