ApifyClient.Generator.Spec (apify_client v1.0.0)

Copy Markdown View Source

Location and sanity checks for the committed Apify OpenAPI description.

Generation-time only

Used by the apify.* Mix tasks; lives in dev/.

Summary

Functions

Where mix apify.spec.update downloads the description from.

Path of the committed description, relative to the project root.

The info.version of the committed description, or nil when there is none.

One-line summary of a description: version, operation and schema counts.

Decodes a description and checks it looks like an OpenAPI document.

Functions

default_url()

@spec default_url() :: String.t()

Where mix apify.spec.update downloads the description from.

path()

@spec path() :: String.t()

Path of the committed description, relative to the project root.

read_version()

@spec read_version() :: String.t() | nil

The info.version of the committed description, or nil when there is none.

summary(spec)

@spec summary(map()) :: String.t()

One-line summary of a description: version, operation and schema counts.

validate!(body)

@spec validate!(binary()) :: map()

Decodes a description and checks it looks like an OpenAPI document.