-
Notifications
You must be signed in to change notification settings - Fork 303
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
Updated list ipv6 response #762
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.
Please keep this consistent with existing List
methods. For example:
Line 69 in 9338200
func (r *ReservedIPsServiceOp) List(ctx context.Context, opt *ListOptions) ([]ReservedIP, *Response, error) { |
We return a slice of the resource while making the pagination info accessible via the Response
Lines 165 to 170 in 9338200
// Links that were returned with the response. These are parsed from | |
// request body and not the header. | |
Links *Links | |
// Meta describes generic information about the response. | |
Meta *Meta |
@@ -34,6 +34,15 @@ type ReservedIPV6 struct { | |||
ReservedAt time.Time `json:"reserved_at"` | |||
Droplet *Droplet `json:"droplet,omitempty"` | |||
} | |||
type ReservedIPV6Resp struct { | |||
ReservedIPV6 *ReservedIPV6 `json:"reserved_ipv6"` |
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 Ashwani, Thanks for the PR 🚀.
Here are some suggestions you may consider:
-
Could you please add
Links
to the ReservedIPV6Resp as it is done here? This will require some changes in Create. You can check reserved ips for reference. -
Could you also rename
ReservedIPV6Resp
toreservedIPV6Root
for consistency with existing code? 🙏 -
Let's return
*ReservedIPV6
instead of*ReservedIPV6Resp
for consistency with existing code? 🙏 -
Let's try to reuse
reservedIPV6Root
in List as it is done here
Please, let me know when you are done. I'll be happy to take a look again 👍
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.
- We don't have any
Links
inCreate
andGet
response for IPv6 API. - Ok but *Root didn't make sense
- Ok
- for list it's plural reservedIPsRoot is being in IPv4
This comment is going to be out of scope of this PR, but it is something we should consider. Would it be possible to add API documentation for a new API documentation repo is here - https://github.com/digitalocean/openapi Many thanks. |
There is a PR for this: digitalocean/openapi#951 |
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.
👍 Looks good to me if it aligns with all changes in digitalocean/openapi#951 and that's ok that Links
are missing in Create
.
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.
🙏 Thanks for the changes!
No description provided.