Skip to content

Commit 7a53848

Browse files
committed
updated README - resource sections can have an explanation
1 parent 25b301e commit 7a53848

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,22 @@ resource "Orders" do
369369
end
370370
```
371371

372+
A resource can also have an explanation.
373+
374+
```ruby
375+
resource "Orders" do
376+
explanation "Orders are top-level business objects. They can be created by a POST request"
377+
post "/orders" do
378+
example "Creating an order" do
379+
explanation "This method creates a new order."
380+
do_request
381+
# make assertions
382+
end
383+
end
384+
end
385+
```
386+
387+
372388
#### header
373389

374390
This method takes the header name and value. The value can be a string or a symbol. If it is a symbol it will `send` the symbol, allowing you to `let` header values.

0 commit comments

Comments
 (0)