-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide user-friendly content-assist suggestions for patternProperties & pattern-constrained values #70
Comments
…ke to try retrieving this title for code assist.
@ghillairet , I've been working through this problem with @tfesenko , and we would like to try using "title" to provide better labels for code assist suggestions.
If this works, generally, we will want to make more use of the title property to provide better code assist (and possibly better validation errors). |
Another improvement that would help with this: In the Responses context (when we have one), provide templates for the most common HTTP response codes, ideally with a description of each one. |
I searched through the schema. Here are all of the contexts in which Vendor Extensions:
Host:
basePath:
pathItem:
response:
|
@daffinm raised another issue with these properties, and suggested a different resolution. Most properties are static, so leaving the cursor after the colon after the user applies the keyword suggestion makes sense. But pattern property names need to be edited, post-insertion, and the cursor position doesn't allow for this. Templates might be a better solution for these pattern properties. |
Related issue #227 |
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:
Invoke content-assist for response code:
The first option is
([0-9]{3})$|^(default)$
, choosing it will create an invalid model:PatternProperties are probably more useful in proposal description than for replacementString.
The text was updated successfully, but these errors were encountered: