documentation-zero 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.documentation_api/sections/posts.md +14 -18
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/documentation_zero/version.rb +1 -1
- data/lib/generators/documentation/scaffold/templates/resource.md.tt +10 -14
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f1e943d71e91ceb6caa7cba651a86e3f93e70c5ac1d2e27bd0498fd9d2a853
|
4
|
+
data.tar.gz: fff3f3e4acf8c71edff06491824431a1c71ccb660355aea8b79eb39c3a824f58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96e451239ab9a7ae56c792d0901a1c22128983273dc1a827a2f26b236b573a10e38565ebec7a7510161b1b1e108f7e99b8c9cedf22bb59995422a88febd721bd
|
7
|
+
data.tar.gz: 4778a6f4796e2d59f244a2af8982b3512136276c7d4b829990fc13d74e5b89f08631a2f35f97247324a4c0d7c0297cb954943f259d6910611956db83068c4939
|
@@ -19,8 +19,8 @@ Models:
|
|
19
19
|
<!--
|
20
20
|
_Optional query parameters_:
|
21
21
|
|
22
|
-
* `attribute1` - when set to true, will only return resources that
|
23
|
-
* `attribute2` - when set to true, will only return resources that
|
22
|
+
* `attribute1` - when set to true, will only return resources that...
|
23
|
+
* `attribute2` - when set to true, will only return resources that...
|
24
24
|
-->
|
25
25
|
|
26
26
|
See the [Post model](#post-model) for more info on the response payload.
|
@@ -36,15 +36,20 @@ See the [Post model](#post-model) for more info on the response payload.
|
|
36
36
|
- `POST /posts.json` creates post.
|
37
37
|
|
38
38
|
<!--
|
39
|
-
**Required parameters**:
|
39
|
+
**Required parameters**:
|
40
|
+
|
41
|
+
* `title` - title of the post.
|
42
|
+
* `content` - content of the post.
|
43
|
+
* `published` - published of the post.
|
44
|
+
* `user_id` - user of the post.
|
40
45
|
-->
|
41
46
|
|
42
47
|
_Optional parameters_:
|
43
48
|
|
44
|
-
* `title` -
|
45
|
-
* `content` -
|
46
|
-
* `published` -
|
47
|
-
* `user_id` -
|
49
|
+
* `title` - title of the post.
|
50
|
+
* `content` - content of the post.
|
51
|
+
* `published` - published of the post.
|
52
|
+
* `user_id` - user of the post.
|
48
53
|
|
49
54
|
This endpoint will return `201 Created` with the current JSON representation of the post if the creation was a success. See the [Post model](#post-model) for more info on the payload.
|
50
55
|
|
@@ -52,18 +57,9 @@ This endpoint will return `201 Created` with the current JSON representation of
|
|
52
57
|
|
53
58
|
- `PUT /posts/1.json` allows changing the post with an ID of `1`.
|
54
59
|
|
55
|
-
|
56
|
-
|
57
|
-
<!--
|
58
|
-
**Required parameters**: `attribute1` and `attribute2`.
|
59
|
-
-->
|
60
|
-
|
61
|
-
_Optional parameters_:
|
60
|
+
You may change any of the required or optional parameters as listed in the [create post](#create-post) endpoint.
|
62
61
|
|
63
|
-
|
64
|
-
* `content` - attribute from post.
|
65
|
-
* `published` - attribute from post.
|
66
|
-
* `user_id` - attribute from post.
|
62
|
+
This endpoint will return `200 OK` with the current JSON representation of the post if the update was a success. See the [Post model](#post-model) for more info on the payload.
|
67
63
|
|
68
64
|
## Delete post
|
69
65
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@ The purpose of documentation zero is to generate a scaffold for rails api docume
|
|
4
4
|
|
5
5
|
## Example
|
6
6
|
|
7
|
-
You can see an example of the generated documentation [here](.documentation_api/README.md)
|
7
|
+
You can see an example of the generated documentation [here](.documentation_api/README.md).
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -19,8 +19,8 @@ Models:
|
|
19
19
|
<!--
|
20
20
|
_Optional query parameters_:
|
21
21
|
|
22
|
-
* `attribute1` - when set to true, will only return resources that
|
23
|
-
* `attribute2` - when set to true, will only return resources that
|
22
|
+
* `attribute1` - when set to true, will only return resources that...
|
23
|
+
* `attribute2` - when set to true, will only return resources that...
|
24
24
|
-->
|
25
25
|
|
26
26
|
See the [<%= class_name %> model](#<%= class_name.downcase %>-model) for more info on the response payload.
|
@@ -36,13 +36,17 @@ See the [<%= class_name %> model](#<%= class_name.downcase %>-model) for more in
|
|
36
36
|
- `POST /<%= plural_name %>.json` creates <%= human_name.downcase %>.
|
37
37
|
|
38
38
|
<!--
|
39
|
-
**Required parameters**:
|
39
|
+
**Required parameters**:
|
40
|
+
|
41
|
+
<% attributes.each do |attribute| -%>
|
42
|
+
* `<%= attribute.column_name %>` - <%= attribute.name.humanize(capitalize: false) %> of the <%= human_name.downcase %>.
|
43
|
+
<% end -%>
|
40
44
|
-->
|
41
45
|
|
42
46
|
_Optional parameters_:
|
43
47
|
|
44
48
|
<% attributes.each do |attribute| -%>
|
45
|
-
* `<%= attribute.column_name %>` - attribute
|
49
|
+
* `<%= attribute.column_name %>` - <%= attribute.name.humanize(capitalize: false) %> of the <%= human_name.downcase %>.
|
46
50
|
<% end -%>
|
47
51
|
|
48
52
|
This endpoint will return `201 Created` with the current JSON representation of the <%= human_name.downcase %> if the creation was a success. See the [<%= class_name %> model](#<%= class_name.downcase %>-model) for more info on the payload.
|
@@ -51,17 +55,9 @@ This endpoint will return `201 Created` with the current JSON representation of
|
|
51
55
|
|
52
56
|
- `PUT /<%= plural_name %>/1.json` allows changing the <%= human_name.downcase %> with an ID of `1`.
|
53
57
|
|
54
|
-
|
58
|
+
You may change any of the required or optional parameters as listed in the [create <%= human_name.downcase %>](#create-<%= singular_name.dasherize %>) endpoint.
|
55
59
|
|
56
|
-
|
57
|
-
**Required parameters**: `attribute1` and `attribute2`.
|
58
|
-
-->
|
59
|
-
|
60
|
-
_Optional parameters_:
|
61
|
-
|
62
|
-
<% attributes_names.each do |attribute| -%>
|
63
|
-
* `<%= attribute %>` - attribute from <%= human_name.downcase %>.
|
64
|
-
<% end -%>
|
60
|
+
This endpoint will return `200 OK` with the current JSON representation of the <%= human_name.downcase %> if the update was a success. See the [<%= class_name %> model](#<%= class_name.downcase %>-model) for more info on the payload.
|
65
61
|
|
66
62
|
## Delete <%= human_name.downcase %>
|
67
63
|
|