feat: publish JSON files alongside specs + consolidate request bodies#29
Merged
Conversation
mkurapov
commented
May 20, 2026
| - name: Check if generated JSON files are up to date | ||
| run: | | ||
| pnpm generate:json | ||
| git diff --exit-code json/ No newline at end of file |
Contributor
Author
There was a problem hiding this comment.
It's a manual process to generate the files, but because its a small command/we don't expect a huge number of changes, I thought it was better (simpler) than some automated commit hook or CI action that commits to the PR branch.
mkurapov
commented
May 26, 2026
| "format": "prettier --write .", | ||
| "lint": "prettier --check .", | ||
| "lint:openapi": "spectral lint openapi/*" | ||
| "lint:openapi": "redocly lint openapi/* --lint-config error --format=stylish", |
Contributor
Author
There was a problem hiding this comment.
Since we are already importing redocly, we can use its linting feature without having a separate spectral package
Contributor
Author
|
Actions are down :( |
BlairCurrey
approved these changes
May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
In order to help the Open Payments implementations (in this case, Rafiki) validate the request & responses in the API, it is easier to do so using the JSON files. This PR adds a command to generate JSON files from the source-of-truth OpenAPI yaml files.
In addition to the above, this PR consolidates the request bodies of operations (like create incoming payment) into separate schemas in
components.schemas. This allows for easier targeting of schemas when doing request validation in the API implementation.Also, given that we would use
redoclycli tool for the yaml to json conversion, this PR updates the linting command to also use redocly, consolidating our tooling (and removing spectral)Related to RV2-55