openapi: unused
This commit is contained in:
parent
1c0ed6574f
commit
b3ba9c2301
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user