CreateSpecBody

Request body for creating a Spec.

Definition

TypeScript
interface CreateSpecBody {
  workspaceId: string;
  name: string;
  sourceUrl: string;
  autoCreateSolution: boolean;
  description?: string | undefined;
  baseUrl?: string | undefined;
  authHeaderName?: string | undefined;
  authValuePrefix?: string | undefined;
  authSecretId?: string | undefined;
  solutionId?: string | undefined;
}

Fields

FieldTypeNotes
workspaceIdstringrequired — Workspace that will own the new spec.
namestringrequired — Spec name.
sourceUrlstringrequired — URL to fetch the OpenAPI spec from.
autoCreateSolutionbooleanrequired — If true (default), auto-create a solution named after the spec and wrap generated entities in it. Set false to leave generated entities unwrapped, or pass solutionId to add to an existing solution instead.
descriptionstring | undefinedoptional — Optional longer-form description.
baseUrlstring | undefinedoptional — Override for the spec's servers[] base URL.
authHeaderNamestring | undefinedoptional — HTTP header to set with the API key value when invoking generated functions (e.g. Authorization).
authValuePrefixstring | undefinedoptional — Prefix to prepend to the secret value (e.g. Bearer ).
authSecretIdstring | undefinedoptional — Workspace secret ID holding the API key. Required if authHeaderName is set.
solutionIdstring | undefinedoptional — Existing solution to add generated entities to. Mutually exclusive with autoCreateSolution.