Skip to content

OA 3.1 foldable array types use the json editor instead of the array item picker #10943

Description

@tthornton3-chwy

Q&A (please complete the following information)

  • OS: ALL
  • Browser: ALL
  • Version: ALL
  • Method of installation: ALL
  • Swagger-UI version: Latest/5.32.8
  • Swagger/OpenAPI version: Swagger 2 OpenAPI 3.1

Content & configuration

Example Swagger/OpenAPI definition:

{
  "name": "test",
  "in": "query",
  "description": "Find Something",
  "required": false,
  "allowEmptyValue": true,
  "schema": {
      "type": ["array", "null"],
      "items": {
        "type": "string",
                  "description": "Repo.",
                  "enum": [
                      "FOO",
                      "BAR"
                  ]
              }
         
      
  }
},

Describe the bug you're encountering

You would get the raw json editor when using the spec above. This should instead be the array item picker.

To reproduce...

Steps to reproduce the behavior:

  1. Have an api-doc similar/including to what I shared above.
  2. See that the json editor is shown instead of the array item picker.

Expected behavior

The array item picker should be shown.

Screenshots

What we want:

Image

Additional context or thoughts

I fixed it here: #10942

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions