openapi: flatten list query parameters

This commit is contained in:
Quaternions 2024-12-17 21:33:09 -08:00
parent e905d96917
commit 88dfc92bc6
2 changed files with 54 additions and 81 deletions

View File

@ -312,21 +312,6 @@ components:
Policy: Policy:
type: integer type: integer
format: int32 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: Error:
description: Represents error object description: Represents error object
type: object type: object

View File

@ -21,19 +21,24 @@ paths:
operationId: listSubmissions operationId: listSubmissions
tags: tags:
- Submissions - Submissions
requestBody: parameters:
required: true - $ref: "#/components/parameters/Page"
content: - $ref: "#/components/parameters/Limit"
application/json: - name: DisplayName
in: query
schema: schema:
required: type: string
- Page maxLength: 128
type: object - name: Creator
properties: in: query
Page: schema:
$ref: "#/components/schemas/Pagination" type: string
Filter: maxLength: 128
$ref: "#/components/schemas/SubmissionFilter" - name: GameID
in: query
schema:
type: integer
format: int32
responses: responses:
"200": "200":
description: Successful response description: Successful response
@ -248,19 +253,25 @@ paths:
operationId: listScriptPolicy operationId: listScriptPolicy
tags: tags:
- ScriptPolicy - ScriptPolicy
requestBody: parameters:
required: true - $ref: "#/components/parameters/Page"
content: - $ref: "#/components/parameters/Limit"
application/json: - name: FromScriptHash
in: query
schema: schema:
required: type: string
- Page minLength: 16
type: object maxLength: 16
properties: - name: ToScriptID
Page: in: query
$ref: "#/components/schemas/Pagination" schema:
Filter: type: integer
$ref: "#/components/schemas/ScriptPolicyFilter" format: int64
- name: Policy
in: query
schema:
type: integer
format: int32
responses: responses:
"200": "200":
description: Successful response description: Successful response
@ -501,6 +512,23 @@ components:
schema: schema:
type: integer type: integer
format: int64 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: schemas:
Id: Id:
required: required:
@ -565,18 +593,6 @@ components:
StatusID: StatusID:
type: integer type: integer
format: int32 format: int32
SubmissionFilter:
type: object
properties:
DisplayName:
type: string
maxLength: 128
Creator:
type: string
maxLength: 128
GameID:
type: integer
format: int32
SubmissionCreate: SubmissionCreate:
required: required:
- DisplayName - DisplayName
@ -684,19 +700,6 @@ components:
Policy: Policy:
type: integer type: integer
format: int32 format: int32
ScriptPolicyFilter:
type: object
properties:
FromScriptHash:
type: string
minLength: 16
maxLength: 16
ToScriptID:
type: integer
format: int64
Policy:
type: integer
format: int32
ScriptPolicyCreate: ScriptPolicyCreate:
required: required:
- FromScriptID - FromScriptID
@ -730,21 +733,6 @@ components:
Policy: Policy:
type: integer type: integer
format: int32 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: Error:
description: Represents error object description: Represents error object
type: object type: object