diff --git a/pkg/generated/models/rekord_v001_schema.go b/pkg/generated/models/rekord_v001_schema.go index a979c9be44fbf41cf0e427b6547e1a5028c935df..32f079a414d67658261c4ef9cf7a644f81a2799b 100644 --- a/pkg/generated/models/rekord_v001_schema.go +++ b/pkg/generated/models/rekord_v001_schema.go @@ -175,6 +175,7 @@ func (m *RekordV001Schema) UnmarshalBinary(b []byte) error { type RekordV001SchemaData struct { // Specifies the content inline within the document + // Max Length: 32000000 // Format: byte Content strfmt.Base64 `json:"content,omitempty"` @@ -190,6 +191,10 @@ type RekordV001SchemaData struct { func (m *RekordV001SchemaData) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateContent(formats); err != nil { + res = append(res, err) + } + if err := m.validateHash(formats); err != nil { res = append(res, err) } @@ -204,6 +209,18 @@ func (m *RekordV001SchemaData) Validate(formats strfmt.Registry) error { return nil } +func (m *RekordV001SchemaData) validateContent(formats strfmt.Registry) error { + if swag.IsZero(m.Content) { // not required + return nil + } + + if err := validate.MaxLength("data"+"."+"content", "body", m.Content.String(), 32000000); err != nil { + return err + } + + return nil +} + func (m *RekordV001SchemaData) validateHash(formats strfmt.Registry) error { if swag.IsZero(m.Hash) { // not required return nil diff --git a/pkg/generated/models/rpm_v001_schema.go b/pkg/generated/models/rpm_v001_schema.go index 15846c8304331b29e0439fb580f9c60d37d27ea8..8202f9b75a5063ccd1f8ebf53bd4a4488a63517e 100644 --- a/pkg/generated/models/rpm_v001_schema.go +++ b/pkg/generated/models/rpm_v001_schema.go @@ -175,6 +175,7 @@ func (m *RpmV001Schema) UnmarshalBinary(b []byte) error { type RpmV001SchemaPackage struct { // Specifies the package inline within the document + // Max Length: 32000000 // Format: byte Content strfmt.Base64 `json:"content,omitempty"` @@ -193,6 +194,10 @@ type RpmV001SchemaPackage struct { func (m *RpmV001SchemaPackage) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateContent(formats); err != nil { + res = append(res, err) + } + if err := m.validateHash(formats); err != nil { res = append(res, err) } @@ -207,6 +212,18 @@ func (m *RpmV001SchemaPackage) Validate(formats strfmt.Registry) error { return nil } +func (m *RpmV001SchemaPackage) validateContent(formats strfmt.Registry) error { + if swag.IsZero(m.Content) { // not required + return nil + } + + if err := validate.MaxLength("package"+"."+"content", "body", m.Content.String(), 32000000); err != nil { + return err + } + + return nil +} + func (m *RpmV001SchemaPackage) validateHash(formats strfmt.Registry) error { if swag.IsZero(m.Hash) { // not required return nil diff --git a/pkg/generated/restapi/embedded_spec.go b/pkg/generated/restapi/embedded_spec.go index ba8c6e3092ba085fdc94c1a6a60cd0aba1753ddf..bb730d4f9c0d12039c40954c3834e89cc5dbee28 100644 --- a/pkg/generated/restapi/embedded_spec.go +++ b/pkg/generated/restapi/embedded_spec.go @@ -1164,7 +1164,8 @@ func init() { "content": { "description": "Specifies the content inline within the document", "type": "string", - "format": "byte" + "format": "byte", + "maxLength": 32000000 }, "hash": { "description": "Specifies the hash algorithm and value for the content", @@ -1332,7 +1333,8 @@ func init() { "content": { "description": "Specifies the package inline within the document", "type": "string", - "format": "byte" + "format": "byte", + "maxLength": 32000000 }, "hash": { "description": "Specifies the hash algorithm and value for the package", @@ -1568,7 +1570,8 @@ func init() { "content": { "description": "Specifies the content inline within the document", "type": "string", - "format": "byte" + "format": "byte", + "maxLength": 32000000 }, "hash": { "description": "Specifies the hash algorithm and value for the content", @@ -1747,7 +1750,8 @@ func init() { "content": { "description": "Specifies the package inline within the document", "type": "string", - "format": "byte" + "format": "byte", + "maxLength": 32000000 }, "hash": { "description": "Specifies the hash algorithm and value for the package", diff --git a/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json b/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json index 5beb510d41847adeae5ad239ddbd88032fa65db1..becd2b3b2177c4f3b73c6105e2ddbb1da1ed8208 100644 --- a/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json +++ b/pkg/types/rekord/v0.0.1/rekord_v0_0_1_schema.json @@ -86,7 +86,8 @@ "content": { "description": "Specifies the content inline within the document", "type": "string", - "format": "byte" + "format": "byte", + "maxLength" : 32000000 } }, "oneOf": [ diff --git a/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json b/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json index f74e960eab48e7a36285881348941d73a1c83e18..6fbf45db325f36b1dca422a3aa7b2221dfa1bd0e 100644 --- a/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json +++ b/pkg/types/rpm/v0.0.1/rpm_v0_0_1_schema.json @@ -64,7 +64,8 @@ "content": { "description": "Specifies the package inline within the document", "type": "string", - "format": "byte" + "format": "byte", + "maxLength" : 32000000 } }, "oneOf": [