Skip to content

Draft: Add openapi v3 #5627

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

amirsalarsafaei
Copy link

References to other Issues or PRs

This feature was request in #441.

Have you read the Contributing Guidelines?

Brief description of what is fixed or changed

This is a minimal implementation (as I'm writing this description a draft) for openapiv3 protoc plugin.

Other comments

I plan to add tests and complete other features. I just want to get this look at before I go all in.
Right now it generates OpenAPI spec version 3, using kin-openapi library.

@amirsalarsafaei amirsalarsafaei marked this pull request as draft June 4, 2025 18:30
Copy link
Collaborator

@johanbrandhorst johanbrandhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for taking the time to look into this. It's going to be hard for me to review this the way it's currently written. It seems to be based a lot on the existing generator. Could you talk to me about the process you used to build this? I explicitly said that I want us to start from scratch with this generator and not rely on existing code, if we can avoid it. I would remove basically all the flags too and add them piece by piece. Did you use AI to build this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this file?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this file?

@amirsalarsafaei
Copy link
Author

Hi,
Thanks for taking a look at it.
I understood that you didn't want the core functionality to be like the existing generator. But I wanted something to get off the ground. So I copied some base stuff. I thought that you didn't want to use the open api generation method from proto. And using the registry was ok. I dont want a full review I exactly wanted to get some pointers before I fully complete the PR. So I will start by keeping the flags I need. And removing dependencies from other parts as much as possible. I used AI in the process but not for code extensively.

@amirsalarsafaei
Copy link
Author

I'm also a little bit unfamiliar with bazel. I will fix the bazel config to not generate the swagger files

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

Successfully merging this pull request may close these issues.

2 participants