-
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
base: master
Are you sure you want to change the base?
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.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
shell: bash | ||
- name: Run Vacuum | ||
run: | | ||
go run github.com/daveshanley/vacuum@latest lint -d api/webhook.yaml |
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.
Can we pin this or use a specific pinned action?
@@ -60,9 +60,12 @@ licensecheck: | |||
exit 1; \ | |||
fi | |||
|
|||
oas-lint: | |||
go run github.com/daveshanley/vacuum@latest lint -d api/webhook.yaml |
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.
Same for the pinning comment above.
@@ -162,7 +162,6 @@ func TestAdjustEndpoints(t *testing.T) { | |||
} | |||
j, _ := json.Marshal(endpoints) | |||
w.Write(j) | |||
|
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 a mistake?
--- | ||
openapi: "3.0.0" | ||
info: | ||
version: 0.14.0 |
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 the ExternalDNS version? Do we want to add a v
in front so that we can more easily find and replace it on release?
@@ -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?
description: Endpoints to update DNS records. | ||
servers: | ||
- url: http://localhost:8888 | ||
description: Server url for a k8s deployment. |
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.
Extreme nitpick, but for me it's better to always spell it Kubernetes, it is way more accessible to newcomers.
description: Server url for a k8s deployment. | |
description: Server url for a Kubernetes deployment. |
- example.com | ||
'500': | ||
description: | | ||
Failed to provide the list of domains we serve. |
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.
This is wrong, I think. We failed the negotiation at this point.
Description
This PR is based on #4148.
Checklist