Generate .http files from OpenAPI/Swagger JSON
Project description
OpenAPI to VSCode REST Client Generator
This tool automatically generates .http
files for the VSCode REST Client from an OpenAPI (Swagger) specification. It supports both local and remote (URL) OpenAPI JSON files.
Features
- Fetch OpenAPI JSON from a URL or a local file.
- Generate
.http
files compatible with the VSCode REST Client. - Handle path and query parameters, including enum options.
Prerequisites
Before you begin, ensure you have met the following requirements:
- Python 3.x
requests
library for Python (Install usingpip install requests
)
Usage
To use the OpenAPI to VSCode REST Client Generator, follow these steps:
- Clone or download this repository to your local machine.
- Install the required Python packages using
pip install -r requirements.txt
. - Run the script using the following command:
The file can be loaded locally or pulled directly from an url e.g https://petstore.swagger.io/v2/swagger.json
python gen_openapi_rest.py <swagger-json-source> <output-http-file>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gen-openapi-rest-0.0.3.tar.gz
.
File metadata
- Download URL: gen-openapi-rest-0.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67b61ca418ebd7f245f78b3c704a4f0dab2f33d6ef7133c4dbe6d00af01e9b4a |
|
MD5 | ac03ebfc7f416d6fbaad7a8b7a89848d |
|
BLAKE2b-256 | 8cdb9add64da9f1a12abcaf989afa36a860acdf4d96fd3e9eb39d234d6e497fc |
File details
Details for the file gen_openapi_rest-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: gen_openapi_rest-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41b57cd2a35f04fd4165f9343cbcede074e63ea290f58ea8bb4a3b6928823d1a |
|
MD5 | 41923c4440c4705af5b4f293d65c3dc1 |
|
BLAKE2b-256 | cf4b169a973393bde407492c083ee35de3ac83de5ee6450278886417e1d2b9a2 |