Skip to content

Provide user-friendly content-assist suggestions for patternProperties & pattern-constrained values #70

Open
@tfesenko

Description

@tfesenko

Extracted from #30 (comment):

The Swagger schema defines some patternProperties, including vendor extensions, path items and responses. It also defines some string values with pattern constraints, including host and basePath.

Code assist shows these patterns as suggestions, and there are two problems:

  1. The patterns aren't a user-friendly indication of what is expected in this context.
  2. The patterns, when chosen from the suggestion list, are inserted verbatim into the document, and they are not legal values.

Invoke content-assist for response code:
screen shot 2016-01-27 at 5 29 02 pm

The first option is ([0-9]{3})$|^(default)$, choosing it will create an invalid model:

  /taxFilings:
    get:
      responses:
        ([0-9]{3})$|^(default)$:

PatternProperties are probably more useful in proposal description than for replacementString.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions