Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Interactive edition of the spec text in the monaco editor #23

Open
antoniogarrote opened this issue Apr 3, 2017 · 0 comments
Open

Interactive edition of the spec text in the monaco editor #23

antoniogarrote opened this issue Apr 3, 2017 · 0 comments
Assignees

Comments

@antoniogarrote
Copy link
Contributor

Once the app has become really editable, we should try to provide some auto-completion features through the Monaco editor we are using to display the text of the different syntaxes for the model.

The lexical information for the tokens in the editor matching the nodes in the model is available for YAML/RAML parsed models and should be exposed through the class LexicalInfo but the connection is missing.

You can track how the information is generated, merged into the YAM AST as meta-data, and finally added to the model elements.

That's the information that should be exposed through the LexicalInfo TS class.
Debugging and finishing the elementLexicalInfo function in model_proxy.ts should be enough for getting the lexical inforamtion available.

The lexical information is not present in the JSON parser.

Changing the implementation of api-modelling-framework.parser.syntax.json/parse-string to get an AST using some JSON-AST library as we are doing with the YAML parser might be an option for JSON/OpenAPI.

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

No branches or pull requests

2 participants