0

The Developer portal for Google cloud is getting depreciated and I am looking for an option to display my docs. Each of my services has the openAPI.yaml file.

I would like have a page of links for the services and on click open the respective YAML file in swagger.

The code below is for swagger.json files. Is there an option to use the openApi.yaml file instead or an alternative suggestion. The code just read from local file but eventually I would want to load from a URL.

Thanks

const express = require('express');
const app = express();
const swaggerUi = require('swagger-ui-express');
const swaggerDocumentOne = require('./swagger-one.json');
const swaggerDocumentTwo = require('./swagger-two.json');

var options = {}

app.use('/api-docs-one', swaggerUi.serveFiles(swaggerDocumentOne, options), swaggerUi.setup(swaggerDocumentOne));

app.use('/api-docs-two', swaggerUi.serveFiles(swaggerDocumentTwo, options), swaggerUi.setup(swaggerDocumentTwo));
user2570135
  • 2,669
  • 6
  • 50
  • 80

0 Answers0