Represents a definition for example schema, request, response definitions contained in an API version. A definition is added/updated/deleted in an API version when a new spec is added or an existing spec is updated/deleted in a version. Currently, definition will be created only corresponding to OpenAPI spec as parsing is supported for OpenAPI spec. Also, within OpenAPI spec, only schema object is supported.
JSON representation
{"name": string,"spec": string,"type": enum (Type),"createTime": string,"updateTime": string,"attributes": {string: {object (AttributeValues)},...},// Union field value can be only one of the following:"schema": {object (Schema)}// End of list of possible types for union field value.}
Output only. The name of the spec from where the definition was parsed. Format is projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}
Output only. The time at which the definition was created.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Output only. The time at which the definition was last updated.
Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".
Optional. The list of user defined attributes associated with the definition resource. The key is the attribute name. It will be of the format: projects/{project}/locations/{location}/attributes/{attribute}. The value is the attribute values associated with the resource.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
The schema details derived from the spec. Currently, this entity is supported for OpenAPI spec only. For OpenAPI spec, this maps to the schema defined in the definitions section for OpenAPI 2.0 version and in components.schemas section for OpenAPI 3.0 and 3.1 version.
JSON representation
{"displayName": string,"rawValue": string}
Fields
displayName
string
Output only. The display name of the schema. This will map to the name of the schema in the spec.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-28 UTC."],[[["\u003cp\u003eA definition represents schema, request, and response definitions within an API version, primarily supporting OpenAPI specifications.\u003c/p\u003e\n"],["\u003cp\u003eDefinitions are created, updated, or deleted within an API version when changes occur in the corresponding specifications.\u003c/p\u003e\n"],["\u003cp\u003eEach definition includes details such as its name, the spec it was parsed from, its type, creation time, and last update time.\u003c/p\u003e\n"],["\u003cp\u003eA definition's type can be either \u003ccode\u003eTYPE_UNSPECIFIED\u003c/code\u003e or \u003ccode\u003eSCHEMA\u003c/code\u003e, indicating the nature of the definition.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eschema\u003c/code\u003e field within a definition provides detailed schema information, derived from the spec, currently supported for OpenAPI specifications.\u003c/p\u003e\n"]]],[],null,["# REST Resource: projects.locations.apis.versions.definitions\n\n- [Resource: Definition](#Definition)\n - [JSON representation](#Definition.SCHEMA_REPRESENTATION)\n- [Schema](#Schema)\n - [JSON representation](#Schema.SCHEMA_REPRESENTATION)\n- [Type](#Type)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Definition\n--------------------\n\nRepresents a definition for example schema, request, response definitions contained in an API version. A definition is added/updated/deleted in an API version when a new spec is added or an existing spec is updated/deleted in a version. Currently, definition will be created only corresponding to OpenAPI spec as parsing is supported for OpenAPI spec. Also, within OpenAPI spec, only `schema` object is supported.\n\nSchema\n------\n\nThe schema details derived from the spec. Currently, this entity is supported for OpenAPI spec only. For OpenAPI spec, this maps to the schema defined in the `definitions` section for OpenAPI 2.0 version and in `components.schemas` section for OpenAPI 3.0 and 3.1 version.\n\nType\n----\n\nEnumeration of definition types."]]