Repository navigation
feat(api): generate OpenAPI 3.1 spec from Zod schemas with CI drift check - #184
Micheal1605 wants to merge 11 commits into
Conversation
|
@Micheal1605 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Malware scan: passed, with notes for the reviewerNothing malicious was detected in
|
|
@Micheal1605 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared files like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@Micheal1605 CI is failing on this branch, so it can't be merged yet. The errors from the latest run: Backend (typecheck + test + build) Please reproduce this locally, fix the errors above and push. CI will re-run on your next push. This PR also has merge conflicts with |
|
@Micheal1605 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared files like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@Micheal1605 CI is failing on this branch against the latest Backend (typecheck + test + build) Reproduce this locally on the latest This PR also conflicts with |
…rated-from-the-zod
|
@Micheal1605 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@Micheal1605 CI is failing on this branch against the latest Backend (typecheck + test + build)
This PR also conflicts with |
|
@afeezorobsco-cyber — this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed c37a45f). |
…rated-from-the-zod
|
@Micheal1605 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@Micheal1605 CI is failing on this branch against the latest Backend (typecheck + test + build)
This PR also conflicts with |
…rated-from-the-zod
|
@Micheal1605 CI is failing on this branch against the latest Backend (typecheck + test + build)
|
…rated-from-the-zod
|
@Micheal1605 CI is failing at The import path for the OpenAPI registry is wrong (or the file isn't committed), |
|
@Micheal1605 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
|
@afeezorobsco-cyber — this PR is ready for another review. I resolved the merge conflicts with the main branch (pushed 5248321). |
|
@Micheal1605 The conflicts are resolved, but Fix the registry import path (or commit the file), use |
|
@Micheal1605 This PR now has merge conflicts with git fetch upstream # upstream = https://github.com/DocForum/docforum-core.git
git rebase upstream/main
# resolve the conflicts, re-run the tests, then:
git push --force-with-leaseThe usual culprits are shared docs like Automated message. It won't repeat unless the PR conflicts again after your next push. |
Overview
This PR adds an OpenAPI 3.1 spec generated from the existing Zod request schemas, serves it at
/openapi.jsonin non-production, and adds a CI drift check that fails when the committed spec is out of date. It also updates the payments validation to represent BigInt amounts as strings in the spec, and documents the change inROADMAP.mdandARCHITECTURE.md.Related Issue
Changes
📄 OpenAPI Generation
[ADD]
backend/scripts/generate-openapi.mjsvalidation.tsfiles and registers request/response schemas (including error envelopes and auth requirements) into an OpenAPI 3.1 document.docs/api/openapi.json.[MODIFY]
backend/src/modules/payments/validation.ts[MODIFY]
.github/workflows/ci.ymldocs/api/openapi.jsondiffers from the freshly generated output (drift check).📚 Docs
[MODIFY]
ROADMAP.md[MODIFY]
ARCHITECTURE.mdVerification Results
validation.tsschemas.github/workflows/ci.ymlfails when committed spec is staleROADMAP.md/ARCHITECTURE.mdupdatedCloses #112