update swagger for api

This commit is contained in:
root
2026-05-26 18:19:56 -04:00
parent 797e01eece
commit 8b3eb588f2
5 changed files with 1228 additions and 10 deletions
@@ -17,5 +17,14 @@ describe('GET /health', () => {
expect(res.status).toBe(200)
expect(res.body.name).toBe('rentaldrivego-api')
expect(Array.isArray(res.body.routes)).toBe(true)
expect(res.body.swaggerUi).toBe('/docs')
expect(res.body.openApi).toBe('/api/v1/openapi.json')
})
it('GET /api/v1/openapi.json returns the OpenAPI document', async () => {
const res = await request(app).get('/api/v1/openapi.json')
expect(res.status).toBe(200)
expect(res.body.openapi).toBe('3.0.3')
expect(res.body.info?.title).toBe('RentalDriveGo API')
})
})