cloudfoundry/go-cfclient

Invalid attributes in Domain Create

Dray56 opened this issue · 0 comments

As per the existing schema of DomainCreate, there are relationship fields directly present such as Organization and SharedOrganizations.

type DomainCreate struct {
	Name string `json:"name"`

	Internal            *bool                `json:"internal,omitempty"`
	RouterGroup         *Relationship        `json:"router_group,omitempty"`
	Organization        *ToOneRelationship   `json:"organization,omitempty"`
	SharedOrganizations *ToManyRelationships `json:"shared_organizations,omitempty"`
	Metadata            *Metadata            `json:"metadata,omitempty"`
}

However, this causes errors such as the one below as they should exist under the relationships similar to the structures of space quota

Could not create Domain test.com : executing POST request for /v3/domains failed: cfclient error (CF-UnprocessableEntity|10008): Unknown field(s): 'organization'
type SpaceQuotaCreateOrUpdate struct {
	// 	Name of the quota
	Name *string `json:"name,omitempty"`
	// relationships to the organization and spaces where the quota belongs
	Relationships *SpaceQuotaRelationships `json:"relationships,omitempty"`
	// quotas that affect apps
	Apps *AppsQuota `json:"apps,omitempty"`
	// quotas that affect services
	Services *ServicesQuota `json:"services,omitempty"`
	// quotas that affect routes
	Routes *RoutesQuota `json:"routes,omitempty"`
}