Add require_type_on_create? for JSON:API spec compliance (issue #164)#414
Open
Dgoz101 wants to merge 5 commits intoash-project:mainfrom
Open
Add require_type_on_create? for JSON:API spec compliance (issue #164)#414Dgoz101 wants to merge 5 commits intoash-project:mainfrom
Dgoz101 wants to merge 5 commits intoash-project:mainfrom
Conversation
Contributor
|
This looks good to me, but no need for a whole doc about it IMO. Lets find a place to add a line or paragraph about the topic 😄 |
Contributor
|
Also looks like some checks failing 😄 |
Author
|
Hmmm, I had them working earlier. I'll see if I can get all of that fixed. |
Contributor
|
@Dgoz101 please pull |
Author
@zachdaniel Did you want this to be a shorter line/paragraph document or did you want the md file removed completely and adding a line about it elsewhere? |
Contributor
|
I think best to remove it completely and put it in the documentation for that option and/or one of the other guides. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist
Leave anything that you believe does not apply unchecked.
The require-type-on-create.md has documentation that goes in depth on the compliance issue and what was done to fix it. This fixes the JSON_API spec compliance issue that allowed users to create without including a type field within the data. There is a require_type_on_create? Boolean value (set to false by default to avoid breaking existing clients) that users can set to true within their domain to enforce the compliance. When set to true, any create request whose data object omits type (or has empty type) receives a 400 response and one error object with code: "missing_type" and source_pointer: "/data".