⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

uniqueItems in Array Does not cause "unique" to Appear Where Expected #2864

@kentbulza

Description

@kentbulza

If the JSON schema states an array is unique, there is no visual indication.

Context

Where read-only or required appear, it should also say "unique" if the schema specifies.

Current Behavior

No indication of unique appears.

Expected Behavior

unique label should appear.

Steps to Reproduce

Here's an example OpenAPI 3.1 Schema demonstrating the issue.:

{ "openapi": "3.1.0", "info": { "title": "Dog Food API", "version": "1.0.0", "description": "API for adding dog food SKUs" }, "paths": { "/addDogFood": { "post": { "operationId": "addDogFood", "summary": "Add dog food items", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "dogFoods": { "type": "array", "items": { "type": "object", "properties": { "sku": { "type": "string" }, "name": { "type": "string", "readOnly": true } }, "required": [ "sku", "name" ] }, "uniqueItems": true, "minItems": 1 } }, "required": [ "dogFoods" ] } } } }, "responses": { "200": { "description": "Dog food items added successfully" } } } } } }

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