Skip to main content

Generate .http files from OpenAPI/Swagger JSON

Project description

OpenAPI to VSCode REST Client Generator

Upload Python Package

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.

image

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 using pip install requests)

Usage

To use the OpenAPI to VSCode REST Client Generator, follow these steps:

  1. Clone or download this repository to your local machine.
  2. Install the required Python packages using pip install -r requirements.txt.
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen_openapi_rest-0.0.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

gen_openapi_rest-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file gen_openapi_rest-0.0.2.tar.gz.

File metadata

  • Download URL: gen_openapi_rest-0.0.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for gen_openapi_rest-0.0.2.tar.gz
Algorithm Hash digest
SHA256 42886ab71c165051d11a88d7d5a17dddd69d0f7e44b71b9661f4849e7ac16503
MD5 8b65cf3d8b7ffcb51888613d8c7ae848
BLAKE2b-256 79d7925c25488da61d3a591092e6643a76319aec667598dbce42b2e607fa3e9c

See more details on using hashes here.

File details

Details for the file gen_openapi_rest-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gen_openapi_rest-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52989021833b82368e897e0eafb7a99043ddc899a6adda36f580dbf38976540c
MD5 c7ed0adc1a12f4d17ca01b737bec2f75
BLAKE2b-256 120110f5f9cb1c6a1bc650c2dc08796fae20c3ca35c01d1661a7583c8c27e19c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page