feat(server): expose location paths
This commit is contained in:
parent
6e8aefcfa0
commit
a7855aa169
7 changed files with 65 additions and 1 deletions
20
packages/protocol/src/groups/path.ts
Normal file
20
packages/protocol/src/groups/path.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { Path } from "@opencode-ai/schema/path"
|
||||
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
||||
import { LocationQuery, locationQueryOpenApi } from "./location.js"
|
||||
|
||||
export const PathGroup = HttpApiGroup.make("server.path")
|
||||
.add(
|
||||
HttpApiEndpoint.get("path.get", "/api/path", {
|
||||
query: LocationQuery,
|
||||
success: Path.Info,
|
||||
})
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.path.get",
|
||||
summary: "Get paths",
|
||||
description: "Get process and location paths.",
|
||||
}),
|
||||
),
|
||||
)
|
||||
.annotateMerge(OpenApi.annotations({ title: "path", description: "Location and process paths." }))
|
||||
Loading…
Add table
Add a link
Reference in a new issue