cmd

package
v0.0.0-...-09c460e Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2025 License: MIT Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Headers []string

	UserAgent string
)

Functions

func BuildRequestsFromPaths

func BuildRequestsFromPaths(spec map[string]interface{}, client http.Client)

func CheckAndConfigureProxy

func CheckAndConfigureProxy() (client http.Client)

func CheckContentType

func CheckContentType(client http.Client, target string) string

func CheckSecuritySchemes

func CheckSecuritySchemes(spec map[string]interface{})

func EnforceSingleContentType

func EnforceSingleContentType(newContentType string)

func Execute

func Execute()

func ExtractSpecFromJS

func ExtractSpecFromJS(bodyBytes []byte) []byte

func GenerateRequests

func GenerateRequests(bodyBytes []byte, client http.Client)

func MakeRequest

func MakeRequest(client http.Client, method, target string, timeout int64, reqData io.Reader) ([]byte, string, int)

func PrintSpecInfo

func PrintSpecInfo(spec map[string]interface{})

func SafelyUnmarshalSpec

func SafelyUnmarshalSpec(data []byte) map[string]interface{}

func SetScheme

func SetScheme(swaggerURL string) (scheme string)

func TrimHostScheme

func TrimHostScheme(apiTarget, fullUrlHost string) (host string)

TrimHostScheme trims the scheme from the provided URL if the '-T' flag is supplied to sj.

func UnmarshalSpec

func UnmarshalSpec(bodyBytes []byte) (newDoc *openapi3.T)

func WriteConvertedDefinitionFile

func WriteConvertedDefinitionFile(data []byte)

Types

type Result

type Result struct {
	Method string `json:"method"`
	Status int    `json:"status"`
	Target string `json:"target"`
}

type VerboseResult

type VerboseResult struct {
	Method  string `json:"method"`
	Preview string `json:"preview"`
	Status  int    `json:"status"`
	Target  string `json:"target"`
	Curl    string `json:"curl"`
}

Jump to

Keyboard shortcuts

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