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

Adding grpc comments designed for api generation #85

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kw510
Copy link
Contributor

@kw510 kw510 commented Apr 10, 2024

A rough idea of whats going on. Still needs tweaks to add fullstops

Comment on lines 29 to 30
get : "/v1/principals?segment={segment}&_limit={pagination_limit}&_start={pagination_token}"
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a strange way to do this. It makes the openapi generater have a heart attack...

I would suggest not to map variables like this 😬

Copy link
Owner

Choose a reason for hiding this comment

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

🤔 which generator did you try? I haven't actually tried this using a proxy like Envoy either so this might be a no go anyway.

Copy link
Contributor Author

@kw510 kw510 Apr 10, 2024

Choose a reason for hiding this comment

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

https://pkg.go.dev/github.com/google/gnostic/cmd/protoc-gen-openapi
Turns into this:

/v1/principals?segment={paginationToken:
        get:
            tags:
                - Principals
            description: Lists principals

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.

None yet

2 participants