Giter VIP home page Giter VIP logo

typo3-json-schemas's Introduction

Validating site config of #TYPO3

PayPal

This is a proof of concept validating the TYPO3 site configuration.

Example

Setup

PhpStorm

  1. Open PhpStorm and switch to File > Preferences > Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings
  2. Add a new entry with the following options
    • Schema file or URL: https://raw.githubusercontent.com/georgringer/site-config-validation/master/siteconfig.json
    • File path Pattern: **/sites/*/config.yaml
  3. Provide path to the directory containg the yaml files.

IMPORTANT: Currently I have troubles with validation having the schema remotely. I propose to clone the repository and define the path to the siteconfig.json file!

Visual Studio Code

  1. Install the plugin "redhat.vscode-yaml"
  2. Open the settings and search for "yaml schemas" and open the settings.json.
  3. Add the following config
"yaml.schemas": {
    "https://raw.githubusercontent.com/georgringer/site-config-validation/master/siteconfig.json" : ["**/sites/*/config.yaml"],
}

A basic configuration.json looks like this

{
    "explorer.confirmDelete": false,
    "window.zoomLevel": 1,
    "security.workspace.trust.untrustedFiles": "open",
    "yaml.schemas": {
        "https://raw.githubusercontent.com/georgringer/site-config-validation/master/siteconfig.json" : ["**/sites/*/config.yaml"],
    }
}

Setup PhpStorm

All other IDEs

TBD, I guess google should help

Say thanks

If you find validation useful, please support me:

  • Patreon: Support me on patreon.com and get access to additional extensions and snippets as reward.
  • PayPal: Support me by a donation on paypal.com. It is just one click away.
  • Amazon Wishlist: Satisfy a wish of my Amazon wishlist.

Next steps

  1. Finish site config

Testing

cd tests
npm install
npm test

Thanks to https://github.com/buildkite/pipeline-schema/ for inspiration

typo3-json-schemas's People

Contributors

dependabot[bot] avatar georgringer avatar konafets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

konafets

typo3-json-schemas's Issues

[DOC][ENHANCEMENT] Use the schema also in vscode

To use the schema also in vscode, I would suggest to install the extension YAML by Redhat (redhat.vscode-yaml).
It comes already with a full bunch of schemas for YAML (e.g. Kubernetes).
Now you could add your own schemas.

  • Go to: File -> Preferences -> Settings
  • Search for "yaml: schemas"
  • select "Edit in settings.json"
  • Add this code:
  "yaml.schemas": {
        "https://raw.githubusercontent.com/georgringer/site-config-validation/master/siteconfig.json" : ["*/Configuration/Yaml/*.yaml"],
    },

(in fact, yaml.schemas is already written, you just have to add the second line for schema-file.)

Done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.