lib/restspec/runners/docs/templates/docs.md.erb in restspec-0.2 vs lib/restspec/runners/docs/templates/docs.md.erb in restspec-0.2.1

- old
+ new

@@ -10,28 +10,23 @@ <% if payload_schema = endpoint.schema_for(:payload) %> #### Payload The payload is an instance of the **<%= payload_schema.name %>** schema. -<% sample = Restspec::Schema::SchemaExample.new(payload_schema).value %> - ```json -<%= JSON.pretty_generate(sample).gsub(/^/, ' ') %> +<%= json_example payload_schema %> ``` - <% end %> #### Response <% if response_schema = endpoint.schema_for(:response) %> - Returns schema **<%= response_schema.name %>** +Returns schema **<%= response_schema.name %>** - <% sample = Restspec::Schema::SchemaExample.new(response_schema).value %> - ```json -<%= JSON.pretty_generate(sample).gsub(/^/, ' ') %> +<%= json_example response_schema %> ``` <% else %> - The response is empty. +The response is empty. <% end %> <% end %> <% end %>