-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
What happened:
In the api/webhook.yaml openAPI spec, the changes component lists the properties as starting with lower-case.
Lines 250 to 257 in 58ac76e
| create: | |
| $ref: '#/components/schemas/endpoints' | |
| updateOld: | |
| $ref: '#/components/schemas/endpoints' | |
| updateNew: | |
| $ref: '#/components/schemas/endpoints' | |
| delete: | |
| $ref: '#/components/schemas/endpoints' |
However, the Changes struct in Go side doesn't have the JSON tag giving it an eplicit name, so Go will default to the field names (Create, UpdateOld, UpdateNew, Delete) in the generated JSON.
Lines 55 to 64 in 58ac76e
| type Changes struct { | |
| // Records that need to be created | |
| Create []*endpoint.Endpoint | |
| // Records that need to be updated (current data) | |
| UpdateOld []*endpoint.Endpoint | |
| // Records that need to be updated (desired data) | |
| UpdateNew []*endpoint.Endpoint | |
| // Records that need to be deleted | |
| Delete []*endpoint.Endpoint | |
| } |
What you expected to happen:
I would expect the openAPI spec and code to agree. Even though Go doesn't care about casing, other platforms do.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- External-DNS version (use
external-dns --version): v0.15.1 - DNS provider: webhook
- Others:
Metadata
Metadata
Assignees
Labels
help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.