Is there a way to add default fields to all of my end-points? I wish to add fields like api_key, sort, limit etc. to all of my end points.
Can you add a set of default input parameters to all end points in a central location?
You can define Parameters like
"parameters": {
"skipParam": {
"name": "skip",
"in": "query",
"description": "number of items to skip",
"required": true,
"type": "integer",
"format": "int32"
},
and then use it like
"parameters": [
{ "$ref": "#/parameters/skipParam" }
],
Using this, you will not have to specify parameter details again and again but will need to add ref where required.
More details can be found at Open Api Specification
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With