OpenAPITools / OpenAPITools/openapi-generator

[REQ] Improve protobuf generator by adding custom options for api and model files

Open
#21,074 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is your feature request related to a problem? Please describe.

Our project requires custom options in the proto api and model files.

Describe the solution you'd like

Can define 2 new options in the protobuf generator:

  • customOptionsApi
  • customOptionsModel

https://github.com/OpenAPITools/openapi-generator/pull/21075

Describe alternatives you've considered

n/a

Additional context

Some good options that you can provide include:

  • option cc_generic_services = true; # C++
  • option optimize_for = SPEED;

java options see here

  • option java_multiple_files = true;
  • option java_package = "com.example.tutorial.protos.api";
  • option java_outer_classname = "ExampleProtos";

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 reviewing linked pull request #21075 and the protobuf generator entry point. Trace how API and model .proto files are produced, then verify that customOptionsApi and customOptionsModel can supply options such as the examples in the issue. Done means generated API and model files include the configured custom options.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.