SDKgen is a powerful code generator to automatically build client SDKs for your REST API.

Sign in   Sign up

The sdkgen.json schema

This document describes the sdkgen.json JSON schema.

  1. type
  2. repository
  3. require

type

The type defines the programming language which the generator will produce. It is a string like client-typescript or client-php. You can get a list of all supported types through the following command:

./sdkgen types

repository

Contains the target repository where the package manager resolves specifications in the form of [user]/[document], by default the TypeHub repository is used. It must be a URL pointing to the API i.e. https://api.typehub.cloud/.

require

The require map contains all dependencies of your project. The key of each package can be one of the following forms:

Package
A package hosted on the TypeHub platform, must be in the format [user]/[document]
Url
An url pointing to a TypeAPI or OpenAPI specification
File
A file pointing to a TypeAPI or OpenAPI specification
{
    "require": {
        "fusio/sdk": {
            "version": "0.1.0",
            "target": "./src/gen/fusio"
        },
        "https://acme.com/spec.json": {
            "target": "./src/gen/folder"
        },
        "./my/spec.json": {
            "target": "./src/gen/folder"
        }
    }
}

version

Defines a concrete specification version. The version property is only relevant in case the package form is used.

target

The target folder where all generated files are placed.

namespace

Optional a namespace for the generated code.