Connexion's controller: on the operation, else its path. */
| 118 | |
| 119 | /* Connexion's controller: on the operation, else its path. */ |
| 120 | static const char *oa_controller(const CBMExtractCtx *ctx, TSNode op, TSNode path_item) { |
| 121 | static const char *const keys[] = {"x-openapi-router-controller", "x-swagger-router-controller", |
| 122 | NULL}; |
| 123 | for (int k = 0; keys[k]; k++) { |
| 124 | const char *c = oa_dup_scalar(ctx, oa_get(ctx, op, keys[k])); |
| 125 | c = c ? c : oa_dup_scalar(ctx, oa_get(ctx, path_item, keys[k])); |
| 126 | if (c) { |
| 127 | return c; |
| 128 | } |
| 129 | } |
| 130 | return NULL; |
| 131 | } |
| 132 | |
| 133 | /* One operation: its Route, and its operationId's reference. */ |
| 134 | static void oa_operation(CBMExtractCtx *ctx, const char *path, const char *method, TSNode op, |
no test coverage detected