From 21c09dd593901a9e0c89f30030a3f3261bb3cf14 Mon Sep 17 00:00:00 2001 From: Luces Huayhuaca <21225410+uturunku1@users.noreply.github.com> Date: Tue, 22 Feb 2022 11:38:11 -0800 Subject: [PATCH] change ID to type (#323) --- registry_module.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/registry_module.go b/registry_module.go index 1b8233e16..beb738b37 100644 --- a/registry_module.go +++ b/registry_module.go @@ -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"` @@ -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