Commands can be run by first typing ctrl + shift + P or cmd + shift + P on macOS.
Commands provided are:
Convert to YAML - converts the current document from JSON to YAML
Convert to JSON - converts the current document from YAML to JSON
Note: When converting from an Untitled document, the command will overwrite the current file instead of creating a new one.
Install
To install, search for this extension in the Extension Marketplace by going to the Extensions View () in VS Code searching for "BEL Nanopub".
Usage
For files to be validated against the BEL Nanopub JSONSchema, the file must be in either JSON or YAML and the file name must end with nanopub or nanopubs with a suffix of json, yaml or yml, ie. *nanopubs.json, *nanopub.yaml, ...
Syntax highlighting will currently be applied to all JSON and YAML files regardless of file name.
To use snippets, the current file must be in either JSON or YAML, so any files ending in .json, .yaml or .yml will have access to the snippets.
Developing
To get started developing:
Clone this repo.
Go into the directory
Run npm install
Credits
Conversion between JSON and YAML based upon openapi-lint