Skip to main content

oaspy is a quick-and-dirty tool to generate an OpenApi 3.x specification from an insomnia V4 collections.

Project description

oaspy

Python: 3.10 License: MIT PyPI version

oaspy is a quick-and-dirty tool to generate an OpenApi 3.x specification from an insomnia V4 collections.

Getting Started

For more, see the documentation.

Installation

oaspy is available on PyPI:

pip install oaspy

Usage

To run oaspy, try any of the following:

oaspy --help

Commands

gen: :new: (in progress)

Generate an OpenApi 3.x file from an Insomnia collection v4.

oaspy gen --help

with the default options.

oaspy gen --file Insomnia_file_v4.json

defining the version of openapi to generate.

oaspy gen --file Insomnia_file_v4.json --schema v30

argument v30 refers to openapi version 3.0.x

defining the version of openapi to generate and the output file name.

oaspy gen --file Insomnia_file_v4.json --output my_oa3_export.json

a complete version of the above.

oaspy gen --file Insomnia_file_v4.json --schema v30 --output my_oa3_export.json

check: :new:

Validates the structure of an OpenApi file.

oaspy check --help
oaspy check --file my_oa3_export.json

info: :new:

Shows information from an Insomnia v4 file.

oaspy info --help
oaspy info --file Insomnia_file_v4.json

Configuration

oaspy can be configured through a pyproject.toml if it is used as a dev dependency in your project.

If left unspecified, the default configuration is equivalent to:

[tool.oaspy]
title = "awesome api - OpenAPI 3.0"
description = "my awesome api"
terms-of-service = "http://awesome.io/terms"
contact-url = "http://awesome.io"
contact-email = "apiteam@awesome.io"
license-name = "MIT"
license-url = "https://opensource.org/license/mit/"
version = "1.0.0"

License

This project is licensed under the terms of the MIT. license.

The full text of this license can be found in the LICENSE. file.

How to Contribute

For any questions, comments, suggestions or contributions, go to the issues. section. Before opening a new issue, check the existing ones to find a solution (possibly already existing) to the problem you are facing.

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

oaspy-2024.2.13.tar.gz (21.4 kB view hashes)

Uploaded Source

Built Distribution

oaspy-2024.2.13-py3-none-any.whl (20.6 kB view hashes)

Uploaded Python 3

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