Skip to content

Commit

Permalink
Merge pull request #10 from postmanlabs/v1
Browse files Browse the repository at this point in the history
change README
  • Loading branch information
davidespihernandez authored Jul 17, 2023
2 parents e4e93c0 + a7b78c7 commit d2e1e52
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# push-openapi-to-postman

This code is part of a blog post, and it is not maintained actively by Postman.
> This code is part of a blog post and is **not** actively maintained by Postman.
Pushes an OpenAPI definition in your repository to Postman, creating a new version on an existing API.
Pushes an OpenAPI definition in your repository to Postman and creates a new API version.

You will need to add the following values to your repository:

- The `API_ID` environment variable that contains the ID of the API you want to update.
- The `POSTMAN_API_KEY` secret that contains your valid Postman API key. The API key requires admin permissions.

## Usage
Example of manual trigger, asking for the required inputs.

The following is an example of manual trigger and its required input:

```yaml
name: Sync OpenAPI with Postman
Expand Down Expand Up @@ -39,18 +44,12 @@ jobs:
release-notes: ${{ github.event.inputs.releaseNotes }}
```
For the previous example to work you need to define:
- An environment variable `API_ID` containing the API id that is going to be updated
- A secret called `POSTMAN_API_KEY` containing the Postman API key with admin permission on the API that is going to be modified.

Other things to take into account:

* Make sure the `path-to-definition` points to the file in your repo that contains your OpenAPI definition.
* The OpenAPI definition must be in JSON format.
* Make sure the file name to update in your API schema matches the value on the `api-path-to-file-name` input.
**Note:**
- The `path-to-definition` value must point to the file in your repo that contains your OpenAPI definition.
- Your OpenAPI definition must be in JSON format.
- The file name in your API schema must match the `api-path-to-file-name` value.

## License

MIT

MIT

0 comments on commit d2e1e52

Please sign in to comment.