Metadata-Version: 2.1
Name: oaspy
Version: 2023.8.25
Summary: oaspy, Convert insomnia V4 collection files to OpenApi 3.0.x and 3.1.x
Keywords: oaspy,insomnia,openapi,converter
Author-email: Jorge Brunal <diniremix@gmail.com>
Requires-Python: >=3.9,<3.12
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Topic :: File Formats
Classifier: Topic :: File Formats :: JSON :: JSON Schema
Requires-Dist: click~=8.1.6
Requires-Dist: jsonschema[format]~=4.18.4
Requires-Dist: orjson~=3.9.2
Requires-Dist: isort~=5.12.0 ; extra == "dev"
Requires-Dist: black~=23.7.0 ; extra == "dev"
Requires-Dist: ruff~=0.0.278 ; extra == "dev"
Project-URL: Changelog, https://gitlab.com/HomeInside/oaspy/-/blob/master/CHANGELOG.md
Project-URL: Documentation, https://gitlab.com/HomeInside/oaspy
Project-URL: Homepage, https://gitlab.com/HomeInside/oaspy
Project-URL: Source, https://gitlab.com/HomeInside/oaspy
Provides-Extra: dev

# oaspy

[![Python: 3.10](https://img.shields.io/badge/python-3.10-blue?logo=python)](https://docs.python.org/3.10/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

**oaspy** is a quick-and-dirty tool to generate an [OpenApi 3.x](https://www.openapis.org) specification from an [insomnia V4](https://insomnia.rest/products/insomnia) collections. 


## Getting Started

For more, see the [documentation](./docs/README.md).

### Installation

oaspy is available on [PyPI](https://pypi.org/project/oaspy/):

```shell
pip install oaspy
```

### Usage

To run oaspy, try any of the following:

```sh
oaspy --help
```

with the default options.

```sh
oaspy --file Insomnia_file_v4.json
```

defining the version of openapi to generate.

```sh
oaspy --file Insomnia_file_v4.json --schema v30
```
> parameter `v30` refers to openapi version 3.0.x

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

```sh
oaspy --file Insomnia_file_v4.json --output my_oa3_export.json
```

a complete version of the above.

```sh
oaspy --file Insomnia_file_v4.json --schema v30 --output my_oa3_export.json
```


### Configuration

oaspy can be configured through a `pyproject.toml`.

If left unspecified, the default configuration is equivalent to:

```toml
[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.](https://opensource.org/license/mit/) license.

The full text of this license can be found in the [LICENSE.](./LICENSE) file.


## How to Contribute

For any questions, comments, suggestions or contributions, go to the [issues.](https://gitlab.com/HomeInside/oaspy/-/issues) section.
Before opening a new issue, check the existing ones to find a solution (possibly already existing) to the problem you are facing.

