Type object
File match **/api.json
Schema URL https://catalog.lintel.tools/schemas/schemastore/api-builder/latest.json
Source https://www.schemastore.org/apibuilder.json

Validate with Lintel

npx @lintel/lintel check
Type: object

JSON Schema for API Builder's api.json format from https://app.apibuilder.io/doc/apiJson

Properties

name string required

The human readable name of this service. Used for display, and as the basis for generating a unique key for URL.

$schema string

A JSON schema URL

apidoc object
1 nested properties
version string required

Specifies the version of the API Builder specification that this file is written for. The latest version can be found by visiting /apicollective/apibuilder-spec.

info object
2 nested properties
contact object

Specifies contact information for this service

3 nested properties
name string

Identifying name of the contact person/organization

url string

URL pointing to the contact information

email string

Email address of the contact person/organization

license object

specifies the license under which this service is released

2 nested properties
name string required

Name of the license - e.g. MIT

url string

URL of the license itself

namespace string

Specifies the namespace for this service. Namespace is primarily used when other services import definitions from your service and in the code generators when defining things like package names. If not specified, we will automatically generate a namespace based on [organization namespace].[formatted service name].[major version number]. Note that by default API Builder includes the major version number in the package name which allows service authors and clients to interact with multiple versions of the service where changes have been made in a non backwards compatible way.

base_url string

The base URL where this service is hosted. Must start with http.

description string

optional description for what this service provides. Supports GFM.

imports import[]

JSON Array defining any other services whose schema definitions we would like to import into our service.

headers header[]

JSON Array defining any HTTP Headers that the service understands or expects.

enums object
interfaces object
models object

specifies the name of the model. Names must be alphanumeric and start with a letter. Valid characters are a-z, A-Z, 0-9 and _ characters. The name must be unique in the set of names assigned to enums, interfaces, models, or unions types.

unions object
resources object
attributes attribute[]

JSON Array defining additional meta data about this service. Attributes are used to add custom extensions to API Builder and are typically used by generators to enable advanced code generation.

annotations object

Definitions

apidoc object
version string required

Specifies the version of the API Builder specification that this file is written for. The latest version can be found by visiting /apicollective/apibuilder-spec.

info object
contact object

Specifies contact information for this service

3 nested properties
name string

Identifying name of the contact person/organization

url string

URL pointing to the contact information

email string

Email address of the contact person/organization

license object

specifies the license under which this service is released

2 nested properties
name string required

Name of the license - e.g. MIT

url string

URL of the license itself

contact object

Specifies contact information for this service

name string

Identifying name of the contact person/organization

url string

URL pointing to the contact information

email string

Email address of the contact person/organization

license object

specifies the license under which this service is released

name string required

Name of the license - e.g. MIT

url string

URL of the license itself

import object
uri string required

The complete URI to the service specification that we are importing. Within API Builder, you can find the URL to the service specification by clicking on the "service.json" link for a service.

header object
name string required

The name of the header.

type string required

The type of this header. Acceptable values are either the name of an enum or string. To specify a collection (meaning multiple values for this header can be provided), the type name can be wrapped with "[]". For example, to specify that the type is a collection of strings, use "[string]".

required boolean

boolean: true|false. By default, all headers are considered required. To make a parameter optional, set "required" to false.

Default: true
default

The default value for this header. If specified, generated clients will automatically include this header in all requests. Default values must be specified as strings.

description string

Optional description for what this header provides. Supports GFM.

attributes attribute[]

JSON Array defining additional meta data about this header for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

annotation object
attribute object
name string required

the name and identifier of the attribute.

value object required

a JSON object that is usually utilized by a downstream Generator.

description string
deprecation object

JSON Object that indicates that this object is deprecated.

description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

enum object
enumvalues object
name string required

The name of the value. Names must start with a letter.

value string

The actual string representation of this value when serializing. If not specified, defaults to 'name'.

description string

Optional description for what this enum value provides. Supports GFM.

attributes attribute[]

JSON Array defining additional meta data about this enum value for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

interface object
field object
name string required

Specifies the name of the field. Names must be alphanumeric and start with a letter. Valid characters are a-z, A-Z, 0-9 and _ characters.

pattern=^[a-zA-Z0-9_]*$
type string required

Specifies the type of this field. Acceptable values include the name of either an enum, a model, or a (primitive type). To specify a List, the type name can be wrapped with "[]". For example, to specify that the type is a collection of strings, use "[string]". To specify a Map, the type name can be prefixed with "map[type]". For example, to specify that the type is a Map of string to long, use "map[long]". Note that for map, the keys must be strings (per the JSON specification).

description string

Optional description for what this field provides. Supports GFM.

required boolean

By default, all fields are considered required. To make a field optional, set "required" to false. When a field is marked as required, it must be present in any form of a model for that form to be valid. In client-server scenario, this means that any defaults that are present in the model must be applied by the client. If you want a default to be applied by the receiver, you should mark the field as "required": false

Default: true
default

Optional default value. The value must be valid for the type specified for this field. For example, if you specify a field named 'limit' with type 'integer', an acceptable default would be 10.

example string

Optional - an example value for this field used only in the produced documentation

minimum integer

Optional - For a string, refers to the minimum length. For an array, the minimum number of elements in the array. For example, a value of 1 for an array would indicate the array must have at least 1 element.

maximum integer

Optional - For a string, refers to the maximum length. For an array, the maximum number of elements in the array. For example, a value of 1 for an array would indicate the array must have at most 1 element.

attributes attribute[]

JSON Array defining additional meta data about this field for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

annotations string[]

JSON Array of type string where each value indicates the name of a declared annotation (optional),

model object

specifies the name of the model. Names must be alphanumeric and start with a letter. Valid characters are a-z, A-Z, 0-9 and _ characters. The name must be unique in the set of names assigned to enums, interfaces, models, or unions types.

union object
uniontype object
type string required

Specifies the type to include in this union type. Acceptable values include the name of either an enum, a model, or a (primitive type). description optional description for what this type provides. Supports GFM.

description string
default boolean

If true, indicates that this type should be used as the default when deserializing union types. This field is only used by union types that require a discriminator and sets the default value for that discriminator during deserialization.

discriminator_value string

The discriminator value defines the string to use in the discriminator field to identify this type. If not specified, the discriminator value will default to the name of the type itself.

attributes attribute[]

JSON Array defining additional meta data about this union type for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

resource object
operation object
method string required

The HTTP method for this operation

path string

Optional path for this particular operation. If not provided, defaults to no additional path. Path parameters can be specified by prefixing a path element with ':'. For example, a path of '/:guid' would imply that this operation is available at /resource_path/:guid. Path parameter types are inferred by looking for a field with that name on the model associated with this resource. If not found, the datatype of any path parameter will be string.

description string

Optional description for what this operation provides. Supports GFM.

body object
4 nested properties
type string required

Specifies the type of this body. Acceptable values include the name of either an enum, a model, or a (primitive type). To specify a List, the type name can be wrapped with "[]". For example, to specify that the type is a collection of strings, use "[string]". To specify a Map, the type name can be prefixed with "map[type]". For example, to specify that the type is a Map of string to long, use "map[long]". Note that for map, the keys must be strings (per the JSON specification).

description string

Optional description for what this body provides. Supports GFM.

attributes attribute[]

JSON Array defining additional meta data about this body for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

parameters parameter[]

Optional JSON Array of the parameters to this method. By default, for GET methods, parameters are assumed to be in the path or in the query. For other methods, parameters are assumed to be in the path or form body, unless you have explicitly specified a body in which case parameters can be provided in the path or the query.

responses object
attributes attribute[]

JSON array defining additional meta data about this operation for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

parameter object
name string required

The name of the parameter. Names must be alphanumeric and must start with a letter. Valid characters are a-z, A-Z, 0-9 and _ characters.

pattern=^[a-zA-Z0-9_]*$
type string required

Specifies the type of this parameter. Acceptable values include the name of either an enum, a model, or a (primitive type). To specify a List, the type name can be wrapped with "[]". For example, to specify that the type is a collection of strings, use "[string]". To specify a Map, the type name can be prefixed with "map[type]". For example, to specify that the type is a Map of string to long, use "map[long]". Note that for map, the keys must be strings (per the JSON specification).

location string

One of: path, query, form, header. Defines the location of this parameter. Default location varies based on the context of the parameter (e.g. if the operation method is a POST, the default will be Form; if a GET, the default will be Query)

description string

Optional description for what this parameter provides. Supports GFM.

required boolean

By default all parameters are considered required. To make a parameter optional, set "required" to false.

Default: true
default

Optional default value. The value must be valid for the type specified for this parameter. For example, if you specify a parameter named 'limit' with type 'integer', an acceptable default would be 10

example string

Optional - an example value for this parameter used only in the produced documentation

minimum integer

Optional - For a string, refers to the minimum length. For an array, the minimum number of elements in the array. For example, a value of 1 for an array would indicate the array must have at least 1 element.

maximum integer

Optional - For a string, refers to the maximum length. For an array, the maximum number of elements in the array. For example, a value of 1 for an array would indicate the array must have at most 1 element.

attributes attribute[]

JSON array defining additional meta data about this parameter for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.

response object
body object
type string required

Specifies the type of this body. Acceptable values include the name of either an enum, a model, or a (primitive type). To specify a List, the type name can be wrapped with "[]". For example, to specify that the type is a collection of strings, use "[string]". To specify a Map, the type name can be prefixed with "map[type]". For example, to specify that the type is a Map of string to long, use "map[long]". Note that for map, the keys must be strings (per the JSON specification).

description string

Optional description for what this body provides. Supports GFM.

attributes attribute[]

JSON Array defining additional meta data about this body for use by generators.

deprecation object

JSON Object that indicates that this object is deprecated.

1 nested properties
description string

Optional, but recommended to contain notes for what the user is supposed to do now that this property is deprecated. Supports GFM.