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
rafaelcr authored Aug 18, 2023
1 parent a3f01d9 commit c552565
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 c552565

Please sign in to comment.