Skip to content

Commit

Permalink
feat(api): add api spec for processors resource
Browse files Browse the repository at this point in the history
closes #185

fix #185
  • Loading branch information
enudler authored and NivLipetz committed Oct 12, 2019
1 parent 25f9819 commit f882ed3
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions docs/openapi3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tags:
Tests include end-to-end scenarios that are executed at pre-configured intervals to provide in-depth performance metrics of your API.
- name: Processors
description: |
Processor files allow Predator to execute custom javascript code during test flows.
Processor file allows Preadtor execute custom javascript code.
- name: Jobs
description: |
Predator executes tests through so-called **jobs**. Depending on your configuration, the job will either execute immediately or at scheduled intervals.
Expand Down Expand Up @@ -877,9 +877,10 @@ paths:
name: limit
description: The number of most recent reports to retrieve.
required: true
minimum: 1
maximum: 250
type: integer
schema:
minimum: 1
maximum: 250
type: integer
responses:
'200':
description: Success
Expand Down Expand Up @@ -1059,20 +1060,18 @@ paths:
parameters:
- in: query
name: from
description: From which result to start retrieve data
description: From which result to start retrieve data ( default is zero )
required: false
schema:
type: integer
minimum: 0
default: 0
- in: query
name: limit
description: Max results to return from this query ( Limit to 100 )
required: false
schema:
type: integer
maximum: 100
default: 100
responses:
'200':
description: Success
Expand Down Expand Up @@ -1295,6 +1294,7 @@ components:
format: uri
example: http://www.example.com/file.txt
description: Url to text file location , will be used by the processor

description:
type: string
description: A description of the test.
Expand Down Expand Up @@ -1672,10 +1672,6 @@ components:
type: string
description: set to * in order to print all requests and responeses of the runner
example: test
force_download:
type: boolean
description: If job has a processor file of type file_download, then user has the ability to force download it or not upon each job start.
default: false
job_response:
allOf:
- $ref: '#/components/schemas/job'
Expand All @@ -1696,8 +1692,8 @@ components:
discriminator:
propertyName: type
oneOf:
- $ref: '#/components/schemas/file_download'
- $ref: '#/components/schemas/raw_javascript'
- $ref: '#/components/schemas/download'
- $ref: '#/components/schemas/raw'
required:
- name
- description
Expand All @@ -1719,17 +1715,17 @@ components:
readOnly: true
updated_at:
type: string
format: date-time
format: date_time
description: The date and time that the procesor file was updated.
readOnly: true
created_at:
type: string
format: date-time
format: date_time
description: The date and time that the procesor file was created.
readOnly: true
javascript:
type: string
description: Raw javascript that will be used by the processor resource.
description: Javascript raw that will be used by the processor resource.
readOnly: true
post_report:
required:
Expand Down Expand Up @@ -1873,9 +1869,7 @@ components:
runner_memory:
type: number
minimum: 128
allow_insecure_tls:
type: boolean
description: If true, don't fail requests on unverified server certificate errors.
description: Max memory to use by each runner.
metrics_plugin_name:
type: string
enum:
Expand Down Expand Up @@ -1963,15 +1957,18 @@ components:
timeout:
description: timout to smtp server in milliseconds
type: number
file_download:
download:
description: Download processor file from the file_url and store it.
required:
- file_url
properties:
file_url:
type: string
description: url that the file can be downloaded from, should be direct download link.
raw_javascript:
force_download:
type: boolean
description: wether to try download the file_url on every invoke by a test.
raw:
description: Javascript file that will be used by the processor resource.
required:
- javascript
Expand All @@ -1983,5 +1980,9 @@ components:
type: string
description: |
The type of the processor resource. Can be one of the following:
* `raw_javascript`: Raw javascript string that will be stored and persisted as it is.
* `file_download`: Predator will download the custom javascript by file_url and persist it.
* `raw`: Raw javascript string that will be stored and persisted as it is.
* `download`: Predator will download the custom javascript by file_url and persist it.
enum:
- dsl
- basic
example: dsl

0 comments on commit f882ed3

Please sign in to comment.