Skip to content

Provide JSON Schema for draft.yaml to SchemaStore for IDE autocompletionΒ #708

Open
@edjw

Description

@edjw

Just discovering Blueprint in the last couple of days and noted a couple of things that might make it easier to pick up.

I'm really used to autocomplete, inline validation etc in my editor and missed these things while making my draft.yaml.

The JSON Schema Store project might offer a way to provide these nice things for developers for Blueprint.

Synopsis:

Create a JSON Schema for Blueprint to provide autocompletion, validation, and tooltips to the draft.yaml

PhpStorm seems to include the schema validation by default.
Red Hat's YAML extension provides it for VS Code.

You then get some nice autocomplete, some tooltip docs, some validation.

Here's a couple of examples of what that looks like in VS Code with a Github Workflow yaml.
CleanShot 2024-11-18 at 14 33 01@2x
CleanShot 2024-11-18 at 14 34 07@2x

Proposed steps:

  1. Create a JSON Schema.
  2. Link to it in the JSON Schema Store.

Docs here on creating a schema:
https://json-schema.org/learn/getting-started-step-by-step

There is a list of all other JSON Schemas here:
https://www.schemastore.org/json/

It seems you can add the file in Blueprint's own repo or add to the SchemaStore repo directly:
https://github.com/SchemaStore/schemastore/blob/master/src/api/json/catalog.json

Expected Behavior:

In supported JSON editors like Visual Studio and Visual Studio Code, developers get auto-completion and validation to make sure their JSON document is correct.

When a JSON editor supports schemas, tooltips can help inform the user about the various properties and values.

It is supported in VS Code, PhpStorm, NeoVim and lots of other editors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions