From 7018130ef8cb1fc8b351a46df83ccb86aec1b0a2 Mon Sep 17 00:00:00 2001 From: Rajkaran Yadav Date: Tue, 28 Jul 2026 16:15:35 +0530 Subject: [PATCH] swagger: rename artifact annotation field" Signed-off-by: Rajkaran Yadav --- pkg/api/handlers/libpod/manifests.go | 16 ++++++++-------- pkg/domain/entities/manifest.go | 16 ++++++++-------- pkg/domain/infra/abi/manifest.go | 2 +- pkg/domain/infra/tunnel/manifest.go | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pkg/api/handlers/libpod/manifests.go b/pkg/api/handlers/libpod/manifests.go index 774f307e75..b753233245 100644 --- a/pkg/api/handlers/libpod/manifests.go +++ b/pkg/api/handlers/libpod/manifests.go @@ -680,14 +680,14 @@ func ManifestModify(w http.ResponseWriter, r *http.Request) { // We waited until after the extraction goroutine finished to ensure // that we'd pick up its changes to the ArtifactFiles list. manifestAddArtifactOptions := entities.ManifestAddArtifactOptions{ - Type: body.ArtifactType, - LayerType: body.ArtifactLayerType, - ConfigType: body.ArtifactConfigType, - Config: body.ArtifactConfig, - ExcludeTitles: body.ArtifactExcludeTitles, - Annotations: body.ArtifactAnnotations, - Subject: body.ArtifactSubject, - Files: body.ArtifactFiles, + Type: body.ArtifactType, + LayerType: body.ArtifactLayerType, + ConfigType: body.ArtifactConfigType, + Config: body.ArtifactConfig, + ExcludeTitles: body.ArtifactExcludeTitles, + ArtifactAnnotations: body.ArtifactAnnotations, + Subject: body.ArtifactSubject, + Files: body.ArtifactFiles, } id, err := imageEngine.ManifestAddArtifact(r.Context(), name, body.ArtifactFiles, manifestAddArtifactOptions) if err != nil { diff --git a/pkg/domain/entities/manifest.go b/pkg/domain/entities/manifest.go index 79ee4776ba..3c930f8876 100644 --- a/pkg/domain/entities/manifest.go +++ b/pkg/domain/entities/manifest.go @@ -53,14 +53,14 @@ type ManifestAddOptions struct { type ManifestAddArtifactOptions struct { ManifestAnnotateOptions // Note to future maintainers: keep these fields synchronized with ManifestModifyOptions! - Type *string `json:"artifact_type" schema:"artifact_type"` - LayerType string `json:"artifact_layer_type" schema:"artifact_layer_type"` - ConfigType string `json:"artifact_config_type" schema:"artifact_config_type"` - Config string `json:"artifact_config" schema:"artifact_config"` - ExcludeTitles bool `json:"artifact_exclude_titles" schema:"artifact_exclude_titles"` - Annotations map[string]string `json:"artifact_annotations" schema:"artifact_annotations"` - Subject string `json:"artifact_subject" schema:"artifact_subject"` - Files []string `json:"artifact_files" schema:"-"` + Type *string `json:"artifact_type" schema:"artifact_type"` + LayerType string `json:"artifact_layer_type" schema:"artifact_layer_type"` + ConfigType string `json:"artifact_config_type" schema:"artifact_config_type"` + Config string `json:"artifact_config" schema:"artifact_config"` + ExcludeTitles bool `json:"artifact_exclude_titles" schema:"artifact_exclude_titles"` + ArtifactAnnotations map[string]string `json:"artifact_annotations" schema:"artifact_annotations"` + Subject string `json:"artifact_subject" schema:"artifact_subject"` + Files []string `json:"artifact_files" schema:"-"` } // ManifestAnnotateOptions provides model for annotating manifest list diff --git a/pkg/domain/infra/abi/manifest.go b/pkg/domain/infra/abi/manifest.go index f40222792d..f65ab5d881 100644 --- a/pkg/domain/infra/abi/manifest.go +++ b/pkg/domain/infra/abi/manifest.go @@ -362,7 +362,7 @@ func (ir *ImageEngine) ManifestAddArtifact(ctx context.Context, name string, fil Config: opts.Config, LayerType: opts.LayerType, ExcludeTitles: opts.ExcludeTitles, - Annotations: opts.Annotations, + Annotations: opts.ArtifactAnnotations, Subject: opts.Subject, } diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go index 2bab8fb92e..bfc1dc7540 100644 --- a/pkg/domain/infra/tunnel/manifest.go +++ b/pkg/domain/infra/tunnel/manifest.go @@ -117,7 +117,7 @@ func (ir *ImageEngine) ManifestAddArtifact(_ context.Context, name string, files options.WithType(opts.Type).WithConfigType(opts.ConfigType).WithLayerType(opts.LayerType) options.WithConfig(opts.Config) options.WithExcludeTitles(opts.ExcludeTitles).WithSubject(opts.Subject) - options.WithAnnotations(opts.Annotations) + options.WithAnnotations(opts.ArtifactAnnotations) options.WithFiles(files) id, err := manifests.AddArtifact(ir.ClientCtx, name, options) if err != nil {