Skip to content

Commit

Permalink
add component to the data
Browse files Browse the repository at this point in the history
  • Loading branch information
yurisasuke committed Dec 19, 2024
1 parent 9d4abf0 commit daa483e
Showing 1 changed file with 101 additions and 13 deletions.
114 changes: 101 additions & 13 deletions swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ tags:
Tyk reconstructs the API request based on the data in the batch request. This is to ensure that Tyk is not being used to proxy requests to other hosts outside of the upstream API being accessed.
Batch requests are created by POSTing to the `/{listen_path}/tyk/batch/` endpoint. These requests **do not require a valid key**, but their request list does.
Batch requests are created by POSTING to the `/{listen_path}/tyk/batch/` endpoint. These requests **do not require a valid key**, but their request list does.
<h3>Sample Request</h3>
Expand Down Expand Up @@ -4415,25 +4415,78 @@ paths:
tags:
- Hot Reload
/{listen_path}/tyk/batch:
parameters:
- name: listen_path
in: path
required: true
description: "API listen path"
schema:
type: string
post:
summary: Run batch request
tags:
- Batch requests
description: Endpoint to run batch request.
operationId: batch
parameters:
- description: API listen path
example: get
in: path
name: listen_path
required: true
schema:
type: string
requestBody:
content:
application/json:
example:
requests:
- body: ""
headers:
authorization: 1dbc83b9c431649d7698faa9797e2900f
x-tyk-test: "1"
x-tyk-version: "1.2"
method: GET
relative_url: get
- body: ""
headers:
authorization: 1dbc83b9c431649d7698faa9797e2900f
x-tyk-test: "2"
x-tyk-version: "1.2"
method: GET
relative_url: get
suppress_parallel_execution: false
schema:
$ref: '#/components/schemas/BatchRequestStructure'
responses:
'200':
description: Success
"200":
content:
application/json:
example:
- body: '{"message": "success"}'
code: 200
headers:
Access-Control-Allow-Credentials:
- "true"
Content-Type:
- application/json
relative_url: get
schema:
items:
$ref: '#/components/schemas/BatchReplyUnit'
type: array
description: Success.
"400":
content:
application/json:
example:
message: Batch request malformed
status: error
schema:
$ref: '#/components/schemas/ApiStatusMessage'
description: Bad Request
"403":
content:
application/json:
example:
message: Attempted administrative access with invalid or missing key!
status: error
schema:
$ref: '#/components/schemas/ApiStatusMessage'
description: Forbidden
summary: Run batch request.
tags:
- Batch requests
/tyk/schema:
get:
description: Get OAS schema definition using a version.
Expand Down Expand Up @@ -5487,6 +5540,41 @@ components:
password:
type: string
type: object
BatchReplyUnit:
properties:
body:
type: string
code:
type: integer
headers:
$ref: '#/components/schemas/HttpHeader'
relative_url:
type: string
type: object
BatchRequestStructure:
properties:
requests:
items:
$ref: '#/components/schemas/RequestDefinition'
nullable: true
type: array
suppress_parallel_execution:
type: boolean
type: object
RequestDefinition:
properties:
body:
type: string
headers:
additionalProperties:
type: string
nullable: true
type: object
method:
type: string
relative_url:
type: string
type: object
BooleanQueryParam:
enum:
- true
Expand Down

0 comments on commit daa483e

Please sign in to comment.