Skip to content
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

SwaggerEditor@next: provide completion for $ref field starting with # character. #4109

Open
char0n opened this issue May 10, 2023 · 0 comments

Comments

@char0n
Copy link
Member

char0n commented May 10, 2023

Originally discussed in #3216 (comment)

# is control character for starting of the YAML comment. Thus it's dropped from the resulting AST. We have to escape it with single or double quotes to represent the value, and then the proper completion is displayed.

$ref: #<cursor CTRL+b>

Steps To Reproduce

ref-yaml-comment.mp4

Notes

Now this might be a bit tricky to implement. When ApiDOM YAML 1.2 parser adapter parses the YAML string, we only collect YAML comments from the YAML stream. The rest of the comments are discarded as insignificant white space.

We have a tracking ApiDOM issue which, tracks the support for YAML comments outside of YAML stream. This issue will first need to be processed before this issue can be fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant