rafiki icon indicating copy to clipboard operation
rafiki copied to clipboard

Validate GNAP requests with OpenAPI

Open njlie opened this issue 2 years ago • 1 comments

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

njlie avatar Jun 01 '22 21:06 njlie

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

sabineschaller avatar Sep 22 '22 11:09 sabineschaller