From 84a73d17fb1a1b1fc9feb2b03a841c1c80ecc81c Mon Sep 17 00:00:00 2001 From: thor Date: Mon, 15 Apr 2019 10:41:15 -0700 Subject: [PATCH] mocks of the legal api (#33) Signed-off-by: thor wolpert --- .../legal-api.postman_collection.json | 878 ++++++++++++++++++ 1 file changed, 878 insertions(+) create mode 100644 legal-api/tests/microcks/legal-api.postman_collection.json diff --git a/legal-api/tests/microcks/legal-api.postman_collection.json b/legal-api/tests/microcks/legal-api.postman_collection.json new file mode 100644 index 000000000..bbb0de3b5 --- /dev/null +++ b/legal-api/tests/microcks/legal-api.postman_collection.json @@ -0,0 +1,878 @@ +{ + "info": { + "_postman_id": "c75dc154-2ecb-4590-852b-a2872c53a988", + "name": "legal-api", + "description": "version=0.6 - This is a Legal API description", + "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" + }, + "item": [ + { + "name": "get-business", + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP7654321" + } + ] + } + }, + "response": [ + { + "name": "get-business - CP0001188", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP0001188" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"business_info\": {\n \"founding_date\": \"2019-04-08\",\n \"identifier\": \"CP0001188\",\n \"legal_name\": \"legal name - CP0001188\"\n }\n}" + }, + { + "name": "get-business - CP0001187", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP0001187" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"business_info\": {\n \"founding_date\": \"2019-04-08\",\n \"identifier\": \"CP0001187\",\n \"legal_name\": \"legal name - CP0001187\"\n }\n}" + }, + { + "name": "get-business - CP0001193", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP0001193" + } + ] + } + }, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"business_info\": {\n \"founding_date\": \"2019-04-08\",\n \"identifier\": \"CP0001193\",\n \"legal_name\": \"legal name - CP0001193\"\n }\n}" + }, + { + "name": "get-business - CP6543210", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP6543210" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"business_info\": {\n \"founding_date\": \"2019-04-08\",\n \"identifier\": \"CP7654321\",\n \"legal_name\": \"legal name - CP6543210\"\n }\n}" + }, + { + "name": "get-business - CP0001191", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP0001191" + } + ] + } + }, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"business_info\": {\n \"founding_date\": \"2019-04-08\",\n \"identifier\": \"CP0001191\",\n \"legal_name\": \"legal name - CP0001191\"\n }\n}" + }, + { + "name": "get-business - CP7654321", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id" + ], + "variable": [ + { + "key": "id", + "value": "CP7654321" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"business_info\": {\n \"founding_date\": \"2019-04-08\",\n \"identifier\": \"CP7654321\",\n \"legal_name\": \"legal name - CP7654321\"\n }\n}" + } + ] + }, + { + "name": "get-business - annual report CP7654321:2017", + "request": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2017", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2017" + } + ], + "variable": [ + { + "key": "id", + "value": "CP7654321" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "response": [ + { + "name": "get-business - annual report CP6543210:2016", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2016", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2016" + } + ], + "variable": [ + { + "key": "id", + "value": "CP6543210" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2017-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP6543210\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2017-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "get-business - annual report CP0001191:2017", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2017", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2017" + } + ], + "variable": [ + { + "key": "id", + "value": "CP0001191" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2017-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001191\",\n \"legal_name\": \"legal name - CP0001191\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2017-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "get-business - annual report CP7654321:2017", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2017", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2017" + } + ], + "variable": [ + { + "key": "id", + "value": "CP7654321" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2017-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2017-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "get-business - annual report CP0001187:2017", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2017", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2017" + } + ], + "variable": [ + { + "key": "id", + "value": "CP0001187" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2017-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001187\",\n \"legal_name\": \"legal name - CP0001187\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2017-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "get-business - annual report CP0001193:2017", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2017", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2017" + } + ], + "variable": [ + { + "key": "id", + "value": "CP0001193" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2017-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001193\",\n \"legal_name\": \"legal name - CP0001193\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2017-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "get-business - annual report CP0001188:2017", + "originalRequest": { + "method": "GET", + "header": [], + "body": { + "mode": "raw", + "raw": "" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type?year=2017", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "query": [ + { + "key": "year", + "value": "2017" + } + ], + "variable": [ + { + "key": "id", + "value": "CP0001188" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2017-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001188\",\n \"legal_name\": \"legal name - CP0001188\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2017-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + } + ] + }, + { + "name": "post - annual report CP7654321", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "variable": [ + { + "key": "id", + "value": "CP7654321" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "response": [ + { + "name": "post - annual report CP0001191", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "variable": [ + { + "key": "id", + "value": "CP0001191" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001191\",\n \"legal_name\": \"legal name - CP0001191\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "post - annual report CP0001188", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "variable": [ + { + "key": "id", + "value": "CP0001188" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001187\",\n \"legal_name\": \"legal name - CP0001188\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "post - annual report CP0001193", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "variable": [ + { + "key": "id", + "value": "CP0001193" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001193\",\n \"legal_name\": \"legal name - CP0001193\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "post - annual report CP0001187", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "variable": [ + { + "key": "id", + "value": "CP0001187" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP0001187\",\n \"legal_name\": \"legal name - CP0001187\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + { + "name": "post - annual report CP7654321", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "name": "Content-Type", + "value": "application/json", + "type": "text" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + }, + "url": { + "raw": "{{url}}/api/v1/businesses/:id/filings/:type", + "host": [ + "{{url}}" + ], + "path": [ + "api", + "v1", + "businesses", + ":id", + "filings", + ":type" + ], + "variable": [ + { + "key": "id", + "value": "CP7654321" + }, + { + "key": "type", + "value": "annual_report" + } + ] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": null, + "cookie": [], + "body": "{\n \"filing\": {\n \"header\": {\n \"name\": \"annual report\",\n \"date\": \"2019-04-08\"\n },\n \"business_info\": {\n \"founding_date\": \"2001-08-05\",\n \"identifier\": \"CP1234567\",\n \"legal_name\": \"legal name\"\n },\n \"annual_report\": {\n \"annual_general_meeting_date\": \"2019-04-08\",\n \"certified_by\": \"full name\",\n \"email\": \"no_one@never.get\"\n }\n }\n}" + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "id": "06247768-8ca0-4919-8f43-5833346fb137", + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "id": "cef47724-5de9-4678-82fa-e2482a1e95f7", + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ] +} \ No newline at end of file