JSON Schema for metadata, routes, layouts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yuri
    Member
    • Mar 2014
    • 8454

    JSON Schema for metadata, routes, layouts

    We have JSON Schema for metadata (about 99% coverage) plus for route files and some layout files. See schema files here.

    It provides validation, autocomplete and documentation when editing JSON files in the IDE or editor that supports JSON Schema.

    Mappings for PHPStorm/WebStorm and VSCode are available in the Espo repository (no configuration needed).

    Also available in the ext-template repository. It's possible to apply the schema mapping for existing custom extensions. See for Intellij, for Vscode.
    Last edited by yuri; 05-27-2023, 05:13 PM.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.
  • Kyle
    Senior Member
    • May 2020
    • 143

    #2
    This is very useful, thanks.

    Note that currently VSCode does not appear to support these Schemas yet
    "The schema uses meta-schema features ($dynamicRef) that are not yet supported by the validator."

    Issue Type: Bug So basically I have a VS Code extension that provides JSON file validation based on the built in JSON validator. The schema that I'm validating against (OpenAPI 3.1.x) uses meta-sch...

    Comment


    • yuri
      yuri commented
      Editing a comment
      JSON Schema works in VSCode out of the box. Might need to make the editor to apply the settings after the mapping file is copied to the project. We don't use $dynamicRef. E.g. open settings > JSON Schema > edit mapping > save.
  • wtconseil
    Active Community Member
    • Apr 2015
    • 335

    #3
    super useful ! thx

    Comment

    Working...