Skip to content

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

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" } } } } } }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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