openapi: normalize get policy from hash as list request
This commit is contained in:
parent
518327820d
commit
6a8805b91a
@ -110,6 +110,45 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/script-policy:
|
||||
get:
|
||||
summary: Get list of script policies
|
||||
operationId: listScriptPolicy
|
||||
tags:
|
||||
- ScriptPolicy
|
||||
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
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/ScriptPolicy"
|
||||
default:
|
||||
description: General Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
summary: Create a new script policy
|
||||
operationId: createScriptPolicy
|
||||
@ -134,34 +173,51 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/script-policy/hash/{FromScriptHash}:
|
||||
/scripts:
|
||||
get:
|
||||
summary: Get the policy for the given hash of script source code
|
||||
operationId: getScriptPolicyFromHash
|
||||
summary: Get list of scripts
|
||||
operationId: listScripts
|
||||
tags:
|
||||
- ScriptPolicy
|
||||
- Script
|
||||
parameters:
|
||||
- name: FromScriptHash
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
minLength: 16
|
||||
maxLength: 16
|
||||
- $ref: "#/components/parameters/Page"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- name: Hash
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
minLength: 16
|
||||
maxLength: 16
|
||||
- name: Name
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
maxLength: 128
|
||||
- name: Source
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
maxLength: 1048576
|
||||
- name: SubmissionID
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
"200":
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ScriptPolicy"
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Script"
|
||||
default:
|
||||
description: General Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/scripts:
|
||||
post:
|
||||
summary: Create a new script
|
||||
operationId: createScript
|
||||
@ -225,6 +281,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:
|
||||
|
73
openapi.yaml
73
openapi.yaml
@ -311,34 +311,7 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/script-policy/hash/{FromScriptHash}:
|
||||
get:
|
||||
summary: Get the policy for the given hash of script source code
|
||||
operationId: getScriptPolicyFromHash
|
||||
tags:
|
||||
- ScriptPolicy
|
||||
parameters:
|
||||
- name: FromScriptHash
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
minLength: 16
|
||||
maxLength: 16
|
||||
responses:
|
||||
"200":
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ScriptPolicy"
|
||||
default:
|
||||
description: General Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/script-policy/id/{ScriptPolicyID}:
|
||||
/script-policy/{ScriptPolicyID}:
|
||||
get:
|
||||
summary: Get the specified script policy by ID
|
||||
operationId: getScriptPolicy
|
||||
@ -398,6 +371,50 @@ paths:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
/scripts:
|
||||
get:
|
||||
summary: Get list of scripts
|
||||
operationId: listScripts
|
||||
tags:
|
||||
- Script
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/Page"
|
||||
- $ref: "#/components/parameters/Limit"
|
||||
- name: Hash
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
minLength: 16
|
||||
maxLength: 16
|
||||
- name: Name
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
maxLength: 128
|
||||
- name: Source
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
maxLength: 1048576
|
||||
- name: SubmissionID
|
||||
in: query
|
||||
schema:
|
||||
type: integer
|
||||
format: int64
|
||||
responses:
|
||||
"200":
|
||||
description: Successful response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Script"
|
||||
default:
|
||||
description: General Error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
post:
|
||||
summary: Create a new script
|
||||
operationId: createScript
|
||||
|
Loading…
Reference in New Issue
Block a user