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
Today, singletons and collections same the same resource path. For example, a GET on /clusters/{cluster}/instance may be either a collection, or a singleton. Although instance is singular and perhaps a human can determine that it is a singular, a machine cannot reliably determine that the path is a singleton.
This is problematic for things like the OpenAPI linter, which must have some heuristic to determine if the path is a collection, and therefore should have a different set of linter rules applied to it.
Some ideas floated around include:
Doing something similar to the IBM styleguide, where it looks for an array of objects and some field that is only common on collections (e.g. skip or offset).
Adding an annotation (x-aep-collection) to the OpenAPI description.
Using a media content type to specify that the response is a collection (e.g. application/collection+json.
Today, singletons and collections same the same resource path. For example, a GET on
/clusters/{cluster}/instance
may be either a collection, or a singleton. Althoughinstance
is singular and perhaps a human can determine that it is a singular, a machine cannot reliably determine that the path is a singleton.This is problematic for things like the OpenAPI linter, which must have some heuristic to determine if the path is a collection, and therefore should have a different set of linter rules applied to it.
Some ideas floated around include:
skip
oroffset
).application/collection+json
.CC @mkistler @hudlow
The text was updated successfully, but these errors were encountered: