Skip to content

Add a keyword for autocomplete suggestions #751

@Chi-teck

Description

@Chi-teck

IDEs use "enum" property for autocompletion but in some use cases a property must accept arbitrary data.

Current workaround. Works fine in PhpStorm and likely in other JetBrains products. Though the violation message is a bit messy. Might be improved some day with #396.

"data": {
    "anyOf": [
        {
            "enum": ["public", "private", "temporary"]
        },
        {
            "type": "string"
        }
    ]
}

However it is too verbose and still looks a hack.

If we have a dedicated keyword for suggestions the above schema would look like follows.

"data": {
    "type": "string",
    "suggestions": ["public", "private", "temporary"]
}

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