diff --git a/Updated Code.zip b/Updated Code.zip new file mode 100644 index 0000000..25209ca Binary files /dev/null and b/Updated Code.zip differ diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 29f9b7e..826ecd3 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -71,15 +71,26 @@ paths: - Ideas security: - BearerAuth: [] + parameters: + - $ref: '#/components/parameters/SearchQuery' + - $ref: '#/components/parameters/SortBy' + - $ref: '#/components/parameters/Limit' + - $ref: '#/components/parameters/Offset' responses: '200': description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Idea' + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Idea' + total: + type: integer + example: 100 '401': description: Unauthorized - Missing or invalid token post: @@ -584,10 +595,10 @@ components: properties: name: type: string - example: A task Manager + example: Updated Task Manager description: type: string - example: A web app that manages tasks. + example: Updated Description for the task mananger idea. Project: type: object diff --git a/src/server.js b/src/server.js index 8e5e4df..ddab0db 100644 --- a/src/server.js +++ b/src/server.js @@ -20,7 +20,7 @@ const PORT = process.env.PORT || 3000; app.use(express.json()); app.get('/health', (req, res) => res.status(200).json({ status: 'UP' })); -app.get('/', (req, res) => res.status(200).send('API is running...\nVisit /api-docs for API documentation')); +app.get('/', (req, res) => res.status(200).send('API is running...\nVisit https://idea-tracker-api.onrender.com/api-docs for API documentation')); if (process.env.NODE_ENV !== 'test') app.use(morgan('tiny')); let specs;