openapi: script stuff

This commit is contained in:
Quaternions 2024-12-04 17:27:32 -08:00
parent 4ed70dbcad
commit e7375cde11

View File

@ -326,18 +326,18 @@ paths:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/Error" $ref: "#/components/schemas/Error"
/scripts/replacements: /script-policy/hash/{Hash}:
# /script-policy/id/{ScriptPolicyID}:
get: get:
summary: Get the replacements for the provided list of scripts summary: Get the policy for the given hash of script source code
operationId: getReplacementScripts operationId: getScriptPolicyFromHash
tags: tags:
- Scripts - Scripts
requestBody: parameters:
content: - name: Hash
application/json: in: path
required: true
schema: schema:
type: array
items:
type: string type: string
responses: responses:
"200": "200":
@ -345,11 +345,33 @@ paths:
content: content:
application/json: application/json:
schema: schema:
type: array $ref: "#/components/schemas/ScriptPolicy"
items: default:
oneOf: description: General Error
- type: boolean content:
- type: string application/json:
schema:
$ref: "#/components/schemas/Error"
/scripts/{ScriptID}:
get:
summary: Get the specified script by ID
operationId: getScript
tags:
- Scripts
parameters:
- name: ScriptID
in: path
required: true
schema:
type: integer
format: int64
responses:
"200":
description: Successful response
content:
application/json:
schema:
$ref: "#/components/schemas/Script"
default: default:
description: General Error description: General Error
content: content:
@ -457,6 +479,33 @@ components:
TargetAssetID: TargetAssetID:
type: integer type: integer
format: int64 format: int64
Script:
type: object
properties:
ID:
type: integer
format: int64
Hash:
type: string
Source:
type: string
SubmissionID:
type: integer
format: int64
ScriptPolicy:
type: object
properties:
ID:
type: integer
format: int64
Hash:
type: string
ScriptID:
type: integer
format: int64
Policy:
type: integer
format: int32
Pagination: Pagination:
type: object type: object
required: required: