Skip to content

Commit

Permalink
docs: add purge and purge bulk openapi documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
devppjr authored and wpjunior committed Oct 31, 2022
1 parent a8fe046 commit e00ab64
Showing 1 changed file with 113 additions and 0 deletions.
113 changes: 113 additions & 0 deletions docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,93 @@ paths:
text/plain:
example: failed to get flavors from storage

/resources/{instance}/purge:
parameters:
- name: instance
in: path
description: Instance name
required: true
schema:
type: string
post:
summary: Purge cache key of rpaasv2.
description: |-
This endpoint is exclusive for RPaaS v2 API.
operationId: PurgeCache
tags:
- rpaas
parameters:
- in: path
name: instance
schema:
type: string
required: true
description: Instance name
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Purge'
responses:
'200':
description: OK
content:
application/json:
schema:
type: string
example: "Object purged on 2 servers"
'400':
description: Body or instance name empty.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

/resources/{instance}/purge/bulk:
parameters:
- name: instance
in: path
description: Instance name
required: true
schema:
type: string
post:
summary: Purge objects from rpaasv2.
description: |-
This endpoint is exclusive for RPaaS v2 API.
operationId: PurgeBulkCache
tags:
- rpaas
parameters:
- in: path
name: instance
schema:
type: string
required: true
description: Instance name
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Purge'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/PurgeBulkResponse'
'400':
description: Body or instance name empty.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'

components:
securitySchemes:
basicAuth:
Expand Down Expand Up @@ -738,6 +825,32 @@ components:
type: string
example: 0.0.0.0

Purge:
type: object
properties:
path:
type: string
example: http/v1/product/catalog.json
preserve_path:
type: boolean
example: true
extra_headers:
type: string
example: '{"accept": "image/jpeg,image/webp"}'

PurgeBulkResponse:
type: object
properties:
path:
type: string
example: http/v1/product/catalog.json
instances_purged:
type: integer
example: 2
error:
type: string
example: "Error trying purge cache."

Route:
type: object
properties:
Expand Down

0 comments on commit e00ab64

Please sign in to comment.