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
I was wondering on how to describe a strongly typed (closed generic) collection in API documentation.
Hydra-agnostic example
There are situations when client could benefit from known in advance what kind of collection members are in the collection.
One of the reason would be answer to question "what should I do to obtain a list of users".
Proposed solutions
There are two approaches. One would be to include a piece of a collection mentioned by the API documentation with that documentation itself:
This does not require any new terms, but it may be unwanted to mix metadata (an API documentation) with pieces of actual resources. Alternative would be a new term that would allow to more direct and abstract description:
A brand new term is introduced and attached in a different place (less nesting) compared to the previous example. Slight modification for the two above would require reusing existing hydra:memberAssertion with it's domain modified (currently hydra:Collection). Both of the cases above are abstract descriptions and there are no statements in which the actual resource instance is a subject for.
Feel free to deliberate on the best approach.
The text was updated successfully, but these errors were encountered:
Describe the requirement
I was wondering on how to describe a strongly typed (closed generic) collection in API documentation.
Hydra-agnostic example
There are situations when client could benefit from known in advance what kind of collection members are in the collection.
One of the reason would be answer to question "what should I do to obtain a list of users".
Proposed solutions
There are two approaches. One would be to include a piece of a collection mentioned by the API documentation with that documentation itself:
This does not require any new terms, but it may be unwanted to mix metadata (an API documentation) with pieces of actual resources. Alternative would be a new term that would allow to more direct and abstract description:
The example above introduces a hypothetical
hydra:memberAssertionEquivalent
term (name is a subject to change).Another alternative would be:
A brand new term is introduced and attached in a different place (less nesting) compared to the previous example. Slight modification for the two above would require reusing existing
hydra:memberAssertion
with it's domain modified (currentlyhydra:Collection
). Both of the cases above are abstract descriptions and there are no statements in which the actual resource instance is a subject for.Feel free to deliberate on the best approach.
The text was updated successfully, but these errors were encountered: