aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/web_service/USAGE
blob: d3e45b7fef9061d3b2a3137439df33cab4928866 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description:
    The web service generator creates the controller and API definition for 
    a web service.

    The generator takes a web service name and a list of API methods as arguments.
    The web service name may be given in CamelCase or under_score and should
    contain no extra suffixes.  To create a web service within a
    module, specify the web service name as 'module/webservice'.

    The generator creates a controller class in app/controllers, an API definition
    in app/apis, and a functional test suite in test/functional.

Example:
    ./script/generate web_service User add edit list remove

    User web service.
        Controller: app/controllers/user_controller.rb
        API:        app/apis/user_api.rb
        Test:       test/functional/user_api_test.rb

Modules Example:
    ./script/generate web_service 'api/registration' register renew

    Registration web service.
        Controller: app/controllers/api/registration_controller.rb
        API:        app/apis/api/registration_api.rb
        Test:       test/functional/api/registration_api_test.rb