Skip to content

[REQ][Protobuf-Schema] Enum as model support #10867

@Yurzel

Description

@Yurzel

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

Using $ref to a file with specified enum generates empty message .proto file.

/*
  The version of the OpenAPI document: 1.0

  Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package Random.Namespace;


message MyNumbers {

}

Describe the solution you'd like

Generate something like this.

/*
  The version of the OpenAPI document: 1.0

  Generated by OpenAPI Generator: https://openapi-generator.tech
*/

syntax = "proto3";

package Random.Namespace;


enum MyNumbersEnum {
  ZERO = 0;
  ONE = 1;
  TWO = 2;
}

Additional context

Referenced scheme example:

{
   "$schema": "http://json-schema.org/draft-06/schema#",
   "type": "string",
   "enum": [
      "ZERO",
      "ONE",
      "TWO"
   ]
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions