-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat(webhook): initial OpenAPI spec #4874
feat(webhook): initial OpenAPI spec #4874
Conversation
This needs far better descriptions, but provides the initial OpenAPI doc describing the webhook API as described in the code.
The vacuum run is now clean.
Explain some of the schemas and endpoints in more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments. I wonder what we can do to keep this up to date given that is not generated from code.
@@ -0,0 +1,265 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this generated or written from scratch? I don't see us changing the webhook interface a lot, but how do we remember to keep it up to date in that case? Is it a manual operation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FTM, it's generated by hand.
Some generators exists, with limitations.
In theory, the spec should be written and modified first, and the spec should be used in tests, too.
Some projects do the reverse, and generate spec from the source code.
I suggest to do it one step after the other.
If this way becomes a burden, we can always switch to the generated way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm always for spec first, but there are not really compelling projects to do OpenAPI first in go that I am aware of. Anyway, for now I think we're good and this is a good new addition.
Co-authored-by: Raffaele Di Fazio <raffo@github.com>
7b2f57e
to
0a1c52b
Compare
/lgtm |
@mloiseleur I'll leave to you the self approve 😄 |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mloiseleur The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description
This PR is based on #4148.
Checklist