openapi: 3.0.3 info: title: apibuilder spec version: 0.12.8 description: Specification of apibuilder api.json schema components: schemas: IoApibuilderSpecV0ModelsApidoc: type: object required: - version properties: version: example: 1.0.3 type: string IoApibuilderSpecV0ModelsEnumValue: type: object required: - name - attributes properties: name: type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsDeprecation: description: Indicates that this particular element is considered deprecated in the API. See the description for details type: object properties: description: type: string IoApibuilderSpecV0ModelsModel: type: object required: - name - plural - fields - attributes properties: name: type: string plural: type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' fields: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsField' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsEnum: type: object required: - name - plural - values - attributes properties: name: type: string plural: type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' values: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsEnumValue' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsUnion: type: object required: - name - plural - types - attributes properties: name: type: string plural: type: string discriminator: description: If a type discriminator is provided, serialization of these union types will always contain a field named with the value of the discriminator that will contain the name of the type. This provides a simpler (for many use cases) JSON serialization/deserialization mechanism. When specified, apibuilder itself will verify that none of the types in the union type itself contain a field with the same name as the discriminator example: discriminator or type type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' types: description: The names of the types that make up this union type type: array minItems: 1 items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsUnionType' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsAttribute: description: Represents an additional attribute that is attached to one of the objects in apibuilder. The main use case is to capture additional metadata that doesn't necessarily define the API but aids in code generation. Examples would be hints for certain code generators about classes to extend, interfaces to implement, annotations to add, names to assign to certain methods, etc. The specific attributes will be applicable only in the context of the specific code generators usings them. type: object required: - name - value properties: name: type: string value: type: object additionalProperties: true description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' IoApibuilderSpecV0ModelsApplication: type: object required: - key properties: key: description: Unique key identifying this application type: string IoApibuilderSpecV0ModelsField: type: object required: - name - type - required - attributes properties: name: type: string type: type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' default: type: string required: type: boolean minimum: type: integer format: int64 maximum: type: integer format: int64 example: type: string attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsResponse: type: object required: - code - type properties: code: $ref: '#/components/schemas/IoApibuilderSpecV0UnionsResponseCode' type: type: string headers: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsHeader' description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' IoApibuilderSpecV0ModelsLicense: description: Describes the software license contact for this service type: object required: - name properties: name: example: MIT type: string url: example: http://opensource.org/licenses/MIT type: string IoApibuilderSpecV0ModelsHeader: type: object required: - name - type - required - attributes properties: name: type: string type: type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' required: type: boolean default: type: string attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsParameter: type: object required: - name - type - location - required properties: name: type: string type: type: string location: $ref: '#/components/schemas/IoApibuilderSpecV0EnumsParameterLocation' description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' required: type: boolean default: type: string minimum: type: integer format: int64 maximum: type: integer format: int64 example: type: string IoApibuilderSpecV0ModelsResource: type: object required: - type - plural - operations - attributes properties: type: description: The type of this resource will map to a defined model, enum, or union type type: string plural: type: string path: description: The path to this specific resource. This was added in 2016 to help us differentiate between the resource path and the operation path which can be helpful when, for example, generating method names for operations. This field is optional as some of our input formats (e.g. swagger) do not explicitly differentiate resoure paths. type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' operations: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsOperation' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsContact: description: Describes the primary contact for this service type: object properties: name: example: Michael Bryzek type: string url: example: http://www.apibuilder.io type: string email: example: michael@test.apibuilder.io type: string IoApibuilderSpecV0ModelsOrganization: type: object required: - key properties: key: description: Unique key identifying the organization that owns this service type: string IoApibuilderSpecV0ModelsUnionType: description: Metadata about one of the types that is part of a union type type: object required: - type - attributes properties: type: description: The name of a type (a primitive, model name, or enum name) that makes up this union type type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' default: description: 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 disciminator during deserialization. type: boolean IoApibuilderSpecV0ModelsService: type: object required: - apidoc - name - organization - application - namespace - version - info - headers - imports - enums - unions - models - resources - attributes properties: apidoc: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsApidoc' description: Documents that this is an apibuilder document, noting the specific version used. Internally the version is then used for backwards compatibility when applicable as new features are added to apibuilder. Note naming refers to the original name of this project, 'apidoc', and is left here to avoid a breaking change for preexisting services. name: type: string organization: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsOrganization' application: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsApplication' namespace: description: Fully qualified namespace for this service example: io.apibuilder type: string version: example: 1.0.0 type: string base_url: type: string description: type: string info: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsInfo' headers: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsHeader' imports: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsImport' enums: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsEnum' unions: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsUnion' models: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsModel' resources: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsResource' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsImport: description: An import is used to declare a dependency on another application. This allows you to reference the models and or enums from that application in your own app. type: object required: - uri - namespace - organization - application - version - enums - unions - models properties: uri: description: Full URI to the service.json file of the service we are importing example: http://www.apibuilder.io/apicollective/apibuilder-spec/0.7.38/service.json type: string namespace: description: the fully qualified namespace that we have imported example: io.apibuilder type: string organization: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsOrganization' application: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsApplication' version: description: The version of the service that we are importing example: 1.0.0 type: string enums: description: Models made available by this import type: array items: type: string unions: description: Unions made available by this import type: array items: type: string models: description: Models made available by this import type: array items: type: string IoApibuilderSpecV0ModelsOperation: type: object required: - method - path - parameters - responses - attributes properties: method: $ref: '#/components/schemas/IoApibuilderSpecV0EnumsMethod' path: description: The full path to this operation, relative to the service's base url. type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' body: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsBody' parameters: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsParameter' responses: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsResponse' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0ModelsInfo: description: General metadata about this service type: object properties: license: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsLicense' contact: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsContact' IoApibuilderSpecV0ModelsBody: type: object required: - type - attributes properties: type: type: string description: type: string deprecation: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsDeprecation' attributes: type: array items: $ref: '#/components/schemas/IoApibuilderSpecV0ModelsAttribute' IoApibuilderSpecV0EnumsResponseCodeOption: type: string enum: - Default IoApibuilderSpecV0EnumsParameterLocation: type: string enum: - Path - Query - Form - Header IoApibuilderSpecV0EnumsMethod: type: string enum: - GET - POST - PUT - PATCH - DELETE - HEAD - CONNECT - OPTIONS - TRACE IoApibuilderSpecV0UnionsResponseCode: oneOf: - $ref: '#/components/schemas/Integer' - $ref: '#/components/schemas/IoApibuilderSpecV0EnumsResponseCodeOption'