-
Notifications
You must be signed in to change notification settings - Fork 172
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
Support attribute enumeration for targetSchema #294
Comments
I guess we hadn't really considered that too much as we tend to have parity between the properties of the resource and what is in the example (so it seemed redundant to list it again in the response when it was already available elsewhere). Maybe we should make that more explicit or link though. That said, could you provide a more explicit/concrete example of what you think the schema and output might look like? I think that could really help make sure we are on the same page before we deal with implementation details. Thanks! |
Good point about the parity that naturally happens. That kills some of the use cases I had in mind :P We're using JSONAPI which can sometimes have pretty complicated responses. One use case for enumerating attributes is when describing errors. This might be conflating #295. Here's an example snippet of a response which is a JSONAPI error object that might be returned after a POST. The example is for a validation error which is difficult for the client to detect upon submission. {
"errors": [
{
"code": "overlapping-time-range",
"detail": "Entry with time range (A, B) causes an overlap with an existing record"
}
]
} It'd be neat if the documentation could enumerate the |
Yeah. It might fit to do something in this area using something like |
That makes sense. Maybe using |
Interesting, yeah that sounds like a good balance between individual specificity and not duplicating a bunch of stuff. |
When describing the response in Markdown, prmd only provides an example. It'd be great to enumerate the attributes of the targetSchema like it is enumerated for the request parameters.
I wasn't sure if this is something that would be palatable. If it is, I'd be happy to submit a PR (or just wait for an update!)
The text was updated successfully, but these errors were encountered: