Skip to content

Json schemas of various json file types used by Tyk products. Use them to get autocompletion in these files.

License

Notifications You must be signed in to change notification settings

letzya/tyk-schemas

Repository files navigation

Tyk Schemas

JSON and YAML schemas for various JSON file types used by Tyk products. You can use these schemas in your IDE or favourite editor to get auto-completion and validation of all your Tyk-related configuration files.

This project is an MVP and still WIP

Support Status symbols

Symbol Description
Fully supported
⚠️ Untested / Requires Documentation
❌️ Not currently supported
NA Not available

Client to Gateway Authentication

Type JSON YAML Comments
Tyk API definition ⚠️ ❌️ -
Tyk API OAS definition ❌️ ❌️ -
Tyk key definition ⚠️ ❌️ Also referred as "session object"
Tyk policy definition ❌️ ❌️ -
Tyk OSS gateway config file ⚠️ NA -
Tyk Pro gateway config file ❌️ NA -
Tyk hybrid gateway config file ❌️ NA -
Tyk pump config file ❌️ NA -
Tyk dashboard config file ❌️ NA -
Tyk Identity broker config file ❌️ NA -

Usage

To write in "Tyk language" and feel it's native to your IDE config the settings in your IDE to use the JSON schemas in this repository

VSCode

  1. Open your VSCode settings.json as explained here.

  2. Add the following lines to your setting.json:

"json.schemas": [
          {
            "fileMatch": [
                "tyk.*.conf"
            ],
            "url": "https://raw.githubusercontent.com/letzya/tyk-schemas/main/schema_tyk.oss.conf"
        },
        {
            "fileMatch": [
                "apikey.*.json"
            ],
            "url": "https://raw.githubusercontent.com/letzya/tyk-schemas/main/schema_apikey.json"
        },
        {
            "fileMatch": [
                "apidef.*.json"
            ],
            "url": "https://raw.githubusercontent.com/letzya/tyk-schemas/main/schema_apidef_lean.json"
        },
    ],
  1. If you want IntelliSense to work for Tyk's config files you need VSCode to recognise .conf extension as JSON. To achieve that add the following:
    "files.associations": {
        "*.conf": "json"
    }
  1. cmd+shift+p to Reload the window

  2. Create files with the name convention you used in step #2

    • Tyk API definition - use the format "apidef.*.json", for example "apidef.httpbin.json"
    • Tyk key definition - use the format "apikey.*.json", for example "apikey.httpbin-key.json"
    • Tyk gateway OSS config file - use the format "tyk.*.conf", for example "tyk.gateway.conf"

Goland

Open the project's preferences (cmd+,) and under JSON Schema mapping set the access of Goland to the JSON schemas and the file formats per the example in this screenshot: image

About

Json schemas of various json file types used by Tyk products. Use them to get autocompletion in these files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published