You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: grails-doc/src/en/guide/REST/restProfile.adoc
+7-13Lines changed: 7 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,9 +17,9 @@ specific language governing permissions and limitations
17
17
under the License.
18
18
////
19
19
20
-
Since Grails 3.1, Grails supports a tailored profile for creating REST applications that provides a more focused set of dependencies and commands.
20
+
Grails supports a tailored profile for creating REST applications that provides a more focused set of dependencies and commands.
21
21
22
-
To get started with the REST profile, create an application specifying `rest-api` as the name of the profile:
22
+
To get started with the REST profile using the Grails Shell CLI, create an application specifying `rest-api` as the name of the profile:
23
23
24
24
[source,bash]
25
25
----
@@ -30,7 +30,7 @@ This will create a new REST application that provides the following features:
30
30
31
31
* Default set of commands for creating and generating REST endpoints
32
32
* Defaults to using JSON views for rendering responses (see the next section)
33
-
* Fewer plugins than the default Grails plugin (no GSP, no Asset Pipeline, nothing HTML related)
33
+
* Fewer plugins than the default Grails web profile (no GSP, no Asset Pipeline, nothing HTML related)
34
34
35
35
You will notice for example in the `grails-app/views` directory that there are `*.gson` files for rendering the default index page and as well as any 404 and 500 errors.
Instead of CRUD HTML interface a REST endpoint is generated that produces JSON responses. In addition, the generated functional and unit tests by default test the REST endpoint.
46
46
47
-
48
-
49
-
50
-
51
-
Using Grails Forge, Grails supports a tailored profile for creating REST applications that provides a more focused set of dependencies and commands.
52
-
53
-
To get started with a REST API-type application:
47
+
To generate a REST application using the Forge CLI, use the following:
54
48
55
49
[source,console]
56
50
----
57
-
$ grails create-restapi my-api
51
+
$ grails -t forge create-restapi my-api
58
52
----
59
53
60
-
This will create a new REST application that provides the following features:
54
+
This will create a new REST application with the same focused setup as above:
61
55
62
56
* Default set of commands for creating and generating REST endpoints
63
57
* Defaults to using JSON views for rendering responses (see the next section)
NOTE: The generate-* commands are only available after adding the `org.apache.grails:grails-scaffolding` dependency to your project. They are not available by default in a REST application. Also, they will no longer produce *.gson files as that was a feature of the REST API-profile.
77
71
78
-
Instead of CRUD HTML interface a REST endpoint is generated that produces JSON responses. In addition, the generated functional and unit tests by default test the REST endpoint.
72
+
Instead of CRUD HTML interface a REST endpoint is generated that produces JSON responses. In addition, the generated functional and unit tests by default test the REST endpoint.
Copy file name to clipboardExpand all lines: grails-doc/src/en/guide/commandLine.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,7 +109,7 @@ bootRun{
109
109
----
110
110
111
111
112
-
=== non-interactive mode
112
+
=== Non-interactive mode
113
113
114
114
115
115
When you run a script manually and it prompts you for information, you can answer the questions and continue running the script. But when you run a script as part of an automated process, for example a continuous integration build server, there's no way to "answer" the questions. So you can pass the `\--non-interactive` switch to the script command to tell Grails to accept the default answer for any questions, for example whether to install a missing plugin.
0 commit comments