-
Notifications
You must be signed in to change notification settings - Fork 3
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
Relationship validation #34
Comments
Currently we already have a more extended format for relationships in case they reference a remote API e.g. {
type: 'posts',
attributes: {},
relationships: {
author: {type: 'people', baseUri: 'http://localhost:9999'},
comments: ['comments'],
topic: 'topics'
}
} How about we extend that with a required attribute? {
type: 'posts',
attributes: {},
relationships: {
author: {type: 'people', baseUri: 'http://localhost:9999', required: false},
comments: ['comments'],
topic: 'topics'
}
} Not sure whether we want to default to 'false' or 'true' here, perhaps we could make that configurable at the plugin level? |
Sounds like a good plan to me. I would assume 'required' as false by default... |
Hey Diogo, perhaps you could submit a PR for this? Would be nice to get you in as a committer |
resisting... the urge... not to jump in that code. ok, I will have a look. but please don't wait on me for this one -- I might be too swamped to be able to help. |
(disclaimer: maybe we want to split this in more than one issue. I'd get started with 'required' validations).
When describing an entity with a relationship (eg: a product has a brand), we need a way to say that relationship is mandatory (eg: a product must have a link to a brand).
The text was updated successfully, but these errors were encountered: