rafiki
rafiki copied to clipboard
Validate GNAP requests with OpenAPI
From https://github.com/interledger/rafiki/pull/343#discussion_r880691528:
🤔 Maybe this OpenAPI validation middleware (#339) could be a workspace in the monorepo: https://github.com/interledger/rafiki/tree/bw-openapi/packages/backend/src/openapi Then this could validate requests based on https://github.com/interledger/open-payments/blob/master/auth-server-open-api-spec.yaml
See: https://github.com/interledger/rafiki/pull/339/commits/4556d21258dc2c8c61d3b0f735b6a50d2f430b14
Reopened to specify the ctx.body
type in createGrantInitiation
and elsewhere to make use of the benefits of the OpenAPI validator middleware type guard.
See comment