Skip to content

feat: first-class openapi SDK generation for backend-frontend communication #231

@zhravan

Description

@zhravan

Description:

Right now Fuego emits an OpenAPI 3 spec at /openapi.json, but we are maintaining separately dedicated logic to handle REST calls on frontend.

This feature would let teams keep their backend and frontend in perfect sync.

Issue:

  • For frontend, we are currently manually writing API wrappers that duplicate backend definitions
  • Backend endpoints or schemas change, some manual effort to handle it on UI as well.
  • Reviewing and maintaining API client code is kind of an overhead

Solution:

  • Already have open-api.json generated, see if we can use any codegen applications, to auto-genarate typescript API definitions and types so that we can directly use them as npm package.
  • On every release, if there are any updates on specs, we can release corresponding package

You can check this OSS project, something i found when i was exploring: https://github.com/orval-labs/orval

Open to options here, you can explore and come up with better option from avialable libraries/tools.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions