9/7/2023 0 Comments Go what is speccy![]() ![]() Next, we add the option flag -o to output the resulting definition to a new file named spec-output.yaml. It's followed by the path to the main definition file that includes references to other files you wish to merge. `resolve` is the command to merge definition files back into one. You can either download it from the Node.js website, or open the terminal and run: To use speccy, first we need to have Node.js installed in our machine. Speccy is an open-source project written in Node.js, that allows the user to lint, merge, and visualize an OpenAPI definition in a human-readable format.įor our purposes, we're just going to focus on the merging aspect of it. Now, you might ask yourself, why would someone want to merge an OpenAPI definition file back together? Isn't the point of separating it into multiple files to have better organization? Well, merging a definition file back together into a single one can be useful if you have tooling that doesn't support definition files with references and requires a single one to be uploaded, whether that is for documentation tooling, a UI definition editor, or maybe for API Gateway support. I recently saw a Twitter thread that started with a simple question: how to combine multiple OpenAPI 3 definition files back together? One of the answers on that Twitter thread came from Mike Ralphson, and he pointed out that speccy, an open-source project, could help with that. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |