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 noticed in the Omicron OpenAPI spec that this block of pagination params appears about 25 times (with slight variations around sort mode). Obviously improving the human-readability and length of a machine-oriented spec is not particularly urgent, but it looks like this could be shortened quite a bit with global components.
"parameters": [
{
"in": "query",
"name": "limit",
"description": "Maximum number of items returned by a single call",
"schema": {
"nullable": true,
"type": "integer",
"format": "uint32",
"minimum": 1
},
"style": "form"
},
{
"in": "query",
"name": "page_token",
"description": "Token returned by previous call to retrieve the subsequent page",
"schema": {
"nullable": true,
"type": "string"
},
"style": "form"
},
{
"in": "query",
"name": "sort_by",
"schema": {
"$ref": "#/components/schemas/IdSortMode"
},
"style": "form"
}
],
The text was updated successfully, but these errors were encountered:
While reducing the size of the document may be beneficial, deduping is going to be more expensive than not. Likewise, this change might impose a greater burden on consumers of the document. I would opine that JSON is best suited for machine interpretation rather than human interpretation and therefore the "better" of two isomorphic constructions is the one that's simplest to represent. That said, I recognize that many--including the authors of the OpenAPI spec!--may disagree with this position.
I noticed in the Omicron OpenAPI spec that this block of pagination params appears about 25 times (with slight variations around sort mode). Obviously improving the human-readability and length of a machine-oriented spec is not particularly urgent, but it looks like this could be shortened quite a bit with global components.
The text was updated successfully, but these errors were encountered: