Skip to content

Better code completion proposal for name/key of patterned properties and array elements #227

@tfesenko

Description

@tfesenko

We use the _key_ as a code assist proposal for the "no proposal" case, usually it means property name, or some other named element, represented as additionalProperties or patternProperties in the schema:
screen shot 2016-10-17 at 8 47 55 pm
and
screen shot 2016-10-17 at 8 48 04 pm

It can be easily changed as it's defined in com.reprezen.swagedit.assist.SwaggerProposalProvider.createObjectProposals(ObjectTypeDefinition, AbstractNode, String):

if (proposals.isEmpty()) {
    proposals.add(new Proposal("_key_" + ":", "_key_", null, null));
}

Note that we can change the label, the replacement text, or both.

@tedepstein , we wonder if you have ideas how to improve it, which labels/replacement use in this case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions