MCPcopy Index your code
hub / github.com/Effect-TS/effect / processParameters

Function processParameters

packages/platform/src/OpenApi.ts:363–378  ·  view source on GitHub ↗
(schema: Option.Option<Schema.Schema.All>, i: OpenAPISpecParameter["in"])

Source from the content-addressed store, hash-verified

361 }
362
363 function processParameters(schema: Option.Option<Schema.Schema.All>, i: OpenAPISpecParameter["in"]) {
364 if (Option.isSome(schema)) {
365 const jsonSchema = processAST(schema.value.ast)
366 if ("properties" in jsonSchema) {
367 Object.entries(jsonSchema.properties).forEach(([name, psJsonSchema]) => {
368 op.parameters.push({
369 name,
370 in: i,
371 schema: psJsonSchema,
372 required: jsonSchema.required.includes(name),
373 ...(psJsonSchema.description !== undefined ? { description: psJsonSchema.description } : undefined)
374 })
375 })
376 }
377 }
378 }
379
380 processAnnotation(endpoint.annotations, Description, (description) => {
381 op.description = description

Callers 1

onEndpointFunction · 0.85

Calls 2

processASTFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected