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

Function makeSuccessSchema

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

Source from the content-addressed store, hash-verified

771const responseSchema = Schema.declare(HttpServerResponse.isServerResponse)
772
773const makeSuccessSchema = (
774 schema: Schema.Schema.Any
775): Schema.Schema<unknown, HttpServerResponse.HttpServerResponse> => {
776 const schemas = new Set<Schema.Schema.Any>()
777 HttpApiSchema.deunionize(schemas, schema)
778 return Schema.Union(...Array.from(schemas, toResponseSuccess)) as any
779}
780
781const makeErrorSchema = (
782 api: HttpApi.HttpApi.AnyWithProps

Callers 1

handlerToRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected