diff --git a/pkg/api/oas_json_gen.go b/pkg/api/oas_json_gen.go index c3ec0ae..271d823 100644 --- a/pkg/api/oas_json_gen.go +++ b/pkg/api/oas_json_gen.go @@ -624,18 +624,18 @@ func (s *Pagination) Encode(e *jx.Encoder) { // encodeFields encodes fields. func (s *Pagination) encodeFields(e *jx.Encoder) { { - e.FieldStart("Page") - e.Int32(s.Page) + e.FieldStart("Number") + e.Int32(s.Number) } { - e.FieldStart("Limit") - e.Int32(s.Limit) + e.FieldStart("Size") + e.Int32(s.Size) } } var jsonFieldsNameOfPagination = [2]string{ - 0: "Page", - 1: "Limit", + 0: "Number", + 1: "Size", } // Decode decodes Pagination from json. @@ -647,29 +647,29 @@ func (s *Pagination) Decode(d *jx.Decoder) error { if err := d.ObjBytes(func(d *jx.Decoder, k []byte) error { switch string(k) { - case "Page": + case "Number": requiredBitSet[0] |= 1 << 0 if err := func() error { v, err := d.Int32() - s.Page = int32(v) + s.Number = int32(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"Page\"") + return errors.Wrap(err, "decode field \"Number\"") } - case "Limit": + case "Size": requiredBitSet[0] |= 1 << 1 if err := func() error { v, err := d.Int32() - s.Limit = int32(v) + s.Size = int32(v) if err != nil { return err } return nil }(); err != nil { - return errors.Wrap(err, "decode field \"Limit\"") + return errors.Wrap(err, "decode field \"Size\"") } default: return d.Skip() diff --git a/pkg/api/oas_schemas_gen.go b/pkg/api/oas_schemas_gen.go index 3cd876d..676f4df 100644 --- a/pkg/api/oas_schemas_gen.go +++ b/pkg/api/oas_schemas_gen.go @@ -398,28 +398,28 @@ func (o OptSubmissionFilter) Or(d SubmissionFilter) SubmissionFilter { // Ref: #/components/schemas/Pagination type Pagination struct { - Page int32 `json:"Page"` - Limit int32 `json:"Limit"` + Number int32 `json:"Number"` + Size int32 `json:"Size"` } -// GetPage returns the value of Page. -func (s *Pagination) GetPage() int32 { - return s.Page +// GetNumber returns the value of Number. +func (s *Pagination) GetNumber() int32 { + return s.Number } -// GetLimit returns the value of Limit. -func (s *Pagination) GetLimit() int32 { - return s.Limit +// GetSize returns the value of Size. +func (s *Pagination) GetSize() int32 { + return s.Size } -// SetPage sets the value of Page. -func (s *Pagination) SetPage(val int32) { - s.Page = val +// SetNumber sets the value of Number. +func (s *Pagination) SetNumber(val int32) { + s.Number = val } -// SetLimit sets the value of Limit. -func (s *Pagination) SetLimit(val int32) { - s.Limit = val +// SetSize sets the value of Size. +func (s *Pagination) SetSize(val int32) { + s.Size = val } // Ref: #/components/schemas/Script diff --git a/pkg/api/oas_validators_gen.go b/pkg/api/oas_validators_gen.go index dd2c9e4..9cb8cdd 100644 --- a/pkg/api/oas_validators_gen.go +++ b/pkg/api/oas_validators_gen.go @@ -106,13 +106,13 @@ func (s *Pagination) Validate() error { MaxExclusive: false, MultipleOfSet: false, MultipleOf: 0, - }).Validate(int64(s.Page)); err != nil { + }).Validate(int64(s.Number)); err != nil { return errors.Wrap(err, "int") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ - Name: "Page", + Name: "Number", Error: err, }) } @@ -126,13 +126,13 @@ func (s *Pagination) Validate() error { MaxExclusive: false, MultipleOfSet: false, MultipleOf: 0, - }).Validate(int64(s.Limit)); err != nil { + }).Validate(int64(s.Size)); err != nil { return errors.Wrap(err, "int") } return nil }(); err != nil { failures = append(failures, validate.FieldError{ - Name: "Limit", + Name: "Size", Error: err, }) }