From ada8c322dacbae1073460f80d96ebaaf0b4adab9 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 7 Jun 2025 17:07:47 -0700 Subject: [PATCH 1/2] openapi: add descriptions to enum fields --- openapi.yaml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/openapi.yaml b/openapi.yaml index 8b656e4..fa1736e 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -114,6 +114,13 @@ paths: format: int32 minimum: 0 maximum: 4 + description: > + Sort order: + * `0` - Disabled + * `1` - DisplayNameAscending + * `2` - DisplayNameDescending + * `3` - DateAscending + * `4` - DateDescending responses: "200": description: Successful response @@ -178,6 +185,11 @@ paths: format: int32 minimum: 1 maximum: 5 + description: > + Game ID: + * `1` - Bhop + * `2` - Surf + * `5` - FlyTrials - name: Sort in: query schema: @@ -185,6 +197,13 @@ paths: format: int32 minimum: 0 maximum: 4 + description: > + Sort order: + * `0` - Disabled + * `1` - DisplayNameAscending + * `2` - DisplayNameDescending + * `3` - DateAscending + * `4` - DateDescending - name: Submitter in: query schema: @@ -210,6 +229,24 @@ paths: format: int32 minimum: 0 maximum: 9 + description: > + // Phase: Creation + * `0` - UnderConstruction + * `1` - ChangesRequested + + // Phase: Review + * `2` - Submitting + * `3` - Submitted + + // Phase: Testing + * `4` - AcceptedUnvalidated // pending script review, can re-trigger validation + * `5` - Validating + * `6` - Validated + * `7` - Uploading + + // Phase: Final MapfixStatus + * `8` - Uploaded // uploaded to the group, but pending release + * `9` - Rejected responses: "200": description: Successful response @@ -602,6 +639,11 @@ paths: format: int32 minimum: 1 maximum: 5 + description: > + Game ID: + * `1` - Bhop + * `2` - Surf + * `5` - FlyTrials - name: Sort in: query schema: @@ -609,6 +651,13 @@ paths: format: int32 minimum: 0 maximum: 4 + description: > + Sort order: + * `0` - Disabled + * `1` - DisplayNameAscending + * `2` - DisplayNameDescending + * `3` - DateAscending + * `4` - DateDescending - name: Submitter in: query schema: @@ -634,6 +683,25 @@ paths: format: int32 minimum: 0 maximum: 10 + description: > + // Phase: Creation + * `0` - UnderConstruction + * `1` - ChangesRequested + + // Phase: Review + * `2` - Submitting + * `3` - Submitted + + // Phase: Testing + * `4` - AcceptedUnvalidated // pending script review, can re-trigger validation + * `5` - Validating + * `6` - Validated + * `7` - Uploading + * `8` - Uploaded // uploaded to the group, but pending release + + // Phase: Final SubmissionStatus + * `9` - Rejected + * `10` - Released responses: "200": description: Successful response -- 2.49.1 From 0e1d2fe50a9d11955496069d75f3cd14e682041a Mon Sep 17 00:00:00 2001 From: Quaternions Date: Sat, 7 Jun 2025 17:09:51 -0700 Subject: [PATCH 2/2] openapi: generate --- pkg/api/oas_parameters_gen.go | 46 +++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/pkg/api/oas_parameters_gen.go b/pkg/api/oas_parameters_gen.go index bcfd93d..262f791 100644 --- a/pkg/api/oas_parameters_gen.go +++ b/pkg/api/oas_parameters_gen.go @@ -2879,16 +2879,25 @@ func decodeListMapfixAuditEventsParams(args [1]string, argsEscaped bool, r *http // ListMapfixesParams is parameters of listMapfixes operation. type ListMapfixesParams struct { - Page int32 - Limit int32 - DisplayName OptString - Creator OptString - GameID OptInt32 + Page int32 + Limit int32 + DisplayName OptString + Creator OptString + // Game ID: * `1` - Bhop * `2` - Surf * `5` - FlyTrials. + GameID OptInt32 + // Sort order: * `0` - Disabled * `1` - DisplayNameAscending * `2` - DisplayNameDescending * `3` - + // DateAscending * `4` - DateDescending. Sort OptInt32 Submitter OptInt64 AssetID OptInt64 TargetAssetID OptInt64 - StatusID OptInt32 + // // Phase: Creation * `0` - UnderConstruction * `1` - ChangesRequested + // // Phase: Review * `2` - Submitting * `3` - Submitted + // // Phase: Testing * `4` - AcceptedUnvalidated // pending script review, can re-trigger validation + // * `5` - Validating * `6` - Validated * `7` - Uploading + // // Phase: Final MapfixStatus * `8` - Uploaded // uploaded to the group, but pending release * `9` + // - Rejected. + StatusID OptInt32 } func unpackListMapfixesParams(packed middleware.Parameters) (params ListMapfixesParams) { @@ -3617,7 +3626,9 @@ type ListMapsParams struct { DisplayName OptString Creator OptString GameID OptInt32 - Sort OptInt32 + // Sort order: * `0` - Disabled * `1` - DisplayNameAscending * `2` - DisplayNameDescending * `3` - + // DateAscending * `4` - DateDescending. + Sort OptInt32 } func unpackListMapsParams(packed middleware.Parameters) (params ListMapsParams) { @@ -5117,16 +5128,25 @@ func decodeListSubmissionAuditEventsParams(args [1]string, argsEscaped bool, r * // ListSubmissionsParams is parameters of listSubmissions operation. type ListSubmissionsParams struct { - Page int32 - Limit int32 - DisplayName OptString - Creator OptString - GameID OptInt32 + Page int32 + Limit int32 + DisplayName OptString + Creator OptString + // Game ID: * `1` - Bhop * `2` - Surf * `5` - FlyTrials. + GameID OptInt32 + // Sort order: * `0` - Disabled * `1` - DisplayNameAscending * `2` - DisplayNameDescending * `3` - + // DateAscending * `4` - DateDescending. Sort OptInt32 Submitter OptInt64 AssetID OptInt64 UploadedAssetID OptInt64 - StatusID OptInt32 + // // Phase: Creation * `0` - UnderConstruction * `1` - ChangesRequested + // // Phase: Review * `2` - Submitting * `3` - Submitted + // // Phase: Testing * `4` - AcceptedUnvalidated // pending script review, can re-trigger validation + // * `5` - Validating * `6` - Validated * `7` - Uploading * `8` - Uploaded // uploaded to the group, + // but pending release + // // Phase: Final SubmissionStatus * `9` - Rejected * `10` - Released. + StatusID OptInt32 } func unpackListSubmissionsParams(packed middleware.Parameters) (params ListSubmissionsParams) { -- 2.49.1