wing-api-checker rule that every resource has an @inflight annotation
#320 aberto em 24 de out. de 2022
Métricas do repositório
- Stars
- (5.385 stars)
- Métricas de merge de PR
- (Nenhuma PRs mesclada em 30d)
Description
We'd like to update wing-api-checker to perform a check that if a class extends Resource then it (or one of its superclasses) has a docstring annotation for @inflight. This annotation is needed so that the Wing compiler can infer the type information of the inflight methods of the resource and associate it with the resource.
For example, here is one such annotation:
The wing-api-checker uses jsii-reflect to traverse the type information of the SDK's APIs. There is limited documentation online for it, but you can take a look at the existing wing-api-checker code to see how its used to check for other missing docstring information: https://github.com/winglang/wing/blob/b8bcf153624e82c18499d98c521221e089e8d449/apps/wing-api-checker/src/index.ts#L59-L61