This tool facilitates the conversion of OpenAPI 3.0 specifications to the Swagger 2.0 (OpenAPI 2.0) format, with a focus on ensuring compatibility with Microsoft Power Automate. It applies the necessary transformations to meet Microsoft's validation requirements.
Option 1: Using Docker (Recommended)
-
Build the Docker image:
docker build -t openapi-powerautomate-compat .
-
Run the Docker container: Place your OpenAPI 3.1 specification file (e.g.,
api-3.1.json
) in the current directory.docker run -v "$(pwd):/app" openapi-powerautomate-compat my-api.json
Rename your file to
api-3.1.json
.
Option 2: Local Execution
-
Clone this repository to your local machine.
-
Add your OpenAPI 3.1 specification to the repository root and name the file:
api-3.1.json
Example:
- Execute the tool using the following command:
./convert_openapi.sh
-
Upon successful conversion, a confirmation message will be displayed.
-
The output file, swagger-2.0-cleaned.yaml, is the final result and should be ready for import into Microsoft Power Automate. For example:
