README.md in fdoc-0.3.0 vs README.md in fdoc-0.3.1
- old
+ new
@@ -22,10 +22,16 @@
```ruby
require 'fdoc'
Fdoc.service_path = "path/to/your/fdocs"
+
+# Configure how Fdoc decides a successful response
+Fdoc.decide_success_with do |response, status|
+ status.to_i < 400
+end
+
```
fdoc is built to work around controller specs in rspec, and provides `Fdoc::SpecWatcher` as a mixin. Make sure to include it *inside* your top level describe.
```ruby
@@ -85,9 +91,18 @@
fdoc provides the `fdoc convert` script to transform a directory of `.fdoc` files into more human-readable HTML.
In this repo, try running:
bin/fdoc convert ./spec/fixtures --output=./html
+
+```
+Options:
+ -o, [--output=OUTPUT] # Output path
+ -u, [--url-base-path=URL_BASE_PATH] # URL base path
+ -f, [--format=FORMAT] # Format in html or markdown, defaults to html
+ # Default: html
+ -t, [--templates=TEMPLATES] # Directory with override templates
+```
## Example
`.fdoc` files are YAML files based on [JSON schema][json_schema] to describe API endpoints. They derive their endpoint path and verb from their filename.