openapi: 3.0.3
info:
title: OAS Validation API
description: test api spec
version: '1.0'
servers:
description: DEV servers
components:
securitySchemes:
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
AuditInfo:
type: object
properties:
createdDate:
$ref: '#/components/schemas/DateTime'
lastUpdatedDate:
$ref: '#/components/schemas/DateTime'
DateTime:
description: UTC Date timestamp
type: string
format: date-time
example: '2017-07-21T17:32:28Z'
Error:
type: object
required:
- message
- code
properties:
message:
type: string
maxLength: 250
example: Error Processing your request
code:
type: string
example: folder.name
transactionId:
description: client identifier with which the transaction is associated with
$ref: '#/components/schemas/UUID'
example: 9845dk-39fdk3fj3-4483483478
correlationId:
description: client Identifier with which the request is associated with for troubleshooting purpose
$ref: '#/components/schemas/UUID'
example: 6545dk-39fdk3fj3-4483483478
Folder:
description: Folder Object
allOf:
- $ref: '#/components/schemas/FolderInfo'
- type: object
required:
- id
properties:
id:
description: Unique Identifier of the folder
$ref: '#/components/schemas/UUID'
tags:
type: array
items:
$ref: '#/components/schemas/TagWithId'
example:
- id: ae787cc8-beaf-46da-a88a-6ef38ab5239e
value: apigee
- id: bbb787cc8-beaf-46da-a88a-6ef38ab5239e
value: Marketing2023
path:
description: Relative path in which the document exists.
$ref: '#/components/schemas/path'
auditInfo:
type: object
$ref: '#/components/schemas/AuditInfo'
example:
createdDate: '2023-05-17T22:38:59.101507Z'
lastUpdatedDate: '2023-05-17T22:38:59.101507Z'
FolderInfo:
description: Object representing folder metadata
type: object
required:
- name
properties:
name:
description: Name of the folder
type: string
example: Logo
parentFolderId:
description: Unique identifier of the parent folder
$ref: '#/components/schemas/UUID'
FolderMetadata:
description: Object representing folder metadata
allOf:
- $ref: '#/components/schemas/FolderInfo'
- type: object
required:
- name
properties:
tags:
type: array
items:
$ref: '#/components/schemas/Tag'
example:
- Logos
- Marketing
Tag:
type: string
example: marketing
TagWithId:
description: Tags associated with the folder
type: object
required:
- id
- value
properties:
id:
$ref: '#/components/schemas/UUID'
value:
$ref: '#/components/schemas/Tag'
example:
id: ae787cc8-beaf-46da-a88a-6ef38ab5239e
value: marketing
UUID:
type: string
format: uuid
example: ae787cc8-beaf-46da-a88a-6ef38ab5239e
path:
type: string
example: /images/test.png
security:
- BearerAuth: []
paths:
/folders:
get:
description: Returns folders matching the search criteria
parameters:
- in: query
name: depth
description: Depth of nested folders that needs to be fetched. Default value is 1 and returns folders at depth 1
required: false
schema:
type: integer
example: 1
- in: query
name: folderId
description: The parent folder whose child folders needs to be returned.
required: false
schema:
$ref: '#/components/schemas/UUID'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Folder'
'400':
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
description: Endpoint to update metadata of a folder
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/FolderMetadata'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Folder'
'400':
description: bad request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: unauthorized request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'500':
description: Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'