(schema: Option.Option<Schema.Schema.All>, i: OpenAPISpecParameter["in"])
| 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 |
no test coverage detected