documentation-zero 0.0.6 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4882b26240b6143fc91284a6b50e230a21fb3367ff223fbbf74b85b582622e67
4
- data.tar.gz: c52ebd9ece21e06dd2397e6879ae07661d491198b8ef2a88169d929effb9b484
3
+ metadata.gz: 25b3388ee2af025b7d1144d1f359c18ce4d75daf4d2d6e69845b4c642174cc43
4
+ data.tar.gz: 50e5e4c9b83f9a1315861cef29a97f1415394357adb82b97f69504a095ca7205
5
5
  SHA512:
6
- metadata.gz: 1807652142ed5011dd35be639788c2bc651c35f08051d1f95a602deb68f59ff17fd49d87082fcc5189e7381669d4b18e6e26345ecb1b07696418d830992c3260
7
- data.tar.gz: c42fc5525c9057585ee27103bb58a42650507835c5531c77589e00affdc1efc6ce0237d9ff8d3fcbad7c9579b1ac30bc607d84c468731e8814678023b6cf4dfb
6
+ metadata.gz: 6f093fa94fd57cc9159a0130635164c468e2541744ecee8d7b9693569a9c04542179a65d37dcd07083ad4006c9e71b8a5b4d8e52dd035dde4f71a09e338f17cf
7
+ data.tar.gz: 0ae4198e2eca599ae54a4594692e712e31e42a33f62fb8a7cf497a40a7abb97bf75b64555f1606b57f3816a274bdfeceb9245809fc9aa97075316993d63dffaf
@@ -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 are completed.
23
- * `attribute2` - when set to true, will only return resources that are completed.
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**: `attribute1` and `attribute2`.
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` - attribute from post.
45
- * `content` - attribute from post.
46
- * `published` - attribute from post.
47
- * `user_id` - attribute from post.
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
- 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.
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
- * `title` - attribute from post.
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
 
@@ -82,6 +78,8 @@ This endpoint will return `204 No Content` if successful. No parameters are requ
82
78
  "title": "string",
83
79
  "content": "string",
84
80
  "published": "boolean",
85
- "user": "users.md#user-model",
81
+ "user_id": "integer",
82
+ "created_at": "datetime",
83
+ "updated_at": "datetime"
86
84
  }
87
85
  ```
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- documentation-zero (0.0.6)
4
+ documentation-zero (0.0.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
 
@@ -24,7 +24,7 @@ rails generate documentation:readme
24
24
  rails generate documentation:scaffold posts title:string body:text published:boolean user:references
25
25
  ```
26
26
 
27
- Add ```- [Posts](sections/posts.md)``` to API endpoints section.
27
+ Add `- [Posts](sections/posts.md)` to API endpoints section.
28
28
 
29
29
  ## Development
30
30
 
@@ -1,3 +1,3 @@
1
1
  module DocumentationZero
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -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 are completed.
23
- * `attribute2` - when set to true, will only return resources that are completed.
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**: `attribute1` and `attribute2`.
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 from <%= human_name.downcase %>.
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
- 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.
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
 
@@ -81,12 +77,14 @@ This endpoint will return `204 No Content` if successful. No parameters are requ
81
77
  <% if attribute.password_digest? -%>
82
78
  "password_digest": "string",
83
79
  <% elsif attribute.token? -%>
84
- "<%= attribute.name %>": "string",
80
+ "<%= attribute.column_name %>": "string",
85
81
  <% elsif attribute.reference? -%>
86
- "<%= attribute.name %>": "<%= attribute.name.pluralize %>.md#<%= attribute.name.dasherize %>-model",
82
+ "<%= attribute.column_name %>": "integer",
87
83
  <% elsif !attribute.virtual? -%>
88
- "<%= attribute.name %>": "<%= attribute.type %>",
84
+ "<%= attribute.column_name %>": "<%= attribute.type %>",
89
85
  <% end -%>
90
86
  <% end -%>
87
+ "created_at": "datetime",
88
+ "updated_at": "datetime"
91
89
  }
92
90
  ```
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: documentation-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon