Link

zio.blocks.openapi.Link
See theLink companion object
final case class Link(operationRef: Option[String] = ..., operationId: Option[String] = ..., parameters: ChunkMap[String, Json] = ..., requestBody: Option[Json] = ..., description: Option[Doc] = ..., server: Option[Server] = ..., extensions: ChunkMap[String, Json] = ...)

The Link object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.

Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.

For computing links, and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.

Value parameters

description

A description of the link. CommonMark syntax MAY be used for rich text representation.

extensions

Specification extensions (x-* fields). These allow adding additional properties beyond the standard OpenAPI fields.

operationId

A name of an existing, resolvable OAS operation (operationId), mutually exclusive with operationRef.

operationRef

An optional absolute URI reference to an OAS operation (operationRef), mutually exclusive with operationId.

parameters

A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used, whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. The parameter name can be qualified using the parameter location [{in}.]{name} for operations that use the same parameter name in different locations (e.g. path.id).

requestBody

A literal value or {expression} to use as a request body when calling the target operation.

server

A server object to be used by the target operation.

Attributes

Companion
object
Source
OpenAPI.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala