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
We'd like to be able to set a minimum value for URI Parameters. Could do something similar for maximum. e.g.:
limit (optional, integer, 10)
Limit the number of results to return. If omitted all results in the period are returned.
Minimum: (0, exclusive)
Maximum: (10, inclusive)
Running it through snowcrash should then yield something like:
{
"name": "limit",
"description": "Limit the number of results to return. If omitted all results in the period are returned.",
"type": "integer",
"required": false,
"default": "",
"example": "10",
"values": [],
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 10,
"exclusiveMaximum": false
}
The text was updated successfully, but these errors were encountered:
This is definitely planned as part of MSON validation. Since Parameter's description is converging to MSON (and eventually should become the same) it should get to it as well.
However I am afraid in the interim period the only way is to write this intent (limits / validation) into parameter's description.
Any contribution to syntax and / or implementation is highly appreciated!
I have just proposed an RFC that should introduce the complete MSON syntax to URI parameters. This is indirectly solving this issue as MSON should eventually introduce value validation. Please see and comment on apiaryio/api-blueprint-rfcs#3
We'd like to be able to set a minimum value for URI Parameters. Could do something similar for maximum. e.g.:
10
)Limit the number of results to return. If omitted all results in the period are returned.
0
, exclusive)10
, inclusive)Running it through snowcrash should then yield something like:
{
"name": "limit",
"description": "Limit the number of results to return. If omitted all results in the period are returned.",
"type": "integer",
"required": false,
"default": "",
"example": "10",
"values": [],
"minimum": 0,
"exclusiveMinimum": true,
"maximum": 10,
"exclusiveMaximum": false
}
The text was updated successfully, but these errors were encountered: