// ----------------------------------------------------------------------------- // Enum Typedefs // ----------------------------------------------------------------------------- /** * @typedef {"path" | "query" | "form" | "header"} ParameterLocation */ // ----------------------------------------------------------------------------- // Model Typedefs // ----------------------------------------------------------------------------- /** * @typedef {Object} Annotation * @property {string} [description] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} ApiJson * @property {string} name * @property {Info} [info] * @property {string} [namespace] * @property {string} [base_url] * @property {string} [description] * @property {Import[]} imports * @property {Header[]} headers * @property {Object.} enums * @property {Object.} interfaces * @property {Templates} [templates] * @property {Object.} unions * @property {Object.} models * @property {Object.} resources * @property {Object.} annotations * @property {Attribute[]} attributes */ /** * @typedef {Object} Attribute * @property {string} name * @property {Object} value */ /** * @typedef {Object} Body * @property {string} type * @property {string} [description] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Contact * @property {string} [name] * @property {string} [url] * @property {string} [email] */ /** * @typedef {Object} Deprecation * @property {string} [description] */ /** * @typedef {Object} Enum * @property {string} [plural] * @property {string} [description] * @property {EnumValue[]} values * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} EnumValue * @property {string} name * @property {string} [value] * @property {string} [description] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Field * @property {string} name * @property {string} type * @property {string} [description] * @property {boolean} required * @property {*} [default] * @property {string} [example] * @property {number} [minimum] * @property {number} [maximum] * @property {Attribute[]} [attributes] * @property {string[]} [annotations] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Header * @property {string} name * @property {string} type * @property {boolean} required * @property {string} [description] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Import * @property {string} uri */ /** * @typedef {Object} Info * @property {Contact} [contact] * @property {License} [license] */ /** * @typedef {Object} Interface * @property {string} [plural] * @property {string} [description] * @property {Field[]} [fields] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * Describes the software license contact for this service * @typedef {Object} License * @property {string} name * @property {string} [url] */ /** * @typedef {Object} Model * @property {string} [description] * @property {string} [plural] * @property {Field[]} fields * @property {Attribute[]} [attributes] * @property {string[]} [interfaces] * @property {TemplateDeclaration[]} [templates] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Operation * @property {string} method * @property {string} [path] * @property {string} [description] * @property {Body} [body] * @property {Parameter[]} [parameters] * @property {Object.} [responses] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Parameter * @property {string} name * @property {string} type * @property {ParameterLocation} location * @property {string} [description] * @property {boolean} required * @property {*} [default] * @property {number} [minimum] * @property {number} [maximum] * @property {string} [example] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Resource * @property {string} [path] * @property {string} [description] * @property {Operation[]} operations * @property {Attribute[]} [attributes] * @property {TemplateDeclaration[]} [templates] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} Response * @property {string} type * @property {Header[]} [headers] * @property {string} [description] * @property {Deprecation} [deprecation] * @property {Attribute[]} [attributes] */ /** * @typedef {Object} TemplateDeclaration * @property {string} name * @property {Object.} [cast] Casts the types declared in the template to the types you want to use in this declaration */ /** * Experimental * @typedef {Object} Templates * @property {Object.} [models] * @property {Object.} [resources] */ /** * @typedef {Object} Union * @property {string} [plural] * @property {string} [discriminator] * @property {string} [description] * @property {UnionType[]} types * @property {Attribute[]} [attributes] * @property {string[]} [interfaces] * @property {Deprecation} [deprecation] */ /** * @typedef {Object} UnionType * @property {string} type * @property {string} [description] * @property {boolean} default * @property {string} [discriminator_value] * @property {Attribute[]} [attributes] * @property {Deprecation} [deprecation] */ // ----------------------------------------------------------------------------- // Union Typedefs // -----------------------------------------------------------------------------