reqcord 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +8 -0
  3. data/CHANGELOG.md +77 -0
  4. data/Gemfile +5 -0
  5. data/Gemfile.lock +171 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +239 -95
  8. data/Rakefile +13 -0
  9. data/docs/configuration.md +319 -0
  10. data/examples/complex-spec-app/.rspec +1 -0
  11. data/examples/complex-spec-app/README.md +21 -0
  12. data/examples/complex-spec-app/app.rb +363 -0
  13. data/examples/complex-spec-app/docs/api/README.md +104 -0
  14. data/examples/complex-spec-app/docs/api/api/v1/admin/products/create.md +117 -0
  15. data/examples/complex-spec-app/docs/api/api/v1/admin/products/destroy.md +51 -0
  16. data/examples/complex-spec-app/docs/api/api/v1/admin/products/index.md +11 -0
  17. data/examples/complex-spec-app/docs/api/api/v1/admin/products/list.md +106 -0
  18. data/examples/complex-spec-app/docs/api/api/v1/auth/index.md +9 -0
  19. data/examples/complex-spec-app/docs/api/api/v1/auth/login.md +76 -0
  20. data/examples/complex-spec-app/docs/api/api/v1/cart-items/create.md +91 -0
  21. data/examples/complex-spec-app/docs/api/api/v1/cart-items/destroy.md +51 -0
  22. data/examples/complex-spec-app/docs/api/api/v1/cart-items/index.md +10 -0
  23. data/examples/complex-spec-app/docs/api/api/v1/carts/checkout.md +102 -0
  24. data/examples/complex-spec-app/docs/api/api/v1/carts/index.md +10 -0
  25. data/examples/complex-spec-app/docs/api/api/v1/carts/show.md +73 -0
  26. data/examples/complex-spec-app/docs/api/api/v1/home/index.md +9 -0
  27. data/examples/complex-spec-app/docs/api/api/v1/home/list.md +47 -0
  28. data/examples/complex-spec-app/docs/api/api/v1/notes/create.md +94 -0
  29. data/examples/complex-spec-app/docs/api/api/v1/notes/index.md +10 -0
  30. data/examples/complex-spec-app/docs/api/api/v1/notes/list.md +61 -0
  31. data/examples/complex-spec-app/docs/api/api/v1/orders/cancel.md +69 -0
  32. data/examples/complex-spec-app/docs/api/api/v1/orders/create.md +150 -0
  33. data/examples/complex-spec-app/docs/api/api/v1/orders/destroy.md +37 -0
  34. data/examples/complex-spec-app/docs/api/api/v1/orders/index.md +13 -0
  35. data/examples/complex-spec-app/docs/api/api/v1/orders/list.md +78 -0
  36. data/examples/complex-spec-app/docs/api/api/v1/orders/show.md +83 -0
  37. data/examples/complex-spec-app/docs/api/api/v1/products/index.md +11 -0
  38. data/examples/complex-spec-app/docs/api/api/v1/products/list.md +83 -0
  39. data/examples/complex-spec-app/docs/api/api/v1/products/search.md +88 -0
  40. data/examples/complex-spec-app/docs/api/api/v1/products/show.md +71 -0
  41. data/examples/complex-spec-app/docs/api/api/v1/profiles/index.md +10 -0
  42. data/examples/complex-spec-app/docs/api/api/v1/profiles/show.md +61 -0
  43. data/examples/complex-spec-app/docs/api/api/v1/profiles/update.md +91 -0
  44. data/examples/complex-spec-app/docs/api/api/v2/products/index.md +9 -0
  45. data/examples/complex-spec-app/docs/api/api/v2/products/list.md +77 -0
  46. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/create.sh +18 -0
  47. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/destroy.sh +9 -0
  48. data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/list.sh +9 -0
  49. data/examples/complex-spec-app/docs/api/curl/api/v1/auth/login.sh +9 -0
  50. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/create.sh +16 -0
  51. data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/destroy.sh +9 -0
  52. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/checkout.sh +13 -0
  53. data/examples/complex-spec-app/docs/api/curl/api/v1/carts/show.sh +9 -0
  54. data/examples/complex-spec-app/docs/api/curl/api/v1/home/list.sh +8 -0
  55. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/create.sh +15 -0
  56. data/examples/complex-spec-app/docs/api/curl/api/v1/notes/list.sh +9 -0
  57. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/cancel.sh +9 -0
  58. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/create.sh +29 -0
  59. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/destroy.sh +9 -0
  60. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/list.sh +9 -0
  61. data/examples/complex-spec-app/docs/api/curl/api/v1/orders/show.sh +9 -0
  62. data/examples/complex-spec-app/docs/api/curl/api/v1/products/list.sh +8 -0
  63. data/examples/complex-spec-app/docs/api/curl/api/v1/products/search.sh +8 -0
  64. data/examples/complex-spec-app/docs/api/curl/api/v1/products/show.sh +8 -0
  65. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/show.sh +9 -0
  66. data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/update.sh +16 -0
  67. data/examples/complex-spec-app/docs/api/curl/api/v2/products/list.sh +8 -0
  68. data/examples/complex-spec-app/docs/api/dataset.json +5116 -0
  69. data/examples/complex-spec-app/docs/api/postman/collection.json +2519 -0
  70. data/examples/complex-spec-app/generate.rb +14 -0
  71. data/examples/complex-spec-app/reqcord.yml +28 -0
  72. data/examples/complex-spec-app/spec/requests/admin_spec.rb +67 -0
  73. data/examples/complex-spec-app/spec/requests/cart_spec.rb +61 -0
  74. data/examples/complex-spec-app/spec/requests/home_and_auth_spec.rb +49 -0
  75. data/examples/complex-spec-app/spec/requests/orders_spec.rb +124 -0
  76. data/examples/complex-spec-app/spec/requests/products_spec.rb +65 -0
  77. data/examples/complex-spec-app/spec/spec_helper.rb +17 -0
  78. data/examples/complex-test-app/README.md +40 -0
  79. data/examples/complex-test-app/app.rb +384 -0
  80. data/examples/complex-test-app/docs/api/README.md +104 -0
  81. data/examples/complex-test-app/docs/api/api/v1/admin/products/create.md +117 -0
  82. data/examples/complex-test-app/docs/api/api/v1/admin/products/destroy.md +51 -0
  83. data/examples/complex-test-app/docs/api/api/v1/admin/products/index.md +11 -0
  84. data/examples/complex-test-app/docs/api/api/v1/admin/products/list.md +106 -0
  85. data/examples/complex-test-app/docs/api/api/v1/auth/index.md +9 -0
  86. data/examples/complex-test-app/docs/api/api/v1/auth/login.md +76 -0
  87. data/examples/complex-test-app/docs/api/api/v1/cart-items/create.md +91 -0
  88. data/examples/complex-test-app/docs/api/api/v1/cart-items/destroy.md +51 -0
  89. data/examples/complex-test-app/docs/api/api/v1/cart-items/index.md +10 -0
  90. data/examples/complex-test-app/docs/api/api/v1/carts/checkout.md +102 -0
  91. data/examples/complex-test-app/docs/api/api/v1/carts/index.md +10 -0
  92. data/examples/complex-test-app/docs/api/api/v1/carts/show.md +73 -0
  93. data/examples/complex-test-app/docs/api/api/v1/home/index.md +9 -0
  94. data/examples/complex-test-app/docs/api/api/v1/home/list.md +47 -0
  95. data/examples/complex-test-app/docs/api/api/v1/notes/create.md +94 -0
  96. data/examples/complex-test-app/docs/api/api/v1/notes/index.md +10 -0
  97. data/examples/complex-test-app/docs/api/api/v1/notes/list.md +61 -0
  98. data/examples/complex-test-app/docs/api/api/v1/orders/cancel.md +69 -0
  99. data/examples/complex-test-app/docs/api/api/v1/orders/create.md +150 -0
  100. data/examples/complex-test-app/docs/api/api/v1/orders/destroy.md +37 -0
  101. data/examples/complex-test-app/docs/api/api/v1/orders/index.md +13 -0
  102. data/examples/complex-test-app/docs/api/api/v1/orders/list.md +71 -0
  103. data/examples/complex-test-app/docs/api/api/v1/orders/show.md +83 -0
  104. data/examples/complex-test-app/docs/api/api/v1/products/index.md +11 -0
  105. data/examples/complex-test-app/docs/api/api/v1/products/list.md +83 -0
  106. data/examples/complex-test-app/docs/api/api/v1/products/search.md +88 -0
  107. data/examples/complex-test-app/docs/api/api/v1/products/show.md +71 -0
  108. data/examples/complex-test-app/docs/api/api/v1/profiles/index.md +10 -0
  109. data/examples/complex-test-app/docs/api/api/v1/profiles/show.md +61 -0
  110. data/examples/complex-test-app/docs/api/api/v1/profiles/update.md +91 -0
  111. data/examples/complex-test-app/docs/api/api/v2/products/index.md +9 -0
  112. data/examples/complex-test-app/docs/api/api/v2/products/list.md +77 -0
  113. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/create.sh +18 -0
  114. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/destroy.sh +9 -0
  115. data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/list.sh +9 -0
  116. data/examples/complex-test-app/docs/api/curl/api/v1/auth/login.sh +9 -0
  117. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/create.sh +16 -0
  118. data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/destroy.sh +9 -0
  119. data/examples/complex-test-app/docs/api/curl/api/v1/carts/checkout.sh +13 -0
  120. data/examples/complex-test-app/docs/api/curl/api/v1/carts/show.sh +9 -0
  121. data/examples/complex-test-app/docs/api/curl/api/v1/home/list.sh +8 -0
  122. data/examples/complex-test-app/docs/api/curl/api/v1/notes/create.sh +15 -0
  123. data/examples/complex-test-app/docs/api/curl/api/v1/notes/list.sh +9 -0
  124. data/examples/complex-test-app/docs/api/curl/api/v1/orders/cancel.sh +9 -0
  125. data/examples/complex-test-app/docs/api/curl/api/v1/orders/create.sh +29 -0
  126. data/examples/complex-test-app/docs/api/curl/api/v1/orders/destroy.sh +9 -0
  127. data/examples/complex-test-app/docs/api/curl/api/v1/orders/list.sh +9 -0
  128. data/examples/complex-test-app/docs/api/curl/api/v1/orders/show.sh +9 -0
  129. data/examples/complex-test-app/docs/api/curl/api/v1/products/list.sh +8 -0
  130. data/examples/complex-test-app/docs/api/curl/api/v1/products/search.sh +8 -0
  131. data/examples/complex-test-app/docs/api/curl/api/v1/products/show.sh +8 -0
  132. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/show.sh +9 -0
  133. data/examples/complex-test-app/docs/api/curl/api/v1/profiles/update.sh +16 -0
  134. data/examples/complex-test-app/docs/api/curl/api/v2/products/list.sh +8 -0
  135. data/examples/complex-test-app/docs/api/dataset.json +5109 -0
  136. data/examples/complex-test-app/docs/api/postman/collection.json +2568 -0
  137. data/examples/complex-test-app/generate.rb +14 -0
  138. data/examples/complex-test-app/reqcord.yml +28 -0
  139. data/examples/complex-test-app/test/integration/admin_test.rb +70 -0
  140. data/examples/complex-test-app/test/integration/cart_test.rb +64 -0
  141. data/examples/complex-test-app/test/integration/home_and_auth_test.rb +53 -0
  142. data/examples/complex-test-app/test/integration/orders_test.rb +127 -0
  143. data/examples/complex-test-app/test/integration/products_test.rb +66 -0
  144. data/examples/reqcord.yml +58 -0
  145. data/examples/spec-app/.rspec +1 -0
  146. data/examples/spec-app/README.md +36 -0
  147. data/examples/spec-app/app.rb +209 -0
  148. data/examples/spec-app/docs/api/README.md +45 -0
  149. data/examples/spec-app/docs/api/api/v1/customers/create.md +95 -0
  150. data/examples/spec-app/docs/api/api/v1/customers/index.md +11 -0
  151. data/examples/spec-app/docs/api/api/v1/customers/list.md +67 -0
  152. data/examples/spec-app/docs/api/api/v1/customers/show.md +65 -0
  153. data/examples/spec-app/docs/api/api/v1/tasks/complete.md +51 -0
  154. data/examples/spec-app/docs/api/api/v1/tasks/create.md +90 -0
  155. data/examples/spec-app/docs/api/api/v1/tasks/destroy.md +35 -0
  156. data/examples/spec-app/docs/api/api/v1/tasks/index.md +14 -0
  157. data/examples/spec-app/docs/api/api/v1/tasks/list.md +65 -0
  158. data/examples/spec-app/docs/api/api/v1/tasks/show.md +65 -0
  159. data/examples/spec-app/docs/api/api/v1/tasks/update.md +74 -0
  160. data/examples/spec-app/docs/api/api/v1/users/create.md +95 -0
  161. data/examples/spec-app/docs/api/api/v1/users/index.md +11 -0
  162. data/examples/spec-app/docs/api/api/v1/users/list.md +67 -0
  163. data/examples/spec-app/docs/api/api/v1/users/show.md +65 -0
  164. data/examples/spec-app/docs/api/curl/api/v1/customers/create.sh +17 -0
  165. data/examples/spec-app/docs/api/curl/api/v1/customers/list.sh +9 -0
  166. data/examples/spec-app/docs/api/curl/api/v1/customers/show.sh +9 -0
  167. data/examples/spec-app/docs/api/curl/api/v1/tasks/complete.sh +8 -0
  168. data/examples/spec-app/docs/api/curl/api/v1/tasks/create.sh +15 -0
  169. data/examples/spec-app/docs/api/curl/api/v1/tasks/destroy.sh +8 -0
  170. data/examples/spec-app/docs/api/curl/api/v1/tasks/list.sh +8 -0
  171. data/examples/spec-app/docs/api/curl/api/v1/tasks/show.sh +8 -0
  172. data/examples/spec-app/docs/api/curl/api/v1/tasks/update.sh +14 -0
  173. data/examples/spec-app/docs/api/curl/api/v1/users/create.sh +17 -0
  174. data/examples/spec-app/docs/api/curl/api/v1/users/list.sh +9 -0
  175. data/examples/spec-app/docs/api/curl/api/v1/users/show.sh +9 -0
  176. data/examples/spec-app/docs/api/dataset.json +2402 -0
  177. data/examples/spec-app/docs/api/postman/collection.json +1290 -0
  178. data/examples/spec-app/generate.rb +14 -0
  179. data/examples/spec-app/reqcord.yml +27 -0
  180. data/examples/spec-app/spec/requests/customers_spec.rb +71 -0
  181. data/examples/spec-app/spec/requests/tasks_spec.rb +78 -0
  182. data/examples/spec-app/spec/requests/users_spec.rb +68 -0
  183. data/examples/spec-app/spec/spec_helper.rb +17 -0
  184. data/examples/test-app/README.md +57 -0
  185. data/examples/test-app/app.rb +212 -0
  186. data/examples/test-app/docs/api/README.md +45 -0
  187. data/examples/test-app/docs/api/api/v1/customers/create.md +95 -0
  188. data/examples/test-app/docs/api/api/v1/customers/index.md +11 -0
  189. data/examples/test-app/docs/api/api/v1/customers/list.md +67 -0
  190. data/examples/test-app/docs/api/api/v1/customers/show.md +65 -0
  191. data/examples/test-app/docs/api/api/v1/tasks/complete.md +51 -0
  192. data/examples/test-app/docs/api/api/v1/tasks/create.md +90 -0
  193. data/examples/test-app/docs/api/api/v1/tasks/destroy.md +35 -0
  194. data/examples/test-app/docs/api/api/v1/tasks/index.md +14 -0
  195. data/examples/test-app/docs/api/api/v1/tasks/list.md +65 -0
  196. data/examples/test-app/docs/api/api/v1/tasks/show.md +65 -0
  197. data/examples/test-app/docs/api/api/v1/tasks/update.md +74 -0
  198. data/examples/test-app/docs/api/api/v1/users/create.md +95 -0
  199. data/examples/test-app/docs/api/api/v1/users/index.md +11 -0
  200. data/examples/test-app/docs/api/api/v1/users/list.md +67 -0
  201. data/examples/test-app/docs/api/api/v1/users/show.md +65 -0
  202. data/examples/test-app/docs/api/curl/api/v1/customers/create.sh +17 -0
  203. data/examples/test-app/docs/api/curl/api/v1/customers/list.sh +9 -0
  204. data/examples/test-app/docs/api/curl/api/v1/customers/show.sh +9 -0
  205. data/examples/test-app/docs/api/curl/api/v1/tasks/complete.sh +8 -0
  206. data/examples/test-app/docs/api/curl/api/v1/tasks/create.sh +15 -0
  207. data/examples/test-app/docs/api/curl/api/v1/tasks/destroy.sh +8 -0
  208. data/examples/test-app/docs/api/curl/api/v1/tasks/list.sh +8 -0
  209. data/examples/test-app/docs/api/curl/api/v1/tasks/show.sh +8 -0
  210. data/examples/test-app/docs/api/curl/api/v1/tasks/update.sh +14 -0
  211. data/examples/test-app/docs/api/curl/api/v1/users/create.sh +17 -0
  212. data/examples/test-app/docs/api/curl/api/v1/users/list.sh +9 -0
  213. data/examples/test-app/docs/api/curl/api/v1/users/show.sh +9 -0
  214. data/examples/test-app/docs/api/dataset.json +2402 -0
  215. data/examples/test-app/docs/api/postman/collection.json +1290 -0
  216. data/examples/test-app/generate.rb +14 -0
  217. data/examples/test-app/reqcord.yml +28 -0
  218. data/examples/test-app/test/integration/customers_test.rb +72 -0
  219. data/examples/test-app/test/integration/tasks_test.rb +80 -0
  220. data/examples/test-app/test/integration/users_test.rb +72 -0
  221. data/lib/reqcord/capture/collector.rb +31 -0
  222. data/lib/reqcord/capture/integration_patch.rb +209 -0
  223. data/lib/reqcord/capture/minitest_context.rb +34 -0
  224. data/lib/reqcord/capture/rspec_context.rb +42 -0
  225. data/lib/reqcord/capture/test_context.rb +25 -0
  226. data/lib/reqcord/capture.rb +19 -0
  227. data/lib/reqcord/configuration.rb +198 -0
  228. data/lib/reqcord/dataset.rb +176 -0
  229. data/lib/reqcord/endpoint.rb +263 -0
  230. data/lib/reqcord/errors.rb +9 -0
  231. data/lib/reqcord/exporters/curl.rb +68 -0
  232. data/lib/reqcord/exporters/markdown.rb +295 -0
  233. data/lib/reqcord/exporters/postman.rb +206 -0
  234. data/lib/reqcord/exporters.rb +32 -0
  235. data/lib/reqcord/generator.rb +364 -0
  236. data/lib/reqcord/railtie.rb +51 -0
  237. data/lib/reqcord/renderers/curl.rb +56 -0
  238. data/lib/reqcord/renderers/payload.rb +69 -0
  239. data/lib/reqcord/request_example.rb +104 -0
  240. data/lib/reqcord/response_example.rb +72 -0
  241. data/lib/reqcord/route_collector.rb +242 -0
  242. data/lib/reqcord/sanitizers/sanitizer.rb +140 -0
  243. data/lib/reqcord/schema.rb +187 -0
  244. data/lib/reqcord/support.rb +58 -0
  245. data/lib/reqcord/version.rb +5 -0
  246. data/lib/reqcord.rb +78 -0
  247. data/lib/tasks/reqcord.rake +99 -0
  248. data/reqcord.gemspec +46 -0
  249. metadata +317 -3
@@ -0,0 +1,1290 @@
1
+ {
2
+ "info": {
3
+ "name": "spec-app API",
4
+ "description": "Generated by Reqcord from the application's integration tests.",
5
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
6
+ },
7
+ "item": [
8
+ {
9
+ "name": "Api",
10
+ "item": [
11
+ {
12
+ "name": "V1",
13
+ "item": [
14
+ {
15
+ "name": "Customers",
16
+ "item": [
17
+ {
18
+ "name": "List Customers",
19
+ "request": {
20
+ "method": "GET",
21
+ "description": "GET /api/v1/customers\napi/v1/customers#index\nRoute: api_v1_customers",
22
+ "header": [
23
+ {
24
+ "key": "Accept",
25
+ "value": "application/json"
26
+ }
27
+ ],
28
+ "url": {
29
+ "raw": "{{base_url}}/api/v1/customers?per_page=1",
30
+ "host": [
31
+ "{{base_url}}"
32
+ ],
33
+ "path": [
34
+ "api",
35
+ "v1",
36
+ "customers"
37
+ ],
38
+ "query": [
39
+ {
40
+ "key": "per_page",
41
+ "value": "1"
42
+ }
43
+ ]
44
+ }
45
+ },
46
+ "response": [
47
+ {
48
+ "name": "200 OK",
49
+ "originalRequest": {
50
+ "method": "GET",
51
+ "description": "GET /api/v1/customers\napi/v1/customers#index\nRoute: api_v1_customers",
52
+ "header": [
53
+ {
54
+ "key": "Accept",
55
+ "value": "application/json"
56
+ }
57
+ ],
58
+ "url": {
59
+ "raw": "{{base_url}}/api/v1/customers?per_page=1",
60
+ "host": [
61
+ "{{base_url}}"
62
+ ],
63
+ "path": [
64
+ "api",
65
+ "v1",
66
+ "customers"
67
+ ],
68
+ "query": [
69
+ {
70
+ "key": "per_page",
71
+ "value": "1"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ "status": "OK",
77
+ "code": 200,
78
+ "_postman_previewlanguage": "json",
79
+ "header": [
80
+ {
81
+ "key": "content-type",
82
+ "value": "application/json; charset=utf-8"
83
+ }
84
+ ],
85
+ "body": "[\n {\n \"id\": 1,\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\"\n }\n]"
86
+ },
87
+ {
88
+ "name": "401 Unauthorized",
89
+ "originalRequest": {
90
+ "method": "GET",
91
+ "description": "GET /api/v1/customers\napi/v1/customers#index\nRoute: api_v1_customers",
92
+ "header": [
93
+ {
94
+ "key": "Accept",
95
+ "value": "application/json"
96
+ }
97
+ ],
98
+ "url": {
99
+ "raw": "{{base_url}}/api/v1/customers",
100
+ "host": [
101
+ "{{base_url}}"
102
+ ],
103
+ "path": [
104
+ "api",
105
+ "v1",
106
+ "customers"
107
+ ]
108
+ },
109
+ "auth": {
110
+ "type": "noauth"
111
+ }
112
+ },
113
+ "status": "Unauthorized",
114
+ "code": 401,
115
+ "_postman_previewlanguage": "json",
116
+ "header": [
117
+ {
118
+ "key": "content-type",
119
+ "value": "application/json; charset=utf-8"
120
+ }
121
+ ],
122
+ "body": "{\n \"error\": \"Unauthorized\"\n}"
123
+ }
124
+ ]
125
+ },
126
+ {
127
+ "name": "Create Customer",
128
+ "request": {
129
+ "method": "POST",
130
+ "description": "POST /api/v1/customers\napi/v1/customers#create",
131
+ "header": [
132
+ {
133
+ "key": "Content-Type",
134
+ "value": "application/json"
135
+ },
136
+ {
137
+ "key": "Accept",
138
+ "value": "application/json"
139
+ }
140
+ ],
141
+ "url": {
142
+ "raw": "{{base_url}}/api/v1/customers",
143
+ "host": [
144
+ "{{base_url}}"
145
+ ],
146
+ "path": [
147
+ "api",
148
+ "v1",
149
+ "customers"
150
+ ]
151
+ },
152
+ "body": {
153
+ "mode": "raw",
154
+ "raw": "{\n \"customer\": {\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"active\"\n }\n}",
155
+ "options": {
156
+ "raw": {
157
+ "language": "json"
158
+ }
159
+ }
160
+ }
161
+ },
162
+ "response": [
163
+ {
164
+ "name": "201 Created",
165
+ "originalRequest": {
166
+ "method": "POST",
167
+ "description": "POST /api/v1/customers\napi/v1/customers#create",
168
+ "header": [
169
+ {
170
+ "key": "Content-Type",
171
+ "value": "application/json"
172
+ },
173
+ {
174
+ "key": "Accept",
175
+ "value": "application/json"
176
+ }
177
+ ],
178
+ "url": {
179
+ "raw": "{{base_url}}/api/v1/customers",
180
+ "host": [
181
+ "{{base_url}}"
182
+ ],
183
+ "path": [
184
+ "api",
185
+ "v1",
186
+ "customers"
187
+ ]
188
+ },
189
+ "body": {
190
+ "mode": "raw",
191
+ "raw": "{\n \"customer\": {\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"active\"\n }\n}",
192
+ "options": {
193
+ "raw": {
194
+ "language": "json"
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "status": "Created",
200
+ "code": 201,
201
+ "_postman_previewlanguage": "json",
202
+ "header": [
203
+ {
204
+ "key": "content-type",
205
+ "value": "application/json; charset=utf-8"
206
+ }
207
+ ],
208
+ "body": "{\n \"id\": 3,\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"active\"\n}"
209
+ },
210
+ {
211
+ "name": "422 Unprocessable Content",
212
+ "originalRequest": {
213
+ "method": "POST",
214
+ "description": "POST /api/v1/customers\napi/v1/customers#create",
215
+ "header": [
216
+ {
217
+ "key": "Content-Type",
218
+ "value": "application/json"
219
+ },
220
+ {
221
+ "key": "Accept",
222
+ "value": "application/json"
223
+ }
224
+ ],
225
+ "url": {
226
+ "raw": "{{base_url}}/api/v1/customers",
227
+ "host": [
228
+ "{{base_url}}"
229
+ ],
230
+ "path": [
231
+ "api",
232
+ "v1",
233
+ "customers"
234
+ ]
235
+ },
236
+ "body": {
237
+ "mode": "raw",
238
+ "raw": "{\n \"customer\": {\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"inactive\"\n }\n}",
239
+ "options": {
240
+ "raw": {
241
+ "language": "json"
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "status": "Unprocessable Content",
247
+ "code": 422,
248
+ "_postman_previewlanguage": "json",
249
+ "header": [
250
+ {
251
+ "key": "content-type",
252
+ "value": "application/json; charset=utf-8"
253
+ }
254
+ ],
255
+ "body": "{\n \"errors\": {\n \"status\": [\n \"is not included in the list\"\n ]\n }\n}"
256
+ }
257
+ ]
258
+ },
259
+ {
260
+ "name": "Get Customer",
261
+ "request": {
262
+ "method": "GET",
263
+ "description": "GET /api/v1/customers/:id\napi/v1/customers#show\nRoute: api_v1_customer",
264
+ "header": [
265
+ {
266
+ "key": "Accept",
267
+ "value": "application/json"
268
+ }
269
+ ],
270
+ "url": {
271
+ "raw": "{{base_url}}/api/v1/customers/1",
272
+ "host": [
273
+ "{{base_url}}"
274
+ ],
275
+ "path": [
276
+ "api",
277
+ "v1",
278
+ "customers",
279
+ "1"
280
+ ]
281
+ }
282
+ },
283
+ "response": [
284
+ {
285
+ "name": "200 OK",
286
+ "originalRequest": {
287
+ "method": "GET",
288
+ "description": "GET /api/v1/customers/:id\napi/v1/customers#show\nRoute: api_v1_customer",
289
+ "header": [
290
+ {
291
+ "key": "Accept",
292
+ "value": "application/json"
293
+ }
294
+ ],
295
+ "url": {
296
+ "raw": "{{base_url}}/api/v1/customers/1",
297
+ "host": [
298
+ "{{base_url}}"
299
+ ],
300
+ "path": [
301
+ "api",
302
+ "v1",
303
+ "customers",
304
+ "1"
305
+ ]
306
+ }
307
+ },
308
+ "status": "OK",
309
+ "code": 200,
310
+ "_postman_previewlanguage": "json",
311
+ "header": [
312
+ {
313
+ "key": "content-type",
314
+ "value": "application/json; charset=utf-8"
315
+ }
316
+ ],
317
+ "body": "{\n \"id\": 1,\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\"\n}"
318
+ },
319
+ {
320
+ "name": "404 Not Found",
321
+ "originalRequest": {
322
+ "method": "GET",
323
+ "description": "GET /api/v1/customers/:id\napi/v1/customers#show\nRoute: api_v1_customer",
324
+ "header": [
325
+ {
326
+ "key": "Accept",
327
+ "value": "application/json"
328
+ }
329
+ ],
330
+ "url": {
331
+ "raw": "{{base_url}}/api/v1/customers/999",
332
+ "host": [
333
+ "{{base_url}}"
334
+ ],
335
+ "path": [
336
+ "api",
337
+ "v1",
338
+ "customers",
339
+ "999"
340
+ ]
341
+ }
342
+ },
343
+ "status": "Not Found",
344
+ "code": 404,
345
+ "_postman_previewlanguage": "json",
346
+ "header": [
347
+ {
348
+ "key": "content-type",
349
+ "value": "application/json; charset=utf-8"
350
+ }
351
+ ],
352
+ "body": "{\n \"error\": \"Not Found\"\n}"
353
+ }
354
+ ]
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "name": "Tasks",
360
+ "item": [
361
+ {
362
+ "name": "List Tasks",
363
+ "request": {
364
+ "method": "GET",
365
+ "description": "GET /api/v1/tasks\napi/v1/tasks#index\nRoute: api_v1_tasks",
366
+ "header": [
367
+ {
368
+ "key": "Accept",
369
+ "value": "application/json"
370
+ }
371
+ ],
372
+ "url": {
373
+ "raw": "{{base_url}}/api/v1/tasks",
374
+ "host": [
375
+ "{{base_url}}"
376
+ ],
377
+ "path": [
378
+ "api",
379
+ "v1",
380
+ "tasks"
381
+ ]
382
+ },
383
+ "auth": {
384
+ "type": "noauth"
385
+ }
386
+ },
387
+ "response": [
388
+ {
389
+ "name": "200 OK",
390
+ "originalRequest": {
391
+ "method": "GET",
392
+ "description": "GET /api/v1/tasks\napi/v1/tasks#index\nRoute: api_v1_tasks",
393
+ "header": [
394
+ {
395
+ "key": "Accept",
396
+ "value": "application/json"
397
+ }
398
+ ],
399
+ "url": {
400
+ "raw": "{{base_url}}/api/v1/tasks",
401
+ "host": [
402
+ "{{base_url}}"
403
+ ],
404
+ "path": [
405
+ "api",
406
+ "v1",
407
+ "tasks"
408
+ ]
409
+ },
410
+ "auth": {
411
+ "type": "noauth"
412
+ }
413
+ },
414
+ "status": "OK",
415
+ "code": 200,
416
+ "_postman_previewlanguage": "json",
417
+ "header": [
418
+ {
419
+ "key": "content-type",
420
+ "value": "application/json; charset=utf-8"
421
+ }
422
+ ],
423
+ "body": "[\n {\n \"id\": 1,\n \"title\": \"Write the docs\",\n \"status\": \"open\",\n \"priority\": \"high\"\n },\n {\n \"id\": 2,\n \"title\": \"Ship 0.1.1\",\n \"status\": \"done\",\n \"priority\": \"high\"\n },\n {\n \"id\": 3,\n \"title\": \"Tidy the backlog\",\n \"status\": \"open\",\n \"priority\": \"low\"\n }\n]"
424
+ }
425
+ ]
426
+ },
427
+ {
428
+ "name": "Create Task",
429
+ "request": {
430
+ "method": "POST",
431
+ "description": "POST /api/v1/tasks\napi/v1/tasks#create",
432
+ "header": [
433
+ {
434
+ "key": "Content-Type",
435
+ "value": "application/json"
436
+ },
437
+ {
438
+ "key": "Accept",
439
+ "value": "application/json"
440
+ }
441
+ ],
442
+ "url": {
443
+ "raw": "{{base_url}}/api/v1/tasks",
444
+ "host": [
445
+ "{{base_url}}"
446
+ ],
447
+ "path": [
448
+ "api",
449
+ "v1",
450
+ "tasks"
451
+ ]
452
+ },
453
+ "body": {
454
+ "mode": "raw",
455
+ "raw": "{\n \"task\": {\n \"title\": \"Review the release\",\n \"priority\": \"high\"\n }\n}",
456
+ "options": {
457
+ "raw": {
458
+ "language": "json"
459
+ }
460
+ }
461
+ },
462
+ "auth": {
463
+ "type": "noauth"
464
+ }
465
+ },
466
+ "response": [
467
+ {
468
+ "name": "201 Created",
469
+ "originalRequest": {
470
+ "method": "POST",
471
+ "description": "POST /api/v1/tasks\napi/v1/tasks#create",
472
+ "header": [
473
+ {
474
+ "key": "Content-Type",
475
+ "value": "application/json"
476
+ },
477
+ {
478
+ "key": "Accept",
479
+ "value": "application/json"
480
+ }
481
+ ],
482
+ "url": {
483
+ "raw": "{{base_url}}/api/v1/tasks",
484
+ "host": [
485
+ "{{base_url}}"
486
+ ],
487
+ "path": [
488
+ "api",
489
+ "v1",
490
+ "tasks"
491
+ ]
492
+ },
493
+ "body": {
494
+ "mode": "raw",
495
+ "raw": "{\n \"task\": {\n \"title\": \"Review the release\",\n \"priority\": \"high\"\n }\n}",
496
+ "options": {
497
+ "raw": {
498
+ "language": "json"
499
+ }
500
+ }
501
+ },
502
+ "auth": {
503
+ "type": "noauth"
504
+ }
505
+ },
506
+ "status": "Created",
507
+ "code": 201,
508
+ "_postman_previewlanguage": "json",
509
+ "header": [
510
+ {
511
+ "key": "content-type",
512
+ "value": "application/json; charset=utf-8"
513
+ }
514
+ ],
515
+ "body": "{\n \"id\": 4,\n \"status\": \"open\",\n \"title\": \"Review the release\",\n \"priority\": \"high\"\n}"
516
+ },
517
+ {
518
+ "name": "422 Unprocessable Content",
519
+ "originalRequest": {
520
+ "method": "POST",
521
+ "description": "POST /api/v1/tasks\napi/v1/tasks#create",
522
+ "header": [
523
+ {
524
+ "key": "Content-Type",
525
+ "value": "application/json"
526
+ },
527
+ {
528
+ "key": "Accept",
529
+ "value": "application/json"
530
+ }
531
+ ],
532
+ "url": {
533
+ "raw": "{{base_url}}/api/v1/tasks",
534
+ "host": [
535
+ "{{base_url}}"
536
+ ],
537
+ "path": [
538
+ "api",
539
+ "v1",
540
+ "tasks"
541
+ ]
542
+ },
543
+ "body": {
544
+ "mode": "raw",
545
+ "raw": "{\n \"task\": {\n \"title\": \"\",\n \"priority\": \"high\"\n }\n}",
546
+ "options": {
547
+ "raw": {
548
+ "language": "json"
549
+ }
550
+ }
551
+ },
552
+ "auth": {
553
+ "type": "noauth"
554
+ }
555
+ },
556
+ "status": "Unprocessable Content",
557
+ "code": 422,
558
+ "_postman_previewlanguage": "json",
559
+ "header": [
560
+ {
561
+ "key": "content-type",
562
+ "value": "application/json; charset=utf-8"
563
+ }
564
+ ],
565
+ "body": "{\n \"errors\": {\n \"title\": [\n \"can't be blank\"\n ]\n }\n}"
566
+ }
567
+ ]
568
+ },
569
+ {
570
+ "name": "Delete Task",
571
+ "request": {
572
+ "method": "DELETE",
573
+ "description": "DELETE /api/v1/tasks/:id\napi/v1/tasks#destroy",
574
+ "header": [
575
+ {
576
+ "key": "Accept",
577
+ "value": "application/json"
578
+ }
579
+ ],
580
+ "url": {
581
+ "raw": "{{base_url}}/api/v1/tasks/3",
582
+ "host": [
583
+ "{{base_url}}"
584
+ ],
585
+ "path": [
586
+ "api",
587
+ "v1",
588
+ "tasks",
589
+ "3"
590
+ ]
591
+ },
592
+ "auth": {
593
+ "type": "noauth"
594
+ }
595
+ },
596
+ "response": [
597
+ {
598
+ "name": "204 No Content",
599
+ "originalRequest": {
600
+ "method": "DELETE",
601
+ "description": "DELETE /api/v1/tasks/:id\napi/v1/tasks#destroy",
602
+ "header": [
603
+ {
604
+ "key": "Accept",
605
+ "value": "application/json"
606
+ }
607
+ ],
608
+ "url": {
609
+ "raw": "{{base_url}}/api/v1/tasks/3",
610
+ "host": [
611
+ "{{base_url}}"
612
+ ],
613
+ "path": [
614
+ "api",
615
+ "v1",
616
+ "tasks",
617
+ "3"
618
+ ]
619
+ },
620
+ "auth": {
621
+ "type": "noauth"
622
+ }
623
+ },
624
+ "status": "No Content",
625
+ "code": 204,
626
+ "_postman_previewlanguage": "text",
627
+ "header": [],
628
+ "body": ""
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ "name": "Get Task",
634
+ "request": {
635
+ "method": "GET",
636
+ "description": "GET /api/v1/tasks/:id\napi/v1/tasks#show\nRoute: api_v1_task",
637
+ "header": [
638
+ {
639
+ "key": "Accept",
640
+ "value": "application/json"
641
+ }
642
+ ],
643
+ "url": {
644
+ "raw": "{{base_url}}/api/v1/tasks/1",
645
+ "host": [
646
+ "{{base_url}}"
647
+ ],
648
+ "path": [
649
+ "api",
650
+ "v1",
651
+ "tasks",
652
+ "1"
653
+ ]
654
+ },
655
+ "auth": {
656
+ "type": "noauth"
657
+ }
658
+ },
659
+ "response": [
660
+ {
661
+ "name": "200 OK",
662
+ "originalRequest": {
663
+ "method": "GET",
664
+ "description": "GET /api/v1/tasks/:id\napi/v1/tasks#show\nRoute: api_v1_task",
665
+ "header": [
666
+ {
667
+ "key": "Accept",
668
+ "value": "application/json"
669
+ }
670
+ ],
671
+ "url": {
672
+ "raw": "{{base_url}}/api/v1/tasks/1",
673
+ "host": [
674
+ "{{base_url}}"
675
+ ],
676
+ "path": [
677
+ "api",
678
+ "v1",
679
+ "tasks",
680
+ "1"
681
+ ]
682
+ },
683
+ "auth": {
684
+ "type": "noauth"
685
+ }
686
+ },
687
+ "status": "OK",
688
+ "code": 200,
689
+ "_postman_previewlanguage": "json",
690
+ "header": [
691
+ {
692
+ "key": "content-type",
693
+ "value": "application/json; charset=utf-8"
694
+ }
695
+ ],
696
+ "body": "{\n \"id\": 1,\n \"title\": \"Write the docs\",\n \"status\": \"open\",\n \"priority\": \"high\"\n}"
697
+ },
698
+ {
699
+ "name": "404 Not Found",
700
+ "originalRequest": {
701
+ "method": "GET",
702
+ "description": "GET /api/v1/tasks/:id\napi/v1/tasks#show\nRoute: api_v1_task",
703
+ "header": [
704
+ {
705
+ "key": "Accept",
706
+ "value": "application/json"
707
+ }
708
+ ],
709
+ "url": {
710
+ "raw": "{{base_url}}/api/v1/tasks/999",
711
+ "host": [
712
+ "{{base_url}}"
713
+ ],
714
+ "path": [
715
+ "api",
716
+ "v1",
717
+ "tasks",
718
+ "999"
719
+ ]
720
+ },
721
+ "auth": {
722
+ "type": "noauth"
723
+ }
724
+ },
725
+ "status": "Not Found",
726
+ "code": 404,
727
+ "_postman_previewlanguage": "json",
728
+ "header": [
729
+ {
730
+ "key": "content-type",
731
+ "value": "application/json; charset=utf-8"
732
+ }
733
+ ],
734
+ "body": "{\n \"error\": \"Not Found\"\n}"
735
+ }
736
+ ]
737
+ },
738
+ {
739
+ "name": "Update Task",
740
+ "request": {
741
+ "method": "PATCH",
742
+ "description": "PATCH /api/v1/tasks/:id\napi/v1/tasks#update\nAlso answers PUT.",
743
+ "header": [
744
+ {
745
+ "key": "Content-Type",
746
+ "value": "application/json"
747
+ },
748
+ {
749
+ "key": "Accept",
750
+ "value": "application/json"
751
+ }
752
+ ],
753
+ "url": {
754
+ "raw": "{{base_url}}/api/v1/tasks/1",
755
+ "host": [
756
+ "{{base_url}}"
757
+ ],
758
+ "path": [
759
+ "api",
760
+ "v1",
761
+ "tasks",
762
+ "1"
763
+ ]
764
+ },
765
+ "body": {
766
+ "mode": "raw",
767
+ "raw": "{\n \"task\": {\n \"title\": \"Write better docs\"\n }\n}",
768
+ "options": {
769
+ "raw": {
770
+ "language": "json"
771
+ }
772
+ }
773
+ },
774
+ "auth": {
775
+ "type": "noauth"
776
+ }
777
+ },
778
+ "response": [
779
+ {
780
+ "name": "200 OK",
781
+ "originalRequest": {
782
+ "method": "PATCH",
783
+ "description": "PATCH /api/v1/tasks/:id\napi/v1/tasks#update\nAlso answers PUT.",
784
+ "header": [
785
+ {
786
+ "key": "Content-Type",
787
+ "value": "application/json"
788
+ },
789
+ {
790
+ "key": "Accept",
791
+ "value": "application/json"
792
+ }
793
+ ],
794
+ "url": {
795
+ "raw": "{{base_url}}/api/v1/tasks/1",
796
+ "host": [
797
+ "{{base_url}}"
798
+ ],
799
+ "path": [
800
+ "api",
801
+ "v1",
802
+ "tasks",
803
+ "1"
804
+ ]
805
+ },
806
+ "body": {
807
+ "mode": "raw",
808
+ "raw": "{\n \"task\": {\n \"title\": \"Write better docs\"\n }\n}",
809
+ "options": {
810
+ "raw": {
811
+ "language": "json"
812
+ }
813
+ }
814
+ },
815
+ "auth": {
816
+ "type": "noauth"
817
+ }
818
+ },
819
+ "status": "OK",
820
+ "code": 200,
821
+ "_postman_previewlanguage": "json",
822
+ "header": [
823
+ {
824
+ "key": "content-type",
825
+ "value": "application/json; charset=utf-8"
826
+ }
827
+ ],
828
+ "body": "{\n \"id\": 1,\n \"title\": \"Write better docs\",\n \"status\": \"open\",\n \"priority\": \"high\"\n}"
829
+ }
830
+ ]
831
+ },
832
+ {
833
+ "name": "Complete Task",
834
+ "request": {
835
+ "method": "POST",
836
+ "description": "POST /api/v1/tasks/:id/complete\napi/v1/tasks#complete\nRoute: complete_api_v1_task",
837
+ "header": [
838
+ {
839
+ "key": "Accept",
840
+ "value": "application/json"
841
+ }
842
+ ],
843
+ "url": {
844
+ "raw": "{{base_url}}/api/v1/tasks/1/complete",
845
+ "host": [
846
+ "{{base_url}}"
847
+ ],
848
+ "path": [
849
+ "api",
850
+ "v1",
851
+ "tasks",
852
+ "1",
853
+ "complete"
854
+ ]
855
+ },
856
+ "auth": {
857
+ "type": "noauth"
858
+ }
859
+ },
860
+ "response": [
861
+ {
862
+ "name": "200 OK",
863
+ "originalRequest": {
864
+ "method": "POST",
865
+ "description": "POST /api/v1/tasks/:id/complete\napi/v1/tasks#complete\nRoute: complete_api_v1_task",
866
+ "header": [
867
+ {
868
+ "key": "Accept",
869
+ "value": "application/json"
870
+ }
871
+ ],
872
+ "url": {
873
+ "raw": "{{base_url}}/api/v1/tasks/1/complete",
874
+ "host": [
875
+ "{{base_url}}"
876
+ ],
877
+ "path": [
878
+ "api",
879
+ "v1",
880
+ "tasks",
881
+ "1",
882
+ "complete"
883
+ ]
884
+ },
885
+ "auth": {
886
+ "type": "noauth"
887
+ }
888
+ },
889
+ "status": "OK",
890
+ "code": 200,
891
+ "_postman_previewlanguage": "json",
892
+ "header": [
893
+ {
894
+ "key": "content-type",
895
+ "value": "application/json; charset=utf-8"
896
+ }
897
+ ],
898
+ "body": "{\n \"id\": 1,\n \"title\": \"Write the docs\",\n \"status\": \"done\",\n \"priority\": \"high\"\n}"
899
+ }
900
+ ]
901
+ }
902
+ ]
903
+ },
904
+ {
905
+ "name": "Users",
906
+ "item": [
907
+ {
908
+ "name": "List Users",
909
+ "request": {
910
+ "method": "GET",
911
+ "description": "GET /api/v1/users\napi/v1/users#index\nRoute: api_v1_users",
912
+ "header": [
913
+ {
914
+ "key": "Accept",
915
+ "value": "application/json"
916
+ }
917
+ ],
918
+ "url": {
919
+ "raw": "{{base_url}}/api/v1/users?per_page=1",
920
+ "host": [
921
+ "{{base_url}}"
922
+ ],
923
+ "path": [
924
+ "api",
925
+ "v1",
926
+ "users"
927
+ ],
928
+ "query": [
929
+ {
930
+ "key": "per_page",
931
+ "value": "1"
932
+ }
933
+ ]
934
+ }
935
+ },
936
+ "response": [
937
+ {
938
+ "name": "200 OK",
939
+ "originalRequest": {
940
+ "method": "GET",
941
+ "description": "GET /api/v1/users\napi/v1/users#index\nRoute: api_v1_users",
942
+ "header": [
943
+ {
944
+ "key": "Accept",
945
+ "value": "application/json"
946
+ }
947
+ ],
948
+ "url": {
949
+ "raw": "{{base_url}}/api/v1/users?per_page=1",
950
+ "host": [
951
+ "{{base_url}}"
952
+ ],
953
+ "path": [
954
+ "api",
955
+ "v1",
956
+ "users"
957
+ ],
958
+ "query": [
959
+ {
960
+ "key": "per_page",
961
+ "value": "1"
962
+ }
963
+ ]
964
+ }
965
+ },
966
+ "status": "OK",
967
+ "code": 200,
968
+ "_postman_previewlanguage": "json",
969
+ "header": [
970
+ {
971
+ "key": "content-type",
972
+ "value": "application/json; charset=utf-8"
973
+ }
974
+ ],
975
+ "body": "[\n {\n \"id\": 1,\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\"\n }\n]"
976
+ },
977
+ {
978
+ "name": "401 Unauthorized",
979
+ "originalRequest": {
980
+ "method": "GET",
981
+ "description": "GET /api/v1/users\napi/v1/users#index\nRoute: api_v1_users",
982
+ "header": [
983
+ {
984
+ "key": "Accept",
985
+ "value": "application/json"
986
+ }
987
+ ],
988
+ "url": {
989
+ "raw": "{{base_url}}/api/v1/users",
990
+ "host": [
991
+ "{{base_url}}"
992
+ ],
993
+ "path": [
994
+ "api",
995
+ "v1",
996
+ "users"
997
+ ]
998
+ },
999
+ "auth": {
1000
+ "type": "noauth"
1001
+ }
1002
+ },
1003
+ "status": "Unauthorized",
1004
+ "code": 401,
1005
+ "_postman_previewlanguage": "json",
1006
+ "header": [
1007
+ {
1008
+ "key": "content-type",
1009
+ "value": "application/json; charset=utf-8"
1010
+ }
1011
+ ],
1012
+ "body": "{\n \"error\": \"Unauthorized\"\n}"
1013
+ }
1014
+ ]
1015
+ },
1016
+ {
1017
+ "name": "Create User",
1018
+ "request": {
1019
+ "method": "POST",
1020
+ "description": "POST /api/v1/users\napi/v1/users#create",
1021
+ "header": [
1022
+ {
1023
+ "key": "Content-Type",
1024
+ "value": "application/json"
1025
+ },
1026
+ {
1027
+ "key": "Accept",
1028
+ "value": "application/json"
1029
+ }
1030
+ ],
1031
+ "url": {
1032
+ "raw": "{{base_url}}/api/v1/users",
1033
+ "host": [
1034
+ "{{base_url}}"
1035
+ ],
1036
+ "path": [
1037
+ "api",
1038
+ "v1",
1039
+ "users"
1040
+ ]
1041
+ },
1042
+ "body": {
1043
+ "mode": "raw",
1044
+ "raw": "{\n \"user\": {\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"active\"\n }\n}",
1045
+ "options": {
1046
+ "raw": {
1047
+ "language": "json"
1048
+ }
1049
+ }
1050
+ }
1051
+ },
1052
+ "response": [
1053
+ {
1054
+ "name": "201 Created",
1055
+ "originalRequest": {
1056
+ "method": "POST",
1057
+ "description": "POST /api/v1/users\napi/v1/users#create",
1058
+ "header": [
1059
+ {
1060
+ "key": "Content-Type",
1061
+ "value": "application/json"
1062
+ },
1063
+ {
1064
+ "key": "Accept",
1065
+ "value": "application/json"
1066
+ }
1067
+ ],
1068
+ "url": {
1069
+ "raw": "{{base_url}}/api/v1/users",
1070
+ "host": [
1071
+ "{{base_url}}"
1072
+ ],
1073
+ "path": [
1074
+ "api",
1075
+ "v1",
1076
+ "users"
1077
+ ]
1078
+ },
1079
+ "body": {
1080
+ "mode": "raw",
1081
+ "raw": "{\n \"user\": {\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"active\"\n }\n}",
1082
+ "options": {
1083
+ "raw": {
1084
+ "language": "json"
1085
+ }
1086
+ }
1087
+ }
1088
+ },
1089
+ "status": "Created",
1090
+ "code": 201,
1091
+ "_postman_previewlanguage": "json",
1092
+ "header": [
1093
+ {
1094
+ "key": "content-type",
1095
+ "value": "application/json; charset=utf-8"
1096
+ }
1097
+ ],
1098
+ "body": "{\n \"id\": 3,\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"active\"\n}"
1099
+ },
1100
+ {
1101
+ "name": "422 Unprocessable Content",
1102
+ "originalRequest": {
1103
+ "method": "POST",
1104
+ "description": "POST /api/v1/users\napi/v1/users#create",
1105
+ "header": [
1106
+ {
1107
+ "key": "Content-Type",
1108
+ "value": "application/json"
1109
+ },
1110
+ {
1111
+ "key": "Accept",
1112
+ "value": "application/json"
1113
+ }
1114
+ ],
1115
+ "url": {
1116
+ "raw": "{{base_url}}/api/v1/users",
1117
+ "host": [
1118
+ "{{base_url}}"
1119
+ ],
1120
+ "path": [
1121
+ "api",
1122
+ "v1",
1123
+ "users"
1124
+ ]
1125
+ },
1126
+ "body": {
1127
+ "mode": "raw",
1128
+ "raw": "{\n \"user\": {\n \"name\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"status\": \"passive\"\n }\n}",
1129
+ "options": {
1130
+ "raw": {
1131
+ "language": "json"
1132
+ }
1133
+ }
1134
+ }
1135
+ },
1136
+ "status": "Unprocessable Content",
1137
+ "code": 422,
1138
+ "_postman_previewlanguage": "json",
1139
+ "header": [
1140
+ {
1141
+ "key": "content-type",
1142
+ "value": "application/json; charset=utf-8"
1143
+ }
1144
+ ],
1145
+ "body": "{\n \"errors\": {\n \"status\": [\n \"is not included in the list\"\n ]\n }\n}"
1146
+ }
1147
+ ]
1148
+ },
1149
+ {
1150
+ "name": "Get User",
1151
+ "request": {
1152
+ "method": "GET",
1153
+ "description": "GET /api/v1/users/:id\napi/v1/users#show\nRoute: api_v1_user",
1154
+ "header": [
1155
+ {
1156
+ "key": "Accept",
1157
+ "value": "application/json"
1158
+ }
1159
+ ],
1160
+ "url": {
1161
+ "raw": "{{base_url}}/api/v1/users/1",
1162
+ "host": [
1163
+ "{{base_url}}"
1164
+ ],
1165
+ "path": [
1166
+ "api",
1167
+ "v1",
1168
+ "users",
1169
+ "1"
1170
+ ]
1171
+ }
1172
+ },
1173
+ "response": [
1174
+ {
1175
+ "name": "200 OK",
1176
+ "originalRequest": {
1177
+ "method": "GET",
1178
+ "description": "GET /api/v1/users/:id\napi/v1/users#show\nRoute: api_v1_user",
1179
+ "header": [
1180
+ {
1181
+ "key": "Accept",
1182
+ "value": "application/json"
1183
+ }
1184
+ ],
1185
+ "url": {
1186
+ "raw": "{{base_url}}/api/v1/users/1",
1187
+ "host": [
1188
+ "{{base_url}}"
1189
+ ],
1190
+ "path": [
1191
+ "api",
1192
+ "v1",
1193
+ "users",
1194
+ "1"
1195
+ ]
1196
+ }
1197
+ },
1198
+ "status": "OK",
1199
+ "code": 200,
1200
+ "_postman_previewlanguage": "json",
1201
+ "header": [
1202
+ {
1203
+ "key": "content-type",
1204
+ "value": "application/json; charset=utf-8"
1205
+ }
1206
+ ],
1207
+ "body": "{\n \"id\": 1,\n \"name\": \"John Doe\",\n \"email\": \"john@example.com\"\n}"
1208
+ },
1209
+ {
1210
+ "name": "404 Not Found",
1211
+ "originalRequest": {
1212
+ "method": "GET",
1213
+ "description": "GET /api/v1/users/:id\napi/v1/users#show\nRoute: api_v1_user",
1214
+ "header": [
1215
+ {
1216
+ "key": "Accept",
1217
+ "value": "application/json"
1218
+ }
1219
+ ],
1220
+ "url": {
1221
+ "raw": "{{base_url}}/api/v1/users/999",
1222
+ "host": [
1223
+ "{{base_url}}"
1224
+ ],
1225
+ "path": [
1226
+ "api",
1227
+ "v1",
1228
+ "users",
1229
+ "999"
1230
+ ]
1231
+ }
1232
+ },
1233
+ "status": "Not Found",
1234
+ "code": 404,
1235
+ "_postman_previewlanguage": "json",
1236
+ "header": [
1237
+ {
1238
+ "key": "content-type",
1239
+ "value": "application/json; charset=utf-8"
1240
+ }
1241
+ ],
1242
+ "body": "{\n \"error\": \"Not Found\"\n}"
1243
+ }
1244
+ ]
1245
+ }
1246
+ ]
1247
+ }
1248
+ ]
1249
+ }
1250
+ ]
1251
+ }
1252
+ ],
1253
+ "variable": [
1254
+ {
1255
+ "key": "base_url",
1256
+ "value": "http://localhost:3000",
1257
+ "type": "string"
1258
+ },
1259
+ {
1260
+ "key": "api_key",
1261
+ "value": "",
1262
+ "type": "string"
1263
+ },
1264
+ {
1265
+ "key": "password",
1266
+ "value": "",
1267
+ "type": "string"
1268
+ },
1269
+ {
1270
+ "key": "secret",
1271
+ "value": "",
1272
+ "type": "string"
1273
+ },
1274
+ {
1275
+ "key": "token",
1276
+ "value": "",
1277
+ "type": "string"
1278
+ }
1279
+ ],
1280
+ "auth": {
1281
+ "type": "bearer",
1282
+ "bearer": [
1283
+ {
1284
+ "key": "token",
1285
+ "value": "{{token}}",
1286
+ "type": "string"
1287
+ }
1288
+ ]
1289
+ }
1290
+ }