update swagger for api
This commit is contained in:
@@ -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')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user