I want to serve index.html as my default route, using Swagger 2.0. I'm
using this in conjunction with the Google Cloud Endpoints framework on
Google Cloud Platform. This is the only route that still responds with an
operation not found error. I can serve all the static content and assets
that my app needs, except the index.html, which should be served at the
base path "/". Has anybody run in to similar problems and found a solution?
# [START swagger]
swagger: "2.0"
info:
description: "Foo"
title: "Bar"
version: "1.0.0"
# [END swagger]
host: "foobar.com"
consumes:
- "application/json"
produces:
- "application/json"
- "text/html"
- "text/css"
- "application/javascript"
- "image/svg+xml"
schemes:
- "https"
paths:
"/":
get:
description: "Returns index.html file"
operationId: "getIndex"
security: []
produces:
- "text/html"
responses:
302:
description: "redirect"
304:
description: "index.html"
200:
description: "index.html"
A little background: I am in the process of changing a web app, which
serves static content and crud operations, to an api that will just handle
crud operations. In the meantime, I have to handle both cases. My app works
until I deploy my openapi.yaml file to cloud endpoints.
--
You received this message because you are subscribed to the Google Groups
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.