Swimburger / fern-postman

Generate a Postman Collection from your API definition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


header

Postman Generator

Contributors Pulls-opened Pulls-merged

Discord

This repository contains the source for the Fern generators that produce a Postman Collection:

  • fernapi/fern-postman

The generator is written in TypeScript and produces a Postman Collection that includes example requests and responses for your endpoints (if they're in your API definition).

Fern handles transforming an API definition -- either an OpenAPI or Fern specification -- into Fern intermediate representation. IR is a normalized, Fern-specific definition of an API containing its endpoints, models, errors, authentication scheme, version, and more. Then the Postman generator takes over and turns the IR into a production-ready Postman Collection.

What is Fern?

Fern is an open source toolkit for designing, building, and consuming REST APIs. With Fern, you can generate client libraries, API documentation, and boilerplate for your backend server.

Head over to the official Fern website for more information, or head over to our Documentation to dive straight in and find out what Fern can do for you!

Generating a Postman Collection

This generator is used via the Fern CLI by defining the Postman generator:

- name: fernapi/postman
  version: 0.0.44
  output:
    location: local-file-system
    path: ../../generated/postman

By default, Fern runs the generators in the cloud. To run a generator on your local machine, use the --local flag for fern generate. This will run the generator locally in a Docker container, allowing you to inspect its logs and output. Read more.

Releases

All generator releases are published in the Releases section of the GitHub repository. You can directly use these version numbers in your generator configuration files.

For instance, if you want to use version 0.0.44 of the Postman generator:

default-group: local
groups:
  local:
    generators:
      - name: fernapi/fern-postman
        version: 0.0.44
        output:
          location: local-file-system
          path: ../../generated/postman

Fern will handle the rest automatically.

Contributing

We greatly value community contributions. All the work on Fern generators happens right here on GitHub, both Fern developers and community contributors work together through submitting code via Pull Requests. See the contribution guidelines in CONTRIBUTING on how you can contribute to Fern!

About

Generate a Postman Collection from your API definition

License:MIT License


Languages

Language:TypeScript 91.4%Language:JavaScript 6.6%Language:Shell 1.8%Language:Dockerfile 0.2%