MCPcopy Index your code
hub / github.com/anomalyco/opencode / responseSchemas

Function responseSchemas

packages/httpapi-codegen/src/index.ts:799–808  ·  view source on GitHub ↗
(schema: Schema.Top, path: string)

Source from the content-addressed store, hash-verified

797}
798
799function responseSchemas(schema: Schema.Top, path: string): Array<readonly [string, Schema.Top]> {
800 if (HttpApiSchema.isNoContent(schema.ast)) return []
801 if (!isStreamSchema(schema)) return [[path, schema]]
802 if (schema._tag === "StreamUint8Array") return []
803 const value = schema.sseMode === "data" ? streamDataSchema(schema) : schema.events
804 return [
805 [`${path}.${schema.sseMode}`, value],
806 [`${path}.error`, schema.error],
807 ]
808}
809
810function assertPortable(schema: Schema.Top, path: string, portable: Map<SchemaAST.AST, boolean>) {
811 const visiting = new Set<SchemaAST.AST>()

Callers 1

onEndpointFunction · 0.85

Calls 2

isStreamSchemaFunction · 0.85
streamDataSchemaFunction · 0.85

Tested by

no test coverage detected