postman

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package postman imports a Postman Collection v2.1 (or v2.0, which the same schema also parses) into Sonde request files: folders become directories, collection and environment variables become a sonde.yaml skeleton, and pre-request/test scripts are kept as comments, never executed. See docs/guides/migrate-from-postman.md for the mapping this package implements.

Index

Constants

View Source
const (
	GroupRequest = "request"
	GroupFolder  = "folder"
)

Group values of Options.Group.

Variables

This section is empty.

Functions

func Import

func Import(data []byte, opts Options) (out convert.Output, err error)

Import converts a Postman Collection v2.1 document (v2.0 parses the same way) to Sonde request files, never executing pre-request/test scripts and never panicking on malformed input.

Types

type EnvironmentFile

type EnvironmentFile struct {
	FileName string
	Data     []byte
}

EnvironmentFile is one `--environment FILE` given to Import: the file's name (used to derive a fallback environment name, and in warnings) and its raw Postman environment JSON.

type Options

type Options struct {
	// Group lays files out one per request (GroupRequest, the default) or
	// one per folder, chaining its requests in order (GroupFolder).
	Group        string
	Environments []EnvironmentFile
	Dialect      syntax.Dialect
}

Options configure Import.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL