Documentation
¶
Overview ¶
Package discover finds the routes of an application: from Laravel's route list, an OpenAPI specification, the files of a Next.js or Nuxt project, or any command that prints them as JSON.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter struct {
Adapter string `yaml:"adapter"` // laravel, openapi, nextjs, nuxt, spring, symfony, rails, django, command
Command []string `yaml:"command,omitempty"` // laravel: route:list; command: prints routes as JSON
PHP []string `yaml:"php,omitempty"` // laravel: runs PHP in the application, for validation rules
File string `yaml:"file,omitempty"` // openapi: specification file (JSON or YAML)
URL string `yaml:"url,omitempty"` // openapi: specification the running application serves (a path on the target or a full URL)
Identity string `yaml:"identity,omitempty"` // openapi url, spring: read as this identity (some applications describe only what the caller may use)
Target string `yaml:"target,omitempty"` // the service these routes belong to, with several targets
Dir string `yaml:"dir,omitempty"` // folder of the service: commands run there, files are found there (default: the project root)
BasePath string `yaml:"base_path,omitempty"` // prefix of every path (Next.js basePath, an API prefix)
}
Adapter is one entry under discover: in driftgate.yaml.
Click to show internal directories.
Click to hide internal directories.