-
Notifications
You must be signed in to change notification settings - Fork 1
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
Added swagger doc for GIG DNS API #1017
Conversation
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.
Hey! I think a quick win here is make 1 api request pre zone record changed. That would mean for cleaner design as now we dont have to have an entire 4xx error when any one of the requests fail.
I think we could just closely model https://developers.cloudflare.com/api/operations/zones-post here!
The folks did email us, but am worried that flow is really too complicated and conflates business logic within the restful API designs :/ We can discuss this offline
Hey, sorry, didn't quite get this, why do we want to model cloudflare API to create zone in our case? |
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.
Mostly ok, areas for improvement:
- Dont understand the priority for the 200 returns, was this intentional?
- Could we add a success key in the JSON object?
Concretely, would rather the shape of the return objects to be of:
for
{
"type": "A",
"name": "string",
"content": "string",
"success": true
}
and
{
"type": "A",
"name": "string",
"content": "string",
"success": false
"error": object
}
That way we can expect a similar shape for the return values, agnostic of the success/failure of the operation
Hey, thanks for the comment.
Let me know if you want to clarify them over a quick call. Thanks! |
@kishore03109 as discussed, added 401 error response for 3 API calls in ce641d3 |
Problem
We are working with GIG from ITSM to explore the possibility of automatically updating DNS records for agency domains as part of the future site launch process.
As the first step, we are requested to create a swagger API spec to show how the API endpoints could look like before GIG can implement them.
Closes IS-611
Solution
This PR added a swagger file under
docs
folder.To view the API specs on Swagger UI, use one of the two methods:
Breaking Changes