...
No Format |
---|
Create a virtual service based on the following description: a system to manage hotel room bookings. It should include CRUD operations for with endpoints /bookings, /rooms, and /roomsguests. |
The AI Assistant can use this relatively simple prompt to create a virtual asset, but it might not be exactly what you want. A more detailed prompt, like the following, is more likely to get you exactly what you want:
No Format |
---|
Create a virtual service to manage hotel room bookings. based on the following description: Basepath: /hotel/api/v1 Endpoints: /bookings /bookings/{id} /rooms /rooms?guestName={name}&date={date} /rooms/{id} /rooms/{id}/availability /rooms/{id}/hold /guests /guests/{id} Details: 200 for success, 404 for not found, and 409 for conflicts (for example, double booking). Error responses for all endpoints should include a clear error message. Example request for POST - /bookings: { "roomId": 201, "roomNumber": "101A", "roomType": "Deluxe", "guestId": 301, "guestName": "John Doe", "checkIn": "2024-07-01", "checkOut": "2024-07-05", "price": 520, "specialRequests": "Late check-in" } Response returns "id" field and the same as request payload. |
...