From b3ba9c230106b7c7472efea503f423660758ea3f Mon Sep 17 00:00:00 2001 From: Quaternions Date: Mon, 9 Dec 2024 21:19:12 -0800 Subject: [PATCH] openapi: unused --- openapi.yaml | 5 ----- pkg/api/oas_json_gen.go | 31 +++++++------------------------ pkg/api/oas_schemas_gen.go | 11 ----------- 3 files changed, 7 insertions(+), 40 deletions(-) diff --git a/openapi.yaml b/openapi.yaml index aa8b65d..a4e738c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -636,11 +636,9 @@ components: format: int64 SubmissionCreate: required: - - ID - DisplayName - Creator - GameID - - Submitter - AssetID - AssetVersion # - TargetAssetID @@ -653,9 +651,6 @@ components: GameID: type: integer format: int32 - Submitter: - type: integer - format: int64 AssetID: type: integer format: int64 diff --git a/pkg/api/oas_json_gen.go b/pkg/api/oas_json_gen.go index 0148f9b..2b70ed3 100644 --- a/pkg/api/oas_json_gen.go +++ b/pkg/api/oas_json_gen.go @@ -1445,10 +1445,6 @@ func (s *SubmissionCreate) encodeFields(e *jx.Encoder) { e.FieldStart("GameID") e.Int32(s.GameID) } - { - e.FieldStart("Submitter") - e.Int64(s.Submitter) - } { e.FieldStart("AssetID") e.Int64(s.AssetID) @@ -1465,14 +1461,13 @@ func (s *SubmissionCreate) encodeFields(e *jx.Encoder) { } } -var jsonFieldsNameOfSubmissionCreate = [7]string{ +var jsonFieldsNameOfSubmissionCreate = [6]string{ 0: "DisplayName", 1: "Creator", 2: "GameID", - 3: "Submitter", - 4: "AssetID", - 5: "AssetVersion", - 6: "TargetAssetID", + 3: "AssetID", + 4: "AssetVersion", + 5: "TargetAssetID", } // Decode decodes SubmissionCreate from json. @@ -1520,20 +1515,8 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error { }(); err != nil { return errors.Wrap(err, "decode field \"GameID\"") } - case "Submitter": - requiredBitSet[0] |= 1 << 3 - if err := func() error { - v, err := d.Int64() - s.Submitter = int64(v) - if err != nil { - return err - } - return nil - }(); err != nil { - return errors.Wrap(err, "decode field \"Submitter\"") - } case "AssetID": - requiredBitSet[0] |= 1 << 4 + requiredBitSet[0] |= 1 << 3 if err := func() error { v, err := d.Int64() s.AssetID = int64(v) @@ -1545,7 +1528,7 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error { return errors.Wrap(err, "decode field \"AssetID\"") } case "AssetVersion": - requiredBitSet[0] |= 1 << 5 + requiredBitSet[0] |= 1 << 4 if err := func() error { v, err := d.Int64() s.AssetVersion = int64(v) @@ -1576,7 +1559,7 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error { // Validate required fields. var failures []validate.FieldError for i, mask := range [1]uint8{ - 0b00111111, + 0b00011111, } { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { // Mask only required fields and check equality to mask using XOR. diff --git a/pkg/api/oas_schemas_gen.go b/pkg/api/oas_schemas_gen.go index 16a7e89..da55550 100644 --- a/pkg/api/oas_schemas_gen.go +++ b/pkg/api/oas_schemas_gen.go @@ -723,7 +723,6 @@ type SubmissionCreate struct { DisplayName string `json:"DisplayName"` Creator string `json:"Creator"` GameID int32 `json:"GameID"` - Submitter int64 `json:"Submitter"` AssetID int64 `json:"AssetID"` AssetVersion int64 `json:"AssetVersion"` TargetAssetID OptInt64 `json:"TargetAssetID"` @@ -744,11 +743,6 @@ func (s *SubmissionCreate) GetGameID() int32 { return s.GameID } -// GetSubmitter returns the value of Submitter. -func (s *SubmissionCreate) GetSubmitter() int64 { - return s.Submitter -} - // GetAssetID returns the value of AssetID. func (s *SubmissionCreate) GetAssetID() int64 { return s.AssetID @@ -779,11 +773,6 @@ func (s *SubmissionCreate) SetGameID(val int32) { s.GameID = val } -// SetSubmitter sets the value of Submitter. -func (s *SubmissionCreate) SetSubmitter(val int64) { - s.Submitter = val -} - // SetAssetID sets the value of AssetID. func (s *SubmissionCreate) SetAssetID(val int64) { s.AssetID = val