You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/08/05 04:41:53 UTC

[camel] branch master updated: @PoojaChandak Update swagger-java.adoc (#4068)

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 18bc53f  @PoojaChandak Update swagger-java.adoc (#4068)
18bc53f is described below

commit 18bc53fded7702e89cef72a77dc086070871fd40
Author: PoojaChandak <po...@gmail.com>
AuthorDate: Wed Aug 5 10:11:30 2020 +0530

    @PoojaChandak Update swagger-java.adoc (#4068)
    
    * Update README.md
    
    * Update swagger-java.adoc
    
    While going through the document, I have come across a few changes I could suggest. Kindly have a look.
    Thanks.
---
 .../modules/others/pages/swagger-java.adoc         | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/docs/components/modules/others/pages/swagger-java.adoc b/docs/components/modules/others/pages/swagger-java.adoc
index 6c769f1..85ea969 100644
--- a/docs/components/modules/others/pages/swagger-java.adoc
+++ b/docs/components/modules/others/pages/swagger-java.adoc
@@ -75,14 +75,14 @@ The swagger module can be configured using the following options. To
 configure using a servlet you use the init-param as shown above. When
 configuring directly in the rest-dsl, you use the appropriate method,
 such as `enableCORS`, `host,contextPath`, dsl. The options
-with `api.xxx` is configured using `apiProperty` dsl.
+with `api.xxx` are configured using `apiProperty` dsl.
 
 [width="100%",cols="10%,10%,80%",options="header",]
 |===
 |Option |Type |Description
 
 |cors |Boolean |Whether to enable CORS. Notice this only enables CORS for the api
-browser, and not the actual access to the REST services. Is default
+browser and not the actual access to the REST services. Is default
 false.
 
 |swagger.version |String |Swagger spec version. Is default 2.0.
@@ -93,12 +93,12 @@ calculate the name as localhost based.
 |schemes |String |The protocol schemes to use. Multiple values can be
 separated by comma such as "http,https". The default value is "http".
 
-|base.path |String |*Required*: To setup the base path where the REST services is available.
+|base.path |String |*Required*: To set up the base path where the REST services are available.
 The path is relative (eg do not start with http/https) and
 camel-swagger-java will calculate the absolute base path at runtime,
 which will be `protocol://host:port/context-path/base.path`
 
-|api.path |String |To setup the path where the API is available (eg /api-docs). The path is
+|api.path |String |To set up the path where the API is available (eg /api-docs). The path is
 relative (eg do not start with http/https) and camel-swagger-java will
 calculate the absolute base path at runtime, which will be `protocol://host:port/context-path/api.path`
 So using relative paths is much easier. See above for an example.
@@ -123,13 +123,13 @@ So using relative paths is much easier. See above for an example.
 
 |apiContextIdListing |boolean |Whether to allow listing all the CamelContext names in the JVM that has
 REST services. When enabled then the root path of the api-doc will list
-all the contexts. When disabled then no context ids is listed and the
+all the contexts. When disabled then no context ids are listed and the
 root path of the api-doc lists the current CamelContext. Is default
 false.
 
-|apiContextIdPattern |String |A pattern that allows to filter which CamelContext names is shown in the
+|apiContextIdPattern |String |A pattern that allows filtering in which CamelContext names are shown in the
 context listing. The pattern is using regular expression and * as
-wildcard. Its the same pattern matching as used by
+a wildcard. It's the same pattern matching as used by
 Intercept
 |===
 
@@ -137,7 +137,7 @@ Intercept
 
 *Since Camel 2.22.0*
 
-The Rest DSL now supports declaring Swagger `securityDefinitions` in the generated API document.
+The Rest DSL now supports declaring Swagger `securityDefinitions` in the generated API documentation.
 For example as shown below:
 
 [source,java]
@@ -151,7 +151,7 @@ rest("/user").tag("dude").description("User rest service")
     .consumes("application/json").produces("application/json")
 ----
 
-Here we have setup two security definitions
+Here we have set up two security definitions
 
 - OAuth2 - with implicit authorization with the provided url
 - Api Key - using an api key that comes from HTTP header named _myHeader_
@@ -171,32 +171,32 @@ their key (petstore_auth or api_key).
 ----
 
 Here the get operation is using the Api Key security and the put operation
-is using OAuth security with permitted scopes of read and write pets.
+is using OAuth security with permitted scopes of reading and writing pets.
 
 
 
 == ContextIdListing enabled
 
-When contextIdListing is enabled then its detecting all the running
+When contextIdListing is enabled then it's detecting all the running
 CamelContexts in the same JVM. These contexts are listed in the root
 path, eg `/api-docs` as a simple list of names in json format. To access
 the swagger documentation then the context-path must be appended with
 the Camel context id, such as `api-docs/myCamel`. The
-option apiContextIdPattern can be used to filter the names in this list.
+option apiContextIdPattern can be used to filter the names on this list.
 
 == JSon or Yaml
 
 *Since Camel 2.17*
 
 The camel-swagger-java module supports both JSon and Yaml out of the
-box. You can specify in the request url what you want returned by using
+box. You can specify in the request url what you want to be returned by using
 /swagger.json or /swagger.yaml for either one. If none is specified then
 the HTTP Accept header is used to detect if json or yaml can be
-accepted. If either both is accepted or none was set as accepted then
+accepted. If either both are accepted or none was set as accepted then
 json is returned as the default format.
 
 == Examples
 
-In the Apache Camel distribution we ship
+In the Apache Camel distribution, we ship
 the `camel-example-swagger-cdi` and `camel-example-swagger-java` which
 demonstrates using this Swagger component.