You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
But not quite like that: on any given call, depending on the app state, there might or might not be values for any given tag. If a given tag has no values, then it's entirely suppressed (no empty sub-array or null value). So this, also, is a possible return:
To top it all off, that set of tags is useful in its own right (e.g., as an URI Template Parameter for "just give me any tag2 values").
There's a hauntingly inviting section in the MSON book, Non-uniform Property, but it seems to require me to name the non-uniform entity. But it has no other name than "+ Body", and Blueprint seems to require an URL associated with every Asset definition.
The text was updated successfully, but these errors were encountered:
Hmm ... well, for other reasons, the actual case that got me started was redefined in a simpler way. Originally it was something like
GET /path/to/stuff
=> { "tag1" : [1,2,3], "tag2": [1,4,7] }
and also
GET /path/to/stuff/tag1
=> [1,2,3]
(and also a lot of "SQL SELECT type" URIs to be more specific about what to return)
I had wanted to give a type-name to the list of possible tags, and then in many places to declare that this URI parameter, that query parameter, or this other body object member was an instance of that type.
But the first form was eliminated. Also, since asking the question, I have learned that the set of tags is too large (over 100 values, and in fact run-time extensible) to actually list in the Blueprint. So I kind of dropped the thread.
Status now seems to be:
I no longer actually care, so it's only hypothetical
cases I do care about are simpler, and well handled by MSON
but, no, I don't see how the hypothetical case is covered by mson#26
kylef
transferred this issue from apiaryio/api-blueprint
Jan 10, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
How can I define a (named) Attribute for this structure?
I'm documenting an API that, at one point, returns something like this:
But not quite like that: on any given call, depending on the app state, there might or might not be values for any given tag. If a given tag has no values, then it's entirely suppressed (no empty sub-array or null value). So this, also, is a possible return:
And likewise all of the other subsets.
To top it all off, that set of tags is useful in its own right (e.g., as an URI Template Parameter for "just give me any tag2 values").
There's a hauntingly inviting section in the MSON book, Non-uniform Property, but it seems to require me to name the non-uniform entity. But it has no other name than "+ Body", and Blueprint seems to require an URL associated with every Asset definition.
The text was updated successfully, but these errors were encountered: