-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
420 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run lint:fix | ||
# npm run test | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
import responses from "../responses"; | ||
|
||
const ratingCategories = { | ||
"/ratingCategories": { | ||
get: { | ||
tags: ["RatingCategories"], | ||
summary: "Get all rating categories", | ||
description: | ||
"Get all categories. Only admin users can get a list of all categories.", | ||
security: [{ JWT: [] }], | ||
parameters: [], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
post: { | ||
tags: ["RatingCategories"], | ||
summary: "Create a new rating category", | ||
description: | ||
"Create a new project. Only admin users can create categories.", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "body", | ||
name: "body", | ||
required: true, | ||
schema: { | ||
example: { | ||
name: "Rating category name", | ||
}, | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
}, | ||
|
||
"/ratingCategories/{id}": { | ||
get: { | ||
tags: ["RatingCategories"], | ||
summary: "Get a rating category", | ||
description: "Get one rating category with its rating fields.", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "path", | ||
name: "id", | ||
required: true, | ||
schema: { | ||
example: "5e5bb69e-26fe-4e61-b4f3-e9a9332066da", | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
patch: { | ||
tags: ["RatingCategories"], | ||
summary: "Change category name", | ||
description: "Change rating category name", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "path", | ||
name: "id", | ||
required: true, | ||
schema: { | ||
example: "566febd2-d3f3-4ae3-ac76-a5ef5426366d", | ||
}, | ||
}, | ||
{ | ||
in: "body", | ||
name: "body", | ||
required: true, | ||
schema: { | ||
example: { | ||
name: "New Name", | ||
}, | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
delete: { | ||
tags: ["RatingCategories"], | ||
summary: "Delete a rating category", | ||
description: "Delete a rating category. it will delete its rating fields", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "path", | ||
name: "id", | ||
required: true, | ||
schema: { | ||
example: "8a2a4287-fd47-45f9-a1a0-42e24aeeeddz", | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
}, | ||
}; | ||
|
||
export default ratingCategories; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import responses from "../responses"; | ||
|
||
const ratingFields = { | ||
"/ratingFields": { | ||
get: { | ||
tags: ["RatingFields"], | ||
summary: "Get all rating fields", | ||
description: | ||
"Get all projects. Only admin users can get a list of all projects.", | ||
security: [{ JWT: [] }], | ||
parameters: [], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
post: { | ||
tags: ["RatingFields"], | ||
summary: "Create a new rating field", | ||
description: | ||
"Create a new project. Only admin users can create projects.", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "body", | ||
name: "body", | ||
required: true, | ||
schema: { | ||
example: { | ||
categoryId: "41dcfb3c-9c7f-4829-9752-f0e1694fd6ea", | ||
name: "Rating field name", | ||
}, | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
}, | ||
|
||
"/ratingFields/{id}": { | ||
get: { | ||
tags: ["RatingFields"], | ||
summary: "Get a rating field", | ||
description: "Get one rating field with its rating fields.", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "path", | ||
name: "id", | ||
required: true, | ||
schema: { | ||
example: "5e5bb69e-26fe-4e61-b4f3-e9a9332066da", | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
delete: { | ||
tags: ["RatingFields"], | ||
summary: "Delete a rating field", | ||
description: "Delete a rating field. it will delete its rating fields", | ||
security: [{ JWT: [] }], | ||
parameters: [ | ||
{ | ||
in: "path", | ||
name: "id", | ||
required: true, | ||
schema: { | ||
example: "8a2a4287-fd47-45f9-a1a0-42e24aeeeddz", | ||
}, | ||
}, | ||
], | ||
consumes: ["application/json"], | ||
responses, | ||
}, | ||
}, | ||
}; | ||
|
||
export default ratingFields; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.