Skip to content

Commit

Permalink
Merge pull request #427 from sparcs-kaist/#426-bug-swagger-api-test
Browse files Browse the repository at this point in the history
#426 [Bug] Swagger api 테스트가 작동하지 않음
  • Loading branch information
chlehdwon authored Nov 7, 2023
2 parents 319e38a + aa330f4 commit f03e0a1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/routes/docs/swaggerDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ const logininfoDocs = require("./logininfo");
const locationsDocs = require("./locations");
const authDocs = require("./auth");
const usersDocs = require("./users");
const { port, nodeEnv } = require("../../../loadenv");

const serverList = [
{
url: `http://localhost:${port}`,
description: "local api server",
development: true,
production: false,
},
{
url: "https://taxi.sparcs.org/api",
description: "taxi main api server",
development: true,
production: true,
},
{
url: "https://taxi.dev.sparcs.org/api",
description: "taxi dev api server",
development: true,
production: false,
},
];

const swaggerDocs = {
openapi: "3.0.3",
Expand All @@ -12,6 +34,7 @@ const swaggerDocs = {
version: "1.0.0",
},
basePath: "/",
servers: serverList.filter((server) => server[nodeEnv]),
tags: [
{
name: "locations",
Expand Down

0 comments on commit f03e0a1

Please sign in to comment.