Argument

Describes arguments of the operation
{
  "contentType": String,
  "in": String,
  "name": String,
  "schema": typeschema:PropertyType,
}
FieldDescription
contentTypeString
In case the data is not a JSON payload which you can describe with a schema you can select a content type
inString
The location where the value can be found either in the path, query, header or body. If you choose path, then your path must have a fitting variable path fragment
nameString
Optional the actual path, query or header name. If not provided the key of the argument map is used
schematypeschema:PropertyType
Schema of the JSON payload

Operation

{
  "arguments": Map (Argument),
  "authorization": Boolean,
  "description": String,
  "method": String,
  "path": String,
  "return": Response,
  "security": Array (String),
  "stability": Integer,
  "throws": Array (Response),
}
FieldDescription
argumentsMap (Argument)
All arguments provided to this operation. Each argument is mapped to a location from the HTTP request i.e. query or body
authorizationBoolean
Indicates whether this operation needs authorization, if set to false the client will not send an authorization header, default it is true
descriptionString
A short description of this operation. The generated code will include this description at the method so it is recommend to use simple alphanumeric characters and no new lines
methodString
The HTTP method which is associated with this operation, must be a valid HTTP method i.e. GET, POST, PUT etc.
pathString
The HTTP path which is associated with this operation. A path can also include variable path fragments i.e. /my/path/:year then you can map the variable year path fragment to a specific argument
returnResponse
The return type of this operation. The return has also an assigned HTTP success status code which is by default 200
securityArray (String)
An array of scopes which are required to access this operation
stabilityInteger
Indicates the stability of this operation: 0 - Deprecated, 1 - Experimental, 2 - Stable, 3 - Legacy. If not explicit provided the operation is by default experimental
throwsArray (Response)
All exceptional states which can occur in case the operation fails. Each exception is assigned to an HTTP error status code

Response

Describes the response of the operation
{
  "code": Integer,
  "contentType": String,
  "schema": typeschema:PropertyType,
}
FieldDescription
codeInteger
The associated HTTP response code. For error responses it is possible to use the 499, 599 or 999 status code to catch all errors
contentTypeString
In case the data is not a JSON payload which you can describe with a schema you can select a content type
schematypeschema:PropertyType
Schema of the JSON payload

Security

{
  "type": String,
}
FieldDescription
typeString
The global security type of the API must be one of: httpBasic, httpBearer, apiKey or oauth2

SecurityApiKey extends Security

{
  "in": String,
  "name": String,
}
FieldDescription
inString
Must be either "header" or "query"
nameString
The name of the header or query parameter i.e. "X-Api-Key"

SecurityHttpBasic extends Security

{
}
FieldDescription

SecurityHttpBearer extends Security

{
}
FieldDescription

SecurityOAuth extends Security

{
  "authorizationUrl": String,
  "scopes": Array (String),
  "tokenUrl": String,
}
FieldDescription
authorizationUrlString
Optional the OAuth2 authorization endpoint
scopesArray (String)
Optional OAuth2 scopes
tokenUrlString
The OAuth2 token endpoint

TypeAPI extends typeschema:TypeSchema

The TypeAPI Root
{
  "baseUrl": String,
  "operations": Map (Operation),
  "security": Security,
}
FieldDescription
baseUrlString
Optional the base url of the service, if provided the user does not need to provide a base url for your client
operationsMap (Operation)
A map of operations which are provided by the API. The key of the operation should be separated by a dot to group operations into logical units i.e. product.getAll or enterprise.product.execute
securitySecurity
Describes the authorization mechanism which is used by your API