Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 024C4200CAE for ; Wed, 7 Jun 2017 00:03:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 009D5160BD4; Tue, 6 Jun 2017 22:03:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F68E160BB7 for ; Wed, 7 Jun 2017 00:03:20 +0200 (CEST) Received: (qmail 49522 invoked by uid 500); 6 Jun 2017 22:03:20 -0000 Mailing-List: contact commits-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list commits@geode.apache.org Received: (qmail 49512 invoked by uid 99); 6 Jun 2017 22:03:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jun 2017 22:03:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 364DADFE22; Tue, 6 Jun 2017 22:03:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dbarnes@apache.org To: commits@geode.apache.org Message-Id: <17a9acfc08bb4a328599d0201bc735fd@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: geode git commit: GEODE-3044: User Manual: Update Swagger example and screen shots This closes #566 Date: Tue, 6 Jun 2017 22:03:20 +0000 (UTC) archived-at: Tue, 06 Jun 2017 22:03:22 -0000 Repository: geode Updated Branches: refs/heads/release/1.2.0 d4f7a2808 -> 664d4cbe1 GEODE-3044: User Manual: Update Swagger example and screen shots This closes #566 Project: http://git-wip-us.apache.org/repos/asf/geode/repo Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/664d4cbe Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/664d4cbe Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/664d4cbe Branch: refs/heads/release/1.2.0 Commit: 664d4cbe1791c246c885cce257538ecae699911e Parents: d4f7a28 Author: Dave Barnes Authored: Tue Jun 6 11:51:23 2017 -0700 Committer: Dave Barnes Committed: Tue Jun 6 15:03:03 2017 -0700 ---------------------------------------------------------------------- geode-docs/images/swagger_home.png | Bin 187378 -> 122516 bytes geode-docs/images/swagger_post_region.png | Bin 170963 -> 67917 bytes .../images/swagger_post_region_response.png | Bin 176783 -> 117065 bytes geode-docs/images/swagger_region_endpoints.png | Bin 0 -> 95740 bytes geode-docs/images/swagger_v1.png | Bin 149806 -> 51576 bytes geode-docs/images/swagger_v1_response.png | Bin 143134 -> 157034 bytes geode-docs/rest_apps/using_swagger.html.md.erb | 20 ++++++++++--------- 7 files changed, 11 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/images/swagger_home.png ---------------------------------------------------------------------- diff --git a/geode-docs/images/swagger_home.png b/geode-docs/images/swagger_home.png index c045727..b494bf5 100644 Binary files a/geode-docs/images/swagger_home.png and b/geode-docs/images/swagger_home.png differ http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/images/swagger_post_region.png ---------------------------------------------------------------------- diff --git a/geode-docs/images/swagger_post_region.png b/geode-docs/images/swagger_post_region.png index b3393c6..83715fb 100644 Binary files a/geode-docs/images/swagger_post_region.png and b/geode-docs/images/swagger_post_region.png differ http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/images/swagger_post_region_response.png ---------------------------------------------------------------------- diff --git a/geode-docs/images/swagger_post_region_response.png b/geode-docs/images/swagger_post_region_response.png index 0645dd2..f1848e8 100644 Binary files a/geode-docs/images/swagger_post_region_response.png and b/geode-docs/images/swagger_post_region_response.png differ http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/images/swagger_region_endpoints.png ---------------------------------------------------------------------- diff --git a/geode-docs/images/swagger_region_endpoints.png b/geode-docs/images/swagger_region_endpoints.png new file mode 100644 index 0000000..faa64f0 Binary files /dev/null and b/geode-docs/images/swagger_region_endpoints.png differ http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/images/swagger_v1.png ---------------------------------------------------------------------- diff --git a/geode-docs/images/swagger_v1.png b/geode-docs/images/swagger_v1.png index f0dd6b3..bc21580 100644 Binary files a/geode-docs/images/swagger_v1.png and b/geode-docs/images/swagger_v1.png differ http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/images/swagger_v1_response.png ---------------------------------------------------------------------- diff --git a/geode-docs/images/swagger_v1_response.png b/geode-docs/images/swagger_v1_response.png index c9823df..3a28f6d 100644 Binary files a/geode-docs/images/swagger_v1_response.png and b/geode-docs/images/swagger_v1_response.png differ http://git-wip-us.apache.org/repos/asf/geode/blob/664d4cbe/geode-docs/rest_apps/using_swagger.html.md.erb ---------------------------------------------------------------------- diff --git a/geode-docs/rest_apps/using_swagger.html.md.erb b/geode-docs/rest_apps/using_swagger.html.md.erb index e9645fe..c76fa26 100644 --- a/geode-docs/rest_apps/using_swagger.html.md.erb +++ b/geode-docs/rest_apps/using_swagger.html.md.erb @@ -25,20 +25,21 @@ Swagger application JARs are included in the Geode REST application WAR; you do The following example demonstrates how to access the Swagger UI to browse the APIs. -1. Start a Geode Developer REST API-enabled server and JMX Manager as described in [Setup and Configuration](setup_config.html#topic_e21_qc5_m4). For example: +1. Start a Geode Locator and a Developer REST API-enabled server as described in [Setup and Configuration](setup_config.html#topic_e21_qc5_m4). +Specify an `http-service-port` for the developer REST service, as the default port, 7070, is already taken by the locator. For example: ``` pre + gfsh>start locator --name=locator1 + Starting a Geode Locator in /Users/admin/apache-geode-1.2.0/locator1... + .... gfsh>start server --name=server1 --J=-Dgemfire.start-dev-rest-api=true \ - --J=-Dgemfire.http-service-bind-address=localhost \ - --J=-Dgemfire.jmx-manager=true --J=-Dgemfire.jmx-manager-start=true + --J=-Dgemfire.http-service-port=8080 ``` - If desired, you can specify a different HTTP port for the developer REST service. For example, `-J=-Dgemfire.http-service-port=8080`. If you do not specify this property, the service is available at the default port 7070. - -2. To access Swagger, open a browser and enter the following URL: For example: +2. To access Swagger, open a browser and enter the following URL. For example: ``` pre - http://localhost:7070/gemfire-api/docs/index.html + http://localhost:8080/geode/swagger-ui.html ``` The following Web page appears: @@ -58,7 +59,8 @@ The following example demonstrates how to access the Swagger UI to browse the AP server1 | Region "/region1" created on "server1" ``` -5. In Swagger, click on **region : region** to list all the available endpoints for accessing regions. +5. In Swagger, click on **pdx-based-crud-controller : region CRUD operations** to list all the available endpoints for accessing regions. + 6. In the list of **region** endpoints, click on the **GET /v1** endpoint link. The page displays additional request and response information about the API. 7. Click the **Try it out!** button. Any regions you added in step 5 are returned in the response body. 8. Add an entry to the region by expanding the **POST /v1/{region}** endpoint. @@ -66,6 +68,6 @@ The following example demonstrates how to access the Swagger UI to browse the AP You can use the Swagger interface to try out additional Geode API endpoints and view sample responses. -For more information on Swagger, see [https://helloreverb.com/developers/swagger](https://helloreverb.com/developers/swagger) and the Swagger Specification at [https://github.com/wordnik/swagger-spec/](https://github.com/wordnik/swagger-spec/). +For more information on Swagger, see the [Swagger website](http://swagger.io/).