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

Add protoc-gen-openapi (from gnostic) #603

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Conversation

fredrikaverpil
Copy link
Member

@fredrikaverpil fredrikaverpil commented Oct 15, 2024

Why this change?

So that we can generate openapiv3 JSON file from protos using protoc-gen-openapi and version control it from Sage.

Notes

Docs: https://github.com/google/gnostic/tree/main/cmd/protoc-gen-openapi

@fredrikaverpil fredrikaverpil self-assigned this Oct 15, 2024
@fredrikaverpil fredrikaverpil changed the title Add gnostic Add protoc-gen-openapi (from gnostic) Oct 15, 2024
@fredrikaverpil fredrikaverpil marked this pull request as ready for review October 15, 2024 06:17
@fredrikaverpil fredrikaverpil requested a review from a team as a code owner October 15, 2024 06:17
@fredrikaverpil fredrikaverpil enabled auto-merge (rebase) October 15, 2024 06:45
Copy link
Collaborator

@alethenorio alethenorio left a comment

Choose a reason for hiding this comment

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

Does the package name need to contain the openapi version? The tool seems to be generic so maybe sgprotocgenopenapi is enough?

@fredrikaverpil
Copy link
Member Author

Does the package name need to contain the openapi version? The tool seems to be generic so maybe sgprotocgenopenapi is enough?

@alethenorio good one, I fixed that.

@radhus
Copy link
Member

radhus commented Oct 15, 2024

Does the package name need to contain the openapi version? The tool seems to be generic so maybe sgprotocgenopenapi is enough?

Maybe even calling it sggnostic as the tool here is Gnostic and there are other protobuf compilers for OpenAPI 🤓

@fredrikaverpil
Copy link
Member Author

Maybe even calling it sggnostic as the tool here is Gnostic and there are other protobuf compilers for OpenAPI 🤓

The binary is protoc-gen-openapi and you could potentially add another "sgtool" to Sage which downloads and installs a differently named binary from the gnostic project. See here:
https://github.com/google/gnostic/tree/main/cmd/

@fredrikaverpil fredrikaverpil enabled auto-merge (rebase) October 15, 2024 07:04
@fredrikaverpil fredrikaverpil merged commit 42d8c83 into master Oct 15, 2024
3 checks passed
@fredrikaverpil fredrikaverpil deleted the protoc-gen-openapi branch October 15, 2024 09:09
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.

3 participants