MCPcopy Create free account
hub / github.com/effect-app/libs / Api

Class Api

repos/effect/packages/platform-node/test/HttpApi.test.ts:1662–1687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1660class AnotherApi extends HttpApi.make("another").add(GroupsApi) {}
1661
1662class Api extends HttpApi.make("api")
1663 .addHttpApi(AnotherApi)
1664 .add(UsersApi.prefix("/users"))
1665 .add(TopLevelApi)
1666 .annotateMerge(OpenApi.annotations({
1667 title: "API",
1668 summary: "test api summary",
1669 transform: (openApiSpec) => ({
1670 ...openApiSpec,
1671 tags: [...openApiSpec.tags ?? [], {
1672 name: "Tag from OpenApi.Transform annotation"
1673 }]
1674 })
1675 }))
1676 .annotate(
1677 HttpApi.AdditionalSchemas,
1678 [
1679 Schema.Struct({
1680 contentType: Schema.String,
1681 length: Schema.Int
1682 }).annotate({
1683 identifier: "ComponentsSchema"
1684 })
1685 ]
1686 )
1687{}
1688
1689// impl
1690

Callers

nothing calls this directly

Calls 6

addHttpApiMethod · 0.80
annotateMethod · 0.65
annotateMergeMethod · 0.65
addMethod · 0.65
makeMethod · 0.65
prefixMethod · 0.65

Tested by

no test coverage detected