wing-api-checker rule that every resource has an @inflight annotation
#320 opened on 2022幎10æ24æ¥
Repository metrics
- Stars
- Â (5,385 stars)
- PR merge metrics
-  (30d ã« merged PR ã¯ãããŸãã)
説æ
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