lib/generators/documentation/scaffold/templates/resource.md.tt in documentation-zero-0.0.6 vs lib/generators/documentation/scaffold/templates/resource.md.tt in documentation-zero-0.0.7
- old
+ new
@@ -17,12 +17,12 @@
- `GET /<%= plural_name %>.json` will return a [paginated list](../README.md#pagination) of <%= human_name.pluralize.downcase %>.
<!--
_Optional query parameters_:
-* `attribute1` - when set to true, will only return resources that are completed.
-* `attribute2` - when set to true, will only return resources that are completed.
+* `attribute1` - when set to true, will only return resources that...
+* `attribute2` - when set to true, will only return resources that...
-->
See the [<%= class_name %> model](#<%= class_name.downcase %>-model) for more info on the response payload.
## Get <%= human_name.downcase %>
@@ -34,35 +34,31 @@
## Create <%= human_name.downcase %>
- `POST /<%= plural_name %>.json` creates <%= human_name.downcase %>.
<!--
-**Required parameters**: `attribute1` and `attribute2`.
+**Required parameters**:
+
+<% attributes.each do |attribute| -%>
+* `<%= attribute.column_name %>` - <%= attribute.name.humanize(capitalize: false) %> of the <%= human_name.downcase %>.
+<% end -%>
-->
_Optional parameters_:
<% attributes.each do |attribute| -%>
-* `<%= attribute.column_name %>` - attribute from <%= human_name.downcase %>.
+* `<%= attribute.column_name %>` - <%= attribute.name.humanize(capitalize: false) %> of the <%= human_name.downcase %>.
<% end -%>
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.
## Update <%= human_name.downcase %>
- `PUT /<%= plural_name %>/1.json` allows changing the <%= human_name.downcase %> with an ID of `1`.
-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.
+You may change any of the required or optional parameters as listed in the [create <%= human_name.downcase %>](#create-<%= singular_name.dasherize %>) endpoint.
-<!--
-**Required parameters**: `attribute1` and `attribute2`.
--->
-
-_Optional parameters_:
-
-<% attributes_names.each do |attribute| -%>
-* `<%= attribute %>` - attribute from <%= human_name.downcase %>.
-<% end -%>
+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.
## Delete <%= human_name.downcase %>
- `DELETE /<%= plural_name %>/1.json` will delete the <%= human_name.downcase %> with an ID of `1`.