Skip to content

Commit

Permalink
chore(dsb-client-gateway-api): rebase on master and cherry pick last …
Browse files Browse the repository at this point in the history
…develop commit

fix(dsb-client-gateway-api): update override when merge
  • Loading branch information
nik-ewf committed Feb 17, 2023
1 parent f8b4339 commit ac4f390
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions apps/dsb-client-gateway-api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ dotenv.config({
});

const generateSchema = async (document) => {
if (!process.env.GENERATE_SWAGGER) {
return;
}

if (!document.components.schemas) {
document.components.schemas = {};
}

fs.writeFileSync(
'./libs/dsb-client-gateway-api-client/schema.yaml',
Yaml.stringify(document)
);
const docsPath =
process.env.SWAGGER_SCHEMA_PATH ||
'./libs/dsb-client-gateway-api-client/schema.yaml';

fs.writeFileSync(docsPath, Yaml.stringify(document));
};

async function bootstrap() {
Expand Down

0 comments on commit ac4f390

Please sign in to comment.