swagger: rename artifact annotation field"

Signed-off-by: Rajkaran Yadav <yadavrajkaran854@gmail.com>
This commit is contained in:
Rajkaran Yadav 2026-07-28 16:15:35 +05:30
parent e31bb4d170
commit 7018130ef8
4 changed files with 18 additions and 18 deletions

View file

@ -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 {

View file

@ -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

View file

@ -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,
}

View file

@ -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 {