Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 Added title and description to capability #585

Merged
merged 1 commit into from
Apr 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions provider/internal/builtin/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,31 @@ type builtinCondition struct {
}

type fileContentCondition struct {
FilePattern string `yaml:"filePattern" json:"filePattern,omitempty"`
Pattern string `yaml:"pattern" json:"pattern"`
FilePattern string `yaml:"filePattern" json:"filePattern,omitempty" title:"FilePattern" description:"Only search in files with names matching this pattern"`
Pattern string `yaml:"pattern" json:"pattern" title:"Pattern" description:"Regex pattern to match in content"`
}

type fileCondition struct {
Pattern string `yaml:"pattern" json:"pattern"`
Pattern string `yaml:"pattern" json:"pattern" title:"Pattern" description:"Find files with names matching this pattern"`
}

var _ provider.InternalProviderClient = &builtinProvider{}

type xmlCondition struct {
XPath string `yaml:"xpath" json:"xpath"`
Namespaces map[string]string `yaml:"namespaces" json:"namespace,omitempty"`
Filepaths []string `yaml:"filepaths" json:"filepaths,omitempty"`
XPath string `yaml:"xpath" json:"xpath" title:"XPath" description:"Xpath query"`
Namespaces map[string]string `yaml:"namespaces" json:"namespace,omitempty" title:"Namespaces" description:"A map to scope down query to namespaces"`
Filepaths []string `yaml:"filepaths" json:"filepaths,omitempty" title:"Filepaths" description:"Optional list of files to scope down search"`
}

type xmlPublicIDCondition struct {
Regex string `yaml:"regex" json:"regex"`
Namespaces map[string]string `yaml:"namespaces" json:"namespaces"`
Filepaths []string `yaml:"filepaths" json:"filepaths"`
Namespaces map[string]string `yaml:"namespaces" json:"namespaces" title:"Namespaces" description:"A map to scope down query to namespaces"`
Filepaths []string `yaml:"filepaths" json:"filepaths" title:"Filepaths" description:"Optional list of files to scope down search"`
}

type jsonCondition struct {
XPath string `yaml:"xpath" json:"xpath"`
Filepaths []string `yaml:"filepaths" json:"filepaths,omitempty"`
XPath string `yaml:"xpath" json:"xpath" title:"XPath" description:"Xpath query"`
Filepaths []string `yaml:"filepaths" json:"filepaths,omitempty" title:"Filepaths" description:"Optional list of files to scope down search"`
}

type builtinProvider struct {
Expand Down
Loading