Schema

Schema

This document describes the sdkgen.json JSON file. The following example gives you a first insight how the file is structured.

{
  "type": "client-java",
  "require": {
    "./typeapi.json": {
      "target": "./output",
      "namespace": "org.typeapi.generator"
    }
  }
}
  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 which is used to 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/. Normally you do not need to adjust this.

require

The require map contains all dependencies of your project. The key of each package can have 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.

part of the Apioo-Project