Documentation
¶
Overview ¶
patch-api-resources patches the generated Api.ts file to attach x-resources metadata from the OpenAPI spec to each API method, enabling callers to check resource scope at runtime:
api.v1TaskGet.resources.has("tenant") // true
Run from the repo root after swagger-typescript-api generation:
go run ./hack/oas/patch-api-resources.go
Click to show internal directories.
Click to hide internal directories.