apigee-to-openapi-webtool
v0.1.0
Published
A web tool to upload an Apigee proxy bundle (.zip) and generate an OpenAPI specification (YAML) client-side.
Downloads
7
Maintainers
Readme
Apigee Proxy to OpenAPI Web Tool
This tool allows you to upload an Apigee proxy bundle (.zip file) and generate an OpenAPI (Swagger) specification in YAML format. All processing is done client-side in your browser.
Installation
You can install this tool using npm. It's recommended to install it globally if you want to run it as a command, or locally if you want to integrate it into a project.
npm install -g apigee-to-openapi-webtool(Replace apigee-to-openapi-webtool with the actual unique package name if it's different on npm).
If you install it locally:
npm install apigee-to-openapi-webtoolUsage
If installed globally:
After global installation, you might need to manually locate the package files if a direct command-line interface isn't the primary way it's set up (this package provides a web interface).
A simple way to run it is to use the npx command (for packages that offer a binary or a start script meant for serving):
npx apigee-to-openapi-webtoolThis command will attempt to execute the start script defined in the package, which typically serves the index.html file on a local port (e.g., http://localhost:3000).
Alternatively, navigate to the global node_modules folder, find the package directory, and open index.html in your browser. The location of global node_modules can be found by npm root -g.
If installed locally:
- Navigate to your project where you installed the package:
(Adjust the path if your localcd your-project/node_modules/apigee-to-openapi-webtoolnode_modulesstructure is different or if it's a scoped package). - Serve the
index.htmlfile using a simple HTTP server. If you haveserveinstalled (which is a dev dependency of this package), you can run:
This will serve the contents of the current directory.npx serve . - Open your browser and go to the local URL provided by the server (usually
http://localhost:3000or similar).
You should now see the "Apigee Proxy to OpenAPI Generator" web page.
How it Works
- Click the "Click to select a .zip file" area to choose your Apigee proxy bundle.
- The selected file name will appear.
- Click the "Generate OpenAPI Spec" button.
- The tool will:
- Check if an existing OpenAPI (
.jsonor.yaml) specification is present inapiproxy/resources/oas/within the bundle. If so, it uses that directly. - Otherwise, it parses the XML files in
apiproxy/proxies/to infer API paths, methods, and base paths.
- Check if an existing OpenAPI (
- The generated OpenAPI specification will be displayed in YAML format in the text area.
- You can then "Copy YAML" to your clipboard or "Download YAML" as an
openapi-spec.yamlfile.
Features
- Client-side processing: No data is uploaded to any server.
- Supports
.zipApigee proxy bundles. - Prioritizes existing OpenAPI specs within the bundle (
apiproxy/resources/oas/). - Generates a basic OpenAPI 3.0.0 spec from proxy endpoint definitions if no existing spec is found.
- Output in YAML format.
Contributing
If you'd like to contribute, please fork the repository and submit a pull request.
License
ISC
