Skip to content

Commit

Permalink
Merge 4bbae0d into 788f084
Browse files Browse the repository at this point in the history
  • Loading branch information
dieudonneAwa committed Sep 15, 2019
2 parents 788f084 + 4bbae0d commit db2446e
Show file tree
Hide file tree
Showing 25 changed files with 1,304 additions and 113 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ Make company global travel and accommodation easy and convenient for the strong
- [Swagger:](https://swagger.io/)
- [PassportJS](http://www.passportjs.org)

##### Testing Framework

- Mocha
- Chai
- Chai-HTTP

##### Project Management

- [Pivotal Tracker](https://pivotaltracker.com)

##### Continuous Integration

- [Travis CI](https://travis-ci.org)
- [Circle CI](https://circleci.com)
- [Coveralls](https://coveralls.io)

#### API Docs

- [API Documentation](https://barefoot-nomad-cyclops-staging.herokuapp.com/api-docs)

---

### Installation
Expand Down
287 changes: 196 additions & 91 deletions public/docs/swaggerDoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
{
"name": "Comment",
"description": "Comments on trip request"
},
{
"name": "Accommodation",
"description": "Accommodations for Barefoot Nomad"
}
],
"schemes": ["http", "https"],
Expand Down Expand Up @@ -385,13 +389,6 @@
}
}
},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "token",
"in": "header"
}
},
"/api/v1/trips": {
"post": {
"tags": ["Trip"],
Expand Down Expand Up @@ -464,14 +461,7 @@
}
}
},
"securityDefinitions": {
"api_key": {
"type": "apiKey",
"name": "token",
"in": "header"
}
},
"/api/v1/trips": {
"/api/v1/comment/trips": {
"post": {
"tags": ["Comment"],
"summary": "Allow users to comment on a trip request",
Expand Down Expand Up @@ -631,94 +621,209 @@
}
}
}
}
},
"definitions": {
"Landing": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"created_on": {
"type": "string",
"format": "date-time"
},
"/api/v1/accommodation": {
"post": {
"tags": ["Accommodation"],
"summary": "Allow Suppliers to create accommodation",
"description": "",
"operationId": "CreateAnAccommodation",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "type",
"in": "body",
"description": "details of the accommodation",
"required": true,
"schema": {
"type": "object",
"$ref": "#/definitions/CreateAnAccommodation"
}
}
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "Accomodation that was created",
"status": "success",
"type": "object"
}
}
},
"xml": {
"name": "Order"
"get": {
"tags": ["Accommodation"],
"summary": "get All Accommodations",
"description": "",
"operationId": "ReturnsAlAccommodations",
"security": [
{
"bearerAuth": []
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Comment deleted successful",
"name": "type"
}
}
}
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"email": {
"type": "string",
"example": "johndoe@company.com"
},
"password": {
"type": "string"
},
"token": {
"type": "integer",
"format": "int64"
"/api/v1/accommodation/:accommodationUuid": {
"get": {
"tags": ["Accommodation"],
"summary": "get A Particular Accommodations",
"description": "",
"operationId": "ReturnsAParticularAccommodations",
"security": [
{
"bearerAuth": []
}
],
"parameters": [
{
"name": "accommodationUuid",
"in": "path",
"description": "get details of the accommodation plus the rooms",
"required": true,
"type": "string"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"status": "success",
"type": "object"
}
}
},
"xml": {
"name": "User"
}
},
"CreateReturnTripRequest": {
"type": "object",
"required": [
"request_type",
"trip_plan",
"leaving_from",
"return_date",
"travel_date",
"destination"
],
"properties": {
"request_type": {
"type": "string",
"example": "returnTrip"
},
"trip_plan": {
"type": "string",
"example": "singleCity"
},
"leaving_from": {
"type": "uuid",
"example": "95ccd25d-2524-4b95-a441-8e2643c4c075"
"definitions": {
"Landing": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"created_on": {
"type": "string",
"format": "date-time"
}
},
"return_date": {
"type": "date",
"example": "08-22-2018"
"xml": {
"name": "Order"
}
},
"User": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"first_name": {
"type": "string",
"example": "John"
},
"last_name": {
"type": "string",
"example": "Doe"
},
"email": {
"type": "string",
"example": "johndoe@company.com"
},
"password": {
"type": "string"
},
"token": {
"type": "integer",
"format": "int64"
}
},
"travel_date": {
"type": "date",
"example": "09-22-2019"
"xml": {
"name": "User"
}
},
"CreateReturnTripRequest": {
"type": "object",
"required": [
"request_type",
"trip_plan",
"leaving_from",
"return_date",
"travel_date",
"destination"
],
"properties": {
"request_type": {
"type": "string",
"example": "returnTrip"
},
"trip_plan": {
"type": "string",
"example": "singleCity"
},
"leaving_from": {
"type": "uuid",
"example": "95ccd25d-2524-4b95-a441-8e2643c4c075"
},
"return_date": {
"type": "date",
"example": "08-22-2018"
},
"travel_date": {
"type": "date",
"example": "09-22-2019"
},
"destination": {
"type": "uuid",
"example": "95ccd25d-2524-4b95-a441-8e2643c4c071"
}
},
"destination": {
"type": "uuid",
"example": "95ccd25d-2524-4b95-a441-8e2643c4c071"
"xml": {
"name": "CreateTripRequest"
}
},
"xml": {
"name": "CreateTripRequest"
"CreateAnAccommodation": {
"type": "object",
"required": [
"name",
"description",
"services",
"image_url",
"amenities"
],
"properties": {
"name": {
"type": "string",
"example": "Shegson House"
},
"description": {
"type": "string",
"example": "I want to create this accommodation"
},
"services": {
"type": "array",
"example": "95ccd25d-2524-4b95-a441-8e2643c4c075"
},
"amenities": {
"type": "array",
"example": "08-22-2018"
},
"image_url": {
"type": "date",
"example": "https://res.cloudinary/Blessing.png"
}
},
"xml": {
"name": "CreateAnAccommodation"
}
}
}
}
Expand Down
Loading

0 comments on commit db2446e

Please sign in to comment.