README.rdoc in rapidoc-0.0.4 vs README.rdoc in rapidoc-0.0.5
- old
+ new
@@ -1,25 +1,23 @@
= Rapidoc
-REST API documentation generator for rails projects ( 0.04 version ).
+REST API documentation generator for rails projects ( 0.05 version ).
This gem let you generate API documentation of your rails project in html format.
-It use routes information, _rapidoc_ _comments_ and json examples for generate
-static html files.
+It uses routes information, rapidoc comments and json examples for generate
+static html files. Documentation templates are generated using _handlebars_ and
+_bootstrap_.
-This is how the web interface look like:
+This is how the web interface look like: example[http://drinor.github.io/rapidoc/index.html]
-* Resources: example[http://www.v2imagen.com/RDv]
-* Action-home: example[http://es.zimagez.com/zimage/capturadepantalla-170213-195254.php]
+Rapidoc is based in restapi_doc[https://github.com/Alayho/restapi_doc] gem.
-Rapidoc is based in restapi_doc gem: https://github.com/Alayho/restapi_doc
-
== Installation
Add this line to your application's Gemfile:
- gem 'rapidoc', :git => 'https://github.com/drinor/rapidoc.git'
+ gem 'rapidoc'
And then execute:
$ bundle
@@ -31,34 +29,10 @@
For clean all generate files run:
rake rapidoc:clean
-== Configuration
-
-You can configure rapidoc in ``/config/rapidoc/rapidoc.yml`` file:
-
- project_name: "Project Name"
- company: "My company"
- year: 2013
- doc_route: "doc"
- examples_route: "examples"
-
-The first three parameters are used for show information about project.
-
-The *doc_route* parameter let you specify where _rapidoc_ will generate all the
-documentation:
-
- path_project/name
-
-The *examples_route* parameter let you specify where _rapidoc_ will search for
-requests/responeses examples files:
-
- path_project/name
-
-For more details please visit the Wiki[https://github.com/drinor/rapidoc/wiki].
-
== Introducction
If you generate documentation without do anithing, you can get all resources list in a _index.html_ file.
For get resources documentation you need add a resource block to resource controller:
@@ -71,42 +45,12 @@
# =begin action
# =end
Documentation blocks use *yaml* format.
-== Requests/Responses examples
+== Documentation example
-Rapidoc let you define *json* files with requests/responses examples. You only need to add
-your files to *examples_route* and _rapidoc_ load it automatically in an action tab.
-
-Files should have the next name format:
-
- <resource>_<action>_<type>.json
-
-Parameters:
-
-* *resource*: name of resource (plural)
-* *action*: controller action (index, create, show...)
-* *type*: request / response
-
-Name example:
-
- users_create_request.json
-
-File example:
-
- {
- "usuario": {
- "name": "Paul",
- "age": 23,
- "height": 1.7,
- "favoriteBands": ["Band ABC", "Band XYZ"]
- }
- }
-
-== Documentation examples
-
Resource documentation:
# users_controller.rb
# =begin resource
@@ -140,9 +84,47 @@
# description: name filter
# =end
def index
...
end
+
+== Configuration
+
+You can configure rapidoc in ``/config/rapidoc/rapidoc.yml`` file:
+
+ project_name: "Project Name"
+ company: "My company"
+ year: 2013
+ doc_route: "doc"
+ examples_route: "examples"
+
+The first three parameters are used for show information about project in the documentation.
+
+The *doc_route* parameter let you specify where _rapidoc_ will generate the
+documentation:
+
+ path_project/doc
+
+The *examples_route* parameter let you specify where _rapidoc_ will search for
+requests/responeses examples files:
+
+ path_project/examples
+
+For more details and options please visit the Wiki[https://github.com/drinor/rapidoc/wiki].
+
+== Other Options
+
+* You can use .yml files for write documentation blocks ( configuration[https://github.com/drinor/rapidoc/wiki/Configuration] ).
+
+* Rapidoc let you define *json* files with requests/responses examples ( examples[https://github.com/drinor/rapidoc/wiki/Request---Response-Examples] )
+
+* Rapidoc let you use default errors ( errors[https://github.com/drinor/rapidoc/wiki/Params-Errors] )
+
+* Rapidoc has a lot of parameters for document actions of resource ( actions[https://github.com/drinor/rapidoc/wiki/Action-Documentation] )
+
+* When you are in an action page, you can click the resource name and go back to the resources page with resource selected.
+
+* If there is an error in your documentation, rapidoc show you an error message with the file name that contains the error and block lines.
== Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)