Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

response_or_reference ref is not generated correctly #437

Open
kotyara85 opened this issue Apr 2, 2024 · 0 comments
Open

response_or_reference ref is not generated correctly #437

kotyara85 opened this issue Apr 2, 2024 · 0 comments

Comments

@kotyara85
Copy link

Hey there,
So I have this in my proto file:

            responses: {
              response_or_reference: {
                name: "default"
                value: {
                  response: {
                    content: {
                      additional_properties: [{
                        value: {
                          schema: {
                            reference: { _ref: "#/components/schemas/ErrorResponse"; }
                          }
                        }
                      }]
                    }
                  }
                }
              }
            }

and

message ErrorResponse {
  string message = 1 [(google.api.field_behavior) = REQUIRED];
}

ErrorResponse is being generated into go code, but when I run protoc with openapi ErrorResponse is not being added to components (it's not being used anywhere besides the code above)
Is there any way to force openapi generator to add all structs into the components?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant