Skip to content

Commit 976009d

Browse files
committed
Merge branch 'master' into remove_rack_test
2 parents a815511 + 23dca71 commit 976009d

19 files changed

+32
-26
lines changed

example/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ../
33
specs:
4-
rspec_api_documentation (0.4.3)
4+
rspec_api_documentation (0.4.4)
55
activesupport (>= 3.0.0)
66
coderay (>= 1.0.7.rc1)
77
i18n (>= 0.1.0)

example/public/docs/orders/creating_an_order.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h1>Orders API</h1>
2222

2323
<div class="article">
2424
<h2>Creating an order</h2>
25+
<h3>POST /orders</h3>
2526

2627
<h3>Parameters</h3>
2728
<table class="parameters">
@@ -89,7 +90,7 @@ <h4>Headers</h4>
8990
X-Ua-Compatible: IE=Edge,chrome=1
9091
E-Tag: &quot;5fffd66f61cdd4ab8881584dbf5e72cf&quot;
9192
Cache-Control: max-age=0, private, must-revalidate
92-
X-Runtime: 0.037236
93+
X-Runtime: 0.017610
9394
Content-Length: 58</pre>
9495
<h4>Status</h4>
9596
<pre class="response status">201 Created</pre>
@@ -120,7 +121,7 @@ <h4>Headers</h4>
120121
X-Ua-Compatible: IE=Edge,chrome=1
121122
E-Tag: &quot;5fffd66f61cdd4ab8881584dbf5e72cf&quot;
122123
Cache-Control: max-age=0, private, must-revalidate
123-
X-Runtime: 0.007070
124+
X-Runtime: 0.003642
124125
Content-Length: 58</pre>
125126
<h4>Status</h4>
126127
<pre class="response status">200 OK</pre>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"resource":"Orders","description":"Creating an order","explanation":null,"parameters":[{"name":"name","description":"Name of order","required":true,"scope":"order"},{"name":"paid","description":"If the order has been paid for","required":true,"scope":"order"},{"name":"email","description":"Email of user that placed the order","scope":"order"}],"requests":[{"method":"POST","route":"/orders","request_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>order</span><span style=\"color:#404\">&quot;</span></span>: {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>\n }\n}</pre></div>\n</div>\n","request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":201,"response_status_text":"Created","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nLocation: http://example.org/orders/1\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"5fffd66f61cdd4ab8881584dbf5e72cf\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.037236\nContent-Length: 58","curl":"curl http://localhost:3000/orders -d \"{\"order\":{\"name\":\"Order 1\",\"paid\":true,\"email\":\"[email protected]\"}}\" -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""},{"method":"GET","route":"/orders/1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"5fffd66f61cdd4ab8881584dbf5e72cf\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.007070\nContent-Length: 58","curl":"curl http://localhost:3000/orders/1 -X GET -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}
1+
{"resource":"Orders","description":"Creating an order","explanation":null,"parameters":[{"name":"name","description":"Name of order","required":true,"scope":"order"},{"name":"paid","description":"If the order has been paid for","required":true,"scope":"order"},{"name":"email","description":"Email of user that placed the order","scope":"order"}],"requests":[{"method":"POST","route":"/orders","request_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>order</span><span style=\"color:#404\">&quot;</span></span>: {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>\n }\n}</pre></div>\n</div>\n","request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":201,"response_status_text":"Created","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nLocation: http://example.org/orders/1\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"5fffd66f61cdd4ab8881584dbf5e72cf\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.017610\nContent-Length: 58","curl":"curl http://localhost:3000/orders -d \"{\"order\":{\"name\":\"Order 1\",\"paid\":true,\"email\":\"[email protected]\"}}\" -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""},{"method":"GET","route":"/orders/1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"5fffd66f61cdd4ab8881584dbf5e72cf\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.003642\nContent-Length: 58","curl":"curl http://localhost:3000/orders/1 -X GET -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}

example/public/docs/orders/deleting_an_order.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h1>Orders API</h1>
2222

2323
<div class="article">
2424
<h2>Deleting an order</h2>
25+
<h3>DELETE /orders/:id</h3>
2526

2627

2728
<h3>Request</h3>
@@ -43,7 +44,7 @@ <h4>Headers</h4>
4344
X-Ua-Compatible: IE=Edge,chrome=1
4445
E-Tag: &quot;99914b932bd37a50b983c5e7c90ae93b&quot;
4546
Cache-Control: max-age=0, private, must-revalidate
46-
X-Runtime: 0.012483
47+
X-Runtime: 0.003834
4748
Content-Length: 2</pre>
4849
<h4>Status</h4>
4950
<pre class="response status">200 OK</pre>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"resource":"Orders","description":"Deleting an order","explanation":null,"parameters":[],"requests":[{"method":"DELETE","route":"/orders/1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nLocation: http://example.org/orders\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"99914b932bd37a50b983c5e7c90ae93b\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.012483\nContent-Length: 2","curl":"curl http://localhost:3000/orders/1 -X DELETE -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}
1+
{"resource":"Orders","description":"Deleting an order","explanation":null,"parameters":[],"requests":[{"method":"DELETE","route":"/orders/1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":null,"response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>{\n}</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nLocation: http://example.org/orders\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"99914b932bd37a50b983c5e7c90ae93b\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.003834\nContent-Length: 2","curl":"curl http://localhost:3000/orders/1 -X DELETE -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}

example/public/docs/orders/getting_a_list_of_orders.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h1>Orders API</h1>
2222

2323
<div class="article">
2424
<h2>Getting a list of orders</h2>
25+
<h3>GET /orders</h3>
2526

2627
<h3>Parameters</h3>
2728
<table class="parameters">
@@ -63,7 +64,7 @@ <h4>Headers</h4>
6364
X-Ua-Compatible: IE=Edge,chrome=1
6465
E-Tag: &quot;6cd5831e98b0090b64672b5604d9eb2a&quot;
6566
Cache-Control: max-age=0, private, must-revalidate
66-
X-Runtime: 0.158840
67+
X-Runtime: 0.043226
6768
Content-Length: 121</pre>
6869
<h4>Status</h4>
6970
<pre class="response status">200 OK</pre>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"resource":"Orders","description":"Getting a list of orders","explanation":null,"parameters":[{"name":"page","description":"Current page of orders"}],"requests":[{"method":"GET","route":"/orders?page=1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":"page: 1","response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>[\n {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 0</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n },\n {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n }\n]</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"6cd5831e98b0090b64672b5604d9eb2a\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.158840\nContent-Length: 121","curl":"curl http://localhost:3000/orders?page=1 -X GET -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}
1+
{"resource":"Orders","description":"Getting a list of orders","explanation":null,"parameters":[{"name":"page","description":"Current page of orders"}],"requests":[{"method":"GET","route":"/orders?page=1","request_body":null,"request_headers":"Accept: application/json\nContent-Type: application/json\nHost: example.org\nCookie: ","request_query_parameters":"page: 1","response_status":200,"response_status_text":"OK","response_body":"<div class=\"CodeRay\">\n <div class=\"code\"><pre>[\n {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 0</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n },\n {\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>email</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">[email protected]</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>name</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"background-color:hsla(0,100%,50%,0.05)\"><span style=\"color:#710\">&quot;</span><span style=\"color:#D20\">Order 1</span><span style=\"color:#710\">&quot;</span></span>,\n <span style=\"color:#606\"><span style=\"color:#404\">&quot;</span><span>paid</span><span style=\"color:#404\">&quot;</span></span>: <span style=\"color:#088\">true</span>\n }\n]</pre></div>\n</div>\n","response_headers":"Content-Type: application/json; charset=utf-8\nX-Ua-Compatible: IE=Edge,chrome=1\nE-Tag: \"6cd5831e98b0090b64672b5604d9eb2a\"\nCache-Control: max-age=0, private, must-revalidate\nX-Runtime: 0.043226\nContent-Length: 121","curl":"curl http://localhost:3000/orders?page=1 -X GET -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"Host: example.org\" -H \"Cookie: \""}]}

example/public/docs/orders/getting_a_specific_order.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ <h1>Orders API</h1>
2222

2323
<div class="article">
2424
<h2>Getting a specific order</h2>
25+
<h3>GET /orders/:id</h3>
2526

2627

2728
<h3>Request</h3>
@@ -42,7 +43,7 @@ <h4>Headers</h4>
4243
X-Ua-Compatible: IE=Edge,chrome=1
4344
E-Tag: &quot;d9eaba14696a65b9dfc66bf203d25a13&quot;
4445
Cache-Control: max-age=0, private, must-revalidate
45-
X-Runtime: 0.005675
46+
X-Runtime: 0.002577
4647
Content-Length: 59</pre>
4748
<h4>Status</h4>
4849
<pre class="response status">200 OK</pre>

0 commit comments

Comments
 (0)