diff --git a/server/routes/intent.js b/server/routes/intent.js index 903215cc..d1b28371 100644 --- a/server/routes/intent.js +++ b/server/routes/intent.js @@ -48,7 +48,7 @@ const { /** * This function comment is parsed by doctrine - * @route GET /{projectName}/intent + * @route GET project/{projectId}/intent * @group Intent - Operations about intents * @param {string} projectName.path.required - name of project - eg: testeRasa * @returns {Array.} 200 - An array of intents info @@ -56,7 +56,7 @@ const { */ /** - * @route POST /{projectName}/intent + * @route POST project/{projectId}/intent * @group Intent - Operations about intents * @param {string} projectName.path.required - name of project - eg: testeRasa * @param {Intent.model} intent.body.required @@ -65,7 +65,7 @@ const { */ /** - * @route PUT /intent/{intentId} + * @route PUT project/{projectId}/intent/{intentId} * @group Intent - Operations about intents * @param {string} intentId.path.required - id of intent - eg: 1c24gdq2135s * @param {Intent.model} intent.body.required @@ -74,7 +74,7 @@ const { */ /** - * @route DELETE /intent/{intentId} + * @route DELETE project/{projectId}/intent/{intentId} * @group Intent - Operations about intents * @param {string} intentId.path.required - id of intent - eg: 1c24gdq2135s * @returns {ReturnDelete.model} 200 - An object of numbers of documents deleted and if status is ok @@ -82,11 +82,11 @@ const { */ app - .route('/:projectName/intent') + .route('project/:projectId/intent') .post(createIntent) .get(getAllIntents) app - .route('/intent/:intentId') + .route('project/:projectId/intent/:intentId') .put(updateIntent) .delete(deleteIntent) @@ -223,7 +223,7 @@ module.exports = app // type: string // intentName: // type: string -// /{projectName}/intent: +// project/{projectId}/intent: // get: // summary: Get a JSON with intents // parameters: diff --git a/server/routes/story.js b/server/routes/story.js index b11dda48..532bd36a 100644 --- a/server/routes/story.js +++ b/server/routes/story.js @@ -39,7 +39,7 @@ const { /** * This function comment is parsed by doctrine - * @route GET /{projectName}/story + * @route GET project/{projectId}/story * @group Story - Operations about stories * @param {string} projectName.path.required - name of project - eg: testeRasa * @returns {Array.} 200 - An array of stories info @@ -47,7 +47,7 @@ const { */ /** - * @route POST /{projectName}/story + * @route POST project/{projectId}/story * @group Story - Operations about stories * @param {string} projectName.path.required - name of project - eg: testeRasa * @param {Story.model} story.body.required @@ -56,7 +56,7 @@ const { */ /** - * @route PUT /story/{storyId} + * @route PUT project/{projectId}/story/{storyId} * @group Story - Operations about stories * @param {string} storyId.path.required - id of utter - eg: 1c24gdq2135s * @param {Story.model} story.body.required @@ -65,7 +65,7 @@ const { */ /** - * @route DELETE /story/{storyId} + * @route DELETE project/{projectId}/story/{storyId} * @group Story - Operations about stories * @param {string} storyId.path.required - id of utter - eg: 1c24gdq2135s * @returns {ReturnDelete.model} 200 - An object of numbers of documents deleted and if status is ok @@ -73,7 +73,7 @@ const { */ /** -* @route GET /{projectName}/story/generate_file +* @route GET project/{projectId}/story/generate_file * @group Story - Operations about stories * @param {string} projectName.path.required - name of project - eg: testeRasa * @returns {BinaryType} 200 - Stories file @@ -81,16 +81,16 @@ const { */ app - .route('/:projectName/story') + .route('project/:projectId/story') .post(createStory) .get(getAllStories) app - .route('/story/:storyId') + .route('project/:projectId/story/:storyId') .put(updateStory) .delete(deleteStory) app - .route('/:projectName/story/generate_file') + .route('project/:projectId/story/generate_file') .get(generateStoryFile) module.exports = app diff --git a/server/routes/utter.js b/server/routes/utter.js index ed1a3915..f455186d 100644 --- a/server/routes/utter.js +++ b/server/routes/utter.js @@ -44,7 +44,7 @@ const { /** * This function comment is parsed by doctrine - * @route GET /{projectName}/utter + * @route GET project/{projectId}/utter * @group Utter - Operations about utters * @param {string} projectName.path.required - name of project - eg: testeRasa * @returns {Array.} 200 - An array of utters info @@ -52,7 +52,7 @@ const { */ /** - * @route POST /{projectName}/utter + * @route POST project/{projectId}/utter * @group Utter - Operations about utters * @param {string} projectName.path.required - name of project - eg: testeRasa * @param {Utter.model} utter.body.required @@ -61,7 +61,7 @@ const { */ /** - * @route PUT /utter/{utterId} + * @route PUT project/{projectId}/utter/{utterId} * @group Utter - Operations about utters * @param {string} utterId.path.required - id of utter - eg: 1c24gdq2135s * @param {Utter.model} utter.body.required @@ -70,7 +70,7 @@ const { */ /** - * @route DELETE /utter/{utterId} + * @route DELETE project/{projectID}/utter/{utterId} * @group Utter - Operations about utters * @param {string} utterId.path.required - id of utter - eg: 1c24gdq2135s * @returns {ReturnDelete.model} 200 - An object of numbers of documents deleted and if status is ok @@ -78,11 +78,11 @@ const { */ app - .route('/:projectName/utter') + .route('project/:projectId/utter') .post(createUtter) .get(getAllUtters) app - .route('/utter/:utterId') + .route('project/projectId/utter/:utterId') .put(updateUtter) .delete(deleteUtter)