equinix / equinix-sdk-go

Golang client for Equinix APIs
https://deploy.equinix.com/labs/equinix-sdk-go
MIT License
2 stars 4 forks source link

[Metal] `Organization` model does not declare an `href` property #27

Open ctreatma opened 5 months ago

ctreatma commented 5 months ago

In terraform-provider-equinix, there's a place where we use the href of a project's organization to get the organization ID without having to include the full organization, which would increase response latency.

The code to do that is more verbose than necessary because the Organization schema does not declare an href property, so we have to read that property from AdditionalProperties and then, because AdditionalProperties can contain properties of any type, we have to cast the href property to a string.

If the Organization schema in the Metal API spec were updated to declare an href property that is type: string, we could simply do organization.GetHref().