GetDiscoveredSchema
Source:
src/AWS/Schemas/GetDiscoveredSchema.ts
Runtime binding for schemas:GetDiscoveredSchema.
Infers an OpenAPI 3 or JSONSchema Draft 4 schema from up to 10 sample
events — the same inference the schema discoverer applies to live traffic,
exposed as an on-demand call. The operation is account-level (it is not
scoped to any registry or schema). Provide the implementation with
Effect.provide(AWS.Schemas.GetDiscoveredSchemaHttp).
Discovering Schemas
Section titled “Discovering Schemas”// init — account-level, no resource to bindconst getDiscoveredSchema = yield* AWS.Schemas.GetDiscoveredSchema();
// runtime — events are full AWS event envelopes as JSON stringsconst { Content } = yield* getDiscoveredSchema({ Type: "OpenApi3", Events: [JSON.stringify(sampleEvent)],});