From 88dfc92bc6e2e0ec5c239eff25f63fa30a3aabb2 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 17 Dec 2024 21:33:09 -0800 Subject: [PATCH] openapi: flatten list query parameters --- openapi-internal.yaml | 15 ------ openapi.yaml | 120 +++++++++++++++++++----------------------- 2 files changed, 54 insertions(+), 81 deletions(-) diff --git a/openapi-internal.yaml b/openapi-internal.yaml index 6f8221c..adcef5b 100644 --- a/openapi-internal.yaml +++ b/openapi-internal.yaml @@ -312,21 +312,6 @@ components: Policy: type: integer format: int32 - Pagination: - type: object - required: - - Number - - Size - properties: - Number: - type: integer - format: int32 - minimum: 1 - Size: - type: integer - format: int32 - minimum: 1 - maximum: 100 Error: description: Represents error object type: object diff --git a/openapi.yaml b/openapi.yaml index 53a43ca..815b46d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -21,19 +21,24 @@ paths: operationId: listSubmissions tags: - Submissions - requestBody: - required: true - content: - application/json: - schema: - required: - - Page - type: object - properties: - Page: - $ref: "#/components/schemas/Pagination" - Filter: - $ref: "#/components/schemas/SubmissionFilter" + parameters: + - $ref: "#/components/parameters/Page" + - $ref: "#/components/parameters/Limit" + - name: DisplayName + in: query + schema: + type: string + maxLength: 128 + - name: Creator + in: query + schema: + type: string + maxLength: 128 + - name: GameID + in: query + schema: + type: integer + format: int32 responses: "200": description: Successful response @@ -248,19 +253,25 @@ paths: operationId: listScriptPolicy tags: - ScriptPolicy - requestBody: - required: true - content: - application/json: - schema: - required: - - Page - type: object - properties: - Page: - $ref: "#/components/schemas/Pagination" - Filter: - $ref: "#/components/schemas/ScriptPolicyFilter" + parameters: + - $ref: "#/components/parameters/Page" + - $ref: "#/components/parameters/Limit" + - name: FromScriptHash + in: query + schema: + type: string + minLength: 16 + maxLength: 16 + - name: ToScriptID + in: query + schema: + type: integer + format: int64 + - name: Policy + in: query + schema: + type: integer + format: int32 responses: "200": description: Successful response @@ -501,6 +512,23 @@ components: schema: type: integer format: int64 + Page: + name: Page + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + Limit: + name: Limit + in: query + required: true + schema: + type: integer + format: int32 + minimum: 1 + maximum: 100 schemas: Id: required: @@ -565,18 +593,6 @@ components: StatusID: type: integer format: int32 - SubmissionFilter: - type: object - properties: - DisplayName: - type: string - maxLength: 128 - Creator: - type: string - maxLength: 128 - GameID: - type: integer - format: int32 SubmissionCreate: required: - DisplayName @@ -684,19 +700,6 @@ components: Policy: type: integer format: int32 - ScriptPolicyFilter: - type: object - properties: - FromScriptHash: - type: string - minLength: 16 - maxLength: 16 - ToScriptID: - type: integer - format: int64 - Policy: - type: integer - format: int32 ScriptPolicyCreate: required: - FromScriptID @@ -730,21 +733,6 @@ components: Policy: type: integer format: int32 - Pagination: - type: object - required: - - Number - - Size - properties: - Number: - type: integer - format: int32 - minimum: 1 - Size: - type: integer - format: int32 - minimum: 1 - maximum: 100 Error: description: Represents error object type: object