openapi: remove redundant SubmissionType
This commit is contained in:
parent
576c3a187a
commit
1c0ed6574f
@ -643,7 +643,6 @@ components:
|
||||
- Submitter
|
||||
- AssetID
|
||||
- AssetVersion
|
||||
- SubmissionType
|
||||
# - TargetAssetID
|
||||
type: object
|
||||
properties:
|
||||
@ -663,9 +662,6 @@ components:
|
||||
AssetVersion:
|
||||
type: integer
|
||||
format: int64
|
||||
SubmissionType:
|
||||
type: integer
|
||||
format: int32
|
||||
TargetAssetID:
|
||||
type: integer
|
||||
format: int64
|
||||
|
@ -1457,10 +1457,6 @@ func (s *SubmissionCreate) encodeFields(e *jx.Encoder) {
|
||||
e.FieldStart("AssetVersion")
|
||||
e.Int64(s.AssetVersion)
|
||||
}
|
||||
{
|
||||
e.FieldStart("SubmissionType")
|
||||
e.Int32(s.SubmissionType)
|
||||
}
|
||||
{
|
||||
if s.TargetAssetID.Set {
|
||||
e.FieldStart("TargetAssetID")
|
||||
@ -1469,15 +1465,14 @@ func (s *SubmissionCreate) encodeFields(e *jx.Encoder) {
|
||||
}
|
||||
}
|
||||
|
||||
var jsonFieldsNameOfSubmissionCreate = [8]string{
|
||||
var jsonFieldsNameOfSubmissionCreate = [7]string{
|
||||
0: "DisplayName",
|
||||
1: "Creator",
|
||||
2: "GameID",
|
||||
3: "Submitter",
|
||||
4: "AssetID",
|
||||
5: "AssetVersion",
|
||||
6: "SubmissionType",
|
||||
7: "TargetAssetID",
|
||||
6: "TargetAssetID",
|
||||
}
|
||||
|
||||
// Decode decodes SubmissionCreate from json.
|
||||
@ -1561,18 +1556,6 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error {
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"AssetVersion\"")
|
||||
}
|
||||
case "SubmissionType":
|
||||
requiredBitSet[0] |= 1 << 6
|
||||
if err := func() error {
|
||||
v, err := d.Int32()
|
||||
s.SubmissionType = int32(v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}(); err != nil {
|
||||
return errors.Wrap(err, "decode field \"SubmissionType\"")
|
||||
}
|
||||
case "TargetAssetID":
|
||||
if err := func() error {
|
||||
s.TargetAssetID.Reset()
|
||||
@ -1593,7 +1576,7 @@ func (s *SubmissionCreate) Decode(d *jx.Decoder) error {
|
||||
// Validate required fields.
|
||||
var failures []validate.FieldError
|
||||
for i, mask := range [1]uint8{
|
||||
0b01111111,
|
||||
0b00111111,
|
||||
} {
|
||||
if result := (requiredBitSet[i] & mask) ^ mask; result != 0 {
|
||||
// Mask only required fields and check equality to mask using XOR.
|
||||
|
@ -720,14 +720,13 @@ func (s *Submission) SetStatusID(val int32) {
|
||||
|
||||
// Ref: #/components/schemas/SubmissionCreate
|
||||
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"`
|
||||
SubmissionType int32 `json:"SubmissionType"`
|
||||
TargetAssetID OptInt64 `json:"TargetAssetID"`
|
||||
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"`
|
||||
}
|
||||
|
||||
// GetDisplayName returns the value of DisplayName.
|
||||
@ -760,11 +759,6 @@ func (s *SubmissionCreate) GetAssetVersion() int64 {
|
||||
return s.AssetVersion
|
||||
}
|
||||
|
||||
// GetSubmissionType returns the value of SubmissionType.
|
||||
func (s *SubmissionCreate) GetSubmissionType() int32 {
|
||||
return s.SubmissionType
|
||||
}
|
||||
|
||||
// GetTargetAssetID returns the value of TargetAssetID.
|
||||
func (s *SubmissionCreate) GetTargetAssetID() OptInt64 {
|
||||
return s.TargetAssetID
|
||||
@ -800,11 +794,6 @@ func (s *SubmissionCreate) SetAssetVersion(val int64) {
|
||||
s.AssetVersion = val
|
||||
}
|
||||
|
||||
// SetSubmissionType sets the value of SubmissionType.
|
||||
func (s *SubmissionCreate) SetSubmissionType(val int32) {
|
||||
s.SubmissionType = val
|
||||
}
|
||||
|
||||
// SetTargetAssetID sets the value of TargetAssetID.
|
||||
func (s *SubmissionCreate) SetTargetAssetID(val OptInt64) {
|
||||
s.TargetAssetID = val
|
||||
|
Loading…
Reference in New Issue
Block a user