Swagger2OpenAPI is a powerful Visual Studio Code extension designed to streamline the process of converting Swagger JSON files to OpenAPI (formerly known as Swagger) specifications.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Swagger2OpenAPI is a Visual Studio Code extension designed to streamline the process of converting Swagger JSON files to OpenAPI specifications. With this extension, developers can effortlessly generate OpenAPI files from Swagger JSON, enabling seamless integration with various API development workflows.
Features
Conversion Convenience: Easily convert Swagger JSON files to OpenAPI specifications within your Visual Studio Code environment.
Customization Options: Configure settings to specify the Swagger JSON URL, output file path, and npm command for streamlined generation.
Efficient Workflow: Execute the conversion process with a single command, enhancing productivity and reducing manual effort.
Automatic Execution: Automatically run npm commands after successful generation, facilitating further processing or integration tasks.
Workspace Integration: Seamlessly integrate OpenAPI generation into your existing VS Code workflow, ensuring a cohesive development experience.
Usage
Configure extension settings to define the Swagger JSON URL, output file path, and npm command.
Use the command palette to trigger the OpenAPI generation process.
Sit back and let the extension convert the Swagger JSON to OpenAPI format, with the option to execute additional commands upon completion.
To configure Swagger2OpenAPI, use the settings available in your Visual Studio Code settings:
swagger2openapi.swaggerJsonUrl: The Swagger JSON URL to fetch the Swagger definition.
swagger2openapi.outputPathAndFileName: The output path and filename for the generated OpenAPI file.
swagger2openapi.npmCommand: The npm command to execute after successful OpenAPI generation.
Contributing
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or pull request on GitHub.