Skip to content

Support minItems and maxItems in config array schemas #432

Description

Context

VS Code has a session-mutable configuration property that is represented as an array with a zero-or-one-item contract:

microsoft/vscode#332593

The current Agent Host Protocol ConfigPropertySchema can describe type: "array" and its items, but cannot express array cardinality.

Ask

Please add JSON Schema-compatible array cardinality fields:

interface ConfigPropertySchema {
    minItems?: number;
    maxItems?: number;
}

Servers and generated clients should carry these fields through schema serialization and validate them consistently.

Consumer requirement

VS Code needs to advertise maxItems: 1 for a session config array so clients cannot persist a value that passes the protocol schema but is later rejected by the provider's narrower runtime validation.

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