postman

package
v1.4.1-0...-415649e Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Import

func Import(data []byte) (*spec.Spec, error)

Types

type Body

type Body struct {
	Mode       string
	Raw        string
	Urlencoded []Variable
	Formdata   []Variable
	File       struct {
		Src     *string
		Content string
	}
	Options struct {
		Raw struct {
			Language string
		}
	}
	Disabled bool
}
type Cookie struct{}

type Info

type Info struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Schema      string `json:"schema"`
}

type Item

type Item struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Request     *Request   `json:"request,omitempty"`
	Response    []Response `json:"response"`
	Items       []Item     `json:"item"`
}

type OriginalRequest

type OriginalRequest struct {
	Method string
	Header []Variable
	URL    URL
}

type Request

type Request struct {
	Method      string     `json:"method"`
	Headers     []Variable `json:"header"`
	Url         URL        `json:"url"`
	Description string     `json:"description"`
	Body        *Body
}

type Response

type Response struct {
	Name                    string
	OriginalRequest         OriginalRequest
	Status                  string
	Code                    int
	PostmanePreviewLanguage string `json:"_postman_previewlanguage"`
	Header                  []Variable
	Cookie                  []Cookie
	Body                    string
}

type Spec

type Spec struct {
	Info  Info   `json:"info"`
	Items []Item `json:"item"`
}

https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html

type URL

type URL struct {
	Raw       string     `json:"raw"`
	Protocol  string     `json:"protocol"`
	Host      []string   `json:"host"`
	Path      []string   `json:"path"`
	Queries   []Variable `json:"query"`
	Variables []Variable `json:"variable"`
}

type Variable

type Variable struct {
	Key         string  `json:"key"`
	Value       string  `json:"value"`
	Description string  `json:"description"`
	Type        *string `json:"type"`
	Disabled    bool
}

Jump to

Keyboard shortcuts

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