export type Annotation = { readonly description?: string readonly deprecation?: Deprecation } export type ApiJson = { readonly name: string readonly info?: Info readonly namespace?: string readonly base_url?: string readonly description?: string readonly imports: readonly Import[] readonly headers: readonly Header[] readonly enums: map[io.apibuilder.api.json.v0.models.enum] readonly interfaces: map[io.apibuilder.api.json.v0.models.interface] readonly templates?: Templates readonly unions: map[io.apibuilder.api.json.v0.models.union] readonly models: map[io.apibuilder.api.json.v0.models.model] readonly resources: map[io.apibuilder.api.json.v0.models.resource] readonly annotations: map[io.apibuilder.api.json.v0.models.annotation] readonly attributes: readonly Attribute[] } export type Attribute = { readonly name: string readonly value: any } export type Body = { readonly type: string readonly description?: string readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type Contact = { readonly name?: string readonly url?: string readonly email?: string } export type Deprecation = { readonly description?: string } export type Enum = { readonly plural?: string readonly description?: string readonly values: readonly EnumValue[] readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type EnumValue = { readonly name: string readonly value?: string readonly description?: string readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type Field = { readonly name: string readonly type: string readonly description?: string readonly required: boolean readonly default?: JSONValue readonly example?: string readonly minimum?: number readonly maximum?: number readonly attributes?: readonly Attribute[] readonly annotations?: readonly string[] readonly deprecation?: Deprecation } export type Header = { readonly name: string readonly type: string readonly required: boolean readonly description?: string readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type Import = { readonly uri: string } export type Info = { readonly contact?: Contact readonly license?: License } export type Interface = { readonly plural?: string readonly description?: string readonly fields?: readonly Field[] readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type License = { readonly name: string readonly url?: string } export type Model = { readonly description?: string readonly plural?: string readonly fields: readonly Field[] readonly attributes?: readonly Attribute[] readonly interfaces?: readonly string[] readonly templates?: readonly TemplateDeclaration[] readonly deprecation?: Deprecation } export type Operation = { readonly method: string readonly path?: string readonly description?: string readonly body?: Body readonly parameters?: readonly Parameter[] readonly responses?: map[io.apibuilder.api.json.v0.models.response] readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type Parameter = { readonly name: string readonly type: string readonly location: ParameterLocation readonly description?: string readonly required: boolean readonly default?: JSONValue readonly minimum?: number readonly maximum?: number readonly example?: string readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type Resource = { readonly path?: string readonly description?: string readonly operations: readonly Operation[] readonly attributes?: readonly Attribute[] readonly templates?: readonly TemplateDeclaration[] readonly deprecation?: Deprecation } export type Response = { readonly type: string readonly headers?: readonly Header[] readonly description?: string readonly deprecation?: Deprecation readonly attributes?: readonly Attribute[] } export type TemplateDeclaration = { readonly name: string readonly cast?: map[string] } export type Templates = { readonly models?: map[io.apibuilder.api.json.v0.models.model] readonly resources?: map[io.apibuilder.api.json.v0.models.resource] } export type Union = { readonly plural?: string readonly discriminator?: string readonly description?: string readonly types: readonly UnionType[] readonly attributes?: readonly Attribute[] readonly interfaces?: readonly string[] readonly deprecation?: Deprecation } export type UnionType = { readonly type: string readonly description?: string readonly default: boolean readonly discriminator_value?: string readonly attributes?: readonly Attribute[] readonly deprecation?: Deprecation } export type ParameterLocation = 'path' | 'query' | 'form' | 'header' export type JSONValue = | string | number | boolean | { readonly [x: string]: JSONValue } | readonly JSONValue[]