(
this: HttpApi.AnyWithProps,
api: HttpApi.AnyWithProps
)
| 157 | }) |
| 158 | }, |
| 159 | addHttpApi( |
| 160 | this: HttpApi.AnyWithProps, |
| 161 | api: HttpApi.AnyWithProps |
| 162 | ) { |
| 163 | const newGroups = { ...this.groups } |
| 164 | for (const key in api.groups) { |
| 165 | const newGroup: Mutable<HttpApiGroup.HttpApiGroup.AnyWithProps> = api.groups[key].annotateContext(Context.empty()) |
| 166 | newGroup.annotations = Context.merge(api.annotations, newGroup.annotations) |
| 167 | newGroup.middlewares = new Set([...api.middlewares, ...newGroup.middlewares]) |
| 168 | newGroups[key] = newGroup as any |
| 169 | } |
| 170 | return makeProto({ |
| 171 | identifier: this.identifier, |
| 172 | groups: newGroups, |
| 173 | errorSchema: HttpApiSchema.UnionUnify(this.errorSchema, api.errorSchema), |
| 174 | annotations: this.annotations, |
| 175 | middlewares: this.middlewares |
| 176 | }) |
| 177 | }, |
| 178 | addError( |
| 179 | this: HttpApi.AnyWithProps, |
| 180 | schema: Schema.Schema.Any, |
nothing calls this directly
no test coverage detected