@vkontakte/api-schema-typescript-generator

0.16.0 • Public • Published

VK API Schema Typescript Generator

npm version

This package generates TypeScript typings based on the VK API JSON schema.

Usage

Via npx:

npx @vkontakte/api-schema-typescript-generator --schemaDir ./schema --outDir ./types/api --methods '*'

Via installed dependency:

yarn add @vkontakte/api-schema-typescript-generator

vk-api-schema-typescript-generator --schemaDir ./schema --outDir ./types/api --methods 'messages.*'

Options

--help

Shows help.

--schemaDir

The relative path to directory with methods.json, objects.json and responses.json files.

--outDir

The directory where the files will be generated.

If you skip this param, script will work in linter mode without emitting files to file system.

Please note that this folder will be cleared after starting the generation.

--methods

List of methods to generate responses and all needed objects.

Examples:

  • '*' – to generate all responses and objects.
  • 'messages.*, users.get, groups.isMember' - to generate all methods from messages section, users.get and groups.isMember.

/@vkontakte/api-schema-typescript-generator/

    Package Sidebar

    Install

    npm i @vkontakte/api-schema-typescript-generator

    Weekly Downloads

    0

    Version

    0.16.0

    License

    MIT

    Unpacked Size

    137 kB

    Total Files

    63

    Last publish

    Collaborators

    • vkarelin
    • vkcom-publisher