diff --git a/services/question-service/package.json b/services/question-service/package.json index e0584bf2..b221f6d9 100644 --- a/services/question-service/package.json +++ b/services/question-service/package.json @@ -4,9 +4,9 @@ "private": true, "scripts": { "build": "yarn run swagger-autogen && tsc", - "start": "yarn run swagger-autogen && ts-node src/app.ts", - "dev": "yarn run swagger-autogen && nodemon src/app.ts", - "start:prod": "yarn build && node ./dist/app.js", + "start": "yarn run swagger-autogen && dotenv -e ../../.env ts-node src/app.ts", + "dev": "yarn run swagger-autogen && dotenv -e ../../.env nodemon src/app.ts", + "start:prod": "yarn build && dotenv -e ../../.env node ./dist/app.js", "swagger-autogen": "ts-node swagger-doc-gen.ts" }, "dependencies": { diff --git a/services/question-service/swagger-output.json b/services/question-service/swagger-output.json index 886a995e..c28935a0 100644 --- a/services/question-service/swagger-output.json +++ b/services/question-service/swagger-output.json @@ -227,7 +227,7 @@ } }, "put": { - "description": "", + "description": "Update a question.", "parameters": [ { "name": "id", @@ -236,6 +236,76 @@ "schema": { "type": "string" } + }, + { + "name": "title", + "description": "Title of the question.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "content", + "description": "Content of the question.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "topics", + "description": "Array of topics of the question.", + "in": "query", + "schema": { + "type": "array" + } + }, + { + "name": "difficulty", + "description": "Difficulty of the question.", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "testCasesInputs", + "description": "Array of test case inputs.", + "items": { + "type": "string" + }, + "in": "query", + "schema": { + "type": "array" + } + }, + { + "name": "testCasesOutputs", + "description": "Array of test case outputs.", + "items": { + "type": "string" + }, + "in": "query", + "schema": { + "type": "array" + } + }, + { + "name": "defaultCode", + "description": "Object of default code for each language.", + "in": "query", + "schema": { + "type": "object" + } + }, + { + "name": "solution", + "description": "Object of solution code for each language.", + "in": "query", + "schema": { + "type": "object" + } } ], "responses": {