swagger fix infinitive recursion on some types

Commit 668d517af9 moved a lot of type definitions and by that also
copied a bucnh of swagger:model comments, this caused swagger to create
a incorrect yaml that can no longer be parsed by redoc due
"Self-referencing circular pointer".

The yaml basically defined the type with a name and the pointed to the
same name definition again so it caused a infinitive recursion where
redoc just throws an error but the swagger style ignored the case so it
seemed like it worked but obviously the type information was not
working.

Fixes #22351

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-04-12 14:10:27 +02:00
parent 5e9725983d
commit e8055904e1
6 changed files with 1 additions and 10 deletions

View File

@ -51,7 +51,6 @@ func (i *Image) Id() string { //nolint:revive,stylecheck
return i.ID
}
// swagger:model LibpodImageSummary
type ImageSummary = entitiesTypes.ImageSummary
// ImageRemoveOptions can be used to alter image removal.

View File

@ -117,8 +117,6 @@ type ManifestModifyOptions struct {
}
// ManifestPushReport provides the model for the pushed manifest
//
// swagger:model
type ManifestPushReport = entitiesTypes.ManifestPushReport
// ManifestRemoveOptions provides the model for removing digests from a manifest
@ -128,11 +126,7 @@ type ManifestRemoveOptions struct {
}
// ManifestRemoveReport provides the model for the removed manifest
//
// swagger:model
type ManifestRemoveReport = entitiesTypes.ManifestRemoveReport
// ManifestModifyReport provides the model for removed digests and changed manifest
//
// swagger:model
type ManifestModifyReport = entitiesTypes.ManifestModifyReport

View File

@ -75,7 +75,6 @@ type NetworkConnectOptions = entitiesTypes.NetworkConnectOptions
// NetworkPruneReport containers the name of network and an error
// associated in its pruning (removal)
// swagger:model NetworkPruneReport
type NetworkPruneReport = entitiesTypes.NetworkPruneReport
// NetworkPruneOptions describes options for pruning unused networks

View File

@ -19,7 +19,6 @@ type SystemUnshareOptions = types.SystemUnshareOptions
type ComponentVersion = types.SystemComponentVersion
type ListRegistriesReport = types.ListRegistriesReport
// swagger:model AuthConfig
type AuthConfig = types.AuthConfig
type AuthReport = types.AuthReport
type LocksReport = types.LocksReport

View File

@ -2,6 +2,7 @@
package types
// AuthConfig contains authorization information for connecting to a Registry
// swagger:model
type AuthConfig struct {
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`

View File

@ -7,7 +7,6 @@ import (
)
// VolumeCreateOptions provides details for creating volumes
// swagger:model
type VolumeCreateOptions = types.VolumeCreateOptions
type VolumeConfigResponse = types.VolumeConfigResponse