Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,332
    • Merge requests 1,332
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #226982
Closed
Open
Issue created Jul 06, 2020 by James Ramsay (ex-GitLab)@jramsay-gitlab🔴Contributor

Support custom JSON schema validation in the Web IDE

Problem to solve

Projects that rely on people writing configurations in JSON or YAML format can cause problems because it's easy to make a typo and break things. It's possible to write validation tools that catch this in the CI pipeline but using a JSON schema file, can be helpful for offering documentation and hints.

Further details

This is a problem for the www-gitlab-com where we need to write release post items every month.

Proposal

Users should be able to define custom schema files that are loaded in the Web IDE.

Implementation Details

The Web IDE has an existing file that's loaded for settings used by the Web Terminal .gitlab/.gitlab-webide.yml. This should be extended with an additional section schemas that allows users to define additional schemas.

schemas:
  - uri: https://json.schemastore.org/package
    match: 
      - package.json
  - uri: https://absolute/raw/url
    match: 
      - data/release_posts/unreleased/*.yml
      - data/release_posts/unreleased/*.yaml
  - uri: https://absolute/raw/url2
    match: 
      - data/release_posts/unreleased/*.{yml,yaml}
  - uri: https://absolute/second/raw/url
    match: 
      - "*.gitlab-ci.yml"

As an MVC we will only load schema files referenced by absolute URL and not relative path in the repository. This could be the RAW url to a file in the project, a snippet, or something else.

Pricing Tier

This feature is going to be part of GitLab Premium in the Enterprise Edition. The rationale for this decision is that teams collaborating on projects where custom schema may be required would benefit from having feedback and mechanisms to use this in the Web IDE.

Edited Sep 04, 2020 by Himanshu Kapoor
Assignee
Assign to
Time tracking