REST Resource: projects.locations.apis.versions.definitions

Resource: Definition

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.
}
Fields
name

string

Identifier. The name of the definition.

Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}

spec

string

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}

type

enum (Type)

Output only. The type of the definition.

createTime

string (Timestamp format)

Output only. The time at which the definition was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

updateTime

string (Timestamp format)

Output only. The time at which the definition was last updated.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

attributes

map (key: string, value: object (AttributeValues))

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" }.

Union field value.

value can be only one of the following:

schema

object (Schema)

Output only. The value of a schema definition.

Schema

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.

rawValue

string (bytes format)

Output only. The raw value of the schema definition corresponding to the schema name in the spec.

A base64-encoded string.

Type

Enumeration of definition types.

Enums
TYPE_UNSPECIFIED Definition type unspecified.
SCHEMA Definition type schema.

Methods

get

Get details about a definition in an API version.