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

Fix Incorrect DNS Zone API Specifications #511

Open
rsulli55 opened this issue Oct 28, 2023 · 1 comment
Open

Fix Incorrect DNS Zone API Specifications #511

rsulli55 opened this issue Oct 28, 2023 · 1 comment

Comments

@rsulli55
Copy link

The spec for the /getDnsZone and /getDnsZones API calls say that they return JSON where the value for key "domain" is a string. However, these calls return a JSON object for the key "domain".

I ran into this problem when trying to use the go client library and this inconsistency with spec and implementation means that JSON parsing the response fails.

This issue can be reproduced with the following curl commands:

/getDnsZones

curl -H "Authorization: Bearer <personal_access_token>" https://api.netlify.com/api/v1/dns_zones/

/getDnsZone

curl -H "Authorization: Bearer <personal_access_token>" https://api.netlify.com/api/v1/dns_zones/<zone_id>/

The response I receive from these two API calls has the following type of JSON object for the "domain" key:

  "domain": {
    "id": string
    "name": string
    "user_id": string
    "created_at": string
    "updated_at": string
    "expires_at": string
    "registered_at": string
    "renewal_price": number
    "auto_renew": bool
    "auth_code": ??? (I got null),
    "transferred_at": ??? (I got null)
    "auto_renew_at": string
  }
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

No branches or pull requests

2 participants