Skip to content

nullable: false on a []string query parameter forces strict json array inputs #2849

@bekabaz

Description

@bekabaz

Context

In an effort to make my API definition more detailed, I started using the nullable directive where needed.
Using the latest Stoplight Elements as defined at:

<script src="https://unpkg.com/@stoplight/elements/web-components.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@stoplight/elements/styles.min.css">

Current Behavior

When nullable: false is not applied to a []string parameter, for example, I can input one,two,three in the input field and it works as expected. When nullable: false is applied to the same []string field, I receive an error:
Cannot use param value "one,two". JSON array expected.

Expected Behavior

I don't believe there is any reason to require strict inputs when the nullable: false directive is applied. Strictness of input should be delegated to the API owner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions