Documentation ¶
Index ¶
Constants ¶
const MediaTypeNonJsonBodyFieldName = "contents"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Binding ¶
type Binding struct { Request string `json:"request,omitempty"` Response string `json:"response,omitempty"` }
Binding is a relationship between request and/or response
type Body ¶
type Body struct { Node Required bool `json:"required,omitempty"` Content map[string]MediaType `json:"content,omitempty"` }
func (*Body) MimeTypeAndMediaType ¶ added in v0.18.0
type Components ¶
type MimeType ¶ added in v0.18.0
type MimeType string
func (MimeType) IsByteStream ¶ added in v0.18.0
IsByteStream returns true if the body should be modeled as a byte stream. Today, we only support application/json and application/octet-stream, and non application/json entities are all modeled as byte streams.
type Node ¶
type Node struct { Description string `json:"description,omitempty"` Preview string `json:"x-databricks-preview,omitempty"` Ref string `json:"$ref,omitempty"` }
type Operation ¶
type Operation struct { Node Wait *Wait `json:"x-databricks-wait,omitempty"` Pagination *Pagination `json:"x-databricks-pagination,omitempty"` Shortcut bool `json:"x-databricks-shortcut,omitempty"` Crud string `json:"x-databricks-crud,omitempty"` JsonOnly bool `json:"x-databricks-cli-json-only,omitempty"` // The x-databricks-path-style field indicates whether the operation has a // RESTful path style or a RPC style. When specified, this overrides the // service-level setting. Valid values are "rest" and "rpc". "rest" means // that the operation has a RESTful path style, i.e. the path represents // a resource and the HTTP method represents an action on the resource. // "rpc" means that the operation has a RPC style, i.e. the path represents // an action and the request body represents the resource. PathStyle PathStyle `json:"x-databricks-path-style,omitempty"` // The x-databricks-request-type-name field defines the name to use for // the request type in the generated client. This may be specified only // if the operation does NOT have a request body, thus only uses a request // type to encapsulate path and query parameters. RequestTypeName string `json:"x-databricks-request-type-name,omitempty"` // For list APIs, the path to the field in the response entity that contains // the resource ID. IdField fieldPath `json:"x-databricks-id,omitempty"` // For list APIs, the path to the field in the response entity that contains // the user-friendly name of the resource. NameField fieldPath `json:"x-databricks-name,omitempty"` Summary string `json:"summary,omitempty"` OperationId string `json:"operationId"` Tags []string `json:"tags"` Parameters []Parameter `json:"parameters,omitempty"` Responses map[string]*Body `json:"responses"` RequestBody *Body `json:"requestBody,omitempty"` }
Operation is the equivalent of method
func (*Operation) HasIdentifierField ¶ added in v0.13.0
func (*Operation) HasNameField ¶ added in v0.13.0
func (*Operation) Name ¶
Name is picking the last element of <ServiceName>.<method> string, that is coming in as part of Databricks OpenAPI spec.
func (*Operation) SuccessResponseBody ¶ added in v0.18.0
func (o *Operation) SuccessResponseBody(c *Components) *Body
type Pagination ¶
type Pagination struct { Offset string `json:"offset,omitempty"` Limit string `json:"limit,omitempty"` Results string `json:"results,omitempty"` Increment int `json:"increment,omitempty"` Inline bool `json:"inline,omitempty"` Token *Binding `json:"token,omitempty"` }
Pagination is the Databricks OpenAPI Extension for retrieving lists of entities through multiple API calls
type Path ¶
type PathStyle ¶ added in v0.14.1
type PathStyle string
const ( // PathStyleRpc indicates that the endpoint is an RPC-style endpoint. // The endpoint path is an action, and the entity to act on is specified // in the request body. PathStyleRpc PathStyle = "rpc" // PathStyleRest indicates that the endpoint is a REST-style endpoint. // The endpoint path is a resource, and the operation to perform on the // resource is specified in the HTTP method. PathStyleRest PathStyle = "rest" )
func (*PathStyle) UnmarshalJSON ¶ added in v0.14.1
type Schema ¶
type Schema struct { Node IsComputed bool `json:"x-databricks-computed,omitempty"` IsAny bool `json:"x-databricks-any,omitempty"` Type string `json:"type,omitempty"` Enum []string `json:"enum,omitempty"` AliasEnum []string `json:"x-databricks-alias-enum,omitempty"` EnumDescriptions map[string]string `json:"x-databricks-enum-descriptions,omitempty"` Default any `json:"default,omitempty"` Example any `json:"example,omitempty"` Format string `json:"format,omitempty"` Required []string `json:"required,omitempty"` Properties map[string]*Schema `json:"properties,omitempty"` ArrayValue *Schema `json:"items,omitempty"` MapValue *Schema `json:"additionalProperties,omitempty"` }
func (*Schema) IsDefinable ¶
IsDefinable states that type could be translated into a valid top-level type in Go, Python, Java, Scala, and JavaScript
type Specification ¶
type Specification struct { Node Paths map[string]Path `json:"paths"` Components *Components `json:"components"` Tags []Tag `json:"tags"` }
func NewFromReader ¶
func NewFromReader(r io.Reader) (*Specification, error)
type Wait ¶
type Wait struct { Poll string `json:"poll"` Bind string `json:"bind"` BindResponse string `json:"bindResponse,omitempty"` Binding map[string]Binding `json:"binding,omitempty"` Field []string `json:"field"` Message []string `json:"message"` Success []string `json:"success"` Failure []string `json:"failure"` Timeout int `json:"timeout,omitempty"` }
Wait is the Databricks OpenAPI Extension for long-running result polling
Directories ¶
Path | Synopsis |
---|---|
Package holds higher-level abstractions on top of OpenAPI that are used to generate code via text/template for Databricks SDK in different languages.
|
Package holds higher-level abstractions on top of OpenAPI that are used to generate code via text/template for Databricks SDK in different languages. |
Usage: openapi-codegen
|
Usage: openapi-codegen |