You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.
Include and Exclude fields are provided by GetOptions which are commonly accepted in read-only methods like Get and List.
The Equinix Metal API also supports Include and Exclude parameters for Create and Update methods (POST,PUT).
Having these include fields expanded in create responses could help developers avoid a secondary round-trip API fetch.
How would CreateOpts be introduced? Does this have to break the signature of all Create/Update methods?
Consider how this is handled in gometal, where .Execute() is called after preparing the API call. A similar approach that does not break packngo compatibility could look like client.Projects.ResetIncludes().Including("users").Create(...).
Some decision would need to be made about when the Includes and Excludes would be cleared. Would they be cleared manually? Would includes be cleared after each request?
Within an ServiceOp (Devices, Projects, Users) the same set of includes are generally available, so this could be considered a service feature, except that some service methods are a level deeper (Projects.GetBGP), where the same includes do not apply. The EM API ignores invalid includes, but do we really want to send invalid arguments? This behavior is undocumented and therefor more prone to change.
The text was updated successfully, but these errors were encountered:
Include and Exclude fields are provided by
GetOptions
which are commonly accepted in read-only methods likeGet
andList
.The Equinix Metal API also supports Include and Exclude parameters for Create and Update methods (POST,PUT).
Having these include fields expanded in create responses could help developers avoid a secondary round-trip API fetch.
How would CreateOpts be introduced? Does this have to break the signature of all Create/Update methods?
Consider how this is handled in gometal, where
.Execute()
is called after preparing the API call. A similar approach that does not break packngo compatibility could look likeclient.Projects.ResetIncludes().Including("users").Create(...)
.Some decision would need to be made about when the
Includes
andExcludes
would be cleared. Would they be cleared manually? Would includes be cleared after each request?Within an ServiceOp (Devices, Projects, Users) the same set of includes are generally available, so this could be considered a service feature, except that some service methods are a level deeper (Projects.GetBGP), where the same includes do not apply. The EM API ignores invalid includes, but do we really want to send invalid arguments? This behavior is undocumented and therefor more prone to change.
The text was updated successfully, but these errors were encountered: