Skip to content

oRPC OpenAPI support #402

Closed
Closed

Description

@aidansunbury

Part of the promise of oRPC is the ability to use it in an OpenAPI compliant way in addition to the typical RPC handling https://orpc.unnoq.com/docs/openapi/getting-started

Three possible ways of going about this in better-t-stack

  1. Add OpenAPI setup by default in addition to RPC setup, so that the existing base routes can be used with OpenAPI. Only possible issue with this is it could be a bit confusing to a newcomer which they should use.
  2. Add OpenAPI setup as an alternative to RPC setup. The Api layer menu would then look something like "tRPC", "oRPC - rpc setup", "oRPC - openapi setup"
  3. Keep the existing oRPC option as is, and add idea (1) of a full setup as a third option. The Api layer menu would then look something like "tRPC", "oRPC ", "oRPC with OpenAPI"

Activity

  1. AmanVarshney01 commented on Jul 16, 2025

    @AmanVarshney01
    Owner

    yep i like this

    I'll add openapi support 💯

  2. aidansunbury commented on Jul 16, 2025

    @aidansunbury
    ContributorAuthor

    I'm also down to do it if you would like @AmanVarshney01. Just would just want your input on which path (1,2 or 3) to go down to support it.

  3. AmanVarshney01 commented on Jul 17, 2025

    @AmanVarshney01
    Owner

    I am dropping a big rewrite in like 3 days. It should make the code a bit easier to maintain. lets wait for now. 😃

  4. AmanVarshney01 commented on Jul 20, 2025

    @AmanVarshney01
    Owner

    @aidansunbury i tried some things but nothing worked out so no rewrite for now. if you want you can work on the openapi with orpc

    • add orpc-openapi as an api option
    • add flags and validations
    • add orpc's openapi handler for all server 😅
    • add openapilink in all clients 😅
    • add endpoint for swagger ui too
    • make sure it works with better auth's open api too
    • update stack builder

    this is a lot of work, if you decide to work on it let me know.

  5. aidansunbury commented on Jul 21, 2025

    @aidansunbury
    ContributorAuthor

    I'll get started on it @AmanVarshney01!

  6. jigz commented on Sep 6, 2025

    @jigz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions