Skip to content
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

change ID to type #323

Merged
merged 1 commit into from Feb 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions registry_module.go
Expand Up @@ -256,7 +256,11 @@ func (r *registryModules) CreateVersion(ctx context.Context, organization string

// RegistryModuleCreateWithVCSConnectionOptions is used when creating a registry module with a VCS repo
type RegistryModuleCreateWithVCSConnectionOptions struct {
ID string `jsonapi:"primary,registry-modules"`
// Type is a public field utilized by JSON:API to
// set the resource type via the field tag.
// It is not a user-defined value and does not need to be set.
// https://jsonapi.org/format/#crud-creating
Type string `jsonapi:"primary,registry-modules"`

// VCS repository information
VCSRepo *RegistryModuleVCSRepoOptions `jsonapi:"attr,vcs-repo"`
Expand Down Expand Up @@ -294,9 +298,6 @@ func (r *registryModules) CreateWithVCSConnection(ctx context.Context, options R
return nil, err
}

// Make sure we don't send a user provided ID.
options.ID = ""

req, err := r.client.newRequest("POST", "registry-modules", &options)
if err != nil {
return nil, err
Expand Down