cancel
Showing results for 
Search instead for 
Did you mean: 

Vendor extension on array parameter items node

SOLVED
Highlighted
Occasional Visitor

Vendor extension on array parameter items node

This might not be currently allows on the items node per https://swagger.io/docs/specification/2-0/swagger-extensions/

I came across this:

 

 

        "parameters": [
          {
            "name": "parameterName",
            "in": "body",
            "description": "Parameter description",
            "required": true,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "x-my-vendor-extension": {

 

 The vendor extension here was used to provide a GUI picker for the items inside the array, where the picker returns a single item, rather than the whole array.

Could it be the above structure is currently an out-of-spec placement for the vendor extension?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Moderator

Re: Vendor extension on array parameter items node

Hi @daviburg, your example is valid - extensions are allowed inside Schema Objects. For a full list of places where extensions are allowed, look for  ^x-  in the OpenAPI 2.0 Specification text.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

1 REPLY 1
Highlighted
Moderator

Re: Vendor extension on array parameter items node

Hi @daviburg, your example is valid - extensions are allowed inside Schema Objects. For a full list of places where extensions are allowed, look for  ^x-  in the OpenAPI 2.0 Specification text.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors