Swagger implementation

Basically, we will split the Swagger we created in Chapter 3, Designing RESTful APIs with OpenAPI and Swagger, into two new ones with fewer operations, since there is no need to log in anymore.

At the time of writing, Google Cloud Endpoints supports only Swagger Version 2: https://cloud.google.com/endpoints/docs/openapi/.

The order-ms Swagger will be as follows:

# [START swagger]swagger: '2.0'info:  description: Order Microservice  title: Order Microservice  version: 1.0.0host: order-ms-227100.appspot.com# [END swagger]consumes:  - application/jsonproduces:  - application/json  - application/xmlschemes:  - https  - httppaths:  /api:    get:      tags:        - api      description: Returns a default api message      operationId: getApi      security: - api_key: ...

Get Hands-On RESTful Web Services with TypeScript 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.