-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
1,051 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,299 @@ | ||
#%RAML 1.0 | ||
title: BookMyHotelAPI | ||
baseUri: http://bookmyhotel.com | ||
mediaType: | ||
- application/json | ||
|
||
documentation: | ||
- !include documentation/BookMyHotelDoc.raml | ||
|
||
types: | ||
Error: !include datatypes/Error.raml | ||
Hotel: !include datatypes/Hotel.raml | ||
Registration: !include datatypes/Registration.raml | ||
Booking: !include datatypes/Booking.raml | ||
Status: !include datatypes/Status.raml | ||
|
||
/registrations: | ||
displayName: Registrations | ||
description: All Registrations | ||
get: | ||
displayName: GET Registrations | ||
description: Retrieve a list of all Registrations | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Registration[] | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
|
||
post: | ||
displayName: POST Registration | ||
description: Add a new Registration | ||
headers: | ||
Content-Type: | ||
body: | ||
Registration | ||
responses: | ||
201: | ||
headers: | ||
Location: | ||
example: http://bookmyhotel.com/registrations/r1 | ||
500: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
/{registrationId}: | ||
displayName: Registration | ||
description: Specific Registration | ||
get: | ||
displayName: GET Registration | ||
description: Retrieve a specific Registration | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Registration | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
patch: | ||
displayName: PATCH Registration | ||
description: Update a specific Registration | ||
headers: | ||
Content-Type: | ||
body: | ||
Registration | ||
responses: | ||
204: | ||
500: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
delete: | ||
displayName: DELETE Registration | ||
description: Delete a specific Registration | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Status | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
/hotels: | ||
displayName: Hotels | ||
description: All Hotels | ||
get: | ||
displayName: GET Hotels | ||
description: Retrieve a list of all Hotels | ||
headers: | ||
Accept?: | ||
example: application/json | ||
queryParameters: | ||
city: | ||
required: false | ||
state: | ||
required: false | ||
country: | ||
required: false | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Hotel[] | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
post: | ||
displayName: POST Hotel | ||
description: Add a new Hotel | ||
headers: | ||
Content-Type: | ||
body: | ||
Hotel | ||
responses: | ||
201: | ||
headers: | ||
Location: | ||
example: http://bookmyhotel.com/hotels/h1 | ||
500: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
/{hotelId}: | ||
displayName: Hotel | ||
description: Specific Hotel | ||
get: | ||
displayName: GET Hotel | ||
description: Retrieve a specific Hotel | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Hotel | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
patch: | ||
displayName: PATCH Hotel | ||
description: Update a specific Hotel | ||
headers: | ||
Content-Type: | ||
body: | ||
Hotel | ||
responses: | ||
204: | ||
500: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
delete: | ||
displayName: DELETE Hotel | ||
description: Delete a specific Hotel | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Status | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
/bookings: | ||
displayName: Bookings | ||
description: Bookings of specific Hotel | ||
get: | ||
displayName: GET Bookings | ||
description: Retrieve a list of all Bookings for specific hotel | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Booking[] | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
/bookings: | ||
displayName: Bookings | ||
description: All Bookings | ||
get: | ||
displayName: GET Bookings | ||
description: Retrieve a list of all Bookings | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Booking[] | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
post: | ||
displayName: POST Booking | ||
description: Add a new Booking | ||
headers: | ||
Content-Type: | ||
body: | ||
Booking | ||
responses: | ||
201: | ||
headers: | ||
Location: | ||
example: http://bookmyhotel.com/bookings/b1 | ||
500: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
/{bookingId}: | ||
displayName: Booking | ||
description: Specific Booking | ||
get: | ||
displayName: GET Booking | ||
description: Retrieve a specific Booking | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Booking | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
patch: | ||
displayName: PATCH Booking | ||
description: Update a specific Booking | ||
body: | ||
Booking | ||
responses: | ||
204: | ||
500: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
delete: | ||
displayName: DELETE Booking | ||
description: Delete a specific Booking | ||
headers: | ||
Accept?: | ||
responses: | ||
200: | ||
headers: | ||
Content-Type: | ||
body: | ||
Status | ||
404: | ||
headers: | ||
Content-Type: | ||
body: | ||
Error | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
properties: | ||
addressLine: string | ||
city: string | ||
state: string | ||
country: string | ||
pincode: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
displayName: Booking DataType | ||
description: Booking in Hotel | ||
properties: | ||
bookingId: string | ||
bookingStartDate: date-only | ||
bookingEndDate: date-only | ||
amenitiesSelected: string[] | ||
transportSelected: string[] | ||
food: string | ||
room: !include Room.raml | ||
examples: | ||
example1: !include ../examples/BookingExample1.raml | ||
example2: !include ../examples/BookingExample2.raml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
displayName: Error DataType | ||
description: Error Responses | ||
properties: | ||
code: integer | ||
reasonPhrase: string | ||
details: string | ||
example: !include ../examples/ErrorExample.raml | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
displayName: Hotel DataType | ||
description: Hotel Details | ||
properties: | ||
hotelId: string | ||
hotelName: string | ||
rating: string | ||
rooms: | ||
type: array | ||
items: !include Room.raml | ||
paymentTypes: string[] | ||
amenities: string[] | ||
transport: string[] | ||
food: string[] | ||
languagesSpoken: string[] | ||
address: !include Address.raml | ||
examples: | ||
example1: !include ../examples/HotelExample1.raml | ||
example2: !include ../examples/HotelExample2.raml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
displayName: Registration DataType | ||
description: Registration of Traveller | ||
properties: | ||
registrationId: string | ||
customerName: string | ||
title: string | ||
address: !include Address.raml | ||
paymentType: string | ||
examples: | ||
example1: !include ../examples/RegistrationExample1.raml | ||
example2: !include ../examples/RegistrationExample2.raml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
properties: | ||
roomId: string | ||
roomType: | ||
type: string | ||
enum: | ||
- single room | ||
- double room | ||
- single deluxe | ||
- double deluxe | ||
- twin room | ||
amount: number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#%RAML 1.0 DataType | ||
type: object | ||
displayName: Status DataType | ||
description: Status Responses | ||
properties: | ||
message: string |
Oops, something went wrong.