OpenAPITools / OpenAPITools/openapi-generator

Is it possible to generate a single .proto file?

Open
#18,378 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

Generating .protos from an OpenAPI Spec files creates proto files in subfolders. However when I use buf generate to build my go lang client/servers, buf chokes on a path. I manually combined all the generated .proto files into a single file and buf is able to process that correctly.

Question:
Is it possible to generate ALL protos into a single .proto file?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how an OpenAPI spec produces the generated .proto files and how their paths are passed to buf generate. Check whether the generator exposes an option for consolidating output, then verify that the result is one .proto file accepted by buf for the Go client or server.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, openapi
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.