feat(core): expose project reference filesystem access (#30423)
This commit is contained in:
@@ -9,7 +9,12 @@ type OpenApiResponse = {
|
||||
readonly content?: Record<string, { readonly schema?: OpenApiSchema }>
|
||||
}
|
||||
type OpenApiOperation = {
|
||||
readonly parameters?: ReadonlyArray<{ readonly name: string; readonly in: string }>
|
||||
readonly parameters?: ReadonlyArray<{
|
||||
readonly name: string
|
||||
readonly in: string
|
||||
readonly required?: boolean
|
||||
readonly schema?: { readonly type?: string }
|
||||
}>
|
||||
readonly responses?: Record<string, OpenApiResponse>
|
||||
readonly security?: unknown
|
||||
}
|
||||
@@ -53,6 +58,19 @@ describe("PublicApi OpenAPI v2 errors", () => {
|
||||
}
|
||||
})
|
||||
|
||||
test("documents optional project reference aliases for filesystem reads and lists", () => {
|
||||
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
|
||||
|
||||
for (const path of ["/api/fs/read", "/api/fs/list"]) {
|
||||
expect(spec.paths[path]?.get?.parameters, path).toContainEqual({
|
||||
in: "query",
|
||||
name: "reference",
|
||||
required: false,
|
||||
schema: { type: "string" },
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
test("does not rewrite /api endpoint errors to legacy error components", () => {
|
||||
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
|
||||
const refs = v2Operations(spec)
|
||||
|
||||
Reference in New Issue
Block a user