browser

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package browser uses a headless Chromium instance to discover API definitions behind JavaScript-rendered docs UIs (ReDoc, RapiDoc, swagger-ui) by watching the network for the spec request the page makes after it loads.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Spec       *spec.Spec
	SpecURL    string
	Candidates []string // every spec-looking URL the page requested
}

Result holds what the headless pass found.

func FindSpec

func FindSpec(ctx context.Context, pageURL string, insecure bool, wait time.Duration) (*Result, error)

FindSpec loads pageURL in headless Chromium, captures network responses, and returns the first that parses as a Swagger/OpenAPI definition.

Jump to

Keyboard shortcuts

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