wing-api-checker rule that every resource has an @inflight annotation
#320 ouverte le 24 oct. 2022
Métriques du dépôt
- Stars
- (5 385 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
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