MCPcopy Create free account
hub / github.com/Effect-TS/effect / processParameters

Function processParameters

packages/effect/src/unstable/httpapi/OpenApi.ts:495–514  ·  view source on GitHub ↗
(schema: Schema.Constraint | undefined, i: OpenAPISpecParameter["in"])

Source from the content-addressed store, hash-verified

493 }
494
495 function processParameters(schema: Schema.Constraint | undefined, i: OpenAPISpecParameter["in"]) {
496 if (schema) {
497 const ast = SchemaAST.getLastEncoding(schema.ast)
498 if (SchemaAST.isObjects(ast)) {
499 for (const ps of ast.propertySignatures) {
500 op.parameters.push({
501 name: String(ps.name),
502 in: i,
503 schema: {},
504 required: i === "path" || !SchemaAST.isOptional(ps.type)
505 })
506 pathOps.push({
507 _tag: "parameter",
508 ast: ps.type,
509 path: ["paths", path, method, "parameters", String(op.parameters.length - 1), "schema"]
510 })
511 }
512 }
513 }
514 }
515
516 processAnnotation(endpoint.annotations, Description, (description) => {
517 op.description = description

Callers 1

onEndpointFunction · 0.85

Calls 2

pushMethod · 0.80
StringInterface · 0.50

Tested by

no test coverage detected