reqcord 0.1.1 → 0.1.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile +5 -0
- data/README.md +13 -0
- data/gemfiles/rails_7.1.gemfile +13 -0
- data/gemfiles/rails_7.2.gemfile +13 -0
- data/gemfiles/rails_8.0.gemfile +13 -0
- data/gemfiles/rails_8.1.gemfile +13 -0
- data/lib/reqcord/version.rb +1 -1
- data/reqcord.gemspec +18 -4
- metadata +65 -217
- data/.gitignore +0 -8
- data/Gemfile.lock +0 -171
- data/examples/complex-spec-app/.rspec +0 -1
- data/examples/complex-spec-app/README.md +0 -21
- data/examples/complex-spec-app/app.rb +0 -363
- data/examples/complex-spec-app/docs/api/README.md +0 -104
- data/examples/complex-spec-app/docs/api/api/v1/admin/products/create.md +0 -117
- data/examples/complex-spec-app/docs/api/api/v1/admin/products/destroy.md +0 -51
- data/examples/complex-spec-app/docs/api/api/v1/admin/products/index.md +0 -11
- data/examples/complex-spec-app/docs/api/api/v1/admin/products/list.md +0 -106
- data/examples/complex-spec-app/docs/api/api/v1/auth/index.md +0 -9
- data/examples/complex-spec-app/docs/api/api/v1/auth/login.md +0 -76
- data/examples/complex-spec-app/docs/api/api/v1/cart-items/create.md +0 -91
- data/examples/complex-spec-app/docs/api/api/v1/cart-items/destroy.md +0 -51
- data/examples/complex-spec-app/docs/api/api/v1/cart-items/index.md +0 -10
- data/examples/complex-spec-app/docs/api/api/v1/carts/checkout.md +0 -102
- data/examples/complex-spec-app/docs/api/api/v1/carts/index.md +0 -10
- data/examples/complex-spec-app/docs/api/api/v1/carts/show.md +0 -73
- data/examples/complex-spec-app/docs/api/api/v1/home/index.md +0 -9
- data/examples/complex-spec-app/docs/api/api/v1/home/list.md +0 -47
- data/examples/complex-spec-app/docs/api/api/v1/notes/create.md +0 -94
- data/examples/complex-spec-app/docs/api/api/v1/notes/index.md +0 -10
- data/examples/complex-spec-app/docs/api/api/v1/notes/list.md +0 -61
- data/examples/complex-spec-app/docs/api/api/v1/orders/cancel.md +0 -69
- data/examples/complex-spec-app/docs/api/api/v1/orders/create.md +0 -150
- data/examples/complex-spec-app/docs/api/api/v1/orders/destroy.md +0 -37
- data/examples/complex-spec-app/docs/api/api/v1/orders/index.md +0 -13
- data/examples/complex-spec-app/docs/api/api/v1/orders/list.md +0 -78
- data/examples/complex-spec-app/docs/api/api/v1/orders/show.md +0 -83
- data/examples/complex-spec-app/docs/api/api/v1/products/index.md +0 -11
- data/examples/complex-spec-app/docs/api/api/v1/products/list.md +0 -83
- data/examples/complex-spec-app/docs/api/api/v1/products/search.md +0 -88
- data/examples/complex-spec-app/docs/api/api/v1/products/show.md +0 -71
- data/examples/complex-spec-app/docs/api/api/v1/profiles/index.md +0 -10
- data/examples/complex-spec-app/docs/api/api/v1/profiles/show.md +0 -61
- data/examples/complex-spec-app/docs/api/api/v1/profiles/update.md +0 -91
- data/examples/complex-spec-app/docs/api/api/v2/products/index.md +0 -9
- data/examples/complex-spec-app/docs/api/api/v2/products/list.md +0 -77
- data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/create.sh +0 -18
- data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/destroy.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/admin/products/list.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/auth/login.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/create.sh +0 -16
- data/examples/complex-spec-app/docs/api/curl/api/v1/cart-items/destroy.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/carts/checkout.sh +0 -13
- data/examples/complex-spec-app/docs/api/curl/api/v1/carts/show.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/home/list.sh +0 -8
- data/examples/complex-spec-app/docs/api/curl/api/v1/notes/create.sh +0 -15
- data/examples/complex-spec-app/docs/api/curl/api/v1/notes/list.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/orders/cancel.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/orders/create.sh +0 -29
- data/examples/complex-spec-app/docs/api/curl/api/v1/orders/destroy.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/orders/list.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/orders/show.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/products/list.sh +0 -8
- data/examples/complex-spec-app/docs/api/curl/api/v1/products/search.sh +0 -8
- data/examples/complex-spec-app/docs/api/curl/api/v1/products/show.sh +0 -8
- data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/show.sh +0 -9
- data/examples/complex-spec-app/docs/api/curl/api/v1/profiles/update.sh +0 -16
- data/examples/complex-spec-app/docs/api/curl/api/v2/products/list.sh +0 -8
- data/examples/complex-spec-app/docs/api/dataset.json +0 -5116
- data/examples/complex-spec-app/docs/api/postman/collection.json +0 -2519
- data/examples/complex-spec-app/generate.rb +0 -14
- data/examples/complex-spec-app/reqcord.yml +0 -28
- data/examples/complex-spec-app/spec/requests/admin_spec.rb +0 -67
- data/examples/complex-spec-app/spec/requests/cart_spec.rb +0 -61
- data/examples/complex-spec-app/spec/requests/home_and_auth_spec.rb +0 -49
- data/examples/complex-spec-app/spec/requests/orders_spec.rb +0 -124
- data/examples/complex-spec-app/spec/requests/products_spec.rb +0 -65
- data/examples/complex-spec-app/spec/spec_helper.rb +0 -17
- data/examples/complex-test-app/README.md +0 -40
- data/examples/complex-test-app/app.rb +0 -384
- data/examples/complex-test-app/docs/api/README.md +0 -104
- data/examples/complex-test-app/docs/api/api/v1/admin/products/create.md +0 -117
- data/examples/complex-test-app/docs/api/api/v1/admin/products/destroy.md +0 -51
- data/examples/complex-test-app/docs/api/api/v1/admin/products/index.md +0 -11
- data/examples/complex-test-app/docs/api/api/v1/admin/products/list.md +0 -106
- data/examples/complex-test-app/docs/api/api/v1/auth/index.md +0 -9
- data/examples/complex-test-app/docs/api/api/v1/auth/login.md +0 -76
- data/examples/complex-test-app/docs/api/api/v1/cart-items/create.md +0 -91
- data/examples/complex-test-app/docs/api/api/v1/cart-items/destroy.md +0 -51
- data/examples/complex-test-app/docs/api/api/v1/cart-items/index.md +0 -10
- data/examples/complex-test-app/docs/api/api/v1/carts/checkout.md +0 -102
- data/examples/complex-test-app/docs/api/api/v1/carts/index.md +0 -10
- data/examples/complex-test-app/docs/api/api/v1/carts/show.md +0 -73
- data/examples/complex-test-app/docs/api/api/v1/home/index.md +0 -9
- data/examples/complex-test-app/docs/api/api/v1/home/list.md +0 -47
- data/examples/complex-test-app/docs/api/api/v1/notes/create.md +0 -94
- data/examples/complex-test-app/docs/api/api/v1/notes/index.md +0 -10
- data/examples/complex-test-app/docs/api/api/v1/notes/list.md +0 -61
- data/examples/complex-test-app/docs/api/api/v1/orders/cancel.md +0 -69
- data/examples/complex-test-app/docs/api/api/v1/orders/create.md +0 -150
- data/examples/complex-test-app/docs/api/api/v1/orders/destroy.md +0 -37
- data/examples/complex-test-app/docs/api/api/v1/orders/index.md +0 -13
- data/examples/complex-test-app/docs/api/api/v1/orders/list.md +0 -71
- data/examples/complex-test-app/docs/api/api/v1/orders/show.md +0 -83
- data/examples/complex-test-app/docs/api/api/v1/products/index.md +0 -11
- data/examples/complex-test-app/docs/api/api/v1/products/list.md +0 -83
- data/examples/complex-test-app/docs/api/api/v1/products/search.md +0 -88
- data/examples/complex-test-app/docs/api/api/v1/products/show.md +0 -71
- data/examples/complex-test-app/docs/api/api/v1/profiles/index.md +0 -10
- data/examples/complex-test-app/docs/api/api/v1/profiles/show.md +0 -61
- data/examples/complex-test-app/docs/api/api/v1/profiles/update.md +0 -91
- data/examples/complex-test-app/docs/api/api/v2/products/index.md +0 -9
- data/examples/complex-test-app/docs/api/api/v2/products/list.md +0 -77
- data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/create.sh +0 -18
- data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/destroy.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/admin/products/list.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/auth/login.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/create.sh +0 -16
- data/examples/complex-test-app/docs/api/curl/api/v1/cart-items/destroy.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/carts/checkout.sh +0 -13
- data/examples/complex-test-app/docs/api/curl/api/v1/carts/show.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/home/list.sh +0 -8
- data/examples/complex-test-app/docs/api/curl/api/v1/notes/create.sh +0 -15
- data/examples/complex-test-app/docs/api/curl/api/v1/notes/list.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/orders/cancel.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/orders/create.sh +0 -29
- data/examples/complex-test-app/docs/api/curl/api/v1/orders/destroy.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/orders/list.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/orders/show.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/products/list.sh +0 -8
- data/examples/complex-test-app/docs/api/curl/api/v1/products/search.sh +0 -8
- data/examples/complex-test-app/docs/api/curl/api/v1/products/show.sh +0 -8
- data/examples/complex-test-app/docs/api/curl/api/v1/profiles/show.sh +0 -9
- data/examples/complex-test-app/docs/api/curl/api/v1/profiles/update.sh +0 -16
- data/examples/complex-test-app/docs/api/curl/api/v2/products/list.sh +0 -8
- data/examples/complex-test-app/docs/api/dataset.json +0 -5109
- data/examples/complex-test-app/docs/api/postman/collection.json +0 -2568
- data/examples/complex-test-app/generate.rb +0 -14
- data/examples/complex-test-app/reqcord.yml +0 -28
- data/examples/complex-test-app/test/integration/admin_test.rb +0 -70
- data/examples/complex-test-app/test/integration/cart_test.rb +0 -64
- data/examples/complex-test-app/test/integration/home_and_auth_test.rb +0 -53
- data/examples/complex-test-app/test/integration/orders_test.rb +0 -127
- data/examples/complex-test-app/test/integration/products_test.rb +0 -66
- data/examples/spec-app/.rspec +0 -1
- data/examples/spec-app/README.md +0 -36
- data/examples/spec-app/app.rb +0 -209
- data/examples/spec-app/docs/api/README.md +0 -45
- data/examples/spec-app/docs/api/api/v1/customers/create.md +0 -95
- data/examples/spec-app/docs/api/api/v1/customers/index.md +0 -11
- data/examples/spec-app/docs/api/api/v1/customers/list.md +0 -67
- data/examples/spec-app/docs/api/api/v1/customers/show.md +0 -65
- data/examples/spec-app/docs/api/api/v1/tasks/complete.md +0 -51
- data/examples/spec-app/docs/api/api/v1/tasks/create.md +0 -90
- data/examples/spec-app/docs/api/api/v1/tasks/destroy.md +0 -35
- data/examples/spec-app/docs/api/api/v1/tasks/index.md +0 -14
- data/examples/spec-app/docs/api/api/v1/tasks/list.md +0 -65
- data/examples/spec-app/docs/api/api/v1/tasks/show.md +0 -65
- data/examples/spec-app/docs/api/api/v1/tasks/update.md +0 -74
- data/examples/spec-app/docs/api/api/v1/users/create.md +0 -95
- data/examples/spec-app/docs/api/api/v1/users/index.md +0 -11
- data/examples/spec-app/docs/api/api/v1/users/list.md +0 -67
- data/examples/spec-app/docs/api/api/v1/users/show.md +0 -65
- data/examples/spec-app/docs/api/curl/api/v1/customers/create.sh +0 -17
- data/examples/spec-app/docs/api/curl/api/v1/customers/list.sh +0 -9
- data/examples/spec-app/docs/api/curl/api/v1/customers/show.sh +0 -9
- data/examples/spec-app/docs/api/curl/api/v1/tasks/complete.sh +0 -8
- data/examples/spec-app/docs/api/curl/api/v1/tasks/create.sh +0 -15
- data/examples/spec-app/docs/api/curl/api/v1/tasks/destroy.sh +0 -8
- data/examples/spec-app/docs/api/curl/api/v1/tasks/list.sh +0 -8
- data/examples/spec-app/docs/api/curl/api/v1/tasks/show.sh +0 -8
- data/examples/spec-app/docs/api/curl/api/v1/tasks/update.sh +0 -14
- data/examples/spec-app/docs/api/curl/api/v1/users/create.sh +0 -17
- data/examples/spec-app/docs/api/curl/api/v1/users/list.sh +0 -9
- data/examples/spec-app/docs/api/curl/api/v1/users/show.sh +0 -9
- data/examples/spec-app/docs/api/dataset.json +0 -2402
- data/examples/spec-app/docs/api/postman/collection.json +0 -1290
- data/examples/spec-app/generate.rb +0 -14
- data/examples/spec-app/reqcord.yml +0 -27
- data/examples/spec-app/spec/requests/customers_spec.rb +0 -71
- data/examples/spec-app/spec/requests/tasks_spec.rb +0 -78
- data/examples/spec-app/spec/requests/users_spec.rb +0 -68
- data/examples/spec-app/spec/spec_helper.rb +0 -17
- data/examples/test-app/README.md +0 -57
- data/examples/test-app/app.rb +0 -212
- data/examples/test-app/docs/api/README.md +0 -45
- data/examples/test-app/docs/api/api/v1/customers/create.md +0 -95
- data/examples/test-app/docs/api/api/v1/customers/index.md +0 -11
- data/examples/test-app/docs/api/api/v1/customers/list.md +0 -67
- data/examples/test-app/docs/api/api/v1/customers/show.md +0 -65
- data/examples/test-app/docs/api/api/v1/tasks/complete.md +0 -51
- data/examples/test-app/docs/api/api/v1/tasks/create.md +0 -90
- data/examples/test-app/docs/api/api/v1/tasks/destroy.md +0 -35
- data/examples/test-app/docs/api/api/v1/tasks/index.md +0 -14
- data/examples/test-app/docs/api/api/v1/tasks/list.md +0 -65
- data/examples/test-app/docs/api/api/v1/tasks/show.md +0 -65
- data/examples/test-app/docs/api/api/v1/tasks/update.md +0 -74
- data/examples/test-app/docs/api/api/v1/users/create.md +0 -95
- data/examples/test-app/docs/api/api/v1/users/index.md +0 -11
- data/examples/test-app/docs/api/api/v1/users/list.md +0 -67
- data/examples/test-app/docs/api/api/v1/users/show.md +0 -65
- data/examples/test-app/docs/api/curl/api/v1/customers/create.sh +0 -17
- data/examples/test-app/docs/api/curl/api/v1/customers/list.sh +0 -9
- data/examples/test-app/docs/api/curl/api/v1/customers/show.sh +0 -9
- data/examples/test-app/docs/api/curl/api/v1/tasks/complete.sh +0 -8
- data/examples/test-app/docs/api/curl/api/v1/tasks/create.sh +0 -15
- data/examples/test-app/docs/api/curl/api/v1/tasks/destroy.sh +0 -8
- data/examples/test-app/docs/api/curl/api/v1/tasks/list.sh +0 -8
- data/examples/test-app/docs/api/curl/api/v1/tasks/show.sh +0 -8
- data/examples/test-app/docs/api/curl/api/v1/tasks/update.sh +0 -14
- data/examples/test-app/docs/api/curl/api/v1/users/create.sh +0 -17
- data/examples/test-app/docs/api/curl/api/v1/users/list.sh +0 -9
- data/examples/test-app/docs/api/curl/api/v1/users/show.sh +0 -9
- data/examples/test-app/docs/api/dataset.json +0 -2402
- data/examples/test-app/docs/api/postman/collection.json +0 -1290
- data/examples/test-app/generate.rb +0 -14
- data/examples/test-app/reqcord.yml +0 -28
- data/examples/test-app/test/integration/customers_test.rb +0 -72
- data/examples/test-app/test/integration/tasks_test.rb +0 -80
- data/examples/test-app/test/integration/users_test.rb +0 -72
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Customers
|
|
2
|
-
|
|
3
|
-
Namespace: `api/v1`
|
|
4
|
-
|
|
5
|
-
API version: `v1`
|
|
6
|
-
|
|
7
|
-
| Method | Path | Description |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| `GET` | [`/api/v1/customers`](list.md) | List Customers |
|
|
10
|
-
| `POST` | [`/api/v1/customers`](create.md) | Create Customer |
|
|
11
|
-
| `GET` | [`/api/v1/customers/:id`](show.md) | Get Customer |
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# List Customers
|
|
2
|
-
|
|
3
|
-
`GET /api/v1/customers`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Authorization | `Bearer {{token}}` |
|
|
12
|
-
| Accept | `application/json` |
|
|
13
|
-
|
|
14
|
-
## Query Parameters
|
|
15
|
-
|
|
16
|
-
| Field | Type | Required | Values |
|
|
17
|
-
| --- | --- | --- | --- |
|
|
18
|
-
| `per_page` | integer | yes | `1` |
|
|
19
|
-
|
|
20
|
-
## cURL
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
curl --request GET \
|
|
24
|
-
--url "http://localhost:3000/api/v1/customers?per_page=1" \
|
|
25
|
-
--header "Authorization: Bearer {{token}}" \
|
|
26
|
-
--header "Accept: application/json"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Responses
|
|
30
|
-
|
|
31
|
-
### 200 OK
|
|
32
|
-
|
|
33
|
-
#### Fields
|
|
34
|
-
|
|
35
|
-
| Field | Type | Required | Values |
|
|
36
|
-
| --- | --- | --- | --- |
|
|
37
|
-
| `[].id` | integer | yes | `1` |
|
|
38
|
-
| `[].name` | string | yes | `"John Doe"` |
|
|
39
|
-
| `[].email` | string | yes | `"john@example.com"` |
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
[
|
|
43
|
-
{
|
|
44
|
-
"id": 1,
|
|
45
|
-
"name": "John Doe",
|
|
46
|
-
"email": "john@example.com"
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 401 Unauthorized
|
|
52
|
-
|
|
53
|
-
#### Fields
|
|
54
|
-
|
|
55
|
-
| Field | Type | Required | Values |
|
|
56
|
-
| --- | --- | --- | --- |
|
|
57
|
-
| `error` | string | yes | `"Unauthorized"` |
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"error": "Unauthorized"
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
Resource: [Customers](index.md)
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Get Customer
|
|
2
|
-
|
|
3
|
-
`GET /api/v1/customers/:id`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Authorization | `Bearer {{token}}` |
|
|
12
|
-
| Accept | `application/json` |
|
|
13
|
-
|
|
14
|
-
## Path Parameters
|
|
15
|
-
|
|
16
|
-
| Field | Type | Required | Values |
|
|
17
|
-
| --- | --- | --- | --- |
|
|
18
|
-
| `id` | string | yes | `"1"` |
|
|
19
|
-
|
|
20
|
-
## cURL
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
curl --request GET \
|
|
24
|
-
--url "http://localhost:3000/api/v1/customers/1" \
|
|
25
|
-
--header "Authorization: Bearer {{token}}" \
|
|
26
|
-
--header "Accept: application/json"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Responses
|
|
30
|
-
|
|
31
|
-
### 200 OK
|
|
32
|
-
|
|
33
|
-
#### Fields
|
|
34
|
-
|
|
35
|
-
| Field | Type | Required | Values |
|
|
36
|
-
| --- | --- | --- | --- |
|
|
37
|
-
| `id` | integer | yes | `1` |
|
|
38
|
-
| `name` | string | yes | `"John Doe"` |
|
|
39
|
-
| `email` | string | yes | `"john@example.com"` |
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"id": 1,
|
|
44
|
-
"name": "John Doe",
|
|
45
|
-
"email": "john@example.com"
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 404 Not Found
|
|
50
|
-
|
|
51
|
-
#### Fields
|
|
52
|
-
|
|
53
|
-
| Field | Type | Required | Values |
|
|
54
|
-
| --- | --- | --- | --- |
|
|
55
|
-
| `error` | string | yes | `"Not Found"` |
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{
|
|
59
|
-
"error": "Not Found"
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
Resource: [Customers](index.md)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Complete Task
|
|
2
|
-
|
|
3
|
-
`POST /api/v1/tasks/:id/complete`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Accept | `application/json` |
|
|
12
|
-
|
|
13
|
-
## Path Parameters
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Values |
|
|
16
|
-
| --- | --- | --- | --- |
|
|
17
|
-
| `id` | string | yes | `"1"` |
|
|
18
|
-
|
|
19
|
-
## cURL
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
curl --request POST \
|
|
23
|
-
--url "http://localhost:3000/api/v1/tasks/1/complete" \
|
|
24
|
-
--header "Accept: application/json"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Responses
|
|
28
|
-
|
|
29
|
-
### 200 OK
|
|
30
|
-
|
|
31
|
-
#### Fields
|
|
32
|
-
|
|
33
|
-
| Field | Type | Required | Values |
|
|
34
|
-
| --- | --- | --- | --- |
|
|
35
|
-
| `id` | integer | yes | `1` |
|
|
36
|
-
| `title` | string | yes | `"Write the docs"` |
|
|
37
|
-
| `status` | string | yes | `"done"` |
|
|
38
|
-
| `priority` | string | yes | `"high"` |
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"id": 1,
|
|
43
|
-
"title": "Write the docs",
|
|
44
|
-
"status": "done",
|
|
45
|
-
"priority": "high"
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
Resource: [Tasks](index.md)
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# Create Task
|
|
2
|
-
|
|
3
|
-
`POST /api/v1/tasks`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Content-Type | `application/json` |
|
|
12
|
-
| Accept | `application/json` |
|
|
13
|
-
|
|
14
|
-
## Body Parameters
|
|
15
|
-
|
|
16
|
-
| Field | Type | Required | Values |
|
|
17
|
-
| --- | --- | --- | --- |
|
|
18
|
-
| `task.title` | string | yes | `"Review the release"` |
|
|
19
|
-
| `task.priority` | string | yes | `"high"` \| `"low"` |
|
|
20
|
-
|
|
21
|
-
## Example Request
|
|
22
|
-
|
|
23
|
-
```json
|
|
24
|
-
{
|
|
25
|
-
"task": {
|
|
26
|
-
"title": "Review the release",
|
|
27
|
-
"priority": "high"
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## cURL
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
curl --request POST \
|
|
36
|
-
--url "http://localhost:3000/api/v1/tasks" \
|
|
37
|
-
--header "Content-Type: application/json" \
|
|
38
|
-
--header "Accept: application/json" \
|
|
39
|
-
--data '{
|
|
40
|
-
"task": {
|
|
41
|
-
"title": "Review the release",
|
|
42
|
-
"priority": "high"
|
|
43
|
-
}
|
|
44
|
-
}'
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Responses
|
|
48
|
-
|
|
49
|
-
### 201 Created
|
|
50
|
-
|
|
51
|
-
#### Fields
|
|
52
|
-
|
|
53
|
-
| Field | Type | Required | Values |
|
|
54
|
-
| --- | --- | --- | --- |
|
|
55
|
-
| `id` | integer | yes | `4` |
|
|
56
|
-
| `status` | string | yes | `"open"` |
|
|
57
|
-
| `title` | string | yes | `"Review the release"` |
|
|
58
|
-
| `priority` | string | yes | `"high"` \| `"low"` |
|
|
59
|
-
|
|
60
|
-
```json
|
|
61
|
-
{
|
|
62
|
-
"id": 4,
|
|
63
|
-
"status": "open",
|
|
64
|
-
"title": "Review the release",
|
|
65
|
-
"priority": "high"
|
|
66
|
-
}
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### 422 Unprocessable Content
|
|
70
|
-
|
|
71
|
-
#### Fields
|
|
72
|
-
|
|
73
|
-
| Field | Type | Required | Values |
|
|
74
|
-
| --- | --- | --- | --- |
|
|
75
|
-
| `errors.title[]` | string | no | `"can't be blank"` |
|
|
76
|
-
| `errors.priority[]` | string | no | `"is not included in the list"` |
|
|
77
|
-
|
|
78
|
-
```json
|
|
79
|
-
{
|
|
80
|
-
"errors": {
|
|
81
|
-
"title": [
|
|
82
|
-
"can't be blank"
|
|
83
|
-
]
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
Resource: [Tasks](index.md)
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# Delete Task
|
|
2
|
-
|
|
3
|
-
`DELETE /api/v1/tasks/:id`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Accept | `application/json` |
|
|
12
|
-
|
|
13
|
-
## Path Parameters
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Values |
|
|
16
|
-
| --- | --- | --- | --- |
|
|
17
|
-
| `id` | string | yes | `"3"` |
|
|
18
|
-
|
|
19
|
-
## cURL
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
curl --request DELETE \
|
|
23
|
-
--url "http://localhost:3000/api/v1/tasks/3" \
|
|
24
|
-
--header "Accept: application/json"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Responses
|
|
28
|
-
|
|
29
|
-
### 204 No Content
|
|
30
|
-
|
|
31
|
-
_No response body._
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
Resource: [Tasks](index.md)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Tasks
|
|
2
|
-
|
|
3
|
-
Namespace: `api/v1`
|
|
4
|
-
|
|
5
|
-
API version: `v1`
|
|
6
|
-
|
|
7
|
-
| Method | Path | Description |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| `GET` | [`/api/v1/tasks`](list.md) | List Tasks |
|
|
10
|
-
| `POST` | [`/api/v1/tasks`](create.md) | Create Task |
|
|
11
|
-
| `DELETE` | [`/api/v1/tasks/:id`](destroy.md) | Delete Task |
|
|
12
|
-
| `GET` | [`/api/v1/tasks/:id`](show.md) | Get Task |
|
|
13
|
-
| `PATCH` | [`/api/v1/tasks/:id`](update.md) | Update Task |
|
|
14
|
-
| `POST` | [`/api/v1/tasks/:id/complete`](complete.md) | Complete Task |
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# List Tasks
|
|
2
|
-
|
|
3
|
-
`GET /api/v1/tasks`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Accept | `application/json` |
|
|
12
|
-
|
|
13
|
-
## Query Parameters
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Values |
|
|
16
|
-
| --- | --- | --- | --- |
|
|
17
|
-
| `status` | string | no | `"done"` \| `"open"` |
|
|
18
|
-
|
|
19
|
-
## cURL
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
curl --request GET \
|
|
23
|
-
--url "http://localhost:3000/api/v1/tasks" \
|
|
24
|
-
--header "Accept: application/json"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Responses
|
|
28
|
-
|
|
29
|
-
### 200 OK
|
|
30
|
-
|
|
31
|
-
#### Fields
|
|
32
|
-
|
|
33
|
-
| Field | Type | Required | Values |
|
|
34
|
-
| --- | --- | --- | --- |
|
|
35
|
-
| `[].id` | integer | yes | `3` |
|
|
36
|
-
| `[].title` | string | yes | `"Tidy the backlog"` |
|
|
37
|
-
| `[].status` | string | yes | `"done"` \| `"open"` |
|
|
38
|
-
| `[].priority` | string | yes | `"high"` \| `"low"` |
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
[
|
|
42
|
-
{
|
|
43
|
-
"id": 1,
|
|
44
|
-
"title": "Write the docs",
|
|
45
|
-
"status": "open",
|
|
46
|
-
"priority": "high"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"id": 2,
|
|
50
|
-
"title": "Ship 0.1.1",
|
|
51
|
-
"status": "done",
|
|
52
|
-
"priority": "high"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"id": 3,
|
|
56
|
-
"title": "Tidy the backlog",
|
|
57
|
-
"status": "open",
|
|
58
|
-
"priority": "low"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
Resource: [Tasks](index.md)
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Get Task
|
|
2
|
-
|
|
3
|
-
`GET /api/v1/tasks/:id`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Accept | `application/json` |
|
|
12
|
-
|
|
13
|
-
## Path Parameters
|
|
14
|
-
|
|
15
|
-
| Field | Type | Required | Values |
|
|
16
|
-
| --- | --- | --- | --- |
|
|
17
|
-
| `id` | string | yes | `"1"` |
|
|
18
|
-
|
|
19
|
-
## cURL
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
curl --request GET \
|
|
23
|
-
--url "http://localhost:3000/api/v1/tasks/1" \
|
|
24
|
-
--header "Accept: application/json"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
## Responses
|
|
28
|
-
|
|
29
|
-
### 200 OK
|
|
30
|
-
|
|
31
|
-
#### Fields
|
|
32
|
-
|
|
33
|
-
| Field | Type | Required | Values |
|
|
34
|
-
| --- | --- | --- | --- |
|
|
35
|
-
| `id` | integer | yes | `1` |
|
|
36
|
-
| `title` | string | yes | `"Write the docs"` |
|
|
37
|
-
| `status` | string | yes | `"open"` |
|
|
38
|
-
| `priority` | string | yes | `"high"` |
|
|
39
|
-
|
|
40
|
-
```json
|
|
41
|
-
{
|
|
42
|
-
"id": 1,
|
|
43
|
-
"title": "Write the docs",
|
|
44
|
-
"status": "open",
|
|
45
|
-
"priority": "high"
|
|
46
|
-
}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 404 Not Found
|
|
50
|
-
|
|
51
|
-
#### Fields
|
|
52
|
-
|
|
53
|
-
| Field | Type | Required | Values |
|
|
54
|
-
| --- | --- | --- | --- |
|
|
55
|
-
| `error` | string | yes | `"Not Found"` |
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{
|
|
59
|
-
"error": "Not Found"
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
Resource: [Tasks](index.md)
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
# Update Task
|
|
2
|
-
|
|
3
|
-
`PATCH /api/v1/tasks/:id` (also `PUT`)
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Content-Type | `application/json` |
|
|
12
|
-
| Accept | `application/json` |
|
|
13
|
-
|
|
14
|
-
## Path Parameters
|
|
15
|
-
|
|
16
|
-
| Field | Type | Required | Values |
|
|
17
|
-
| --- | --- | --- | --- |
|
|
18
|
-
| `id` | string | yes | `"1"` |
|
|
19
|
-
|
|
20
|
-
## Body Parameters
|
|
21
|
-
|
|
22
|
-
| Field | Type | Required | Values |
|
|
23
|
-
| --- | --- | --- | --- |
|
|
24
|
-
| `task.title` | string | yes | `"Write better docs"` |
|
|
25
|
-
|
|
26
|
-
## Example Request
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"task": {
|
|
31
|
-
"title": "Write better docs"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## cURL
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
curl --request PATCH \
|
|
40
|
-
--url "http://localhost:3000/api/v1/tasks/1" \
|
|
41
|
-
--header "Content-Type: application/json" \
|
|
42
|
-
--header "Accept: application/json" \
|
|
43
|
-
--data '{
|
|
44
|
-
"task": {
|
|
45
|
-
"title": "Write better docs"
|
|
46
|
-
}
|
|
47
|
-
}'
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Responses
|
|
51
|
-
|
|
52
|
-
### 200 OK
|
|
53
|
-
|
|
54
|
-
#### Fields
|
|
55
|
-
|
|
56
|
-
| Field | Type | Required | Values |
|
|
57
|
-
| --- | --- | --- | --- |
|
|
58
|
-
| `id` | integer | yes | `1` |
|
|
59
|
-
| `title` | string | yes | `"Write better docs"` |
|
|
60
|
-
| `status` | string | yes | `"open"` |
|
|
61
|
-
| `priority` | string | yes | `"high"` |
|
|
62
|
-
|
|
63
|
-
```json
|
|
64
|
-
{
|
|
65
|
-
"id": 1,
|
|
66
|
-
"title": "Write better docs",
|
|
67
|
-
"status": "open",
|
|
68
|
-
"priority": "high"
|
|
69
|
-
}
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
Resource: [Tasks](index.md)
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
# Create User
|
|
2
|
-
|
|
3
|
-
`POST /api/v1/users`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Authorization | `Bearer {{token}}` |
|
|
12
|
-
| Content-Type | `application/json` |
|
|
13
|
-
| Accept | `application/json` |
|
|
14
|
-
|
|
15
|
-
## Body Parameters
|
|
16
|
-
|
|
17
|
-
| Field | Type | Required | Values |
|
|
18
|
-
| --- | --- | --- | --- |
|
|
19
|
-
| `user.name` | string | yes | `"Ada Lovelace"` |
|
|
20
|
-
| `user.email` | string | yes | `"ada@example.com"` |
|
|
21
|
-
| `user.status` | string | yes | `"active"` \| `"inactive"` |
|
|
22
|
-
|
|
23
|
-
## Example Request
|
|
24
|
-
|
|
25
|
-
```json
|
|
26
|
-
{
|
|
27
|
-
"user": {
|
|
28
|
-
"name": "Ada Lovelace",
|
|
29
|
-
"email": "ada@example.com",
|
|
30
|
-
"status": "active"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## cURL
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
curl --request POST \
|
|
39
|
-
--url "http://localhost:3000/api/v1/users" \
|
|
40
|
-
--header "Authorization: Bearer {{token}}" \
|
|
41
|
-
--header "Content-Type: application/json" \
|
|
42
|
-
--header "Accept: application/json" \
|
|
43
|
-
--data '{
|
|
44
|
-
"user": {
|
|
45
|
-
"name": "Ada Lovelace",
|
|
46
|
-
"email": "ada@example.com",
|
|
47
|
-
"status": "active"
|
|
48
|
-
}
|
|
49
|
-
}'
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Responses
|
|
53
|
-
|
|
54
|
-
### 201 Created
|
|
55
|
-
|
|
56
|
-
#### Fields
|
|
57
|
-
|
|
58
|
-
| Field | Type | Required | Values |
|
|
59
|
-
| --- | --- | --- | --- |
|
|
60
|
-
| `id` | integer | yes | `3` |
|
|
61
|
-
| `name` | string | yes | `"Ada Lovelace"` |
|
|
62
|
-
| `email` | string | yes | `"ada@example.com"` |
|
|
63
|
-
| `status` | string | yes | `"active"` \| `"inactive"` |
|
|
64
|
-
|
|
65
|
-
```json
|
|
66
|
-
{
|
|
67
|
-
"id": 3,
|
|
68
|
-
"name": "Ada Lovelace",
|
|
69
|
-
"email": "ada@example.com",
|
|
70
|
-
"status": "active"
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### 422 Unprocessable Content
|
|
75
|
-
|
|
76
|
-
#### Fields
|
|
77
|
-
|
|
78
|
-
| Field | Type | Required | Values |
|
|
79
|
-
| --- | --- | --- | --- |
|
|
80
|
-
| `errors.email[]` | string | no | `"can't be blank"` |
|
|
81
|
-
| `errors.status[]` | string | no | `"is not included in the list"` |
|
|
82
|
-
|
|
83
|
-
```json
|
|
84
|
-
{
|
|
85
|
-
"errors": {
|
|
86
|
-
"email": [
|
|
87
|
-
"can't be blank"
|
|
88
|
-
]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
Resource: [Users](index.md)
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Users
|
|
2
|
-
|
|
3
|
-
Namespace: `api/v1`
|
|
4
|
-
|
|
5
|
-
API version: `v1`
|
|
6
|
-
|
|
7
|
-
| Method | Path | Description |
|
|
8
|
-
| --- | --- | --- |
|
|
9
|
-
| `GET` | [`/api/v1/users`](list.md) | List Users |
|
|
10
|
-
| `POST` | [`/api/v1/users`](create.md) | Create User |
|
|
11
|
-
| `GET` | [`/api/v1/users/:id`](show.md) | Get User |
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# List Users
|
|
2
|
-
|
|
3
|
-
`GET /api/v1/users`
|
|
4
|
-
|
|
5
|
-
Namespace: `api/v1`
|
|
6
|
-
|
|
7
|
-
## Headers
|
|
8
|
-
|
|
9
|
-
| Header | Value |
|
|
10
|
-
| --- | --- |
|
|
11
|
-
| Authorization | `Bearer {{token}}` |
|
|
12
|
-
| Accept | `application/json` |
|
|
13
|
-
|
|
14
|
-
## Query Parameters
|
|
15
|
-
|
|
16
|
-
| Field | Type | Required | Values |
|
|
17
|
-
| --- | --- | --- | --- |
|
|
18
|
-
| `per_page` | integer | yes | `1` |
|
|
19
|
-
|
|
20
|
-
## cURL
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
curl --request GET \
|
|
24
|
-
--url "http://localhost:3000/api/v1/users?per_page=1" \
|
|
25
|
-
--header "Authorization: Bearer {{token}}" \
|
|
26
|
-
--header "Accept: application/json"
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Responses
|
|
30
|
-
|
|
31
|
-
### 200 OK
|
|
32
|
-
|
|
33
|
-
#### Fields
|
|
34
|
-
|
|
35
|
-
| Field | Type | Required | Values |
|
|
36
|
-
| --- | --- | --- | --- |
|
|
37
|
-
| `[].id` | integer | yes | `1` |
|
|
38
|
-
| `[].name` | string | yes | `"John Doe"` |
|
|
39
|
-
| `[].email` | string | yes | `"john@example.com"` |
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
[
|
|
43
|
-
{
|
|
44
|
-
"id": 1,
|
|
45
|
-
"name": "John Doe",
|
|
46
|
-
"email": "john@example.com"
|
|
47
|
-
}
|
|
48
|
-
]
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### 401 Unauthorized
|
|
52
|
-
|
|
53
|
-
#### Fields
|
|
54
|
-
|
|
55
|
-
| Field | Type | Required | Values |
|
|
56
|
-
| --- | --- | --- | --- |
|
|
57
|
-
| `error` | string | yes | `"Unauthorized"` |
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"error": "Unauthorized"
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
Resource: [Users](index.md)
|