Skip to content

feat: create request validation & openapi spec generation library - #46

Open
jumpy-cat wants to merge 17 commits into
gh-actionsfrom
http-api-docs
Open

feat: create request validation & openapi spec generation library#46
jumpy-cat wants to merge 17 commits into
gh-actionsfrom
http-api-docs

Conversation

@jumpy-cat

@jumpy-cat jumpy-cat commented Jul 24, 2026

Copy link
Copy Markdown
Member

Description

Created a library that will enable the creation of always up to date openapi specs for the backend. The design I went with also enforces request validation and responses are checked by the typechecker, both also good to have.

Type of Change

  • New feature (feat)
  • Bug fix (fix)
  • Refactor / code improvement
  • Dependency / build update
  • Documentation
  • Other (explain)

Related Issues

Progress towards #40
Depends on #45

Changes Made

  • Flutter: n/a
  • Backend (TypeScript):
    • src/routes/documented.ts: new library
    • test/documented.test.ts: new test
    • added openapi spec deployment to CI
    • changed a few existing routes to use the library for initial testing
  • Firebase / Shared: n/a

Testing Done

Flutter:

  • Tested on:
    • iOS Simulator
    • Android Emulator
    • Physical device

Screenshots / Demo (if UI or notification change)

Checklist

  • Commit messages follow Conventional Commits
  • PR title follows [type](scope): short description
  • PR target branch is not main and is our current working update branch (e.g. maizebus2.1)
  • No print() / debugPrint() / console.log() left in production code
  • Secrets / keys not committed

@jumpy-cat jumpy-cat mentioned this pull request Jul 24, 2026
9 tasks
@jumpy-cat
jumpy-cat marked this pull request as ready for review July 24, 2026 08:00
@dotSol0

dotSol0 commented Aug 1, 2026

Copy link
Copy Markdown

Checked in Backend meeting: I would add more detail to this PR

@jumpy-cat
jumpy-cat changed the base branch from dev to gh-actions August 1, 2026 22:25
These wrappers add zod-based input validation, type-safety, and reflection capabilities. To be used in the future for generating openapi definitions.
Also reordered the definitions so that the main api is together and
closer to the top + fixed a bug where req & res bodies were mixed up.
Make sure the passed schemas can accept strings as input as that is what
express gives as `path` and `query`. Update module docs.
The previous approach of supporting many status codes and having a 2XX
entry in the generated OpenAPI spec doesn't work well with
swagger_parser. Switch to using only the 200 status code and having an
entry for 200 instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants