openapi: mapfixes
This commit is contained in:
parent
e36b49a31e
commit
2e65d071e0
@ -4,9 +4,98 @@ info:
|
|||||||
description: Internal operations inaccessible from the public internet.
|
description: Internal operations inaccessible from the public internet.
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
tags:
|
tags:
|
||||||
|
- name: Mapfixes
|
||||||
|
description: Mapfix operations
|
||||||
- name: Submissions
|
- name: Submissions
|
||||||
description: Submission operations
|
description: Submission operations
|
||||||
paths:
|
paths:
|
||||||
|
/mapfixes/{MapfixID}/validated-model:
|
||||||
|
post:
|
||||||
|
summary: Update validated model
|
||||||
|
operationId: updateMapfixValidatedModel
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
- name: ValidatedModelID
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
- name: ValidatedModelVersion
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/validator-validated:
|
||||||
|
post:
|
||||||
|
summary: (Internal endpoint) Role Validator changes status from Validating -> Validated
|
||||||
|
operationId: actionMapfixValidated
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/validator-failed:
|
||||||
|
post:
|
||||||
|
summary: (Internal endpoint) Role Validator changes status from Validating -> Accepted
|
||||||
|
operationId: actionMapfixAccepted
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
- name: StatusMessage
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
minLength: 0
|
||||||
|
maxLength: 4096
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/validator-uploaded:
|
||||||
|
post:
|
||||||
|
summary: (Internal endpoint) Role Validator changes status from Uploading -> Uploaded
|
||||||
|
operationId: actionMapfixUploaded
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
/submissions/{SubmissionID}/validated-model:
|
/submissions/{SubmissionID}/validated-model:
|
||||||
post:
|
post:
|
||||||
summary: Update validated model
|
summary: Update validated model
|
||||||
@ -261,6 +350,14 @@ paths:
|
|||||||
$ref: "#/components/schemas/Error"
|
$ref: "#/components/schemas/Error"
|
||||||
components:
|
components:
|
||||||
parameters:
|
parameters:
|
||||||
|
MapfixID:
|
||||||
|
name: MapfixID
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The unique identifier for a submission.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
SubmissionID:
|
SubmissionID:
|
||||||
name: SubmissionID
|
name: SubmissionID
|
||||||
in: path
|
in: path
|
||||||
|
344
openapi.yaml
344
openapi.yaml
@ -6,6 +6,8 @@ info:
|
|||||||
servers:
|
servers:
|
||||||
- url: https://submissions.strafes.net/v1
|
- url: https://submissions.strafes.net/v1
|
||||||
tags:
|
tags:
|
||||||
|
- name: Mapfixes
|
||||||
|
description: Mapfix operations
|
||||||
- name: Session
|
- name: Session
|
||||||
description: Session operations
|
description: Session operations
|
||||||
- name: Submissions
|
- name: Submissions
|
||||||
@ -74,6 +76,281 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Error"
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes:
|
||||||
|
get:
|
||||||
|
summary: Get list of mapfixes
|
||||||
|
operationId: listMapfixes
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
security: []
|
||||||
|
parameters:
|
||||||
|
- $ref: "#/components/parameters/Page"
|
||||||
|
- $ref: "#/components/parameters/Limit"
|
||||||
|
- name: Sort
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
$ref: "#/components/schemas/Mapfix"
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
post:
|
||||||
|
summary: Create new mapfix
|
||||||
|
operationId: createMapfix
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/MapfixCreate'
|
||||||
|
responses:
|
||||||
|
"201":
|
||||||
|
description: Successful response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Id"
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}:
|
||||||
|
get:
|
||||||
|
summary: Retrieve map with ID
|
||||||
|
operationId: getMapfix
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
security: []
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Successful response
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Mapfix"
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/model:
|
||||||
|
post:
|
||||||
|
summary: Update model following role restrictions
|
||||||
|
operationId: updateMapfixModel
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
- name: ModelID
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
- name: VersionID
|
||||||
|
in: query
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/completed:
|
||||||
|
post:
|
||||||
|
summary: Called by maptest when a player completes the map
|
||||||
|
operationId: setMapfixCompleted
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/submit:
|
||||||
|
post:
|
||||||
|
summary: Role Submitter changes status from UnderConstruction|ChangesRequested -> Submitted
|
||||||
|
operationId: actionMapfixSubmit
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/revoke:
|
||||||
|
post:
|
||||||
|
summary: Role Submitter changes status from Submitted|ChangesRequested -> UnderConstruction
|
||||||
|
operationId: actionMapfixRevoke
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/trigger-validate:
|
||||||
|
post:
|
||||||
|
summary: Role Reviewer triggers validation and changes status from Submitted -> Validating
|
||||||
|
operationId: actionMapfixTriggerValidate
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/retry-validate:
|
||||||
|
post:
|
||||||
|
summary: Role Reviewer re-runs validation and changes status from Accepted -> Validating
|
||||||
|
operationId: actionMapfixRetryValidate
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/reset-validating:
|
||||||
|
post:
|
||||||
|
summary: Role Reviewer manually resets validating softlock and changes status from Validating -> Accepted
|
||||||
|
operationId: actionMapfixAccepted
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/reject:
|
||||||
|
post:
|
||||||
|
summary: Role Reviewer changes status from Submitted -> Rejected
|
||||||
|
operationId: actionMapfixReject
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/request-changes:
|
||||||
|
post:
|
||||||
|
summary: Role Reviewer changes status from Validated|Accepted|Submitted -> ChangesRequested
|
||||||
|
operationId: actionMapfixRequestChanges
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/trigger-upload:
|
||||||
|
post:
|
||||||
|
summary: Role Admin changes status from Validated -> Uploading
|
||||||
|
operationId: actionMapfixTriggerUpload
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
|
/mapfixes/{MapfixID}/status/reset-uploading:
|
||||||
|
post:
|
||||||
|
summary: Role Admin manually resets uploading softlock and changes status from Uploading -> Validated
|
||||||
|
operationId: actionMapfixValidated
|
||||||
|
tags:
|
||||||
|
- Mapfixes
|
||||||
|
parameters:
|
||||||
|
- $ref: '#/components/parameters/MapfixID'
|
||||||
|
responses:
|
||||||
|
"204":
|
||||||
|
description: Successful response
|
||||||
|
default:
|
||||||
|
description: General Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: "#/components/schemas/Error"
|
||||||
/submissions:
|
/submissions:
|
||||||
get:
|
get:
|
||||||
summary: Get list of submissions
|
summary: Get list of submissions
|
||||||
@ -656,6 +933,14 @@ components:
|
|||||||
in: cookie
|
in: cookie
|
||||||
name: session_id
|
name: session_id
|
||||||
parameters:
|
parameters:
|
||||||
|
MapfixID:
|
||||||
|
name: MapfixID
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The unique identifier for a mapfix.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
SubmissionID:
|
SubmissionID:
|
||||||
name: SubmissionID
|
name: SubmissionID
|
||||||
in: path
|
in: path
|
||||||
@ -730,6 +1015,65 @@ components:
|
|||||||
AvatarURL:
|
AvatarURL:
|
||||||
type: string
|
type: string
|
||||||
maxLength: 256
|
maxLength: 256
|
||||||
|
Mapfix:
|
||||||
|
required:
|
||||||
|
- ID
|
||||||
|
- CreatedAt
|
||||||
|
- UpdatedAt
|
||||||
|
- Submitter
|
||||||
|
- AssetID
|
||||||
|
- AssetVersion
|
||||||
|
- Completed
|
||||||
|
- TargetAssetID
|
||||||
|
- StatusID
|
||||||
|
- StatusMessage
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ID:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
CreatedAt:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
UpdatedAt:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
Submitter:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
AssetID:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
AssetVersion:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
Completed:
|
||||||
|
type: boolean
|
||||||
|
TargetAssetID:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
StatusID:
|
||||||
|
type: integer
|
||||||
|
format: int32
|
||||||
|
StatusMessage:
|
||||||
|
type: string
|
||||||
|
maxLength: 256
|
||||||
|
MapfixCreate:
|
||||||
|
required:
|
||||||
|
- AssetID
|
||||||
|
- AssetVersion
|
||||||
|
- TargetAssetID
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
AssetID:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
AssetVersion:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
|
TargetAssetID:
|
||||||
|
type: integer
|
||||||
|
format: int64
|
||||||
Submission:
|
Submission:
|
||||||
required:
|
required:
|
||||||
- ID
|
- ID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user