Skip to content

Commit

Permalink
docs: generate JSON openapi schema (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
g0drlc committed Aug 18, 2023
1 parent dcd9cac commit e04f8c3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/openapi-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const ApiGenerator: FastifyPluginAsync<
mkdirSync('./tmp');
}
writeFileSync('./tmp/openapi.yaml', fastify.swagger({ yaml: true }));
writeFileSync('./tmp/openapi.json', JSON.stringify(fastify.swagger(), null, 2));
};

const fastify = Fastify({
Expand Down

0 comments on commit e04f8c3

Please sign in to comment.