openapi: unused

This commit is contained in:
Quaternions 2024-12-09 21:19:12 -08:00
parent 1c0ed6574f
commit b3ba9c2301
3 changed files with 7 additions and 40 deletions

View File

@ -636,11 +636,9 @@ components:
format: int64 format: int64
SubmissionCreate: SubmissionCreate:
required: required:
- ID
- DisplayName - DisplayName
- Creator - Creator
- GameID - GameID
- Submitter
- AssetID - AssetID
- AssetVersion - AssetVersion
# - TargetAssetID # - TargetAssetID
@ -653,9 +651,6 @@ components:
GameID: GameID:
type: integer type: integer
format: int32 format: int32
Submitter:
type: integer
format: int64
AssetID: AssetID:
type: integer type: integer
format: int64 format: int64

View File

@ -1445,10 +1445,6 @@ func (s *SubmissionCreate) encodeFields(e *jx.Encoder) {
e.FieldStart("GameID") e.FieldStart("GameID")
e.Int32(s.GameID) e.Int32(s.GameID)
} }
{
e.FieldStart("Submitter")
e.Int64(s.Submitter)
}
{ {
e.FieldStart("AssetID") e.FieldStart("AssetID")
e.Int64(s.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", 0: "DisplayName",
1: "Creator", 1: "Creator",
2: "GameID", 2: "GameID",
3: "Submitter", 3: "AssetID",
4: "AssetID", 4: "AssetVersion",
5: "AssetVersion", 5: "TargetAssetID",
6: "TargetAssetID",
} }
// Decode decodes SubmissionCreate from json. // Decode decodes SubmissionCreate from json.
@ -1520,20 +1515,8 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error {
}(); err != nil { }(); err != nil {
return errors.Wrap(err, "decode field \"GameID\"") 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": case "AssetID":
requiredBitSet[0] |= 1 << 4 requiredBitSet[0] |= 1 << 3
if err := func() error { if err := func() error {
v, err := d.Int64() v, err := d.Int64()
s.AssetID = int64(v) s.AssetID = int64(v)
@ -1545,7 +1528,7 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error {
return errors.Wrap(err, "decode field \"AssetID\"") return errors.Wrap(err, "decode field \"AssetID\"")
} }
case "AssetVersion": case "AssetVersion":
requiredBitSet[0] |= 1 << 5 requiredBitSet[0] |= 1 << 4
if err := func() error { if err := func() error {
v, err := d.Int64() v, err := d.Int64()
s.AssetVersion = int64(v) s.AssetVersion = int64(v)
@ -1576,7 +1559,7 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error {
// Validate required fields. // Validate required fields.
var failures []validate.FieldError var failures []validate.FieldError
for i, mask := range [1]uint8{ for i, mask := range [1]uint8{
0b00111111, 0b00011111,
} { } {
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 { if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
// Mask only required fields and check equality to mask using XOR. // Mask only required fields and check equality to mask using XOR.

View File

@ -723,7 +723,6 @@ type SubmissionCreate struct {
DisplayName string `json:"DisplayName"` DisplayName string `json:"DisplayName"`
Creator string `json:"Creator"` Creator string `json:"Creator"`
GameID int32 `json:"GameID"` GameID int32 `json:"GameID"`
Submitter int64 `json:"Submitter"`
AssetID int64 `json:"AssetID"` AssetID int64 `json:"AssetID"`
AssetVersion int64 `json:"AssetVersion"` AssetVersion int64 `json:"AssetVersion"`
TargetAssetID OptInt64 `json:"TargetAssetID"` TargetAssetID OptInt64 `json:"TargetAssetID"`
@ -744,11 +743,6 @@ func (s *SubmissionCreate) GetGameID() int32 {
return s.GameID return s.GameID
} }
// GetSubmitter returns the value of Submitter.
func (s *SubmissionCreate) GetSubmitter() int64 {
return s.Submitter
}
// GetAssetID returns the value of AssetID. // GetAssetID returns the value of AssetID.
func (s *SubmissionCreate) GetAssetID() int64 { func (s *SubmissionCreate) GetAssetID() int64 {
return s.AssetID return s.AssetID
@ -779,11 +773,6 @@ func (s *SubmissionCreate) SetGameID(val int32) {
s.GameID = val s.GameID = val
} }
// SetSubmitter sets the value of Submitter.
func (s *SubmissionCreate) SetSubmitter(val int64) {
s.Submitter = val
}
// SetAssetID sets the value of AssetID. // SetAssetID sets the value of AssetID.
func (s *SubmissionCreate) SetAssetID(val int64) { func (s *SubmissionCreate) SetAssetID(val int64) {
s.AssetID = val s.AssetID = val