Skip to content

Commit

Permalink
change ID to type (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
uturunku1 authored and sebasslash committed Feb 23, 2022
1 parent 4dbaf58 commit 8f3923a
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit 8f3923a

Please sign in to comment.