Skip to content

Commit

Permalink
changed attachments files for swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemHolikov committed Dec 18, 2024
1 parent 6002152 commit 6f046cd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 12 deletions.
17 changes: 14 additions & 3 deletions docs/attachments/attachment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ paths:
schema:
$ref: '#/definitions/attachments'
example:
count: 1
count: 2
items:
- _id: 63ec1cd51e9d781cdb6f4b14
author: 648afee884936e09a37deaaa
Expand All @@ -54,6 +54,17 @@ paths:
category: { _id: 6477007a6fa4d05e1a800ce1, name: Science }
createdAt: 2023-02-14T23:44:21.334Z
updatedAt: 2023-02-14T23:44:21.334Z
resourceType: attachment
- _id: 64c9b03d7ea4d07f1b802ff3
author: 648afee884936e09a37deaaa
fileName: Guitar
link: 'https://guitar-play-test.com'
description: 'It is file to check your playing success on guitar'
size: 187
category: { _id: 64b8a20c6fa4d05e1a901de2, name: Music }
createdAt: 2023-01-14T23:44:21.334Z
updatedAt: 2023-01-14T23:44:21.334Z
resourceType: attachment
401:
description: Unauthorized
content:
Expand Down Expand Up @@ -106,11 +117,11 @@ paths:
author: 6255bc080a75adf9223df100
fileName: attachment1.pdf
link: '154867-attachment1.pdf'
category: [{ _id: 6502ec2060ec37be943353e2, name: 'New Category 1' }]
description: This is an example attachment description.
category: null
size: 1024
createdAt: '2023-08-13T12:34:56.789Z'
updatedAt: '2023-08-13T12:34:56.789Z'
resourceType: 'attachment'
400:
description: Bad Request
content:
Expand Down
30 changes: 21 additions & 9 deletions docs/attachments/attachments-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ definitions:
items:
type: object
properties:
author:
type: string
_id:
type: string
fileName:
Expand All @@ -15,28 +17,32 @@ definitions:
size:
type: number
category:
type: string
ref: '#/definitions/resourcesCategory'
type: object
properties:
_id:
type: string
name:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
resourceType:
type: string
attachmentBody:
type: object
properties:
fileName:
id:
type: string
link:
fileName:
type: string
description:
type: string
size:
type: number
category:
type: string
ref: '#/definitions/resourcesCategory'
ref: '#/definitions/resourcesCategoryAttachment'
attachment:
type: object
properties:
Expand All @@ -51,11 +57,17 @@ definitions:
size:
type: number
category:
type: string
ref: '#/definitions/resourcesCategory'
type: object
properties:
_id:
type: string
name:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
resourceType:
type: string
7 changes: 7 additions & 0 deletions docs/resourcesCategory/resourcesCategory.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ definitions:
updatedAt:
type: string
format: date-time
resourcesCategoryAttachment:
type: object
properties:
id_:
type: string
name:
type: string

0 comments on commit 6f046cd

Please sign in to comment.