An open API service indexing awesome lists of open source software.

https://github.com/bpedro/postman-openapi-sync

Postman OpenAPI sync makes sure that your local OpenAPI spec is in sync with Postman.
https://github.com/bpedro/postman-openapi-sync

api openapi postman sync

Last synced: 10 months ago
JSON representation

Postman OpenAPI sync makes sure that your local OpenAPI spec is in sync with Postman.

Awesome Lists containing this project

README

          

# Postman OpenAPI sync

Postman OpenAPI sync makes sure that your local OpenAPI spec is in sync with Postman. It does that by using your local OpenAPI spec as the source of truth and synchronizing its contents with Postman.

## Installing

To install `postman-openapi-sync` simply clone this repository and then run:

```
npm install -g
```

`postman-openapi-sync` will be installed globally on your system.

## Running

To run `postman-api-sync` you must first create two environment variables:

- `POSTMAN_API_KEY`: your Postman API key.
- `POSTMAN_WORKSPACE_ID`: the ID of the workspace where you want to synchronize your API.

Then, you can simply run:

```
postman-openapi-sync
```

Where `openapi_file` is your local OpenAPI specification file.

## Flow

1. Read a local OpenAPI specification file.
2. Obtain the local API name and version from the specification file.
3. Check if there is an API with the same name on Postman.
4. If not, create an API with the same name and description as the local OpenAPI specification.
5. Create an API version with the same value as the local OpenAPI specification, if one doesn't already exist.
6. Update the API schema with the value from the local OpenAPI specification.