MCPcopy Create free account
hub / github.com/Effect-TS/effect / getEncodePayloadSchema

Function getEncodePayloadSchema

packages/effect/src/http-api/HttpApiClient.ts:1668–1673  ·  view source on GitHub ↗
(
  schemas: readonly [Schema.Constraint, ...Array<Schema.Constraint>],
  method: HttpMethod.HttpMethod
)

Source from the content-addressed store, hash-verified

1666}
1667
1668function getEncodePayloadSchema(
1669 schemas: readonly [Schema.Constraint, ...Array<Schema.Constraint>],
1670 method: HttpMethod.HttpMethod
1671): Schema.Top {
1672 return Schema.Union(schemas.map((s) => getEncodePayloadSchemaFromBody(s, method)))
1673}
1674
1675const bodyFromPayloadCache = new WeakMap<SchemaAST.AST, Schema.Top>()
1676

Callers 1

onEndpointFunction · 0.85

Calls 2

mapMethod · 0.45

Tested by

no test coverage detected