elements icon indicating copy to clipboard operation
elements copied to clipboard

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

Open bekabaz opened this issue 2 months ago • 0 comments

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.

bekabaz avatar Nov 14 '25 17:11 bekabaz