MCPcopy
hub / github.com/Effect-TS/effect / makeSuccessSchema

Function makeSuccessSchema

packages/platform/src/HttpApiBuilder.ts:762–768  ·  view source on GitHub ↗
(
  schema: Schema.Schema.Any
)

Source from the content-addressed store, hash-verified

760const responseSchema = Schema.declare(HttpServerResponse.isServerResponse)
761
762const makeSuccessSchema = (
763 schema: Schema.Schema.Any
764): Schema.Schema<unknown, HttpServerResponse.HttpServerResponse> => {
765 const schemas = new Set<Schema.Schema.Any>()
766 HttpApiSchema.deunionize(schemas, schema)
767 return Schema.Union(...Array.from(schemas, toResponseSuccess)) as any
768}
769
770const makeErrorSchema = (
771 api: HttpApi.HttpApi.AnyWithProps

Callers 1

handlerToRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected