From 244126111c363d535a751212729ea78ceed4e4ee Mon Sep 17 00:00:00 2001 From: William Montgomery Date: Thu, 4 Jan 2018 19:28:38 -0700 Subject: [PATCH 1/7] updated quotation mark --- apiary.apib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiary.apib b/apiary.apib index c4f57ac6..bba1fc0b 100644 --- a/apiary.apib +++ b/apiary.apib @@ -645,7 +645,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f [ { - "id": 251", + "id": 251, "service_id": 223, "language": "English", "details": "I want to stop eating crayons", From 1861db6cd4230d2f0529e03e1c279a26a479676b Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sat, 6 Jan 2018 18:59:16 -0700 Subject: [PATCH 2/7] renamed to mimic controller --- apiary.apib | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/apiary.apib b/apiary.apib index bba1fc0b..5f71be91 100644 --- a/apiary.apib +++ b/apiary.apib @@ -542,10 +542,10 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } -## Mentor Request | Create a New Mentor Request [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] +## Request | Request a Mentor [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters - + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + + user_id (integer, required) - ID of the user requesting a mentor, the passed in user must be a verified military veteran( i.e. user.verified == true) + details (string, optional) - Details of the mentor request in the form of a string + language (string, optional) - Primary language of the requesting mentee in the form of a string + service_id (integer, optional) - Indentification of the mentorship request in the form of an integer @@ -588,15 +588,9 @@ API endpoints that Operation Code's Rails backend makes available to its React f "assigned_mentor_id": 250 } -+ Response 422 (application/json) - - + Body - - { - errors: "Some error message" - } ++ Response 401 (application/json) -## Mentor Request | Show [/api/v1/requests/{request_id}] +## Request | Show a Mentor Request [/api/v1/requests/{request_id}] + Parameters + request_id (integer, required) - Indentification of mentor request in the form of an integer @@ -632,7 +626,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f "assigned_mentor_id": 260 } -## Mentor Requests | Unclaimed Collection [/api/v1/requests] +## Request | Collection [/api/v1/requests] ### Get All Unclaimed Mentor Requests [GET] + Request (application/json) @@ -675,7 +669,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f error: 'Unauthorized' } -## Mentor Request | Update [/api/v1/requests{user_id}{?details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] +## Request | Update [/api/v1/requests{user_id}{?details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer From 01e2a2d4c8fc91a869545ede3e32a1114bced5c5 Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sun, 7 Jan 2018 21:19:33 -0700 Subject: [PATCH 3/7] updated to get, changed to 'id', removed body for show route --- apiary.apib | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/apiary.apib b/apiary.apib index 5f71be91..e9476f4b 100644 --- a/apiary.apib +++ b/apiary.apib @@ -590,13 +590,13 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Response 401 (application/json) -## Request | Show a Mentor Request [/api/v1/requests/{request_id}] +## Request | Show a Mentor Request [/api/v1/requests/{id}] + Parameters + request_id (integer, required) - Indentification of mentor request in the form of an integer -### Show an Exiting Request From User ID [POST] +### Show an Exiting Request From User ID [GET] + Request (application/json) @@ -604,19 +604,12 @@ API endpoints that Operation Code's Rails backend makes available to its React f Authorization: Bearer Access-Token - + Body - - { - "request_id": 1234 - - } - + Response 200 (application/json) + Body { - "request_id": 1234, + "id": 1234, "user_id": 5200, "details": "I want to program", "language": "English", From 5013b1c0aba4f2c24612891b403b18c58709699a Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sun, 7 Jan 2018 21:30:00 -0700 Subject: [PATCH 4/7] updated required params --- apiary.apib | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apiary.apib b/apiary.apib index e9476f4b..824aaab8 100644 --- a/apiary.apib +++ b/apiary.apib @@ -662,9 +662,10 @@ API endpoints that Operation Code's Rails backend makes available to its React f error: 'Unauthorized' } -## Request | Update [/api/v1/requests{user_id}{?details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] +## Request | Update [/api/v1/requests/{?user_id,id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters + + id (integer, required) - Identification of the Mentor Request in the form on an integer + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + details (string, optional) - Details of the mentor request in the form of a string + language (string, optional) - Primary language of the requesting mentee in the form of a string @@ -685,6 +686,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f { "user_id": 5200, + "id": 4521, "details": "I want to program", "language": "English", "service_id": 210, @@ -698,8 +700,8 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body { - "id":4521, "user_id": 5200, + "id":4521, "details": "I want to program", "language": "English", "service_id": 210, From a81831b070fa5976f374158a002a471bdd4f134d Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sun, 7 Jan 2018 21:35:42 -0700 Subject: [PATCH 5/7] fixed request params for Show route --- apiary.apib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apiary.apib b/apiary.apib index 824aaab8..4ea2c3a1 100644 --- a/apiary.apib +++ b/apiary.apib @@ -593,7 +593,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f ## Request | Show a Mentor Request [/api/v1/requests/{id}] + Parameters - + request_id (integer, required) - Indentification of mentor request in the form of an integer + + id (integer, required) - Indentification of mentor request in the form of an integer ### Show an Exiting Request From User ID [GET] From 74c6c47fe29f5c9404f3a444669a586ea519d4dc Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sun, 7 Jan 2018 21:40:06 -0700 Subject: [PATCH 6/7] can't spell good, I think there needs to be id for the request --- apiary.apib | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apiary.apib b/apiary.apib index 4ea2c3a1..b1723cdc 100644 --- a/apiary.apib +++ b/apiary.apib @@ -542,9 +542,10 @@ API endpoints that Operation Code's Rails backend makes available to its React f errors: "Some error message" } -## Request | Request a Mentor [/api/v1/requests{?user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] +## Request | Request a Mentor [/api/v1/requests{?id,user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters + + id (integer, required) - ID of mentor request in the form of an integer + user_id (integer, required) - ID of the user requesting a mentor, the passed in user must be a verified military veteran( i.e. user.verified == true) + details (string, optional) - Details of the mentor request in the form of a string + language (string, optional) - Primary language of the requesting mentee in the form of a string @@ -563,7 +564,8 @@ API endpoints that Operation Code's Rails backend makes available to its React f + Body - { + { + "id": 2130, "user_id": 4600, "details": "I want to type well", "language": "English", @@ -593,7 +595,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f ## Request | Show a Mentor Request [/api/v1/requests/{id}] + Parameters - + id (integer, required) - Indentification of mentor request in the form of an integer + + id (integer, required) - Identification of mentor request in the form of an integer ### Show an Exiting Request From User ID [GET] From 2855cea4971b25320035d3941f92e1ac931649fe Mon Sep 17 00:00:00 2001 From: wimo7 Date: Sun, 7 Jan 2018 22:00:32 -0700 Subject: [PATCH 7/7] thoroughly confused --- apiary.apib | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apiary.apib b/apiary.apib index b1723cdc..0d0f22f3 100644 --- a/apiary.apib +++ b/apiary.apib @@ -545,7 +545,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f ## Request | Request a Mentor [/api/v1/requests{?id,user_id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters - + id (integer, required) - ID of mentor request in the form of an integer + + id (integer, required) - Identification of mentor request in the form of an integer + user_id (integer, required) - ID of the user requesting a mentor, the passed in user must be a verified military veteran( i.e. user.verified == true) + details (string, optional) - Details of the mentor request in the form of a string + language (string, optional) - Primary language of the requesting mentee in the form of a string @@ -667,8 +667,8 @@ API endpoints that Operation Code's Rails backend makes available to its React f ## Request | Update [/api/v1/requests/{?user_id,id,details,language,service_id,requested_mentor_id,status,assigned_mentor_id}] + Parameters - + id (integer, required) - Identification of the Mentor Request in the form on an integer + user_id (integer, required) - Identification of the User requesting a mentor in the form of an integer + + id (integer, required) - Identification of the Mentor Request in the form on an integer + details (string, optional) - Details of the mentor request in the form of a string + language (string, optional) - Primary language of the requesting mentee in the form of a string + service_id (integer, optional) - Indentification of the mentorship request in the form of an integer @@ -676,7 +676,7 @@ API endpoints that Operation Code's Rails backend makes available to its React f + status (string, optional) - Current fullfillment status in the form on a string + assigned_mentor_id (integer, optional) - Assigned mentor'd id in the form of an integer -### Update an Existing Mentor Request [PUT] +### Update an Existing Mentor Request [PATCH] + Request (application/json)