Giter Club home page Giter Club logo

vscode-tyk's Introduction

VS Code Tyk extension

Tyk Schemas VS Code extension validates Tyk JSON schemas for various JSON objects/files used by Tyk products. This extension can help you write and validate API Definition, keys, and config files with VS Code IntelliSense which validates and autocomplete the required and optional fields and also provides default values and examples to make your work with Tyk faster and easier. This way you can avoid the back&forth copy+amend code snippet from the docs and start using Tyk natively as a language.

Installing Tyk Schemas Extension

Click on the "install" button, like you would with any other extension

Supported Tyk objects or file formats

For supported file formats and schemas list, check the "Feature Contribution" section in the VS Code extension

image

All the schemas used by Tyk Schemas extension are taken from tyk-schemas repository. Please refer to it for details on the provided schemas (or to suggest improvements and report bugs).

The repository that underlies this extension is vscode-tyk - please use it to report bugs or request features such as more file formats.

Using Tyk Schemas Extension

Once Tyk Schemas extension is installed, you are ready to start using it. The only requirement is to name the file in the following format:

  • tyk*.conf - For Tyk gateway config file
  • apikey*.json For tyk gateway keys files/payloads
  • apidef*.json, TykDefinition*.json - For Tyk API definition files/payloads
  • oasapidef*.json, TykOasApiDef*.json - For Tyk OAS API definition files/payloads

As you can see below, when you name the file in the right format you'll see a pop-up window with a suggestion to auto-complete just as it would with any programming language. If you can't see the pop up click control+space.

image

Creating and testing new schemas

In some cases, you'd want to add your own schemas or maybe add schemas from our schemas repo that have not been published to the VS Code extension just yet. In this case, you can add the URL to the setting.json file in VS Code (in MacOS open via Preferences), reload the window, and start using the schema. Example of the code you need to add to the setting.json file

"json.schemas": [
        {
            "fileMatch": [
                "<your_filename_pattern>"
            ],
            "url": "https://raw.githubusercontent.com/TykTechnologies/tyk-schemas/v0.1/JSON/draft-07/schema_tyk.oss.conf",
        },

Cases for which you might need to do that:

  1. A new schema in tyk-schemas repo that has not yet been published to the Tyk VS Code extension
  2. An existing schema in tyk-schemas repo that is not planned to be published to the Tyk VS Code extension, since it's a special use case but you are interested in using it to validate your Tyk objects/files.
  3. A schema that you forked and want to test.

Community

This project is taking its first steps in the world. If you find any defects, please raise an issue. If you need support for more file formats, please raise an issue as well. We welcome code contributions as well, both in this repo and in tyk-schemas project.

Local development

Please see the quickstart guideline.

vscode-tyk's People

Contributors

buraksekili avatar jeffy-mathew avatar letzya avatar

Stargazers

 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

munkiat

vscode-tyk's Issues

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.