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
Many API providers are looking to add more vendor-specific metadata into the spec--one is adding information about SLAs, response time, request limits, etc.
What if we made a generic specification for custom information? Custom information could be denoted by an "x-" prefix, for example "x-sla". The swagger client could then allow some kind of simple plugin architecture to support how to render/validate such custom fields. This could have a few advantages, not least of which is the ability to road-test new schema before it's included in the concrete specification. It would also allow people to define their own (adhoc) "x-meta" properties which would never form part of the official spec, but at least clients could be aware of the "x" properties.
For Swagger 2.0, vendor extensions in the format of "x-" as proposed were included and can be used to specify these things.
In the future, if specific extensions are commonly used, we may include them inherently in the spec.
Activity
eddieajau commentedon May 7, 2014
What if we made a generic specification for custom information? Custom information could be denoted by an "x-" prefix, for example "x-sla". The swagger client could then allow some kind of simple plugin architecture to support how to render/validate such custom fields. This could have a few advantages, not least of which is the ability to road-test new schema before it's included in the concrete specification. It would also allow people to define their own (adhoc) "x-meta" properties which would never form part of the official spec, but at least clients could be aware of the "x" properties.
My 2c
Merge pull request #51 from madskristensen/patch-1
webron commentedon Sep 19, 2014
For Swagger 2.0, vendor extensions in the format of "x-" as proposed were included and can be used to specify these things.
In the future, if specific extensions are commonly used, we may include them inherently in the spec.