Skip to content

DescribeSchema

Source: src/AWS/Schemas/DescribeSchema.ts

Runtime binding for schemas:DescribeSchema.

Reads the bound Schema’s document — the content, type, version, and description — so a function can fetch the authoritative event contract at runtime (e.g. to validate incoming payloads against the registered schema). The registry and schema names are injected from the binding; pass SchemaVersion to read a specific version instead of the latest. Provide the implementation with Effect.provide(AWS.Schemas.DescribeSchemaHttp).

// init — bind the operation to the schema
const describeSchema = yield* AWS.Schemas.DescribeSchema(schema);
// runtime
const { Content, SchemaVersion } = yield* describeSchema();
const document = JSON.parse(Content!);