Skip to content

Commit 4bf6177

Browse files
committed
Merges index.html with the README for the Endpoints sample.
Removes index.html and removes the paths for / and /api-docs. Updates the README to mention the Endpoints graphs and the Swagger UI.
1 parent c312fc5 commit 4bf6177

File tree

3 files changed

+13
-31
lines changed

3 files changed

+13
-31
lines changed

appengine/endpoints/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,16 @@ Now you can use the client ID to make requests to the API:
104104
--host https://YOUR-PROJECT-ID.appspot.com \
105105
--api_key YOUR-API-KEY \
106106
--client_secrets_file /path/to/client_secrets.json
107+
108+
## Viewing the Endpoints graphs
109+
110+
By using Endpoints, you get access to several metrics that are displayed graphically in the Cloud Console.
111+
112+
To view the Endpoints graphs:
113+
114+
1. Go to the [Endpoints section in Cloud Console](https://console.cloud.google.com/endpoints) of the project you deployed your API to.
115+
2. Click on your API to view more detailed information about the metrics collected.
116+
117+
## Swagger UI
118+
119+
The Swagger UI is an open source Swagger project that allows you to explore your API through a UI. Find out more about it on the [Swagger site](http://swagger.io/swagger-ui/).

appengine/endpoints/app.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,12 @@
1919

2020
require "base64"
2121
require "json"
22-
require "yaml"
2322
require "sinatra"
2423

2524
before do
2625
content_type :json
2726
end
2827

29-
# Shows the index page.
30-
get "/" do
31-
content_type :html
32-
send_file "index.html"
33-
end
34-
35-
# Serves up the Swagger spec for the API.
36-
get "/api-docs" do
37-
YAML.load_file("swagger.yaml").to_json
38-
end
39-
4028
# Simple echo service.
4129
post "/echo" do
4230
message = JSON.parse(request.body.read)["message"]

appengine/endpoints/index.html

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)