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