Skip to content

Add an easy way to view the OpenAPI contracts as Swagger #599

Description

@chetanr25

Add an easy way to view the OpenAPI contracts as Swagger

Problem

Our contracts live in contracts/ as a multi-file OpenAPI spec, with the root in openapi.yaml pulling in the path and schema files. There is no simple way to open all of that as a Swagger page on your machine.

Right now if you want to read the contract you either open the raw YAML, or you run the whole backend and look at /docs. The raw YAML is hard to scan, and the backend /docs shows what the code currently serves, not what the contract files say. Those two can drift, which is the whole point of keeping a contract.

We already have the hosted view at https://fireform-gsoc.chetanr25.in, but that is the published version. While editing the contract locally you want to see your own unsaved changes rendered the same way.

What we want

A single command that renders the contract files in contracts/ as a Swagger page in the browser, the same style as the backend /docs. It should resolve the multi-file references on its own and reload when a file changes, so you can edit a path or schema and see it update.

Why it helps

  • You can review a contract change visually before opening a PR.
  • Reviewers can check the contract without running the backend.
  • It makes drift between the contract and the running API easy to spot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions