Documentation
¶
Overview ¶
Package files provides file resolution and pattern matching for OpenAPI specs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OpenAPIExtensions = []string{".yaml", ".yml", ".json"}
OpenAPIExtensions are file extensions that may contain OpenAPI specs.
View Source
var OpenAPIPatterns = []string{
"openapi",
"swagger",
"api-spec",
"api_spec",
}
OpenAPIPatterns are filename patterns that typically indicate OpenAPI specs.
Functions ¶
func IsOpenAPIFile ¶
IsOpenAPIFile returns true if the path looks like an OpenAPI specification.
func ResolveSpecs ¶
ResolveSpecs resolves file arguments to a list of OpenAPI spec files. It handles:
- Explicit file paths
- Glob patterns (e.g., "api/*.yaml")
- Directories (with recursive flag)
The include/exclude patterns filter the results.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.