diff --git a/docs/category/category-schema.yaml b/docs/category/category-schema.yaml index 89fa7980..d77bc117 100644 --- a/docs/category/category-schema.yaml +++ b/docs/category/category-schema.yaml @@ -78,3 +78,12 @@ definitions: updatedAt: type: string format: date-time + categoriesSubjectsNames: + type: array + items: + type: object + properties: + _id: + type: string + name: + type: string diff --git a/docs/category/category.yaml b/docs/category/category.yaml index fcfe174f..400b1837 100644 --- a/docs/category/category.yaml +++ b/docs/category/category.yaml @@ -179,6 +179,42 @@ paths: status: 401 code: UNAUTHORIZED message: The requested URL requires user authorization. + /categories/subjects/names: + get: + security: + - cookieAuth: [] + tags: + - Categories + summary: Finds and returns all subjects's names + description: Finds and returns names of all subjects in all categories. + produces: + - application/json + responses: + 200: + description: OK + content: + application/json: + schema: + $ref: '#/definitions/categoriesSubjectsNames' + example: + - _id: 6422dbb9823be47b41eeb8d6 + name: Bass + - _id: 6422d995d898aa732d038e8f + name: Guitar + - _id: 6675859059019cd05eb119ff + name: Spanish + - _id: 6675878f59019cd05eb11a1e + name: Product Design + 401: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/Error' + example: + status: 401 + code: UNAUTHORIZED + message: The requested URL requires user authorization. /categories/{id}: get: security: