feat: add server link sharing
This commit is contained in:
parent
ec8eea7cbe
commit
7698a5e6ac
25 changed files with 1586 additions and 1194 deletions
16
packages/protocol/src/groups/server.ts
Normal file
16
packages/protocol/src/groups/server.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { Schema } from "effect"
|
||||
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
||||
|
||||
export const ServerGroup = HttpApiGroup.make("server.server")
|
||||
.add(
|
||||
HttpApiEndpoint.get("server.get", "/api/server", {
|
||||
success: Schema.Struct({ urls: Schema.Array(Schema.String) }),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.server.get",
|
||||
summary: "Get server information",
|
||||
description: "Return the URLs that can be used to connect to this server.",
|
||||
}),
|
||||
),
|
||||
)
|
||||
.annotateMerge(OpenApi.annotations({ title: "server" }))
|
||||
Loading…
Add table
Add a link
Reference in a new issue