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

Class TopLevelApi

packages/platform-node/examples/api.ts:76–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74{}
75
76class TopLevelApi extends HttpApiGroup.make("topLevel", { topLevel: true })
77 .add(
78 HttpApiEndpoint.get("csv", "/csv")
79 .addSuccess(HttpApiSchema.Text({
80 contentType: "text/csv"
81 }))
82 .addError(HttpApiError.Conflict)
83 )
84 .add(
85 HttpApiEndpoint.get("binary", "/binary")
86 .addSuccess(HttpApiSchema.Uint8Array())
87 )
88 .add(
89 HttpApiEndpoint.get("urlParams", "/url-params")
90 .addSuccess(
91 Schema.Struct({
92 id: Schema.NumberFromString,
93 name: Schema.String
94 }).pipe(
95 HttpApiSchema.withEncoding({
96 kind: "UrlParams"
97 })
98 )
99 )
100 )
101 .annotateContext(OpenApi.annotations({
102 title: "Top Level API",
103 description: "API for top level endpoints"
104 }))
105{}
106
107class PeopleApi extends HttpApiGroup.make("people")
108 .add(

Callers

nothing calls this directly

Calls 8

addSuccessMethod · 0.80
annotateContextMethod · 0.65
addMethod · 0.65
makeMethod · 0.65
addErrorMethod · 0.65
getMethod · 0.65
pipeMethod · 0.65
annotationsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…