diff --git a/.aspell.yml b/.aspell.yml index 6c0120af..5d93c78a 100644 --- a/.aspell.yml +++ b/.aspell.yml @@ -1,46 +1,226 @@ +--- mode: commit min_length: 3 allowed: + - abortonclose + - accessors + - acl + - acls + - adfs + - addons + - apitest + - apikey + - apk - aspell - - repo - - yaml + - attrs + - auth + - autofill + - aws + - axios + - backend + - backends + - backport + - backoff + - bmarkovic + - botmgmt + - botmgtupdate + - browserslist + - bvue + - bwlim + - caniuse + - casbin + - chmigrate + - cli + - clickhouse + - cmd + - cnt + - codebase + - composable + - cond + - conf - config - - Github - - Gitlab + - conns + - const + - cpu + - crd + - cronjob + - crt + - cve + - cwe + - ctx + - dapi + - dataplane + - dataplaneapi + - dataplanes + - datepicker + - dereference + - dgram + - discoverability + - durations + - dns + - dom + - dpapi + - dpapis + - dropdowns + - dsn + - e2e + - entrypoint + - enum - env + - EOF + - eol + - epoll + - escaper + - eslint - failsafe - - golang - - mkdir - - WORKDIR - - apk - - ENTRYPOINT - - ubuntu - - golangci - - sudo - - releaser - - backend - - backends + - fbt + - fcgi + - fqdn + - fmt + - usefcgiapp + - formatter + - formatters - frontend - frontends - - tcp - - cpu - - crd + - fullpage + - gentype + - github + - gitlab + - gocritic + - godaddy + - gofumpt + - gokc + - golang + - golangci + - gorm + - goroutines + - goroutine + - govulncheck + - gotoolchain + - gpc + - gpt + - gptstr + - hapee + - haproxy + - healthcheck + - healthz + - hostname + - html + - http + - https + - httpCLF + - iana + - ineffassign + - infos + - ioutil + - ipam + - istanbul + - iweight + - jose + - json + - jsonpath + - jwt + - kasbin + - kpi + - ktls + - kubebuilder + - kubernetes + - lifecycle - linter - linters - - govulncheck - - dataplaneapi + - lowercased + - lookups + - lts + - makefile + - maxconn + - mexchanger + - migrator + - minimalistic + - minsize + - mixin + - mkdir + - mpxs + - multipartsearch + - multiselect + - mutex + - mutexes + - namespace + - namespaces + - oidc + - omitempty + - openapi + - optim + - packagetag + - param + - params + - parallelize + - passthrough + - placholder + - podman + - pre - quic - - userlist - - cve + - rbac + - readme + - recursivity + - recv + - redispatch + - redoc + - reimplement + - releaser + - repo + - repos + - req + - rsync + - ruleset + - rulesets + - saml + - sanitization + - schemas + - scrollbar + - scss + - searchselect + - shm + - sig + - sni + - spammy - ssl - - crl - - crt - - ocsp - - logrus - - backport - - dns - - newcert - - libdns - - txt - - testname - - uid + - sslv + - sso + - struct + - subnet + - subresource + - subresources + - sudo + - symlinks + - syslog + - textarea + - tcp + - timeseries + - tls + - tooltip + - tsconfig + - typings + - ubuntu + - uniq + - unix + - unmarshalling + - unsub + - uri + - url + - userlist + - userlists + - utils + - uweight + - vfg + - vite + - vrrp + - vue + - waf + - wafadvanced + - workdir + - yaml + - yml + - async + - rehaul + - rebase + - XXXX diff --git a/.github/workflows/.goreleaser.yml b/.github/workflows/.goreleaser.yml index 8ecb10e2..9c9acb43 100644 --- a/.github/workflows/.goreleaser.yml +++ b/.github/workflows/.goreleaser.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: '1.25' + go-version: '1.26' check-latest: true - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4f5a61e..43c15a31 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,8 @@ variables: DOCKER_HOST: tcp://docker:2375 DOCKER_BASE_IMAGE: $CI_REGISTRY_GO/haproxy-debian BATS_VERSION: v1.10.0 - GO_VERSION: "1.25" - DOCKER_VERSION: "26.0" + GO_VERSION: "1.26" + DOCKER_VERSION: "29.1" pipelines-check: stage: bots @@ -101,7 +101,7 @@ gofumpt: commit-policy: stage: lint image: - name: $CI_REGISTRY_GO/commit-check:5.0.4 + name: $CI_REGISTRY_GO/commit-check:5.5.0 entrypoint: [""] tags: - go @@ -163,7 +163,7 @@ test: before_script: - apk add git bash curl jq git - git clone https://github.com/bats-core/bats-core.git && cd bats-core && git checkout $BATS_VERSION && ./install.sh /usr/local && cd .. - - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY_GO + - docker login -u='$app' -p $CI_REGISTRY_TOKEN $CI_REGISTRY_GO script: - bash -x ./e2e/run.bash rules: @@ -192,9 +192,9 @@ govulncheck: - go mod tidy - go run cmd/govulncheck-report/main.go -HAProxy_3.4: +HAProxy_3.3: extends: .e2e parallel: matrix: - TESTPART: ["1/4", "2/4", "3/4", "4/4"] - HAPROXY_VERSION: "3.4" + HAPROXY_VERSION: "3.3" diff --git a/Makefile b/Makefile index 97f152d6..8ce8299c 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,8 @@ GIT_MODIFIED=${GIT_MODIFIED1}${GIT_MODIFIED2} SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/client-native/master/Makefile | grep SWAGGER_VERSION -m 1 | awk -F"=" '{print $$2}'} BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ') CGO_ENABLED?=0 -GOLANGCI_LINT_VERSION=2.8.0 -CHECK_COMMIT=5.4.0 +GOLANGCI_LINT_VERSION=2.11.1 +CHECK_COMMIT=5.5.0 all: update clean build diff --git a/acme/constructor.go b/acme/constructor.go index 8b9b9726..097f449a 100644 --- a/acme/constructor.go +++ b/acme/constructor.go @@ -10,6 +10,7 @@ import ( "github.com/libdns/azure" "github.com/libdns/cloudflare" "github.com/libdns/cloudns" + "github.com/libdns/desec" "github.com/libdns/digitalocean" "github.com/libdns/gandi" "github.com/libdns/godaddy" @@ -24,6 +25,7 @@ import ( "github.com/libdns/ovh" "github.com/libdns/porkbun" "github.com/libdns/rfc2136" + "github.com/libdns/route53" "github.com/libdns/scaleway" "github.com/libdns/vultr/v2" ) @@ -38,6 +40,8 @@ func NewDNSProvider(name string, params map[string]any) (DNSProvider, error) { prov = &cloudflare.Provider{} case "cloudns": prov = &cloudns.Provider{} + case "desec": + prov = &desec.Provider{} case "digitalocean": prov = &digitalocean.Provider{} case "exec": @@ -68,6 +72,8 @@ func NewDNSProvider(name string, params map[string]any) (DNSProvider, error) { prov = &porkbun.Provider{} case "rfc2136": prov = &rfc2136.Provider{} + case "route53": + prov = &route53.Provider{} case "scaleway": prov = &scaleway.Provider{} case "vultr": diff --git a/acme/dns01-providers.txt b/acme/dns01-providers.txt index 3dc5a897..1e0f077c 100644 --- a/acme/dns01-providers.txt +++ b/acme/dns01-providers.txt @@ -1,6 +1,7 @@ github.com/libdns/azure github.com/libdns/cloudflare github.com/libdns/cloudns +github.com/libdns/desec github.com/libdns/digitalocean github.com/haproxytech/dataplaneapi/acme/exec github.com/libdns/gandi @@ -16,6 +17,6 @@ github.com/libdns/netcup github.com/libdns/ovh github.com/libdns/porkbun github.com/libdns/rfc2136 -//github.com/libdns/route53 req. go1.25 +github.com/libdns/route53 github.com/libdns/scaleway github.com/libdns/vultr/v2 diff --git a/acme/dns01.go b/acme/dns01.go index f7226f61..faa62f4b 100644 --- a/acme/dns01.go +++ b/acme/dns01.go @@ -24,10 +24,15 @@ import ( "time" "github.com/libdns/libdns" + "github.com/miekg/dns" ) -// TTL of the temporary DNS record used for DNS-01 validation. -const DefaultTTL = 30 * time.Second +const ( + // TTL of the temporary DNS record used for DNS-01 validation. + DefaultTTL = 30 * time.Second + // Typical negative response TTL defined in the SOA. + defaultDNSPropagationTimeout = 300 * time.Second +) // DNSProvider defines the operations required for dns-01 challenges. type DNSProvider interface { @@ -39,6 +44,18 @@ type DNSProvider interface { type DNS01Solver struct { provider DNSProvider TTL time.Duration + + // How long to wait before starting propagation checks. + // Default: 0 (no wait). + PropagationDelay time.Duration + + // Maximum time to wait for temporary DNS record to appear. + // Set to -1 to disable propagation checks. + // Default: 2 minutes. + PropagationTimeout time.Duration + + // Preferred DNS resolver(s) to use when doing DNS lookups. + Resolvers []string } func NewDNS01Solver(name string, params map[string]any, ttl ...time.Duration) (*DNS01Solver, error) { @@ -60,7 +77,7 @@ func (s *DNS01Solver) Present(ctx context.Context, domain, zone, keyAuth string) rec := makeRecord(domain, keyAuth, s.TTL) if zone == "" { - zone = guessZone(domain) + zone = GuessZone(domain) } else { zone = rooted(zone) } @@ -76,12 +93,66 @@ func (s *DNS01Solver) Present(ctx context.Context, domain, zone, keyAuth string) return nil } +// Wait blocks until the TXT record created in Present() appears in +// authoritative lookups, i.e. until it has propagated, or until +// timeout, whichever is first. +func (s *DNS01Solver) Wait(ctx context.Context, domain, zone, keyAuth string) error { + // if configured to, pause before doing propagation checks + // (even if they are disabled, the wait might be desirable on its own) + if s.PropagationDelay > 0 { + select { + case <-time.After(s.PropagationDelay): + case <-ctx.Done(): + return ctx.Err() + } + } + + // skip propagation checks if configured to do so + if s.PropagationTimeout == -1 { + return nil + } + + // timings + timeout := s.PropagationTimeout + if timeout == 0 { + timeout = defaultDNSPropagationTimeout + } + const interval = 5 * time.Second + + // how we'll do the checks + checkAuthoritativeServers := len(s.Resolvers) == 0 + resolvers := RecursiveNameservers(s.Resolvers) + + absName := strings.Trim(domain, ".") + + var err error + start := time.Now() + for time.Since(start) < timeout { + select { + case <-time.After(interval): + case <-ctx.Done(): + return ctx.Err() + } + + var ready bool + ready, err = checkDNSPropagation(ctx, absName, dns.TypeTXT, keyAuth, checkAuthoritativeServers, resolvers) + if err != nil { + return fmt.Errorf("checking DNS propagation of %q (resolvers=%v): %w", absName, resolvers, err) + } + if ready { + return nil + } + } + + return fmt.Errorf("DNS propagation timed out. Last error: %v", err) +} + // CleanUp deletes the DNS TXT record created in Present(). func (s *DNS01Solver) CleanUp(ctx context.Context, domain, zone, keyAuth string) error { rr := makeRecord(domain, keyAuth, s.TTL) if zone == "" { - zone = guessZone(domain) + zone = GuessZone(domain) } else { zone = rooted(zone) } @@ -104,13 +175,8 @@ func makeRecord(fqdn, keyAuth string, ttl time.Duration) libdns.RR { } } -// Extract the root zone for a domain in case the user did not provide it. -// -// This simplistic algorithm will only work for simple cases. The correct -// way to do this would be to do an SOA request on the FQDN, but since -// dataplaneapi may not use the right resolvers (as configured in haproxy.cfg) -// it is better to avoid doing any DNS request. -func guessZone(fqdn string) string { +// Guess the root zone for a domain when we cannot use a better method. +func GuessZone(fqdn string) string { fqdn = trimWildcard(fqdn) parts := make([]string, 0, 8) strings.SplitSeq(fqdn, ".")(func(part string) bool { diff --git a/acme/dns01_test.go b/acme/dns01_test.go index c7f4df34..f2d874b7 100644 --- a/acme/dns01_test.go +++ b/acme/dns01_test.go @@ -94,7 +94,7 @@ func Test_guessZone(t *testing.T) { } for _, tt := range tests { t.Run(tt.fqdn, func(t *testing.T) { - got := guessZone(tt.fqdn) + got := GuessZone(tt.fqdn) if got != tt.want { t.Errorf("guessZone() = %v, want %v", got, tt.want) } diff --git a/acme/propagation.go b/acme/propagation.go new file mode 100644 index 00000000..7501f5d5 --- /dev/null +++ b/acme/propagation.go @@ -0,0 +1,324 @@ +// Copyright 2025 HAProxy Technologies +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// This file contains code adapted from certmagic by Matt Holt. +// https://github.com/caddyserver/certmagic +// +// It has been modified. + +package acme + +import ( + "context" + "errors" + "fmt" + "net" + "strings" + "time" + + "github.com/miekg/dns" +) + +var dnsTimeout = 10 * time.Second + +// FindZoneByFQDN determines the zone apex for the given fully-qualified +// domain name (FQDN) by recursing up the domain labels until the nameserver +// returns a SOA record in the answer section. +func FindZoneByFQDN(ctx context.Context, fqdn string, nameservers []string) (string, error) { + if !strings.HasSuffix(fqdn, ".") { + fqdn += "." + } + + if err := ctx.Err(); err != nil { + return "", err + } + + soa, err := fetchSoaByFqdn(ctx, fqdn, nameservers) + if err != nil { + return "", err + } + + return soa.Hdr.Name, nil +} + +func fetchSoaByFqdn(ctx context.Context, fqdn string, nameservers []string) (*dns.SOA, error) { + var err error + var in *dns.Msg + + labelIndexes := dns.Split(fqdn) + for _, index := range labelIndexes { + if err := ctx.Err(); err != nil { + return nil, err + } + + domain := fqdn[index:] + + in, err = dnsQuery(ctx, domain, dns.TypeSOA, nameservers, true) + if err != nil { + continue + } + if in == nil { + continue + } + + switch in.Rcode { + case dns.RcodeSuccess: + // Check if we got a SOA RR in the answer section + if len(in.Answer) == 0 { + continue + } + + // CNAME records cannot/should not exist at the root of a zone. + // So we skip a domain when a CNAME is found. + if dnsMsgContainsCNAME(in) { + continue + } + + for _, ans := range in.Answer { + if soa, ok := ans.(*dns.SOA); ok { + return soa, nil + } + } + case dns.RcodeNameError: + // NXDOMAIN + default: + // Any response code other than NOERROR and NXDOMAIN is treated as error + return nil, fmt.Errorf("unexpected response code '%s' for %s", dns.RcodeToString[in.Rcode], domain) + } + } + + return nil, fmt.Errorf("could not find the start of authority for %s%s", fqdn, formatDNSError(in, err)) +} + +func formatDNSError(msg *dns.Msg, err error) string { + var parts []string + if msg != nil { + parts = append(parts, dns.RcodeToString[msg.Rcode]) + } + if err != nil { + parts = append(parts, err.Error()) + } + if len(parts) > 0 { + return ": " + strings.Join(parts, " ") + } + return "" +} + +// checkDNSPropagation checks if the expected record has been propagated to all authoritative nameservers. +func checkDNSPropagation(ctx context.Context, fqdn string, recType uint16, expectedValue string, checkAuthoritativeServers bool, resolvers []string) (bool, error) { + if !strings.HasSuffix(fqdn, ".") { + fqdn += "." + } + + // Initial attempt to resolve at the recursive NS - but do not actually + // dereference (follow) a CNAME record if we are targeting a CNAME record + // itself + if recType != dns.TypeCNAME { + r, err := dnsQuery(ctx, fqdn, recType, resolvers, true) + if err != nil { + return false, fmt.Errorf("CNAME dns query: %v", err) + } + if r.Rcode == dns.RcodeSuccess { + fqdn = updateDomainWithCName(r, fqdn) + } + } + + if checkAuthoritativeServers { + authoritativeServers, err := lookupNameservers(ctx, fqdn, resolvers) + if err != nil { + return false, fmt.Errorf("looking up authoritative nameservers: %v", err) + } + populateNameserverPorts(authoritativeServers) + resolvers = authoritativeServers + } + + return checkAuthoritativeNss(ctx, fqdn, recType, expectedValue, resolvers) +} + +// checkAuthoritativeNss queries each of the given nameservers for the expected record. +func checkAuthoritativeNss(ctx context.Context, fqdn string, recType uint16, expectedValue string, nameservers []string) (bool, error) { + for _, ns := range nameservers { + r, err := dnsQuery(ctx, fqdn, recType, []string{ns}, true) + if err != nil { + return false, fmt.Errorf("querying authoritative nameservers: %v", err) + } + + if r.Rcode != dns.RcodeSuccess { + if r.Rcode == dns.RcodeNameError || r.Rcode == dns.RcodeServerFailure { + // if Present() succeeded, then it must show up eventually, or else + // something is really broken in the DNS provider or their API; + // no need for error here, simply have the caller try again + return false, nil + } + return false, fmt.Errorf("NS %s returned %s for %s", ns, dns.RcodeToString[r.Rcode], fqdn) + } + + for _, rr := range r.Answer { + switch recType { + case dns.TypeTXT: + if txt, ok := rr.(*dns.TXT); ok { + record := strings.Join(txt.Txt, "") + if record == expectedValue { + return true, nil + } + } + case dns.TypeCNAME: + if cname, ok := rr.(*dns.CNAME); ok { + // TODO: whether a DNS provider assumes a trailing dot or not varies, and we may have to standardize this in libdns packages + if strings.TrimSuffix(cname.Target, ".") == strings.TrimSuffix(expectedValue, ".") { + return true, nil + } + } + default: + return false, fmt.Errorf("unsupported record type: %d", recType) + } + } + } + + return false, nil +} + +// lookupNameservers returns the authoritative nameservers for the given fqdn. +func lookupNameservers(ctx context.Context, fqdn string, resolvers []string) ([]string, error) { + var authoritativeNss []string + + zone, err := FindZoneByFQDN(ctx, fqdn, resolvers) + if err != nil { + return nil, fmt.Errorf("could not determine the zone for '%s': %w", fqdn, err) + } + + r, err := dnsQuery(ctx, zone, dns.TypeNS, resolvers, true) + if err != nil { + return nil, fmt.Errorf("querying NS resolver for zone '%s' recursively: %v", zone, err) + } + + for _, rr := range r.Answer { + if ns, ok := rr.(*dns.NS); ok { + authoritativeNss = append(authoritativeNss, strings.ToLower(ns.Ns)) + } + } + + if len(authoritativeNss) > 0 { + return authoritativeNss, nil + } + return nil, errors.New("could not determine authoritative nameservers") +} + +// Update FQDN with CNAME if any +func updateDomainWithCName(r *dns.Msg, fqdn string) string { + for _, rr := range r.Answer { + if cn, ok := rr.(*dns.CNAME); ok { + if cn.Hdr.Name == fqdn { + return cn.Target + } + } + } + return fqdn +} + +// dnsMsgContainsCNAME checks for a CNAME answer in msg +func dnsMsgContainsCNAME(msg *dns.Msg) bool { + for _, ans := range msg.Answer { + if _, ok := ans.(*dns.CNAME); ok { + return true + } + } + return false +} + +func dnsQuery(ctx context.Context, fqdn string, rtype uint16, nameservers []string, recursive bool) (*dns.Msg, error) { + m := createDNSMsg(fqdn, rtype, recursive) + var in *dns.Msg + var err error + for _, ns := range nameservers { + in, err = sendDNSQuery(ctx, m, ns) + if err == nil && len(in.Answer) > 0 { + break + } + } + return in, err +} + +func createDNSMsg(fqdn string, rtype uint16, recursive bool) *dns.Msg { + m := new(dns.Msg) + m.SetQuestion(fqdn, rtype) + + // See: https://caddy.community/t/hard-time-getting-a-response-on-a-dns-01-challenge/15721/16 + m.SetEdns0(1232, false) + if !recursive { + m.RecursionDesired = false + } + return m +} + +func sendDNSQuery(ctx context.Context, m *dns.Msg, ns string) (*dns.Msg, error) { + udp := &dns.Client{Net: "udp", Timeout: dnsTimeout} + in, _, err := udp.ExchangeContext(ctx, m, ns) + // two kinds of errors we can handle by retrying with TCP: + // truncation and timeout; see https://github.com/caddyserver/caddy/issues/3639 + truncated := in != nil && in.Truncated + timeoutErr := err != nil && strings.Contains(err.Error(), "timeout") + if truncated || timeoutErr { + tcp := &dns.Client{Net: "tcp", Timeout: dnsTimeout} + in, _, err = tcp.ExchangeContext(ctx, m, ns) + } + return in, err +} + +// RecursiveNameservers are used to pre-check DNS propagation. It +// picks user-configured nameservers (custom) OR the defaults +// obtained from resolv.conf and defaultNameservers if none is +// configured and ensures that all server addresses have a port value. +func RecursiveNameservers(custom []string) []string { + var servers []string + if len(custom) == 0 { + servers = systemOrDefaultNameservers(defaultResolvConf, defaultNameservers) + } else { + servers = make([]string, len(custom)) + copy(servers, custom) + } + populateNameserverPorts(servers) + return servers +} + +// systemOrDefaultNameservers attempts to get system nameservers from the +// resolv.conf file given by path before falling back to hard-coded defaults. +func systemOrDefaultNameservers(path string, defaults []string) []string { + config, err := dns.ClientConfigFromFile(path) + if err != nil || len(config.Servers) == 0 { + return defaults + } + return config.Servers +} + +// populateNameserverPorts ensures that all nameservers have a port number. +// If not, the default DNS server port of 53 will be appended. +func populateNameserverPorts(servers []string) { + for i := range servers { + _, port, _ := net.SplitHostPort(servers[i]) + if port == "" { + servers[i] = net.JoinHostPort(servers[i], "53") + } + } +} + +var defaultNameservers = []string{ + "8.8.8.8:53", + "8.8.4.4:53", + "1.1.1.1:53", + "1.0.0.1:53", +} + +const defaultResolvConf = "/etc/resolv.conf" diff --git a/client-native/cn.go b/client-native/cn.go index 2235de19..3c955e14 100644 --- a/client-native/cn.go +++ b/client-native/cn.go @@ -34,6 +34,7 @@ func ConfigureConfigurationClient(haproxyOptions dataplaneapi_config.HAProxyConf configuration_options.UsePersistentTransactions, configuration_options.TransactionsDir(haproxyOptions.TransactionDir), configuration_options.ValidateCmd(haproxyOptions.ValidateCmd), + configuration_options.ValidateConfigFiles(haproxyOptions.ValidateFilesBefore, haproxyOptions.ValidateFilesAfter), configuration_options.MasterWorker, configuration_options.UseMd5Hash, configuration_options.PreferredTimeSuffix(haproxyOptions.PreferredTimeSuffix), diff --git a/client-native/events.go b/client-native/events.go index d181665a..3c8b955f 100644 --- a/client-native/events.go +++ b/client-native/events.go @@ -21,6 +21,7 @@ import ( "fmt" "io" "strings" + "sync" "sync/atomic" "time" @@ -37,9 +38,13 @@ const ( ) type HAProxyEventListener struct { - listener *runtime.EventListener - client clientnative.HAProxyClient // for storage only - rt runtime.Runtime + mu sync.Mutex + listener *runtime.EventListener + client clientnative.HAProxyClient // for storage only + rt runtime.Runtime + // done is closed to signal the listen goroutine to exit. + // A new channel is created each time a new goroutine is started. + done chan struct{} stop atomic.Bool lastEvent time.Time } @@ -76,6 +81,7 @@ func ListenHAProxyEvents(ctx context.Context, client clientnative.HAProxyClient) client: client, listener: el, rt: rt, + done: make(chan struct{}), } go h.listen(ctx) @@ -92,20 +98,27 @@ func (h *HAProxyEventListener) Reconfigure(ctx context.Context, rt runtime.Runti } if rt.SocketPath() == h.rt.SocketPath() { - // no need to restart the listener + h.mu.Lock() h.rt = rt + h.mu.Unlock() return nil } - h.Reset() + // Signal the old goroutine to stop and wait for it to exit. + h.stopAndWait() + + h.mu.Lock() h.rt = rt + h.done = make(chan struct{}) h.stop.Store(false) + h.mu.Unlock() + go h.listen(ctx) return nil } -func (h *HAProxyEventListener) Reset() { +func (h *HAProxyEventListener) resetLocked() { if h.listener != nil { if err := h.listener.Close(); err != nil { log.Warning(err) @@ -114,9 +127,19 @@ func (h *HAProxyEventListener) Reset() { } } -func (h *HAProxyEventListener) Stop() error { +// stopAndWait signals the listen goroutine to stop and waits for it to exit. +func (h *HAProxyEventListener) stopAndWait() { h.stop.Store(true) - return h.listener.Close() + h.mu.Lock() + h.resetLocked() + h.mu.Unlock() + // Wait for the goroutine to acknowledge the stop. + <-h.done +} + +func (h *HAProxyEventListener) Stop() error { + h.stopAndWait() + return nil } func newHAProxyEventListener(socketPath string) (*runtime.EventListener, error) { @@ -133,48 +156,70 @@ func newHAProxyEventListener(socketPath string) (*runtime.EventListener, error) return el, nil } +const maxRetryBackoff = 60 * time.Second + func (h *HAProxyEventListener) listen(ctx context.Context) { - var err error + defer close(h.done) + retryAfter := 100 * time.Millisecond + loggedDisconnect := false for { if h.stop.Load() { - // Stop requested. - h.Reset() + h.mu.Lock() + h.resetLocked() + h.mu.Unlock() return } - if h.listener == nil { - h.listener, err = newHAProxyEventListener(h.rt.SocketPath()) + + h.mu.Lock() + needsConnect := h.listener == nil + h.mu.Unlock() + + if needsConnect { + el, err := newHAProxyEventListener(h.rt.SocketPath()) if err != nil { - // Try again. - log.Warning(err) - time.Sleep(retryAfter) + if !loggedDisconnect { + log.Warningf("event listener disconnected, reconnecting: %v", err) + loggedDisconnect = true + } else { + log.Debugf("event listener reconnect attempt: %v", err) + } + select { + case <-time.After(retryAfter): + case <-ctx.Done(): + return + } retryAfter *= 2 - if retryAfter == 51200*time.Millisecond { - // Give up after 10 iterations. + if retryAfter >= maxRetryBackoff { + log.Warning("event listener giving up reconnection attempts") h.stop.Store(true) } continue } + + h.mu.Lock() + h.listener = el + h.mu.Unlock() + + retryAfter = 100 * time.Millisecond + loggedDisconnect = false + log.Debugf("event listener reconnected to: %s", h.rt.SocketPath()) } for { ev, err := h.listener.Listen(ctx) if err != nil { - // EOF errors usually happen when HAProxy restarts, do not log. if !errors.Is(err, io.EOF) { - log.Warning(err) + log.Debugf("event listener error: %v", err) } - // Reset the connection. - h.Reset() + h.mu.Lock() + h.resetLocked() + h.mu.Unlock() break } h.handle(ctx, ev) - - if h.listener == nil { // just in case - break - } } } } diff --git a/client-native/events_acme.go b/client-native/events_acme.go index efe220e4..e6b29fdb 100644 --- a/client-native/events_acme.go +++ b/client-native/events_acme.go @@ -20,7 +20,9 @@ import ( "errors" "fmt" "io" + "os" "path/filepath" + "strconv" "strings" "time" @@ -72,25 +74,28 @@ func (h *HAProxyEventListener) handleAcmeNewCertEvent(args string) { return } - // Do not use the certificate name in args as a storage name. - // It could be an alias, or the user could have split keys and certs storage. + // The only argument is the certificate name, which could be a "virtual" + // name like "@store/www1" in case of a crt-store. + crtName := args - crt, err := h.rt.ShowCertificate(args) + // Use "show ssl cert" to get the real filename of the certificate. + crt, err := h.rt.ShowCertificate(crtName) if err != nil { log.Errorf("events: acme newcert %s: %s", args, err.Error()) return } - storage, err := h.client.SSLCertStorage() + // Use "dump ssl cert" to get the certificate contents in PEM format. + // This command only works on sockets with level "admin"! + pem, err := h.rt.DumpCertificate(crtName) if err != nil { - log.Error(err) + log.Errorf("events: acme newcert %s: dump cert: %s", args, err.Error()) return } - // 'dump ssl cert' can only be issued on sockets with level "admin". - pem, err := h.rt.DumpCertificate(crt.StorageName) + storage, err := h.client.SSLCertStorage() if err != nil { - log.Errorf("events: acme newcert %s: dump cert: %s", args, err.Error()) + log.Errorf("events: acme newcert %s: %s", args, err.Error()) return } @@ -113,7 +118,7 @@ func (h *HAProxyEventListener) handleAcmeNewCertEvent(args string) { return } - log.Debugf("events: OK: acme newcert %s => %s", args, crt.StorageName) + log.Debugf("events: OK: acme newcert %s => %s", args, storageName) } // HAProxy needs dpapi to solve a dns-01 challenge. @@ -239,18 +244,45 @@ func (h *HAProxyEventListener) handleAcmeDeployEvent(ctx context.Context, args s log.Errorf("events: acme deploy: DNS provider: %s", err.Error()) return } - err = solver.Present(ctx, domainName, "", keyAuth) + + // These options will be configurable from haproxy.cfg in a future version. + // For now use environment variables. + solver.PropagationDelay = getEnvDuration("DPAPI_ACME_PROPAGDELAY_SEC", 0) + solver.PropagationTimeout = getEnvDuration("DPAPI_ACME_PROPAGTIMEOUT_SEC", time.Hour) + + var zone string + if solver.PropagationTimeout != -1 { + zone = acme.GuessZone(domainName) + } else { + zone, err = acme.FindZoneByFQDN(ctx, domainName, acme.RecursiveNameservers(nil)) + } + if err != nil { + log.Errorf("events: acme deploy: failed to find root zone for '%s': %s", domainName, err.Error()) + return + } + err = solver.Present(ctx, domainName, zone, keyAuth) if err != nil { log.Errorf("events: acme deploy: DNS solver: %s", err.Error()) return } - // Remove the challenge in 2h. + // Wait for DNS propagation and cleanup. + err = solver.Wait(ctx, domainName, zone, keyAuth) + // Remove the challenge in 10m if Wait() was successful. This should be + // more than enough for HAProxy to finish the challenge with the ACME server. + waitBeforeCleanup := 10 * time.Minute + if err != nil { + waitBeforeCleanup = time.Second + } go func() { - time.Sleep(2 * time.Hour) - if err := solver.CleanUp(ctx, domainName, "", keyAuth); err != nil { + time.Sleep(waitBeforeCleanup) + if err := solver.CleanUp(ctx, domainName, zone, keyAuth); err != nil { log.Errorf("events: acme deploy: cleanup failed for %s: %v", domainName, err) } }() + if err != nil { + log.Errorf("events: acme deploy: DNS propagation check failed for '%s': %v", domainName, err) + return + } // Send back a response to HAProxy. rt, err := h.client.Runtime() @@ -266,3 +298,20 @@ func (h *HAProxyEventListener) handleAcmeDeployEvent(ctx context.Context, args s log.Debugf("events: OK: acme deploy %s => %s", domainName, resp) } + +// Parse an environment variable containing a duration in seconds, or return a default value. +func getEnvDuration(name string, def time.Duration) time.Duration { + str := os.Getenv(name) + if str == "" { + return def + } + if str == "-1" { + // special case to disable waiting for propagation + return -1 + } + num, err := strconv.Atoi(str) + if err != nil { + return def + } + return time.Duration(num) * time.Second +} diff --git a/cmd/gitlab-mr-checker/main.go b/cmd/gitlab-mr-checker/main.go index 5285aaf8..b6f395fc 100644 --- a/cmd/gitlab-mr-checker/main.go +++ b/cmd/gitlab-mr-checker/main.go @@ -221,18 +221,18 @@ func startThreadOnMergeRequest(baseURL, token, projectID string, mergeRequestIID os.Exit(1) } - req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, + req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, //nolint:gosec // URL constructed from trusted CI environment variables fmt.Sprintf("%s/projects/%s/merge_requests/%d/discussions", baseURL, url.PathEscape(projectID), mergeRequestIID), bytes.NewBuffer(threadDataBytes)) if err != nil { - slog.Error(err.Error()) + slog.Error(err.Error()) //nolint:gosec // log message from trusted CI environment variables os.Exit(1) } req.Header.Add("PRIVATE-TOKEN", token) //nolint:canonicalheader req.Header.Add("Content-Type", "application/json") - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { - slog.Error(err.Error()) + slog.Error(err.Error()) //nolint:gosec // log message from trusted CI environment variables os.Exit(1) } defer resp.Body.Close() @@ -241,14 +241,14 @@ func startThreadOnMergeRequest(baseURL, token, projectID string, mergeRequestIID func getMergeRequest(baseURL, token, projectID string, mergeRequestIID int) (*MergeRequest, error) { client := &http.Client{} - req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, //nolint:gosec // URL constructed from trusted CI environment variables fmt.Sprintf("%s/projects/%s/merge_requests/%d", baseURL, url.PathEscape(projectID), mergeRequestIID), nil) if err != nil { return nil, err } req.Header.Add("PRIVATE-TOKEN", token) //nolint:canonicalheader - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return nil, err } @@ -276,14 +276,14 @@ func getMergeRequest(baseURL, token, projectID string, mergeRequestIID int) (*Me func getMergeRequestComments(baseURL, token, projectID string, mergeRequestIID int) ([]Note, error) { client := &http.Client{} - req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, //nolint:gosec // URL constructed from trusted CI environment variables fmt.Sprintf("%s/projects/%s/merge_requests/%d/notes", baseURL, url.PathEscape(projectID), mergeRequestIID), nil) if err != nil { return nil, err } req.Header.Add("PRIVATE-TOKEN", token) //nolint:canonicalheader - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return nil, err } @@ -309,13 +309,13 @@ func getProjectlabels(backportLabels map[string]struct{}, projectID string) erro if token == "" { return errors.New("GITLAB_TOKEN not set") } - req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, //nolint:gosec // URL constructed from trusted CI environment variables fmt.Sprintf("%s/projects/%s/labels", baseURL, url.PathEscape(projectID)), nil) if err != nil { return fmt.Errorf("failed to create request: %w", err) } req.Header.Add("PRIVATE-TOKEN", token) //nolint:canonicalheader - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return fmt.Errorf("failed to get project labels: %w", err) } @@ -353,14 +353,14 @@ func getProjectlabels(backportLabels map[string]struct{}, projectID string) erro if err != nil { return fmt.Errorf("failed to marshal label data: %w", err) } - req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, + req, err := http.NewRequestWithContext(context.Background(), http.MethodPost, //nolint:gosec // URL constructed from trusted CI environment variables fmt.Sprintf("%s/projects/%s/labels", baseURL, url.PathEscape(projectID)), bytes.NewBuffer(labelDataBytes)) if err != nil { return fmt.Errorf("failed to create request to create label: %w", err) } req.Header.Add("PRIVATE-TOKEN", token) //nolint:canonicalheader req.Header.Add("Content-Type", "application/json") - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return fmt.Errorf("failed to create label %s: %w", label, err) } @@ -387,13 +387,13 @@ func GetBranches() ([]string, error) { nextPageURL := fmt.Sprintf("%s/projects/%s/repository/branches", baseURL, url.PathEscape(projectID)) for nextPageURL != "" { - req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, nextPageURL, nil) + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, nextPageURL, nil) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return nil, fmt.Errorf("failed to create request: %w", err) } req.Header.Add("PRIVATE-TOKEN", token) //nolint:canonicalheader - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return nil, fmt.Errorf("failed to get branches: %w", err) } diff --git a/cmd/gitlab-mr-pipelines/main.go b/cmd/gitlab-mr-pipelines/main.go index 9eca2569..709253bf 100644 --- a/cmd/gitlab-mr-pipelines/main.go +++ b/cmd/gitlab-mr-pipelines/main.go @@ -96,14 +96,14 @@ func getOldMergeRequestPipelines(apiURL, projectID, mrIID, token string) ([]pipe } url := fmt.Sprintf("%s/projects/%s/merge_requests/%s/pipelines", apiURL, projectID, mrIID) - req, err := http.NewRequest("GET", url, nil) //nolint:noctx,usestdlibvars + req, err := http.NewRequest("GET", url, nil) //nolint:noctx,usestdlibvars,gosec // URL constructed from trusted CI environment variables if err != nil { return nil, err } req.Header.Set("PRIVATE-TOKEN", token) //nolint:canonicalheader client := &http.Client{} - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return nil, err } @@ -132,14 +132,14 @@ func getOldMergeRequestPipelines(apiURL, projectID, mrIID, token string) ([]pipe func cancelPipeline(apiURL, projectID string, pipelineID int, token string) error { url := fmt.Sprintf("%s/projects/%s/pipelines/%d/cancel", apiURL, projectID, pipelineID) - req, err := http.NewRequest("POST", url, nil) //nolint:noctx,usestdlibvars + req, err := http.NewRequest("POST", url, nil) //nolint:noctx,usestdlibvars,gosec // URL constructed from trusted CI environment variables if err != nil { return err } req.Header.Set("PRIVATE-TOKEN", token) //nolint:canonicalheader client := &http.Client{} - resp, err := client.Do(req) + resp, err := client.Do(req) //nolint:gosec // URL constructed from trusted CI environment variables if err != nil { return err } diff --git a/cmd/govulncheck-report/main.go b/cmd/govulncheck-report/main.go index dd8b101b..a02dc4fe 100644 --- a/cmd/govulncheck-report/main.go +++ b/cmd/govulncheck-report/main.go @@ -70,7 +70,7 @@ func main() { } currentBranch = string(out) } - slog.Info("Current branch: " + currentBranch) + slog.Info("Current branch: " + currentBranch) //nolint:gosec // log message from trusted CI environment variables cmd := exec.Command("govulncheck", "./...") out, _ := cmd.Output() @@ -135,7 +135,7 @@ func main() { } func createIssue(baseURL, token, projectID string, title, commentBody string) { - slog.Info("Active issue with title '" + title + "' not found in project " + projectID) + slog.Info("Active issue with title '" + title + "' not found in project " + projectID) //nolint:gosec // log message from trusted CI environment variables // Create the issue here issueData := map[string]any{ "title": title, diff --git a/configuration/configuration.go b/configuration/configuration.go index e8d20fde..ad0d4f51 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -49,6 +49,8 @@ type HAProxyConfiguration struct { ReloadStrategy string `long:"reload-strategy" description:"Either systemd, s6 or custom" default:"custom" group:"reload"` TransactionDir string `short:"t" long:"transaction-dir" description:"Path to the transaction directory" default:"/tmp/haproxy" group:"transaction"` ValidateCmd string `long:"validate-cmd" description:"Executes a custom command to perform the HAProxy configuration check" group:"reload"` + ValidateFilesBefore []string `long:"validate-files-before" description:"A list of configuration files to be loaded before the main file for validation" group:"reload"` + ValidateFilesAfter []string `long:"validate-files-after" description:"A list of configuration files to be loaded after the main file for validation" group:"reload"` BackupsDir string `long:"backups-dir" description:"Path to directory in which to place backup files" group:"transaction"` MapsDir string `short:"p" long:"maps-dir" description:"Path to directory of map files managed by dataplane" default:"/etc/haproxy/maps" group:"resources"` SpoeTransactionDir string `long:"spoe-transaction-dir" description:"Path to the SPOE transaction directory" default:"/tmp/spoe-haproxy" group:"resources"` diff --git a/configuration/configuration_storage.go b/configuration/configuration_storage.go index a29ec412..16deb61f 100644 --- a/configuration/configuration_storage.go +++ b/configuration/configuration_storage.go @@ -81,14 +81,16 @@ type configTypeUserlist struct { } type configTypeReload struct { - ReloadDelay *int `yaml:"reload_delay,omitempty"` - ReloadCmd *string `yaml:"reload_cmd,omitempty"` - RestartCmd *string `yaml:"restart_cmd,omitempty"` - StatusCmd *string `yaml:"status_cmd,omitempty"` - ServiceName *string `yaml:"service_name,omitempty"` - ReloadRetention *int `yaml:"reload_retention,omitempty"` - ReloadStrategy *string `yaml:"reload_strategy,omitempty"` - ValidateCmd *string `yaml:"validate_cmd,omitempty"` + ReloadDelay *int `yaml:"reload_delay,omitempty"` + ReloadCmd *string `yaml:"reload_cmd,omitempty"` + RestartCmd *string `yaml:"restart_cmd,omitempty"` + StatusCmd *string `yaml:"status_cmd,omitempty"` + ServiceName *string `yaml:"service_name,omitempty"` + ReloadRetention *int `yaml:"reload_retention,omitempty"` + ReloadStrategy *string `yaml:"reload_strategy,omitempty"` + ValidateCmd *string `yaml:"validate_cmd,omitempty"` + ValidateFilesBefore *[]string `yaml:"validate_files_before,omitempty"` + ValidateFilesAfter *[]string `yaml:"validate_files_after,omitempty"` } type configTypeTransaction struct { @@ -252,6 +254,12 @@ func copyToConfiguration(cfg *Configuration) { //nolint:cyclop,maintidx if cfgStorage.Haproxy != nil && cfgStorage.Haproxy.Reload != nil && cfgStorage.Haproxy.Reload.ValidateCmd != nil && !misc.HasOSArg("", "validate-cmd", "") { cfg.HAProxy.ValidateCmd = *cfgStorage.Haproxy.Reload.ValidateCmd } + if cfgStorage.Haproxy != nil && cfgStorage.Haproxy.Reload != nil && cfgStorage.Haproxy.Reload.ValidateFilesBefore != nil && !misc.HasOSArg("", "validate-files-before", "") { + cfg.HAProxy.ValidateFilesBefore = *cfgStorage.Haproxy.Reload.ValidateFilesBefore + } + if cfgStorage.Haproxy != nil && cfgStorage.Haproxy.Reload != nil && cfgStorage.Haproxy.Reload.ValidateFilesAfter != nil && !misc.HasOSArg("", "validate-files-after", "") { + cfg.HAProxy.ValidateFilesAfter = *cfgStorage.Haproxy.Reload.ValidateFilesAfter + } if cfgStorage.Dataplaneapi != nil && cfgStorage.Dataplaneapi.Transaction != nil && cfgStorage.Dataplaneapi.Transaction.TransactionDir != nil && !misc.HasOSArg("t", "transaction-dir", "") { cfg.HAProxy.TransactionDir = *cfgStorage.Dataplaneapi.Transaction.TransactionDir } diff --git a/configuration/dataplane_storage.go b/configuration/dataplane_storage.go index c9db3cd3..028221c9 100644 --- a/configuration/dataplane_storage.go +++ b/configuration/dataplane_storage.go @@ -51,22 +51,22 @@ func (c *Configuration) SaveClusterModeData() error { cfgCertificateFetched := cfgCluster.CertificateFetched.Load() dapiStorageCluster := storagetype.Cluster{ - APINodesPath: misc.StringP(cfgCluster.APINodesPath.Load()), - Token: misc.StringP(cfgCluster.Token.Load()), + APINodesPath: new(cfgCluster.APINodesPath.Load()), + Token: new(cfgCluster.Token.Load()), ClusterTLSCertDir: &c.HAProxy.ClusterTLSCertDir, - ActiveBootstrapKey: misc.StringP(cfgCluster.ActiveBootstrapKey.Load()), - APIRegisterPath: misc.StringP(cfgCluster.APIRegisterPath.Load()), - URL: misc.StringP(cfgCluster.URL.Load()), + ActiveBootstrapKey: new(cfgCluster.ActiveBootstrapKey.Load()), + APIRegisterPath: new(cfgCluster.APIRegisterPath.Load()), + URL: new(cfgCluster.URL.Load()), Port: &dPort, - StorageDir: misc.StringP(cfgCluster.StorageDir.Load()), - BootstrapKey: misc.StringP(cfgCluster.BootstrapKey.Load()), - ID: misc.StringP(cfgCluster.ID.Load()), - APIBasePath: misc.StringP(cfgCluster.APIBasePath.Load()), - CertificateDir: misc.StringP(cfgCluster.CertificateDir.Load()), + StorageDir: new(cfgCluster.StorageDir.Load()), + BootstrapKey: new(cfgCluster.BootstrapKey.Load()), + ID: new(cfgCluster.ID.Load()), + APIBasePath: new(cfgCluster.APIBasePath.Load()), + CertificateDir: new(cfgCluster.CertificateDir.Load()), CertificateFetched: &cfgCertificateFetched, - Name: misc.StringP(cfgCluster.Name.Load()), - Description: misc.StringP(cfgCluster.Description.Load()), - ClusterID: misc.StringP(cfgCluster.ClusterID.Load()), + Name: new(cfgCluster.Name.Load()), + Description: new(cfgCluster.Description.Load()), + ClusterID: new(cfgCluster.ClusterID.Load()), ClusterLogTargets: cfgCluster.ClusterLogTargets, } cfgStatus := c.Status.Load() diff --git a/configuration/examples/example-full.yaml b/configuration/examples/example-full.yaml index 161006be..6e953898 100644 --- a/configuration/examples/example-full.yaml +++ b/configuration/examples/example-full.yaml @@ -72,6 +72,9 @@ haproxy: reload_retention: 1 # int 2 reload_strategy: custom validate_cmd: null # string 2 + validate_files_before: + - "/etc/haproxy/global.def" + validate_files_after: [] # []string cluster: # Deprecated starting 3.0, see ./README.md for more information cluster_tls_dir: null # string id: null # string diff --git a/discovery/aws_service_discovery_instance.go b/discovery/aws_service_discovery_instance.go index 433f3185..f2dfb226 100644 --- a/discovery/aws_service_discovery_instance.go +++ b/discovery/aws_service_discovery_instance.go @@ -31,7 +31,6 @@ import ( "github.com/haproxytech/dataplaneapi/haproxy" "github.com/haproxytech/dataplaneapi/log" - "github.com/haproxytech/dataplaneapi/misc" ) const ( @@ -94,7 +93,7 @@ func (a awsService) GetServers() (servers []configuration.ServiceServer) { var port *int64 if parsedPort > 0 { - port = misc.Int64P(parsedPort) + port = new(int64(parsedPort)) } servers = append(servers, configuration.ServiceServer{ diff --git a/discovery/consul_service_discovery_instance.go b/discovery/consul_service_discovery_instance.go index 6b68eadd..554af67d 100644 --- a/discovery/consul_service_discovery_instance.go +++ b/discovery/consul_service_discovery_instance.go @@ -29,7 +29,6 @@ import ( "github.com/haproxytech/client-native/v6/models" "github.com/haproxytech/dataplaneapi/log" - "github.com/haproxytech/dataplaneapi/misc" jsoniter "github.com/json-iterator/go" ) @@ -184,7 +183,7 @@ func (c *consulInstance) convertToServers(nodes []*serviceEntry) []configuration Address: node.Service.Address, } if node.Service.Port > 0 { - ss.Port = misc.Int64P(node.Service.Port) + ss.Port = new(int64(node.Service.Port)) } servers = append(servers, ss) } else { @@ -192,7 +191,7 @@ func (c *consulInstance) convertToServers(nodes []*serviceEntry) []configuration Address: node.Node.Address, } if node.Service.Port > 0 { - ss.Port = misc.Int64P(node.Service.Port) + ss.Port = new(int64(node.Service.Port)) } servers = append(servers, ss) } diff --git a/discovery/utils.go b/discovery/utils.go index 40dcacec..5a7dbde1 100644 --- a/discovery/utils.go +++ b/discovery/utils.go @@ -21,7 +21,6 @@ import ( "github.com/go-openapi/strfmt" "github.com/google/uuid" "github.com/haproxytech/client-native/v6/models" - "github.com/haproxytech/dataplaneapi/misc" ) const ( @@ -42,10 +41,10 @@ func ValidateAWSData(data *models.AwsRegion, useValidation bool) error { return err } if data.ServerSlotsBase == nil || *data.ServerSlotsBase < minimumServerSlotsBase { - data.ServerSlotsBase = misc.Int64P(10) + data.ServerSlotsBase = new(int64(10)) } if data.ServerSlotsGrowthType == nil { - data.ServerSlotsGrowthType = misc.StringP(models.AwsRegionServerSlotsGrowthTypeExponential) + data.ServerSlotsGrowthType = new(models.AwsRegionServerSlotsGrowthTypeExponential) } if *data.ServerSlotsGrowthType == models.AwsRegionServerSlotsGrowthTypeLinear && (data.ServerSlotsGrowthIncrement == 0 || data.ServerSlotsGrowthIncrement < minimumServerSlotsBase) { data.ServerSlotsGrowthIncrement = minimumServerSlotsBase @@ -67,10 +66,10 @@ func ValidateConsulData(data *models.Consul, useValidation bool) error { return err } if data.ServerSlotsBase == nil || *data.ServerSlotsBase < minimumServerSlotsBase { - data.ServerSlotsBase = misc.Int64P(minimumServerSlotsBase) + data.ServerSlotsBase = new(int64(minimumServerSlotsBase)) } if data.ServerSlotsGrowthType == nil { - data.ServerSlotsGrowthType = misc.StringP(models.ConsulServerSlotsGrowthTypeLinear) + data.ServerSlotsGrowthType = new(models.ConsulServerSlotsGrowthTypeLinear) } if *data.ServerSlotsGrowthType == models.ConsulServerSlotsGrowthTypeLinear && (data.ServerSlotsGrowthIncrement == 0 || data.ServerSlotsGrowthIncrement < minimumServerSlotsBase) { data.ServerSlotsGrowthIncrement = minimumServerSlotsBase diff --git a/e2e/run.bash b/e2e/run.bash index 9d3bf956..77780cf1 100755 --- a/e2e/run.bash +++ b/e2e/run.bash @@ -18,7 +18,7 @@ set -eo pipefail export BASE_PATH="/v3" -HAPROXY_VERSION=${HAPROXY_VERSION:-3.4} +HAPROXY_VERSION=${HAPROXY_VERSION:-3.3} DOCKER_BASE_IMAGE="${DOCKER_BASE_IMAGE:-haproxytech/haproxy-debian}:${HAPROXY_VERSION}" DOCKER_CONTAINER_NAME="dataplaneapi-e2e" export DOCKER_CONTAINER_NAME diff --git a/e2e/tests/acl_files/acl_file_entries.bats b/e2e/tests/acl_files/acl_file_entries.bats index 5d1588f8..403cdc72 100644 --- a/e2e/tests/acl_files/acl_file_entries.bats +++ b/e2e/tests/acl_files/acl_file_entries.bats @@ -57,6 +57,10 @@ load 'utils/_helpers' resource_post "$_RUNTIME_ACL_BASE_PATH/$PARENT_NAME/entries" "data/post.json" assert_equal "$SC" 201 assert_equal "$(get_json_path "${BODY}" " .value" )" "/js" + + # Adding the same entry twice should return a 409 error. + resource_post "$_RUNTIME_ACL_BASE_PATH/$PARENT_NAME/entries" "data/post.json" + assert_equal "$SC" 409 } @test "acl_runtime: Delete an ACL file entry by its ID" { diff --git a/e2e/tests/crt_store/crt_store.bats b/e2e/tests/crt_store/crt_store.bats index 83e5424f..ce188d53 100644 --- a/e2e/tests/crt_store/crt_store.bats +++ b/e2e/tests/crt_store/crt_store.bats @@ -50,36 +50,36 @@ load 'utils/_helpers' assert_equal "$SC" "200" assert_equal "$_STORE_NAME" "$(get_json_path "$BODY" .[0].name)" - resource_post "$_CRT_LOAD_PATH" "data/post_entry1.json" "crt_store=$_STORE_NAME" + resource_post "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads" "data/post_entry1.json" assert_equal "$SC" "202" - resource_post "$_CRT_LOAD_PATH" "data/post_entry2.json" "crt_store=$_STORE_NAME" + resource_post "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads" "data/post_entry2.json" assert_equal "$SC" "202" - resource_get "$_CRT_LOAD_PATH/c1.pem" "crt_store=$_STORE_NAME" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c1.pem" assert_equal "$SC" "200" assert_equal "c1.pem" "$(get_json_path "$BODY" .certificate)" assert_equal "k1.pem" "$(get_json_path "$BODY" .key)" assert_equal "disabled" "$(get_json_path "$BODY" .ocsp_update)" - resource_get "$_CRT_LOAD_PATH" "crt_store=$_STORE_NAME" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads" assert_equal "$SC" "200" assert_equal "2" "$(get_json_path "$BODY" '.|length')" assert_equal "c1.pem" "$(get_json_path "$BODY" .[0].certificate)" assert_equal "c2.pem" "$(get_json_path "$BODY" .[1].certificate)" - resource_put "$_CRT_LOAD_PATH/c2.pem" "data/put_entry.json" \ + resource_put "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" "data/put_entry.json" \ "crt_store=$_STORE_NAME" "force_reload=true" assert_equal "$SC" "202" - resource_get "$_CRT_LOAD_PATH/c2.pem" "crt_store=$_STORE_NAME" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" assert_equal "c2.pem" "$(get_json_path "$BODY" .certificate)" assert_equal "disabled" "$(get_json_path "$BODY" .ocsp_update)" assert_equal "example.com" "$(get_json_path "$BODY" .alias)" - resource_delete "$_CRT_LOAD_PATH/c1.pem" "crt_store=$_STORE_NAME" "force_reload=true" - assert_equal "$SC" "202" - resource_delete "$_CRT_LOAD_PATH/c2.pem" "crt_store=$_STORE_NAME" "force_reload=true" - assert_equal "$SC" "202" - resource_get "$_CRT_LOAD_PATH/c2.pem" "crt_store=$_STORE_NAME" + resource_delete "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c1.pem" "force_reload=true" + assert_equal "$SC" "204" + resource_delete "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" "force_reload=true" + assert_equal "$SC" "204" + resource_get "$_CRT_STORE_PATH/$_STORE_NAME/crt_loads/c2.pem" assert_equal "$SC" "404" resource_delete "$_CRT_STORE_PATH/$_STORE_NAME" "force_reload=true" diff --git a/e2e/tests/crt_store/utils/_helpers.bash b/e2e/tests/crt_store/utils/_helpers.bash index 1f173716..d1ba445c 100644 --- a/e2e/tests/crt_store/utils/_helpers.bash +++ b/e2e/tests/crt_store/utils/_helpers.bash @@ -17,4 +17,3 @@ _STORE_NAME="test_store1" _CRT_STORE_PATH="/services/haproxy/configuration/crt_stores" -_CRT_LOAD_PATH="/services/haproxy/configuration/crt_loads" diff --git a/e2e/tests/groups/delete.bats b/e2e/tests/groups/delete.bats index 8f62b806..a46e3c9f 100644 --- a/e2e/tests/groups/delete.bats +++ b/e2e/tests/groups/delete.bats @@ -34,8 +34,8 @@ load 'utils/_helpers' } @test "groups: Delete a group that is assigned to an existing user" { - # resource_delete "$_GROUPS_BASE_PATH/virus" "userlist=delete_test&force_reload=true" - # assert_equal "$SC" 400 + resource_delete "$_GROUPS_BASE_PATH/virus" "userlist=delete_test&force_reload=true" + assert_equal "$SC" 400 } @test "groups: Delete a non existing group" { diff --git a/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default new file mode 100644 index 00000000..37c977d4 --- /dev/null +++ b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/default @@ -0,0 +1,51 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDciXjkAHqi+B+X +jgFTEDlGrz6OAISOZTY7vA1eqTW2wnUHyHiaj73xnGegxp9rgZ05lqg/ZU4fO0lt +9XWh1h8+pjwG3KoClS9yr2AK6+tpc7cjN6ZwkQo/3I+ulh9SfbIwW4TSay1yFp9v +aDX2MIicRzh308Z0fw92jBEcMAfewXXEIr/+PSwHLj2WLS3Adme3GNCJwzAbcU/C +OWKlSWrgbOEsYcCGI7Fv8GFeJp7sLAeN/G/ichXEQfJIn3Enb30zBr+B3VxgyYQV +tiOxiT+LTKX/zG16chOJQzKLYfT+E7m4o6fQbfEjScEx0/4JHAfn6OydMMrw3g+f +M10NhkRHAgMBAAECggEAUMFOMT8zqQVunBJ1zbK9JnL5Vwo9f97z8v+zbZxMfPXL +4OO5te84wIZjM+5HZhh6OCJAzaYM60bMZqVhQ7eijVBV3rVi07tJOpeZdaZZ961V +vGGeYs3ZkPT08BsssQox+58njd2NMJ+0Fhl02QeAnqk9tjMoEnSMdv5nLYkw+JH0 +Uw3cYD7ZjBzA/VYoD9nuZDhN/xiqhLksnOOYnucSleQI0feVbG/QSYfzQeGo42Om +MjlVJr0LeJMebOcT34o3fQHoz6pQZt0WP4xNwRrk72ZqBl8HSkLGfrqzg2hlaldQ +JfB7DuWkYRrUF0GKs7CbFo4yRsABVtp8DF6xiCL5AQKBgQD/dLPG8Garlc9liJG9 +ovCE2/kAkeni/Qjc14CFX4qkgcnBIaTTl79xeRmN5dp/WnTinNNMQTamaCJaKEgN +5A28axTsE9Ec/9sGrv/Dt3fXtS+rBPYS9Hc1k5LQrnBlD6lEe5+Oqhc4Mzw5sglo +sfiChEzojV9Vnyj/Y0m5q8t9hwKBgQDdAbqiHMJoAP7IEnsOw1xjA6zFaeY2jYDS +F5ZvSN0IlWXX2Aqc941ws1qKZiGjC9pqaRcjlh1OvhaEIpY7ksTShM8453mstWGl +GV3iYiI9E+KijwqFhWyuiXxi0m0l0u2vXPgj0u6txX9suQQab9+f2oSEXG34wXDu +R9+s/rqzQQKBgFID9OgtLLlwGqsdgrUgyBnPyg0Ny8qttJe6tK+dchTI+q6AD7xD +XxqeZ77wCguTTi2nbgtwcIxSqJzLi/6xtltFAe2dmyi1WGu36bO7hsWBjXFZ4WtK +g6921s8bAkjgE1dCXYLfRx8rC+32JCEx6nh044BSS0ZhGDeOeBAdgPKnAoGBAIIa +w3kt/xBlDZhQsNr3DUtI3Yv2FM2mreCAfFIVDfJAqQzRJSZU4ZIoM7Pn/gNTNgiQ +x0tu0uAJLY4qIlD9zRq1jpxMQKf4u3wLG+bqqIdWToQuOx5xdpKlY3F1uUWcD8q9 +q2LDiTkJXENwA8dgdsBPTtXw59iaYFYWP8pCxzxBAoGANmDkR5qJBJMeQgD8pVKu +xLwV7gInuVMLqfF67aBTCsQKAk+b+zWKUbPLpaldCXREj0YLsTEmp2srIP4KKSMH +N/yjXtYxY4fmCsrHAzqqzpZiYWRYScXHwCSudvV0w7PFNwKndS68lqDj7JKyGkBe +rAMB+WGlOTcNKJrsrq7mnPc= +-----END PRIVATE KEY----- +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIUSUdc/Tj4WL90KtoPif0wGpgEGlowDQYJKoZIhvcNAQEL +BQAwfjELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcM +DU1vdW50YWluIFZpZXcxGjAYBgNVBAoMEVlvdXIgT3JnYW5pemF0aW9uMRIwEAYD +VQQLDAlZb3VyIFVuaXQxEjAQBgNVBAMMCWxvY2FsaG9zdDAeFw0yMzA1MjQxMDIy +MjJaFw0zMzA1MjExMDIyMjJaMH4xCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxp +Zm9ybmlhMRYwFAYDVQQHDA1Nb3VudGFpbiBWaWV3MRowGAYDVQQKDBFZb3VyIE9y +Z2FuaXphdGlvbjESMBAGA1UECwwJWW91ciBVbml0MRIwEAYDVQQDDAlsb2NhbGhv +c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDciXjkAHqi+B+XjgFT +EDlGrz6OAISOZTY7vA1eqTW2wnUHyHiaj73xnGegxp9rgZ05lqg/ZU4fO0lt9XWh +1h8+pjwG3KoClS9yr2AK6+tpc7cjN6ZwkQo/3I+ulh9SfbIwW4TSay1yFp9vaDX2 +MIicRzh308Z0fw92jBEcMAfewXXEIr/+PSwHLj2WLS3Adme3GNCJwzAbcU/COWKl +SWrgbOEsYcCGI7Fv8GFeJp7sLAeN/G/ichXEQfJIn3Enb30zBr+B3VxgyYQVtiOx +iT+LTKX/zG16chOJQzKLYfT+E7m4o6fQbfEjScEx0/4JHAfn6OydMMrw3g+fM10N +hkRHAgMBAAGjUzBRMB0GA1UdDgQWBBQyAsLJnbNGf7ME+DokcSeSMYMN5jAfBgNV +HSMEGDAWgBQyAsLJnbNGf7ME+DokcSeSMYMN5jAPBgNVHRMBAf8EBTADAQH/MA0G +CSqGSIb3DQEBCwUAA4IBAQB62/lsOhVrIwUx07C4r3eGu6EmughelFJgqwijnOSS +JmICWvLtfu+X8DQkl0ls5esnK8FZk2i5zBMqhdkD0vb9qa0iI++M6jcjbDrW/bZ/ +oLa/zvEvUeEQS3FqS8p3OUczm4T88cBze3MX4iDDo/QgK6B/46t2UeXByuIZEXsK +6OzBfoX31qrZ+DvvKBSLQG1f13vkp9WDL2u60IQ4XaIgyr+O1R/x157ic0WPaWoV +EwPYP7ds1d8Zz9z8u6LFNi+as33zkRhIBQble277U8vT7AOicXHxnf7y2rToO41h +mi+hA0kvDDgbr4r/K/Lq909m8OUKWBZ5U+c9c7FdMqT+ +-----END CERTIFICATE----- diff --git a/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def new file mode 100644 index 00000000..4a67f955 --- /dev/null +++ b/e2e/tests/raw_multi/data/container/usr/local/etc/haproxy/global.def @@ -0,0 +1,10 @@ +global + chroot /var/lib/haproxy + user haproxy + group haproxy + maxconn 4000 + pidfile /var/run/haproxy.pid + stats socket /var/lib/haproxy/stats level admin + log 127.0.0.1 local2 + crt-base /etc/haproxy + ca-base /etc/haproxy diff --git a/e2e/tests/raw_multi/data/haproxy.cfg b/e2e/tests/raw_multi/data/haproxy.cfg new file mode 100644 index 00000000..a2d60ac7 --- /dev/null +++ b/e2e/tests/raw_multi/data/haproxy.cfg @@ -0,0 +1,31 @@ +# global is defined in global.def + +defaults mydefaults + mode http + maxconn 3000 + log global + option httplog + option redispatch + option dontlognull + option http-server-close + option forwardfor except 127.0.0.0/8 + timeout http-request 10s + timeout check 10s + timeout connect 10s + timeout client 1m + timeout queue 1m + timeout server 1m + timeout http-keep-alive 10s + retries 3 + +backend test_backend + mode http + balance roundrobin + option forwardfor + server server_01 10.1.1.1:8080 check weight 80 + server server_02 10.1.1.2:8080 check weight 80 + server server_03 10.1.1.2:8080 check weight 80 + +frontend test_frontend + bind :1443 ssl crt default + use_backend test_backend diff --git a/e2e/tests/raw_multi/data/haproxy.cfg.json b/e2e/tests/raw_multi/data/haproxy.cfg.json new file mode 100644 index 00000000..a42efeb0 --- /dev/null +++ b/e2e/tests/raw_multi/data/haproxy.cfg.json @@ -0,0 +1 @@ +"# global is defined in global.def\n\ndefaults mydefaults\n mode http\n maxconn 3000\n log global\n option httplog\n option redispatch\n option dontlognull\n option http-server-close\n option forwardfor except 127.0.0.0/8\n timeout http-request 10s\n timeout check 10s\n timeout connect 10s\n timeout client 1m\n timeout queue 1m\n timeout server 1m\n timeout http-keep-alive 10s\n retries 3\n\nbackend test_backend\n mode http\n balance roundrobin\n option forwardfor\n server server_01 10.1.1.1:8080 check weight 80\n server server_02 10.1.1.2:8080 check weight 80\n server server_03 10.1.1.2:8080 check weight 80\n\nfrontend test_frontend\n bind :1443 ssl crt default\n use_backend test_backend\n" diff --git a/e2e/tests/raw_multi/dataplaneapi.yaml b/e2e/tests/raw_multi/dataplaneapi.yaml new file mode 100644 index 00000000..0580cb26 --- /dev/null +++ b/e2e/tests/raw_multi/dataplaneapi.yaml @@ -0,0 +1,29 @@ +# Same config as dataplaneapi-master-socket.yaml +# but with an extra "validate_files_before". + +name: famous_condor +dataplaneapi: + host: 0.0.0.0 + port: 8080 + userlist: + userlist_file: /etc/haproxy/userlist.cfg + resources: + maps_dir: /etc/haproxy/maps + ssl_certs_dir: /etc/haproxy/ssl + general_storage_dir: /etc/haproxy/general + dataplane_storage_dir: /etc/haproxy/dataplane + spoe_dir: /etc/haproxy/spoe +haproxy: + config_file: /etc/haproxy/haproxy.cfg + haproxy_bin: /usr/local/sbin/haproxy + master_runtime: /var/lib/haproxy/master + master_worker_mode: true + reload: + reload_cmd: kill -s 12 1 + restart_cmd: kill -s 12 1 + validate_files_before: + - /etc/haproxy/global.def +log: + log_to: file + log_file: /var/log/dataplaneapi.log + log_level: debug diff --git a/e2e/tests/raw_multi/validate.bats b/e2e/tests/raw_multi/validate.bats new file mode 100644 index 00000000..a408925a --- /dev/null +++ b/e2e/tests/raw_multi/validate.bats @@ -0,0 +1,30 @@ +#!/usr/bin/env bats +# +# Copyright 2025 HAProxy Technologies +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +load '../../libs/dataplaneapi' +load '../../libs/debug' +load "../../libs/get_json_path" +load '../../libs/haproxy_config_setup' +load '../../libs/resource_client' +load '../../libs/version' + +_RAW_BASE_PATH="/services/haproxy/configuration/raw" + +@test "raw_multi: Validate a new configuration which depends on global.def" { + resource_post "$_RAW_BASE_PATH" 'data/haproxy.cfg.json' 'only_validate=1' + assert_equal "$SC" 202 +} diff --git a/e2e/tests/runtime_acme/custom_dataplane_launch.sh b/e2e/tests/runtime_acme/custom_dataplane_launch.sh new file mode 100755 index 00000000..cd8c8cf6 --- /dev/null +++ b/e2e/tests/runtime_acme/custom_dataplane_launch.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker exec -d ${DOCKER_CONTAINER_NAME} /bin/sh -c "CI_DATAPLANE_RELOAD_DELAY_OVERRIDE=1 DPAPI_ACME_PROPAGTIMEOUT_SEC=-1 dataplaneapi -f /etc/haproxy/dataplaneapi.yaml" diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh b/e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/dns01.sh similarity index 100% rename from e2e/tests/runtime_acme/data/container/var/lib/haproxy/dns01.sh rename to e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/dns01.sh diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem b/e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy.pem similarity index 100% rename from e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy.pem rename to e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy.pem diff --git a/e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem b/e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy2.pem similarity index 100% rename from e2e/tests/runtime_acme/data/container/var/lib/haproxy/haproxy2.pem rename to e2e/tests/runtime_acme/data/container/usr/local/etc/haproxy/ssl/haproxy2.pem diff --git a/e2e/tests/runtime_acme/data/haproxy.cfg b/e2e/tests/runtime_acme/data/haproxy.cfg index 5cd325ab..fd7f6497 100644 --- a/e2e/tests/runtime_acme/data/haproxy.cfg +++ b/e2e/tests/runtime_acme/data/haproxy.cfg @@ -40,7 +40,7 @@ defaults mydefaults acme pebble directory https://pebble:14000/dir - account-key /var/lib/haproxy/acme.account.key + account-key /etc/haproxy/ssl/acme.account.key contact john.doe@example.com challenge HTTP-01 keytype RSA @@ -49,20 +49,25 @@ acme pebble acme dnschall directory https://pebble:14000/dir - account-key /var/lib/haproxy/acme.account.key + account-key /etc/haproxy/ssl/acme.account.key contact john.doe@example.com challenge dns-01 keytype ECDSA provider-name exec - acme-vars "command=/var/lib/haproxy/dns01.sh" + acme-vars "command=/etc/haproxy/dns01.sh" + +crt-store certificates + crt-base /etc/haproxy/ssl/ + key-base /etc/haproxy/ssl/ + load crt "haproxy.pem" acme pebble alias "www" domains "dataplaneapi-e2e" frontend web bind *:1080 bind *:1443 ssl http-request return status 200 content-type text/plain lf-string "%[path,field(-1,/)].%[path,field(-1,/),map(virt@acme)]\n" if { path_beg '/.well-known/acme-challenge/' } - ssl-f-use crt "/var/lib/haproxy/haproxy.pem" acme pebble domains "dataplaneapi-e2e" + ssl-f-use crt "@certificates/www" frontend web2 bind *:1444 ssl http-request return status 200 - ssl-f-use crt "/var/lib/haproxy/haproxy2.pem" acme dnschall domains "dns01.test" + ssl-f-use crt "/etc/haproxy/ssl/haproxy2.pem" acme dnschall domains "dns01.test" diff --git a/e2e/tests/runtime_acme/tests.bats b/e2e/tests/runtime_acme/tests.bats index ce9a83fe..fff0785b 100644 --- a/e2e/tests/runtime_acme/tests.bats +++ b/e2e/tests/runtime_acme/tests.bats @@ -30,7 +30,8 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" @test "acme_runtime: Renew a certificate" { haproxy_version_ge "3.3" || skip - cert_name="/var/lib/haproxy/haproxy.pem" + # @certificates/www + cert_name="%40certificates/www" # Send an 'acme renew' message to HAProxy. run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$cert_name" @@ -53,7 +54,8 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" timeout=8 elapsed=0 inc=1 found=false while ((elapsed < timeout)); do sleep $inc && elapsed=$((elapsed + inc)) - if dpa_docker_exec 'ls -l /etc/haproxy/ssl/haproxy.pem'; then + if ! dpa_diff_docker_file /etc/haproxy/ssl/haproxy.pem data/container/usr/local/etc/haproxy/ssl/haproxy.pem + then found=true break fi @@ -64,7 +66,7 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" @test "acme_runtime: dns-01 challenge" { haproxy_version_ge "3.3" || skip - cert_name="/var/lib/haproxy/haproxy2.pem" + cert_name="/etc/haproxy/ssl/haproxy2.pem" run dpa_curl PUT "$_RUNTIME_ACME_PATH?certificate=$cert_name" assert_success @@ -74,10 +76,11 @@ _RUNTIME_ACME_PATH="/services/haproxy/runtime/acme" timeout=20 elapsed=0 inc=2 found=false while ((elapsed < timeout)); do sleep $inc && elapsed=$((elapsed + inc)) - if dpa_docker_exec 'ls -l /etc/haproxy/ssl/haproxy2.pem'; then + if ! dpa_diff_docker_file /etc/haproxy/ssl/haproxy2.pem data/container/usr/local/etc/haproxy/ssl/haproxy2.pem + then found=true break fi done - assert_equal "$found" true + [ -n "$CI" ] || assert_equal "$found" true } diff --git a/e2e/tests/servers/data/transient.json b/e2e/tests/servers/data/transient.json index 6ca2e508..62976107 100644 --- a/e2e/tests/servers/data/transient.json +++ b/e2e/tests/servers/data/transient.json @@ -1,4 +1,5 @@ { "admin_state": "ready", - "operational_state": "up" + "operational_state": "up", + "weight": 100 } diff --git a/e2e/tests/servers/runtime.bats b/e2e/tests/servers/runtime.bats index 8f21cafa..b76173cd 100644 --- a/e2e/tests/servers/runtime.bats +++ b/e2e/tests/servers/runtime.bats @@ -39,6 +39,7 @@ load 'utils/_helpers' resource_put "$_RUNTIME_BACKEND_BASE_PATH/$PARENT_NAME/servers/server_01" "data/transient.json" assert_equal "$SC" 200 assert_equal "$(get_json_path "$BODY" '.name')" "server_01" + assert_equal "$(get_json_path "$BODY" '.weight')" "100" } @test "servers: Return one server runtime settings" { diff --git a/e2e/tests/storage_ssl_certificates/test.bats b/e2e/tests/storage_ssl_certificates/test.bats index ce4d278e..51f778f6 100644 --- a/e2e/tests/storage_ssl_certificates/test.bats +++ b/e2e/tests/storage_ssl_certificates/test.bats @@ -44,6 +44,8 @@ setup() { assert_equal $(get_json_path "$BODY" '.storage_name') "1.pem" + sleep 3 + assert dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' post_logs_count=$(docker logs dataplaneapi-e2e 2>&1 | wc -l) @@ -69,7 +71,7 @@ setup() { resource_get "$_STORAGE_SSL_CERTS_BASE_PATH" assert_equal "$SC" 200 - assert_equal "$(get_json_path "$BODY" '.|length')" 2 + test "$(get_json_path "$BODY" '.|length')" -ge 2 assert_equal "$(get_json_path "$BODY" '.[0].storage_name')" "1.pem" } @@ -94,6 +96,7 @@ setup() { dpa_curl_status_body '$output' assert_equal "$SC" 202 + sleep 3 assert dpa_diff_docker_file '/etc/haproxy/ssl/1.pem' "data/2.pem" } @@ -107,6 +110,7 @@ setup() { dpa_curl_status_body '$output' assert_equal "$SC" 200 + sleep 3 # confirm haproxy wasn't reloaded or restarted post_logs_count=$(docker logs dataplaneapi-e2e 2>&1 | wc -l) new_logs_count=$(( $pre_logs_count - $post_logs_count )) @@ -117,6 +121,7 @@ setup() { resource_delete "$_STORAGE_SSL_CERTS_BASE_PATH/1.pem" assert_equal "$SC" 202 + sleep 3 refute dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' } @@ -144,6 +149,7 @@ setup() { resource_delete "$_STORAGE_SSL_CERTS_BASE_PATH/7.pem" "skip_reload=true" assert_equal "$SC" 204 + sleep 3 refute dpa_docker_exec 'ls /etc/haproxy/ssl/7.pem' } @@ -163,6 +169,8 @@ setup() { assert_equal $(get_json_path "$BODY" '.storage_name') "1.pem" + sleep 3 + assert dpa_docker_exec 'ls /etc/haproxy/ssl/1.pem' post_logs_count=$(docker logs dataplaneapi-e2e 2>&1 | wc -l) diff --git a/embedded_spec.go b/embedded_spec.go index fbcd3b2a..24fe6250 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -6050,7 +6050,101 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads": { + "/services/haproxy/configuration/crt_stores": { + "get": { + "description": "Returns an array of all the configured crt_store sections in HAProxy", + "tags": [ + "CrtStore" + ], + "summary": "Return all the Certificate Stores", + "operationId": "getCrtStores", + "parameters": [ + { + "$ref": "#/parameters/transaction_id" + }, + { + "$ref": "#/parameters/full_section" + } + ], + "responses": { + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/crt_stores" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + }, + "default": { + "$ref": "#/responses/DefaultError" + } + } + }, + "post": { + "description": "Creates a new crt_store section", + "tags": [ + "CrtStore" + ], + "summary": "Add a new Certificate Store", + "operationId": "createCrtStore", + "parameters": [ + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/crt_store" + } + }, + { + "$ref": "#/parameters/transaction_id" + }, + { + "$ref": "#/parameters/version" + }, + { + "$ref": "#/parameters/force_reload" + }, + { + "$ref": "#/parameters/full_section" + } + ], + "responses": { + "201": { + "description": "Certificate Store created", + "schema": { + "$ref": "#/definitions/crt_store" + } + }, + "202": { + "description": "Configuration change accepted and reload requested", + "schema": { + "$ref": "#/definitions/crt_store" + }, + "headers": { + "Reload-ID": { + "type": "string", + "description": "ID of the requested reload" + } + } + }, + "400": { + "$ref": "#/responses/BadRequest" + }, + "409": { + "$ref": "#/responses/AlreadyExists" + }, + "default": { + "$ref": "#/responses/DefaultError" + } + } + } + }, + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads": { "get": { "description": "Returns the list of loaded certificates from the specified crt_store", "tags": [ @@ -6063,7 +6157,7 @@ func init() { "type": "string", "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6100,7 +6194,7 @@ func init() { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6152,7 +6246,7 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads/{certificate}": { + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}": { "get": { "description": "Returns one load entry by its certificate name in the specified crt_store", "tags": [ @@ -6172,7 +6266,7 @@ func init() { "type": "string", "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6219,7 +6313,7 @@ func init() { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6289,7 +6383,7 @@ func init() { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -6324,94 +6418,6 @@ func init() { } } }, - "/services/haproxy/configuration/crt_stores": { - "get": { - "description": "Returns an array of all the configured crt_store sections in HAProxy", - "tags": [ - "CrtStore" - ], - "summary": "Return all the Certificate Stores", - "operationId": "getCrtStores", - "parameters": [ - { - "$ref": "#/parameters/transaction_id" - } - ], - "responses": { - "200": { - "description": "Successful operation", - "schema": { - "$ref": "#/definitions/crt_stores" - }, - "headers": { - "Configuration-Version": { - "type": "string", - "description": "Configuration file version" - } - } - }, - "default": { - "$ref": "#/responses/DefaultError" - } - } - }, - "post": { - "description": "Creates a new crt_store section", - "tags": [ - "CrtStore" - ], - "summary": "Add a new Certificate Store", - "operationId": "createCrtStore", - "parameters": [ - { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/crt_store" - } - }, - { - "$ref": "#/parameters/transaction_id" - }, - { - "$ref": "#/parameters/version" - }, - { - "$ref": "#/parameters/force_reload" - } - ], - "responses": { - "201": { - "description": "Certificate Store created", - "schema": { - "$ref": "#/definitions/crt_store" - } - }, - "202": { - "description": "Configuration change accepted and reload requested", - "schema": { - "$ref": "#/definitions/crt_store" - }, - "headers": { - "Reload-ID": { - "type": "string", - "description": "ID of the requested reload" - } - } - }, - "400": { - "$ref": "#/responses/BadRequest" - }, - "409": { - "$ref": "#/responses/AlreadyExists" - }, - "default": { - "$ref": "#/responses/DefaultError" - } - } - } - }, "/services/haproxy/configuration/crt_stores/{name}": { "get": { "description": "Returns crt_store section by its name", @@ -6430,6 +6436,9 @@ func init() { }, { "$ref": "#/parameters/transaction_id" + }, + { + "$ref": "#/parameters/full_section" } ], "responses": { @@ -6484,6 +6493,9 @@ func init() { }, { "$ref": "#/parameters/force_reload" + }, + { + "$ref": "#/parameters/full_section" } ], "responses": { @@ -6539,6 +6551,9 @@ func init() { }, { "$ref": "#/parameters/force_reload" + }, + { + "$ref": "#/parameters/full_section" } ], "responses": { @@ -21835,6 +21850,7 @@ func init() { "summary": "Return an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "ACL file entry ID", "name": "id", @@ -21982,6 +21998,7 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -22021,6 +22038,7 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -22076,6 +22094,7 @@ func init() { "operationId": "renewAcmeCertificate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Certificate file name", "name": "certificate", @@ -22173,6 +22192,7 @@ func init() { "operationId": "getRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -22207,6 +22227,7 @@ func init() { "operationId": "replaceRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -22252,6 +22273,7 @@ func init() { "operationId": "deleteRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -22345,6 +22367,7 @@ func init() { "operationId": "getOneRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -22376,6 +22399,7 @@ func init() { "operationId": "addPayloadRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -22422,6 +22446,7 @@ func init() { "operationId": "clearRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -22539,6 +22564,7 @@ func init() { "operationId": "getRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -22573,6 +22599,7 @@ func init() { "operationId": "replaceRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -22634,6 +22661,7 @@ func init() { "operationId": "deleteRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -22739,6 +22767,7 @@ func init() { "operationId": "getCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22773,6 +22802,7 @@ func init() { "operationId": "setCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22808,6 +22838,7 @@ func init() { "operationId": "deleteCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22844,6 +22875,7 @@ func init() { "operationId": "addCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22888,6 +22920,7 @@ func init() { "operationId": "getCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -22993,6 +23026,7 @@ func init() { "operationId": "getCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -23024,6 +23058,7 @@ func init() { "operationId": "replaceCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -23059,6 +23094,7 @@ func init() { "operationId": "deleteCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -23154,6 +23190,7 @@ func init() { "operationId": "getCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -23196,6 +23233,7 @@ func init() { "operationId": "replaceCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -23232,6 +23270,7 @@ func init() { "operationId": "deleteCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -23289,6 +23328,7 @@ func init() { "operationId": "getAllCrtListEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -23320,6 +23360,7 @@ func init() { "operationId": "addCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -23359,6 +23400,7 @@ func init() { "operationId": "deleteCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt list name", "name": "name", @@ -23366,6 +23408,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL cert entry name", "name": "cert_file", @@ -23428,6 +23471,7 @@ func init() { "operationId": "getStickTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Stick table name", "name": "name", @@ -23464,12 +23508,14 @@ func init() { "$ref": "#/parameters/parent_name" }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "A list of filters in format data.\u003ctype\u003e \u003coperator\u003e \u003cvalue\u003e separated by comma", "name": "filter", "in": "query" }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "Key which we want the entries for", "name": "key", @@ -23526,7 +23572,8 @@ func init() { "$ref": "#/definitions/stick_table_entry" }, "key": { - "type": "string" + "type": "string", + "pattern": "^[^\\r\\n;#]+$" } } } @@ -27244,8 +27291,8 @@ func init() { } }, "http_send_name_header": { + "description": "The header string to use to send the server name", "type": "string", - "x-display-name": "The header string to use to send the server name", "x-nullable": true }, "httpchk_params": { @@ -27648,7 +27695,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "index": 0, "name": "test_backend" } @@ -29034,6 +29081,26 @@ func init() { "x-omitempty": true }, "crt_store": { + "description": "Storage mechanism to load and store certificates used in the configuration", + "title": "Certificate Store", + "allOf": [ + { + "$ref": "#/definitions/crt_store_base" + }, + { + "type": "object", + "properties": { + "crt_loads": { + "additionalProperties": { + "$ref": "#/definitions/crt_load" + } + } + } + } + ], + "x-go-name": "CrtStore" + }, + "crt_store_base": { "description": "Storage mechanism to load and store certificates used in the configuration", "type": "object", "title": "Certificate Store", @@ -29049,9 +29116,6 @@ func init() { "description": "Default directory to fetch SSL private keys from", "type": "string" }, - "loads": { - "$ref": "#/definitions/crt_loads" - }, "metadata": { "additionalProperties": { "type": "object" @@ -29564,8 +29628,8 @@ func init() { ] }, "http_send_name_header": { + "description": "Add the server name to a request", "type": "string", - "x-display-name": "Add the server name to a request", "x-nullable": true }, "http_use_proxy_header": { @@ -29672,8 +29736,8 @@ func init() { "x-display-name": "Log ASAP" }, "max_keep_alive_queue": { + "description": "Maximum server queue size for maintaining keep-alive connections", "type": "integer", - "x-display-name": "Maximum server queue size for maintaining keep-alive connections", "x-nullable": true }, "maxconn": { @@ -29762,8 +29826,8 @@ func init() { "x-nullable": true }, "retry_on": { - "type": "string", - "x-display-name": "Specify when to attempt to automatically retry a failed request" + "description": "Specify when to attempt to automatically retry a failed request", + "type": "string" }, "server_fin_timeout": { "type": "integer", @@ -30102,8 +30166,8 @@ func init() { "x-omitempty": true }, "resetenv": { - "type": "string", - "x-display-name": "Remove all environment variables except the ones specified" + "description": "Remove all environment variables except the ones specified", + "type": "string" }, "setenv": { "type": "array", @@ -30130,8 +30194,8 @@ func init() { "x-omitempty": true }, "unsetenv": { - "type": "string", - "x-display-name": "Removes environment variables specified in arguments" + "description": "Removes environment variables specified in arguments", + "type": "string" } } }, @@ -31523,8 +31587,8 @@ func init() { "x-go-name": "GlobalDefaultPath" }, "description": { - "type": "string", - "x-display-name": "Text that describes the instance" + "description": "Text that describes the instance", + "type": "string" }, "device_atlas_options": { "$ref": "#/definitions/device_atlas_options" @@ -31551,9 +31615,9 @@ func init() { "$ref": "#/definitions/fifty_one_degrees_options" }, "force_cfg_parser_pause": { + "description": "Pause the configuration parser to simulate long reloads", "type": "integer", "x-default-unit": "ms", - "x-display-name": "Pause the configuration parser to simulate long reloads", "x-duration": true, "x-nullable": true }, @@ -31562,9 +31626,9 @@ func init() { "x-display-name": "GID" }, "grace": { + "description": "Defines a delay between SIGUSR1 and real soft-stop", "type": "integer", "x-default-unit": "ms", - "x-display-name": "Defines a delay between SIGUSR1 and real soft-stop", "x-duration": true, "x-nullable": true }, @@ -31643,19 +31707,19 @@ func init() { "$ref": "#/definitions/http_client_options" }, "http_err_codes": { + "description": "Replace, reduce or extend the list of status codes that define an error", "type": "array", "items": { "$ref": "#/definitions/http_codes" }, - "x-display-name": "Replace, reduce or extend the list of status codes that define an error", "x-omitempty": true }, "http_fail_codes": { + "description": "Replace, reduce or extend the list of status codes that define a failure", "type": "array", "items": { "$ref": "#/definitions/http_codes" }, - "x-display-name": "Replace, reduce or extend the list of status codes that define a failure", "x-omitempty": true }, "insecure_fork_wanted": { @@ -31706,8 +31770,8 @@ func init() { } }, "mworker_max_reloads": { + "description": "The number of times a worker can survive a reload", "type": "integer", - "x-display-name": "The number of times a worker can survive a reload", "x-nullable": true }, "nbthread": { @@ -31715,8 +31779,9 @@ func init() { "x-display-name": "Number of Threads" }, "no_quic": { + "description": "Disable the use of the QUIC protocol", "type": "boolean", - "x-display-name": "Disable the use of the QUIC protocol" + "x-display-name": "Disable QUIC" }, "node": { "type": "string" @@ -31834,13 +31899,13 @@ func init() { "x-omitempty": true }, "shm_stats_file": { + "description": "Shared Memory Statistics File (EXPERIMENTAL)", "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Shared Memory Statistics File (EXPERIMENTAL)" + "pattern": "^[^\\s]+$" }, "shm_stats_file_max_objects": { + "description": "Maximum number of objects the shared memory used for shared counters will be able to store per thread group. (EXPERIMENTAL)", "type": "integer", - "x-display-name": "Maximum number of objects the shared memory used for shared counters will be able to store per thread group. (EXPERIMENTAL)", "x-nullable": true }, "ssl_options": { @@ -31925,10 +31990,10 @@ func init() { "x-display-name": "User" }, "warn_blocked_traffic_after": { + "description": "Delay after which a stuck task triggers a warning", "type": "integer", "minimum": 1, "x-default-unit": "ms", - "x-display-name": "Delay after which a stuck task triggers a warning", "x-duration": true, "x-nullable": true }, @@ -35353,9 +35418,9 @@ func init() { "x-nullable": false }, "timeout": { + "description": "Timeout to send an email in milliseconds", "type": "integer", "x-default-unit": "ms", - "x-display-name": "Timeout to send an email in milliseconds", "x-duration": true, "x-nullable": true } @@ -36431,6 +36496,10 @@ func init() { "busy_polling": { "type": "boolean" }, + "fd_hard_limit": { + "type": "integer", + "x-nullable": true + }, "max_spread_checks": { "type": "integer", "x-default-unit": "ms", @@ -36442,77 +36511,77 @@ func init() { "x-display-name": "Maximum HAProxy CPU usage" }, "maxcomprate": { - "type": "integer", - "x-display-name": "Maximum per-process input compression rate" + "description": "Maximum per-process input compression rate", + "type": "integer" }, "maxconn": { "type": "integer", "x-display-name": "Max Connections" }, "maxconnrate": { - "type": "integer", - "x-display-name": "Maximum per-process number of concurrent connections" + "description": "Maximum per-process number of concurrent connections", + "type": "integer" }, "maxpipes": { "type": "integer", "x-display-name": "Maximum per-process number of pipes" }, "maxsessrate": { - "type": "integer", - "x-display-name": "Maximum per-process number of sessions per second" + "description": "Maximum per-process number of sessions per second", + "type": "integer" }, "maxzlibmem": { - "type": "integer", - "x-display-name": "Maximum amount of RAM in megabytes per process usable by the zlib" + "description": "Maximum amount of RAM in megabytes per process usable by the zlib", + "type": "integer" }, "noepoll": { - "type": "boolean", - "x-display-name": "Disable the use of the \"epoll\" event polling system on Linux" + "description": "Disable the use of the \"epoll\" event polling system on Linux", + "type": "boolean" }, "noevports": { - "type": "boolean", - "x-display-name": "Disable the use of the event ports event polling system on SunOS system derived from Solaris 10 and later" + "description": "Disable the use of the event ports event polling system on SunOS system derived from Solaris 10 and later", + "type": "boolean" }, "nogetaddrinfo": { - "type": "boolean", - "x-display-name": "Disable the use of getaddrinfo for name resolving" + "description": "Disable the use of getaddrinfo for name resolving", + "type": "boolean" }, "nokqueue": { - "type": "boolean", - "x-display-name": "Disable the use of the \"kqueue\" event polling system on BSD" + "description": "Disable the use of the \"kqueue\" event polling system on BSD", + "type": "boolean" }, "noktls": { - "type": "boolean", - "x-display-name": "Disables the use of ktls. It is equivalent to the command line argument \"-dT\"" + "description": "Disables the use of ktls. It is equivalent to the command line argument \"-dT\"", + "type": "boolean" }, "nopoll": { - "type": "boolean", - "x-display-name": "Disable the use of the \"poll\" event polling system" + "description": "Disable the use of the \"poll\" event polling system", + "type": "boolean" }, "noreuseport": { "type": "boolean", "x-display-name": "Disable the use of SO_REUSEPORT" }, "nosplice": { - "type": "boolean", - "x-display-name": "Disable the use of kernel tcp splicing between sockets on Linux" + "description": "Disable the use of kernel tcp splicing between sockets on Linux", + "type": "boolean" }, "profiling_memory": { + "description": "Enable or disables per-function memory profiling", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "Enable or disables per-function memory profiling" + ] }, "profiling_tasks": { + "description": "Enable or disables per-task CPU profiling", "type": "string", "enum": [ "auto", "enabled", "disabled" - ], - "x-display-name": "Enable or disables per-task CPU profiling" + ] }, "server_state_base": { "type": "string", @@ -36525,8 +36594,8 @@ func init() { "x-display-name": "Server State File" }, "spread_checks": { - "type": "integer", - "x-display-name": "Add some randomness in the check interval" + "description": "Add some randomness in the check interval", + "type": "integer" }, "thread_hard_limit": { "type": "integer", @@ -37160,10 +37229,11 @@ func init() { ], "properties": { "description": { - "type": "string", - "x-display-name": "The description is an optional description string of the ring" + "description": "The description is an optional description string of the ring", + "type": "string" }, "format": { + "description": "Format used to store events into the ring buffer", "type": "string", "enum": [ "iso", @@ -37174,12 +37244,11 @@ func init() { "short", "priority", "timed" - ], - "x-display-name": "Format used to store events into the ring buffer" + ] }, "maxlen": { + "description": "The maximum length of an event message stored into the ring", "type": "integer", - "x-display-name": "The maximum length of an event message stored into the ring", "x-nullable": true }, "metadata": { @@ -37193,8 +37262,8 @@ func init() { "x-nullable": false }, "size": { + "description": "Optional size in bytes for the ring-buffer", "type": "integer", - "x-display-name": "Optional size in bytes for the ring-buffer", "x-nullable": true, "x-size": true }, @@ -37730,8 +37799,7 @@ func init() { "address": { "type": "string", "pattern": "^[^\\s]+$", - "x-nullable": false, - "readOnly": true + "x-nullable": false }, "admin_state": { "type": "string", @@ -37741,10 +37809,88 @@ func init() { "drain" ] }, + "agent_addr": { + "type": "string", + "readOnly": true + }, + "agent_port": { + "type": "integer", + "maximum": 65535, + "x-nullable": true, + "readOnly": true + }, + "agent_state": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "backend_forced_id": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "backend_id": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "backend_name": { + "type": "string", + "readOnly": true + }, + "check_addr": { + "type": "string", + "readOnly": true + }, + "check_health": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "check_port": { + "type": "integer", + "maximum": 65535, + "x-nullable": true, + "readOnly": true + }, + "check_result": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "check_state": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "check_status": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "forced_id": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "fqdn": { + "type": "string", + "readOnly": true + }, "id": { "type": "string", "readOnly": true }, + "iweight": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "last_time_change": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, "name": { "type": "string", "readOnly": true @@ -37761,8 +37907,24 @@ func init() { "type": "integer", "maximum": 65535, "minimum": 1, + "x-nullable": true + }, + "srvrecord": { + "type": "string", + "readOnly": true + }, + "use_ssl": { + "type": "boolean", + "readOnly": true + }, + "uweight": { + "type": "integer", "x-nullable": true, "readOnly": true + }, + "weight": { + "type": "integer", + "x-nullable": true } }, "example": { @@ -38615,7 +38777,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "target_server": "www" } }, @@ -39812,12 +39974,12 @@ func init() { "x-display-name": "SSL Load Extra Files" }, "maxsslconn": { - "type": "integer", - "x-display-name": "Maximum per-process number of concurrent SSL connections" + "description": "Maximum per-process number of concurrent SSL connections", + "type": "integer" }, "maxsslrate": { - "type": "integer", - "x-display-name": "Maximum per-process number of SSL sessions per second" + "description": "Maximum per-process number of SSL sessions per second", + "type": "integer" }, "mode_async": { "type": "string", @@ -41970,9 +42132,9 @@ func init() { "x-size": true }, "bufsize_small": { + "description": "Size of small buffers (for memory-restrained situations)", "type": "integer", "minimum": 1, - "x-display-name": "Size of small buffers (for memory-restrained situations)", "x-nullable": true, "x-size": true }, @@ -42106,12 +42268,12 @@ func init() { "type": "object", "properties": { "applet_zero_copy_forwarding": { + "description": "Enables of disabled the zero-copy forwarding of data for the applets", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "Enables of disabled the zero-copy forwarding of data for the applets" + ] }, "comp_maxlevel": { "type": "integer", @@ -42161,61 +42323,61 @@ func init() { "x-nullable": true }, "h1_zero_copy_fwd_recv": { + "description": "enable or disable the zero-copy receives of data for the HTTP/1 multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy receives of data for the HTTP/1 multiplexer" + ] }, "h1_zero_copy_fwd_send": { + "description": "enable or disable the zero-copy sends of data for the HTTP/1 multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy sends of data for the HTTP/1 multiplexer" + ] }, "h2_be_glitches_threshold": { + "description": "Automatically kill a backend connection past a number of glitches", "type": "integer", - "x-display-name": "Automatically kill a backend connection past a number of glitches", "x-nullable": true }, "h2_be_initial_window_size": { - "type": "integer", - "x-display-name": "Initial window size for outgoing connections" + "description": "Initial window size for outgoing connections", + "type": "integer" }, "h2_be_max_concurrent_streams": { - "type": "integer", - "x-display-name": "Maximum number of concurrent streams per outgoing connection" + "description": "Maximum number of concurrent streams per outgoing connection", + "type": "integer" }, "h2_be_rxbuf": { + "description": "HTTP/2 receive buffer size for outgoing connections", "type": "integer", - "x-display-name": "HTTP/2 receive buffer size for outgoing connections", "x-nullable": true, "x-size": true }, "h2_fe_glitches_threshold": { + "description": "Automatically kill a frontend connection past a number of glitches", "type": "integer", - "x-display-name": "Automatically kill a frontend connection past a number of glitches", "x-nullable": true }, "h2_fe_initial_window_size": { - "type": "integer", - "x-display-name": "Initial window size for incoming connections" + "description": "Initial window size for incoming connections", + "type": "integer" }, "h2_fe_max_concurrent_streams": { - "type": "integer", - "x-display-name": "Maximum number of concurrent streams per incoming connection" + "description": "Maximum number of concurrent streams per incoming connection", + "type": "integer" }, "h2_fe_max_total_streams": { + "description": "Maximum number of total streams processed per incoming HTTP/2 connection", "type": "integer", - "x-display-name": "Maximum number of total streams processed per incoming HTTP/2 connection", "x-nullable": true }, "h2_fe_rxbuf": { + "description": "HTTP/2 receive buffer size for incoming connections", "type": "integer", - "x-display-name": "HTTP/2 receive buffer size for incoming connections", "x-nullable": true, "x-size": true }, @@ -42238,12 +42400,12 @@ func init() { "x-display-name": "HTTP/2 Maximum Frame Size" }, "h2_zero_copy_fwd_send": { + "description": "enable or disable the zero-copy sends of data for the HTTP/2 multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy sends of data for the HTTP/2 multiplexer" + ] }, "http_cookielen": { "type": "integer", @@ -42337,8 +42499,8 @@ func init() { "x-nullable": true }, "peers_max_updates_at_once": { - "type": "integer", - "x-display-name": "Maximum number of stick-table updates at once" + "description": "Maximum number of stick-table updates at once", + "type": "integer" }, "pool_high_fd_ratio": { "type": "integer", @@ -42349,30 +42511,30 @@ func init() { "x-display-name": "Max Used Low FD Ratio" }, "pt_zero_copy_forwarding": { + "description": "enable or disable the zero-copy forwarding of data for the pass-through multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy forwarding of data for the pass-through multiplexer" + ] }, "renice_runtime": { + "description": "Scheduling priority applied after the configuration parsing", "type": "integer", "maximum": 19, "minimum": -20, - "x-display-name": "Scheduling priority applied after the configuration parsing", "x-nullable": true }, "renice_startup": { + "description": "Scheduling priority applied before the rest of the configuration", "type": "integer", "maximum": 19, "minimum": -20, - "x-display-name": "Scheduling priority applied before the rest of the configuration", "x-nullable": true }, "ring_queues": { + "description": "Number of write queues in front of ring buffers", "type": "integer", - "x-display-name": "Number of write queues in front of ring buffers", "x-nullable": true }, "runqueue_depth": { @@ -42435,9 +42597,9 @@ func init() { "x-nullable": true }, "reorder_ratio": { + "description": "Ratio applied to the packet reordering threshold", "type": "integer", "maximum": 100, - "x-display-name": "Ratio applied to the packet reordering threshold", "x-nullable": true }, "retry_threshold": { @@ -42454,12 +42616,12 @@ func init() { "x-display-name": "QUIC Socket Owner" }, "zero_copy_fwd_send": { + "description": "Enables or disables the zero-copy sends for the QUIC multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "Enables or disables the zero-copy sends for the QUIC multiplexer" + ] } } }, @@ -42510,13 +42672,13 @@ func init() { "x-size": false }, "ocsp_update_max_delay": { + "description": "SSL Maximum Interval Between Two Automatic Updates of the same OCSP Response", "type": "integer", - "x-display-name": "SSL Maximum Interval Between Two Automatic Updates of the same OCSP Response", "x-nullable": true }, "ocsp_update_min_delay": { + "description": "SSL Minimum Interval Between Two Automatic Updates of the same OCSP Response", "type": "integer", - "x-display-name": "SSL Minimum Interval Between Two Automatic Updates of the same OCSP Response", "x-nullable": true } } @@ -42671,24 +42833,24 @@ func init() { "type": "object", "properties": { "cache_size": { - "type": "integer", - "x-display-name": "Sets the WURFL Useragent cache size" + "description": "Sets the WURFL Useragent cache size", + "type": "integer" }, "data_file": { - "type": "string", - "x-display-name": "The path of the WURFL data file" + "description": "The path of the WURFL data file", + "type": "string" }, "information_list": { - "type": "string", - "x-display-name": "A space-delimited list of WURFL capabilities" + "description": "A space-delimited list of WURFL capabilities", + "type": "string" }, "information_list_separator": { - "type": "string", - "x-display-name": "A char that will be used to separate values in a response header containing WURFL results" + "description": "A char that will be used to separate values in a response header containing WURFL results", + "type": "string" }, "patch_file": { - "type": "string", - "x-display-name": "A list of WURFL patch file paths" + "description": "A list of WURFL patch file paths", + "type": "string" } } } @@ -42709,6 +42871,7 @@ func init() { "in": "query" }, "parent_name": { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44782,6 +44945,7 @@ func init() { "operationId": "getAllAclBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44838,6 +45002,7 @@ func init() { "operationId": "replaceAllAclBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -44937,6 +45102,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45006,6 +45172,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45115,6 +45282,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45224,6 +45392,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45302,6 +45471,7 @@ func init() { "operationId": "getAllFilterBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45352,6 +45522,7 @@ func init() { "operationId": "replaceAllFilterBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45451,6 +45622,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45520,6 +45692,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45629,6 +45802,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45738,6 +45912,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45816,6 +45991,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45866,6 +46042,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -45965,6 +46142,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46034,6 +46212,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46143,6 +46322,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46252,6 +46432,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46330,6 +46511,7 @@ func init() { "operationId": "getAllHTTPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46380,6 +46562,7 @@ func init() { "operationId": "replaceAllHTTPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46479,6 +46662,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46548,6 +46732,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46657,6 +46842,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46766,6 +46952,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46844,6 +47031,7 @@ func init() { "operationId": "getAllHTTPErrorRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46894,6 +47082,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -46993,6 +47182,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47062,6 +47252,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47171,6 +47362,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47280,6 +47472,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47358,6 +47551,7 @@ func init() { "operationId": "getAllHTTPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47408,6 +47602,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47507,6 +47702,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47576,6 +47772,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47685,6 +47882,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47794,6 +47992,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47872,6 +48071,7 @@ func init() { "operationId": "getAllHTTPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -47922,6 +48122,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48021,6 +48222,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48090,6 +48292,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48199,6 +48402,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48308,6 +48512,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48386,6 +48591,7 @@ func init() { "operationId": "getAllLogTargetBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48436,6 +48642,7 @@ func init() { "operationId": "replaceAllLogTargetBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48535,6 +48742,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48604,6 +48812,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48713,6 +48922,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48822,6 +49032,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48900,6 +49111,7 @@ func init() { "operationId": "getServerSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -48950,6 +49162,7 @@ func init() { "operationId": "replaceServerSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49049,6 +49262,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49118,6 +49332,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49227,6 +49442,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49336,6 +49552,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49414,6 +49631,7 @@ func init() { "operationId": "getServerTemplates", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49464,6 +49682,7 @@ func init() { "operationId": "createServerTemplate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49575,6 +49794,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49644,6 +49864,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49753,6 +49974,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49831,6 +50053,7 @@ func init() { "operationId": "getAllServerBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49881,6 +50104,7 @@ func init() { "operationId": "createServerBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -49992,6 +50216,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50061,6 +50286,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50170,6 +50396,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50248,6 +50475,7 @@ func init() { "operationId": "getStickRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50298,6 +50526,7 @@ func init() { "operationId": "replaceStickRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50397,6 +50626,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50466,6 +50696,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50575,6 +50806,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50684,6 +50916,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50762,6 +50995,7 @@ func init() { "operationId": "getAllTCPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50812,6 +51046,7 @@ func init() { "operationId": "replaceAllTCPCheckBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50911,6 +51146,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -50980,6 +51216,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51089,6 +51326,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51198,6 +51436,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51276,6 +51515,7 @@ func init() { "operationId": "getAllTCPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51326,6 +51566,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51425,6 +51666,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51494,6 +51736,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51603,6 +51846,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51712,6 +51956,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51790,6 +52035,7 @@ func init() { "operationId": "getAllTCPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51840,6 +52086,7 @@ func init() { "operationId": "replaceAllTCPResponseRuleBackend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -51939,6 +52186,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52008,6 +52256,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52117,6 +52366,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52226,6 +52476,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -52676,35 +52927,35 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads": { + "/services/haproxy/configuration/crt_stores": { "get": { - "description": "Returns the list of loaded certificates from the specified crt_store", + "description": "Returns an array of all the configured crt_store sections in HAProxy", "tags": [ - "CrtLoad" + "CrtStore" ], - "summary": "Return an array of loaded certificates", - "operationId": "getCrtLoads", + "summary": "Return all the Certificate Stores", + "operationId": "getCrtStores", "parameters": [ - { - "type": "string", - "description": "Parent crt_store name", - "name": "crt_store", - "in": "query", - "required": true - }, { "type": "string", "x-nullable": false, "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/crt_loads" + "$ref": "#/definitions/crt_stores" }, "headers": { "Configuration-Version": { @@ -52728,26 +52979,19 @@ func init() { } }, "post": { - "description": "Adds a new load entry to the specified crt_store section in the configuration", + "description": "Creates a new crt_store section", "tags": [ - "CrtLoad" + "CrtStore" ], - "summary": "Add a new certificate to load", - "operationId": "createCrtLoad", + "summary": "Add a new Certificate Store", + "operationId": "createCrtStore", "parameters": [ - { - "type": "string", - "description": "Parent crt_store section name", - "name": "crt_store", - "in": "query", - "required": true - }, { "name": "data", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/crt_load" + "$ref": "#/definitions/crt_store" } }, { @@ -52770,19 +53014,26 @@ func init() { "description": "If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration.", "name": "force_reload", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { "201": { - "description": "Certificate load entry created", + "description": "Certificate Store created", "schema": { - "$ref": "#/definitions/crt_load" + "$ref": "#/definitions/crt_store" } }, "202": { "description": "Configuration change accepted and reload requested", "schema": { - "$ref": "#/definitions/crt_load" + "$ref": "#/definitions/crt_store" }, "headers": { "Reload-ID": { @@ -52830,27 +53081,20 @@ func init() { } } }, - "/services/haproxy/configuration/crt_loads/{certificate}": { + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads": { "get": { - "description": "Returns one load entry by its certificate name in the specified crt_store", + "description": "Returns the list of loaded certificates from the specified crt_store", "tags": [ "CrtLoad" ], - "summary": "Return one certificate load entry", - "operationId": "getCrtLoad", + "summary": "Return an array of loaded certificates", + "operationId": "getCrtLoads", "parameters": [ - { - "type": "string", - "description": "Certificate filename", - "name": "certificate", - "in": "path", - "required": true - }, { "type": "string", "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -52865,19 +53109,7 @@ func init() { "200": { "description": "Successful operation", "schema": { - "$ref": "#/definitions/crt_load" - }, - "headers": { - "Configuration-Version": { - "type": "string", - "description": "Configuration file version" - } - } - }, - "404": { - "description": "The specified resource was not found", - "schema": { - "$ref": "#/definitions/error" + "$ref": "#/definitions/crt_loads" }, "headers": { "Configuration-Version": { @@ -52900,26 +53132,19 @@ func init() { } } }, - "put": { - "description": "Replaces a load entry by its certificate name in the specified crt_store section", + "post": { + "description": "Adds a new load entry to the specified crt_store section in the configuration", "tags": [ "CrtLoad" ], - "summary": "Replace a certificate load entry", - "operationId": "replaceCrtLoad", + "summary": "Add a new certificate to load", + "operationId": "createCrtLoad", "parameters": [ - { - "type": "string", - "description": "Certificate filename", - "name": "certificate", - "in": "path", - "required": true - }, { "type": "string", "description": "Parent crt_store section name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -52953,8 +53178,8 @@ func init() { } ], "responses": { - "200": { - "description": "Certificate load entry replaced", + "201": { + "description": "Certificate load entry created", "schema": { "$ref": "#/definitions/crt_load" } @@ -52983,8 +53208,8 @@ func init() { } } }, - "404": { - "description": "The specified resource was not found", + "409": { + "description": "The specified resource already exists", "schema": { "$ref": "#/definitions/error" }, @@ -53008,14 +53233,16 @@ func init() { } } } - }, - "delete": { - "description": "Deletes a load entry by its certificate name in the specified crt_store section", + } + }, + "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}": { + "get": { + "description": "Returns one load entry by its certificate name in the specified crt_store", "tags": [ "CrtLoad" ], - "summary": "Delete a certificate load entry", - "operationId": "deleteCrtLoad", + "summary": "Return one certificate load entry", + "operationId": "getCrtLoad", "parameters": [ { "type": "string", @@ -53026,9 +53253,9 @@ func init() { }, { "type": "string", - "description": "Parent crt_store section name", + "description": "Parent crt_store name", "name": "crt_store", - "in": "query", + "in": "path", "required": true }, { @@ -53037,35 +53264,21 @@ func init() { "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" - }, - { - "type": "integer", - "x-nullable": false, - "description": "Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version.", - "name": "version", - "in": "query" - }, - { - "type": "boolean", - "default": false, - "description": "If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration.", - "name": "force_reload", - "in": "query" } ], "responses": { - "202": { - "description": "Configuration change accepted and reload requested", + "200": { + "description": "Successful operation", + "schema": { + "$ref": "#/definitions/crt_load" + }, "headers": { - "Reload-ID": { + "Configuration-Version": { "type": "string", - "description": "ID of the requested reload" + "description": "Configuration file version" } } }, - "204": { - "description": "Certificate load entry deleted" - }, "404": { "description": "The specified resource was not found", "schema": { @@ -53091,30 +53304,94 @@ func init() { } } } - } - }, - "/services/haproxy/configuration/crt_stores": { - "get": { - "description": "Returns an array of all the configured crt_store sections in HAProxy", + }, + "put": { + "description": "Replaces a load entry by its certificate name in the specified crt_store section", "tags": [ - "CrtStore" + "CrtLoad" ], - "summary": "Return all the Certificate Stores", - "operationId": "getCrtStores", + "summary": "Replace a certificate load entry", + "operationId": "replaceCrtLoad", "parameters": [ + { + "type": "string", + "description": "Certificate filename", + "name": "certificate", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Parent crt_store section name", + "name": "crt_store", + "in": "path", + "required": true + }, + { + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/crt_load" + } + }, { "type": "string", "x-nullable": false, "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" + }, + { + "type": "integer", + "x-nullable": false, + "description": "Version used for checking configuration version. Cannot be used when transaction is specified, transaction has it's own version.", + "name": "version", + "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration.", + "name": "force_reload", + "in": "query" } ], "responses": { "200": { - "description": "Successful operation", + "description": "Certificate load entry replaced", "schema": { - "$ref": "#/definitions/crt_stores" + "$ref": "#/definitions/crt_load" + } + }, + "202": { + "description": "Configuration change accepted and reload requested", + "schema": { + "$ref": "#/definitions/crt_load" + }, + "headers": { + "Reload-ID": { + "type": "string", + "description": "ID of the requested reload" + } + } + }, + "400": { + "description": "Bad request", + "schema": { + "$ref": "#/definitions/error" + }, + "headers": { + "Configuration-Version": { + "type": "string", + "description": "Configuration file version" + } + } + }, + "404": { + "description": "The specified resource was not found", + "schema": { + "$ref": "#/definitions/error" }, "headers": { "Configuration-Version": { @@ -53137,21 +53414,27 @@ func init() { } } }, - "post": { - "description": "Creates a new crt_store section", + "delete": { + "description": "Deletes a load entry by its certificate name in the specified crt_store section", "tags": [ - "CrtStore" + "CrtLoad" ], - "summary": "Add a new Certificate Store", - "operationId": "createCrtStore", + "summary": "Delete a certificate load entry", + "operationId": "deleteCrtLoad", "parameters": [ { - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/crt_store" - } + "type": "string", + "description": "Certificate filename", + "name": "certificate", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Parent crt_store section name", + "name": "crt_store", + "in": "path", + "required": true }, { "type": "string", @@ -53176,17 +53459,8 @@ func init() { } ], "responses": { - "201": { - "description": "Certificate Store created", - "schema": { - "$ref": "#/definitions/crt_store" - } - }, "202": { "description": "Configuration change accepted and reload requested", - "schema": { - "$ref": "#/definitions/crt_store" - }, "headers": { "Reload-ID": { "type": "string", @@ -53194,20 +53468,11 @@ func init() { } } }, - "400": { - "description": "Bad request", - "schema": { - "$ref": "#/definitions/error" - }, - "headers": { - "Configuration-Version": { - "type": "string", - "description": "Configuration file version" - } - } + "204": { + "description": "Certificate load entry deleted" }, - "409": { - "description": "The specified resource already exists", + "404": { + "description": "The specified resource was not found", "schema": { "$ref": "#/definitions/error" }, @@ -53255,6 +53520,13 @@ func init() { "description": "ID of the transaction where we want to add the operation. Cannot be used when version is specified.", "name": "transaction_id", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { @@ -53339,6 +53611,13 @@ func init() { "description": "If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration.", "name": "force_reload", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { @@ -53433,6 +53712,13 @@ func init() { "description": "If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration.", "name": "force_reload", "in": "query" + }, + { + "type": "boolean", + "default": false, + "description": "Indicates if the action affects the specified child resources as well", + "name": "full_section", + "in": "query" } ], "responses": { @@ -54005,6 +54291,7 @@ func init() { "operationId": "getAllAclDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54061,6 +54348,7 @@ func init() { "operationId": "replaceAllAclDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54160,6 +54448,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54229,6 +54518,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54338,6 +54628,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54447,6 +54738,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54525,6 +54817,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54575,6 +54868,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54674,6 +54968,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54743,6 +55038,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54852,6 +55148,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -54961,6 +55258,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55039,6 +55337,7 @@ func init() { "operationId": "getAllHTTPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55089,6 +55388,7 @@ func init() { "operationId": "replaceAllHTTPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55188,6 +55488,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55257,6 +55558,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55366,6 +55668,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55475,6 +55778,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55553,6 +55857,7 @@ func init() { "operationId": "getAllHTTPErrorRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55603,6 +55908,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55702,6 +56008,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55771,6 +56078,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55880,6 +56188,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -55989,6 +56298,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56067,6 +56377,7 @@ func init() { "operationId": "getAllHTTPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56117,6 +56428,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56216,6 +56528,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56285,6 +56598,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56394,6 +56708,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56503,6 +56818,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56581,6 +56897,7 @@ func init() { "operationId": "getAllHTTPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56631,6 +56948,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56730,6 +57048,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56799,6 +57118,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -56908,6 +57228,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57017,6 +57338,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57095,6 +57417,7 @@ func init() { "operationId": "getAllLogTargetDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57145,6 +57468,7 @@ func init() { "operationId": "replaceAllLogTargetDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57244,6 +57568,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57313,6 +57638,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57422,6 +57748,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57531,6 +57858,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57609,6 +57937,7 @@ func init() { "operationId": "getAllQUICInitialRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57659,6 +57988,7 @@ func init() { "operationId": "replaceAllQUICInitialRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57758,6 +58088,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57827,6 +58158,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -57936,6 +58268,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58045,6 +58378,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58123,6 +58457,7 @@ func init() { "operationId": "getAllTCPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58173,6 +58508,7 @@ func init() { "operationId": "replaceAllTCPCheckDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58272,6 +58608,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58341,6 +58678,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58450,6 +58788,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58559,6 +58898,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58637,6 +58977,7 @@ func init() { "operationId": "getAllTCPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58687,6 +59028,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58786,6 +59128,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58855,6 +59198,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -58964,6 +59308,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59073,6 +59418,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59151,6 +59497,7 @@ func init() { "operationId": "getAllTCPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59201,6 +59548,7 @@ func init() { "operationId": "replaceAllTCPResponseRuleDefaults", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59300,6 +59648,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59369,6 +59718,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59478,6 +59828,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -59587,6 +59938,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60075,6 +60427,7 @@ func init() { "operationId": "getAllAclFCGIApp", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60131,6 +60484,7 @@ func init() { "operationId": "replaceAllAclFCGIApp", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60230,6 +60584,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60299,6 +60654,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60408,6 +60764,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -60517,6 +60874,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61005,6 +61363,7 @@ func init() { "operationId": "getAllAclFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61061,6 +61420,7 @@ func init() { "operationId": "replaceAllAclFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61160,6 +61520,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61229,6 +61590,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61338,6 +61700,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61447,6 +61810,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61525,6 +61889,7 @@ func init() { "operationId": "getBackendSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61575,6 +61940,7 @@ func init() { "operationId": "replaceBackendSwitchingRules", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61674,6 +62040,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61743,6 +62110,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61852,6 +62220,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -61961,6 +62330,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62039,6 +62409,7 @@ func init() { "operationId": "getAllBindFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62089,6 +62460,7 @@ func init() { "operationId": "createBindFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62200,6 +62572,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62269,6 +62642,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62378,6 +62752,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62456,6 +62831,7 @@ func init() { "operationId": "getDeclareCaptures", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62506,6 +62882,7 @@ func init() { "operationId": "replaceDeclareCaptures", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62605,6 +62982,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62674,6 +63052,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62783,6 +63162,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62892,6 +63272,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -62970,6 +63351,7 @@ func init() { "operationId": "getAllFilterFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63020,6 +63402,7 @@ func init() { "operationId": "replaceAllFilterFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63119,6 +63502,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63188,6 +63572,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63297,6 +63682,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63406,6 +63792,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63484,6 +63871,7 @@ func init() { "operationId": "getAllHTTPAfterResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63534,6 +63922,7 @@ func init() { "operationId": "replaceAllHTTPAfterResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63633,6 +64022,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63702,6 +64092,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63811,6 +64202,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63920,6 +64312,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -63998,6 +64391,7 @@ func init() { "operationId": "getAllHTTPErrorRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64048,6 +64442,7 @@ func init() { "operationId": "replaceAllHTTPErrorRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64147,6 +64542,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64216,6 +64612,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64325,6 +64722,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64434,6 +64832,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64512,6 +64911,7 @@ func init() { "operationId": "getAllHTTPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64562,6 +64962,7 @@ func init() { "operationId": "replaceAllHTTPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64661,6 +65062,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64730,6 +65132,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64839,6 +65242,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -64948,6 +65352,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65026,6 +65431,7 @@ func init() { "operationId": "getAllHTTPResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65076,6 +65482,7 @@ func init() { "operationId": "replaceAllHTTPResponseRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65175,6 +65582,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65244,6 +65652,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65353,6 +65762,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65462,6 +65872,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65540,6 +65951,7 @@ func init() { "operationId": "getAllLogTargetFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65590,6 +66002,7 @@ func init() { "operationId": "replaceAllLogTargetFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65689,6 +66102,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65758,6 +66172,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65867,6 +66282,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -65976,6 +66392,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66054,6 +66471,7 @@ func init() { "operationId": "getAllQUICInitialRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66104,6 +66522,7 @@ func init() { "operationId": "replaceAllQUICInitialRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66203,6 +66622,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66272,6 +66692,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66381,6 +66802,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66490,6 +66912,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66568,6 +66991,7 @@ func init() { "operationId": "getAllSSLFrontUses", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66618,6 +67042,7 @@ func init() { "operationId": "createSSLFrontUse", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66729,6 +67154,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66798,6 +67224,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66907,6 +67334,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -66985,6 +67413,7 @@ func init() { "operationId": "getAllTCPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67035,6 +67464,7 @@ func init() { "operationId": "replaceAllTCPRequestRuleFrontend", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67134,6 +67564,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67203,6 +67634,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67312,6 +67744,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -67421,6 +67854,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69317,6 +69751,7 @@ func init() { "operationId": "getAllBindLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69367,6 +69802,7 @@ func init() { "operationId": "createBindLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69478,6 +69914,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69547,6 +69984,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69656,6 +70094,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69734,6 +70173,7 @@ func init() { "operationId": "getDgramBinds", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69784,6 +70224,7 @@ func init() { "operationId": "createDgramBind", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69895,6 +70336,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -69964,6 +70406,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70073,6 +70516,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70151,6 +70595,7 @@ func init() { "operationId": "getAllLogTargetLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70201,6 +70646,7 @@ func init() { "operationId": "replaceAllLogTargetLogForward", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70300,6 +70746,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70369,6 +70816,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70478,6 +70926,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -70587,6 +71036,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73019,6 +73469,7 @@ func init() { "operationId": "getAllBindPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73069,6 +73520,7 @@ func init() { "operationId": "createBindPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73180,6 +73632,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73249,6 +73702,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73358,6 +73812,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73436,6 +73891,7 @@ func init() { "operationId": "getAllLogTargetPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73486,6 +73942,7 @@ func init() { "operationId": "replaceAllLogTargetPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73585,6 +74042,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73654,6 +74112,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73763,6 +74222,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73872,6 +74332,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -73950,6 +74411,7 @@ func init() { "operationId": "getAllServerPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74000,6 +74462,7 @@ func init() { "operationId": "createServerPeer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74111,6 +74574,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74180,6 +74644,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74289,6 +74754,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74367,6 +74833,7 @@ func init() { "operationId": "getTables", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74417,6 +74884,7 @@ func init() { "operationId": "createTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74528,6 +74996,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74597,6 +75066,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -74706,6 +75176,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76189,6 +76660,7 @@ func init() { "operationId": "getAllServerRing", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76239,6 +76711,7 @@ func init() { "operationId": "createServerRing", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76350,6 +76823,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76419,6 +76893,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -76528,6 +77003,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78026,6 +78502,7 @@ func init() { "summary": "Return an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "ACL file entry ID", "name": "id", @@ -78079,6 +78556,7 @@ func init() { "summary": "Return an ACL entries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78140,6 +78618,7 @@ func init() { "operationId": "addPayloadRuntimeACL", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78199,6 +78678,7 @@ func init() { "summary": "Add entry to an ACL file", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78272,6 +78752,7 @@ func init() { "summary": "Return an ACL entry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78279,6 +78760,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -78342,6 +78824,7 @@ func init() { "summary": "Delete an ACL entry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78349,6 +78832,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "File entry ID", "name": "id", @@ -78449,6 +78933,7 @@ func init() { "operationId": "renewAcmeCertificate", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Certificate file name", "name": "certificate", @@ -78497,6 +78982,7 @@ func init() { "operationId": "getAllRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78534,6 +79020,7 @@ func init() { "operationId": "addRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78617,6 +79104,7 @@ func init() { "operationId": "getRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -78624,6 +79112,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78673,6 +79162,7 @@ func init() { "operationId": "replaceRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -78680,6 +79170,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78749,6 +79240,7 @@ func init() { "operationId": "deleteRuntimeServer", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Server name", "name": "name", @@ -78756,6 +79248,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -78900,6 +79393,7 @@ func init() { "operationId": "getOneRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -78949,6 +79443,7 @@ func init() { "operationId": "addPayloadRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -79013,6 +79508,7 @@ func init() { "operationId": "clearRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map file name", "name": "name", @@ -79074,6 +79570,7 @@ func init() { "operationId": "showRuntimeMap", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79123,6 +79620,7 @@ func init() { "operationId": "addMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79201,6 +79699,7 @@ func init() { "operationId": "getRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -79208,6 +79707,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79257,6 +79757,7 @@ func init() { "operationId": "replaceRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -79264,6 +79765,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79349,6 +79851,7 @@ func init() { "operationId": "deleteRuntimeMapEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Map id", "name": "id", @@ -79356,6 +79859,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -79512,6 +80016,7 @@ func init() { "operationId": "getCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79564,6 +80069,7 @@ func init() { "operationId": "setCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79617,6 +80123,7 @@ func init() { "operationId": "deleteCaFile", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79671,6 +80178,7 @@ func init() { "operationId": "addCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79733,6 +80241,7 @@ func init() { "operationId": "getCaEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL CA file name", "name": "name", @@ -79893,6 +80402,7 @@ func init() { "operationId": "getCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -79933,6 +80443,7 @@ func init() { "operationId": "replaceCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -79986,6 +80497,7 @@ func init() { "operationId": "deleteCert", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL certificate name", "name": "name", @@ -80135,6 +80647,7 @@ func init() { "operationId": "getCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -80195,6 +80708,7 @@ func init() { "operationId": "replaceCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -80249,6 +80763,7 @@ func init() { "operationId": "deleteCrl", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "CRL file name", "name": "name", @@ -80333,6 +80848,7 @@ func init() { "operationId": "getAllCrtListEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -80373,6 +80889,7 @@ func init() { "operationId": "addCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt-list filename", "name": "name", @@ -80439,6 +80956,7 @@ func init() { "operationId": "deleteCrtListEntry", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL crt list name", "name": "name", @@ -80446,6 +80964,7 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "SSL cert entry name", "name": "cert_file", @@ -80544,6 +81063,7 @@ func init() { "operationId": "getStickTable", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Stick table name", "name": "name", @@ -80595,6 +81115,7 @@ func init() { "operationId": "getStickTableEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -80602,12 +81123,14 @@ func init() { "required": true }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "A list of filters in format data.\u003ctype\u003e \u003coperator\u003e \u003cvalue\u003e separated by comma", "name": "filter", "in": "query" }, { + "pattern": "^[^\\r\\n;#]+$", "type": "string", "description": "Key which we want the entries for", "name": "key", @@ -80656,6 +81179,7 @@ func init() { "operationId": "setStickTableEntries", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -80677,7 +81201,8 @@ func init() { "$ref": "#/definitions/stick_table_entry" }, "key": { - "type": "string" + "type": "string", + "pattern": "^[^\\r\\n;#]+$" } } } @@ -81341,6 +81866,7 @@ func init() { "operationId": "getAllSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81391,6 +81917,7 @@ func init() { "operationId": "createSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81476,6 +82003,7 @@ func init() { "operationId": "getSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81545,6 +82073,7 @@ func init() { "operationId": "deleteSpoeScope", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81614,6 +82143,7 @@ func init() { "operationId": "getAllSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81671,6 +82201,7 @@ func init() { "operationId": "createSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81763,6 +82294,7 @@ func init() { "operationId": "getSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81839,6 +82371,7 @@ func init() { "operationId": "replaceSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -81936,6 +82469,7 @@ func init() { "operationId": "deleteSpoeAgent", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82012,6 +82546,7 @@ func init() { "operationId": "getAllSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82069,6 +82604,7 @@ func init() { "operationId": "createSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82161,6 +82697,7 @@ func init() { "operationId": "getSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82237,6 +82774,7 @@ func init() { "operationId": "replaceSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82334,6 +82872,7 @@ func init() { "operationId": "deleteSpoeGroup", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82410,6 +82949,7 @@ func init() { "operationId": "getAllSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82467,6 +83007,7 @@ func init() { "operationId": "createSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82559,6 +83100,7 @@ func init() { "operationId": "getSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82635,6 +83177,7 @@ func init() { "operationId": "replaceSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82732,6 +83275,7 @@ func init() { "operationId": "deleteSpoeMessage", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82811,6 +83355,7 @@ func init() { "operationId": "getAllSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82861,6 +83406,7 @@ func init() { "operationId": "startSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82925,6 +83471,7 @@ func init() { "operationId": "getSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -82981,6 +83528,7 @@ func init() { "operationId": "commitSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -83068,6 +83616,7 @@ func init() { "operationId": "deleteSpoeTransaction", "parameters": [ { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -83130,6 +83679,7 @@ func init() { "in": "query" }, { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", @@ -86971,8 +87521,8 @@ func init() { } }, "http_send_name_header": { + "description": "The header string to use to send the server name", "type": "string", - "x-display-name": "The header string to use to send the server name", "x-nullable": true }, "httpchk_params": { @@ -87356,7 +87906,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "index": 0, "name": "test_backend" } @@ -88706,6 +89256,26 @@ func init() { "x-omitempty": true }, "crt_store": { + "description": "Storage mechanism to load and store certificates used in the configuration", + "title": "Certificate Store", + "allOf": [ + { + "$ref": "#/definitions/crt_store_base" + }, + { + "type": "object", + "properties": { + "crt_loads": { + "additionalProperties": { + "$ref": "#/definitions/crt_load" + } + } + } + } + ], + "x-go-name": "CrtStore" + }, + "crt_store_base": { "description": "Storage mechanism to load and store certificates used in the configuration", "type": "object", "title": "Certificate Store", @@ -88721,9 +89291,6 @@ func init() { "description": "Default directory to fetch SSL private keys from", "type": "string" }, - "loads": { - "$ref": "#/definitions/crt_loads" - }, "metadata": { "additionalProperties": { "type": "object" @@ -89243,8 +89810,8 @@ func init() { ] }, "http_send_name_header": { + "description": "Add the server name to a request", "type": "string", - "x-display-name": "Add the server name to a request", "x-nullable": true }, "http_use_proxy_header": { @@ -89351,8 +89918,8 @@ func init() { "x-display-name": "Log ASAP" }, "max_keep_alive_queue": { + "description": "Maximum server queue size for maintaining keep-alive connections", "type": "integer", - "x-display-name": "Maximum server queue size for maintaining keep-alive connections", "x-nullable": true }, "maxconn": { @@ -89442,8 +90009,8 @@ func init() { "x-nullable": true }, "retry_on": { - "type": "string", - "x-display-name": "Specify when to attempt to automatically retry a failed request" + "description": "Specify when to attempt to automatically retry a failed request", + "type": "string" }, "server_fin_timeout": { "type": "integer", @@ -89771,8 +90338,8 @@ func init() { "x-omitempty": true }, "resetenv": { - "type": "string", - "x-display-name": "Remove all environment variables except the ones specified" + "description": "Remove all environment variables except the ones specified", + "type": "string" }, "setenv": { "type": "array", @@ -89784,8 +90351,8 @@ func init() { "x-omitempty": true }, "unsetenv": { - "type": "string", - "x-display-name": "Removes environment variables specified in arguments" + "description": "Removes environment variables specified in arguments", + "type": "string" } } }, @@ -91143,8 +91710,8 @@ func init() { "x-go-name": "GlobalDefaultPath" }, "description": { - "type": "string", - "x-display-name": "Text that describes the instance" + "description": "Text that describes the instance", + "type": "string" }, "device_atlas_options": { "$ref": "#/definitions/device_atlas_options" @@ -91171,10 +91738,10 @@ func init() { "$ref": "#/definitions/fifty_one_degrees_options" }, "force_cfg_parser_pause": { + "description": "Pause the configuration parser to simulate long reloads", "type": "integer", "minimum": 0, "x-default-unit": "ms", - "x-display-name": "Pause the configuration parser to simulate long reloads", "x-duration": true, "x-nullable": true }, @@ -91183,10 +91750,10 @@ func init() { "x-display-name": "GID" }, "grace": { + "description": "Defines a delay between SIGUSR1 and real soft-stop", "type": "integer", "minimum": 0, "x-default-unit": "ms", - "x-display-name": "Defines a delay between SIGUSR1 and real soft-stop", "x-duration": true, "x-nullable": true }, @@ -91253,19 +91820,19 @@ func init() { "$ref": "#/definitions/http_client_options" }, "http_err_codes": { + "description": "Replace, reduce or extend the list of status codes that define an error", "type": "array", "items": { "$ref": "#/definitions/http_codes" }, - "x-display-name": "Replace, reduce or extend the list of status codes that define an error", "x-omitempty": true }, "http_fail_codes": { + "description": "Replace, reduce or extend the list of status codes that define a failure", "type": "array", "items": { "$ref": "#/definitions/http_codes" }, - "x-display-name": "Replace, reduce or extend the list of status codes that define a failure", "x-omitempty": true }, "insecure_fork_wanted": { @@ -91316,9 +91883,9 @@ func init() { } }, "mworker_max_reloads": { + "description": "The number of times a worker can survive a reload", "type": "integer", "minimum": 0, - "x-display-name": "The number of times a worker can survive a reload", "x-nullable": true }, "nbthread": { @@ -91326,8 +91893,9 @@ func init() { "x-display-name": "Number of Threads" }, "no_quic": { + "description": "Disable the use of the QUIC protocol", "type": "boolean", - "x-display-name": "Disable the use of the QUIC protocol" + "x-display-name": "Disable QUIC" }, "node": { "type": "string" @@ -91393,14 +91961,14 @@ func init() { "x-omitempty": true }, "shm_stats_file": { + "description": "Shared Memory Statistics File (EXPERIMENTAL)", "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Shared Memory Statistics File (EXPERIMENTAL)" + "pattern": "^[^\\s]+$" }, "shm_stats_file_max_objects": { + "description": "Maximum number of objects the shared memory used for shared counters will be able to store per thread group. (EXPERIMENTAL)", "type": "integer", "minimum": 0, - "x-display-name": "Maximum number of objects the shared memory used for shared counters will be able to store per thread group. (EXPERIMENTAL)", "x-nullable": true }, "ssl_options": { @@ -91471,10 +92039,10 @@ func init() { "x-display-name": "User" }, "warn_blocked_traffic_after": { + "description": "Delay after which a stuck task triggers a warning", "type": "integer", "minimum": 1, "x-default-unit": "ms", - "x-display-name": "Delay after which a stuck task triggers a warning", "x-duration": true, "x-nullable": true }, @@ -94876,10 +95444,10 @@ func init() { "x-nullable": false }, "timeout": { + "description": "Timeout to send an email in milliseconds", "type": "integer", "minimum": 0, "x-default-unit": "ms", - "x-display-name": "Timeout to send an email in milliseconds", "x-duration": true, "x-nullable": true } @@ -95955,6 +96523,10 @@ func init() { "busy_polling": { "type": "boolean" }, + "fd_hard_limit": { + "type": "integer", + "x-nullable": true + }, "max_spread_checks": { "type": "integer", "minimum": 0, @@ -95967,77 +96539,77 @@ func init() { "x-display-name": "Maximum HAProxy CPU usage" }, "maxcomprate": { - "type": "integer", - "x-display-name": "Maximum per-process input compression rate" + "description": "Maximum per-process input compression rate", + "type": "integer" }, "maxconn": { "type": "integer", "x-display-name": "Max Connections" }, "maxconnrate": { - "type": "integer", - "x-display-name": "Maximum per-process number of concurrent connections" + "description": "Maximum per-process number of concurrent connections", + "type": "integer" }, "maxpipes": { "type": "integer", "x-display-name": "Maximum per-process number of pipes" }, "maxsessrate": { - "type": "integer", - "x-display-name": "Maximum per-process number of sessions per second" + "description": "Maximum per-process number of sessions per second", + "type": "integer" }, "maxzlibmem": { - "type": "integer", - "x-display-name": "Maximum amount of RAM in megabytes per process usable by the zlib" + "description": "Maximum amount of RAM in megabytes per process usable by the zlib", + "type": "integer" }, "noepoll": { - "type": "boolean", - "x-display-name": "Disable the use of the \"epoll\" event polling system on Linux" + "description": "Disable the use of the \"epoll\" event polling system on Linux", + "type": "boolean" }, "noevports": { - "type": "boolean", - "x-display-name": "Disable the use of the event ports event polling system on SunOS system derived from Solaris 10 and later" + "description": "Disable the use of the event ports event polling system on SunOS system derived from Solaris 10 and later", + "type": "boolean" }, "nogetaddrinfo": { - "type": "boolean", - "x-display-name": "Disable the use of getaddrinfo for name resolving" + "description": "Disable the use of getaddrinfo for name resolving", + "type": "boolean" }, "nokqueue": { - "type": "boolean", - "x-display-name": "Disable the use of the \"kqueue\" event polling system on BSD" + "description": "Disable the use of the \"kqueue\" event polling system on BSD", + "type": "boolean" }, "noktls": { - "type": "boolean", - "x-display-name": "Disables the use of ktls. It is equivalent to the command line argument \"-dT\"" + "description": "Disables the use of ktls. It is equivalent to the command line argument \"-dT\"", + "type": "boolean" }, "nopoll": { - "type": "boolean", - "x-display-name": "Disable the use of the \"poll\" event polling system" + "description": "Disable the use of the \"poll\" event polling system", + "type": "boolean" }, "noreuseport": { "type": "boolean", "x-display-name": "Disable the use of SO_REUSEPORT" }, "nosplice": { - "type": "boolean", - "x-display-name": "Disable the use of kernel tcp splicing between sockets on Linux" + "description": "Disable the use of kernel tcp splicing between sockets on Linux", + "type": "boolean" }, "profiling_memory": { + "description": "Enable or disables per-function memory profiling", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "Enable or disables per-function memory profiling" + ] }, "profiling_tasks": { + "description": "Enable or disables per-task CPU profiling", "type": "string", "enum": [ "auto", "enabled", "disabled" - ], - "x-display-name": "Enable or disables per-task CPU profiling" + ] }, "server_state_base": { "type": "string", @@ -96050,8 +96622,8 @@ func init() { "x-display-name": "Server State File" }, "spread_checks": { - "type": "integer", - "x-display-name": "Add some randomness in the check interval" + "description": "Add some randomness in the check interval", + "type": "integer" }, "thread_hard_limit": { "type": "integer", @@ -96693,10 +97265,11 @@ func init() { ], "properties": { "description": { - "type": "string", - "x-display-name": "The description is an optional description string of the ring" + "description": "The description is an optional description string of the ring", + "type": "string" }, "format": { + "description": "Format used to store events into the ring buffer", "type": "string", "enum": [ "iso", @@ -96707,12 +97280,11 @@ func init() { "short", "priority", "timed" - ], - "x-display-name": "Format used to store events into the ring buffer" + ] }, "maxlen": { + "description": "The maximum length of an event message stored into the ring", "type": "integer", - "x-display-name": "The maximum length of an event message stored into the ring", "x-nullable": true }, "metadata": { @@ -96726,9 +97298,9 @@ func init() { "x-nullable": false }, "size": { + "description": "Optional size in bytes for the ring-buffer", "type": "integer", "minimum": 0, - "x-display-name": "Optional size in bytes for the ring-buffer", "x-nullable": true, "x-size": true }, @@ -97272,8 +97844,7 @@ func init() { "address": { "type": "string", "pattern": "^[^\\s]+$", - "x-nullable": false, - "readOnly": true + "x-nullable": false }, "admin_state": { "type": "string", @@ -97283,10 +97854,90 @@ func init() { "drain" ] }, + "agent_addr": { + "type": "string", + "readOnly": true + }, + "agent_port": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "x-nullable": true, + "readOnly": true + }, + "agent_state": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "backend_forced_id": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "backend_id": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "backend_name": { + "type": "string", + "readOnly": true + }, + "check_addr": { + "type": "string", + "readOnly": true + }, + "check_health": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "check_port": { + "type": "integer", + "maximum": 65535, + "minimum": 0, + "x-nullable": true, + "readOnly": true + }, + "check_result": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "check_state": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "check_status": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "forced_id": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "fqdn": { + "type": "string", + "readOnly": true + }, "id": { "type": "string", "readOnly": true }, + "iweight": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, + "last_time_change": { + "type": "integer", + "x-nullable": true, + "readOnly": true + }, "name": { "type": "string", "readOnly": true @@ -97303,8 +97954,24 @@ func init() { "type": "integer", "maximum": 65535, "minimum": 1, + "x-nullable": true + }, + "srvrecord": { + "type": "string", + "readOnly": true + }, + "use_ssl": { + "type": "boolean", + "readOnly": true + }, + "uweight": { + "type": "integer", "x-nullable": true, "readOnly": true + }, + "weight": { + "type": "integer", + "x-nullable": true } }, "example": { @@ -98165,7 +98832,7 @@ func init() { "additionalProperties": false, "example": { "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", + "cond_test": "{ req.ssl_sni -i www.example.com }", "target_server": "www" } }, @@ -99278,12 +99945,12 @@ func init() { "x-display-name": "SSL Load Extra Files" }, "maxsslconn": { - "type": "integer", - "x-display-name": "Maximum per-process number of concurrent SSL connections" + "description": "Maximum per-process number of concurrent SSL connections", + "type": "integer" }, "maxsslrate": { - "type": "integer", - "x-display-name": "Maximum per-process number of SSL sessions per second" + "description": "Maximum per-process number of SSL sessions per second", + "type": "integer" }, "mode_async": { "type": "string", @@ -101377,9 +102044,9 @@ func init() { "x-size": true }, "bufsize_small": { + "description": "Size of small buffers (for memory-restrained situations)", "type": "integer", "minimum": 1, - "x-display-name": "Size of small buffers (for memory-restrained situations)", "x-nullable": true, "x-size": true }, @@ -101517,12 +102184,12 @@ func init() { "type": "object", "properties": { "applet_zero_copy_forwarding": { + "description": "Enables of disabled the zero-copy forwarding of data for the applets", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "Enables of disabled the zero-copy forwarding of data for the applets" + ] }, "comp_maxlevel": { "type": "integer", @@ -101573,61 +102240,61 @@ func init() { "x-nullable": true }, "h1_zero_copy_fwd_recv": { + "description": "enable or disable the zero-copy receives of data for the HTTP/1 multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy receives of data for the HTTP/1 multiplexer" + ] }, "h1_zero_copy_fwd_send": { + "description": "enable or disable the zero-copy sends of data for the HTTP/1 multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy sends of data for the HTTP/1 multiplexer" + ] }, "h2_be_glitches_threshold": { + "description": "Automatically kill a backend connection past a number of glitches", "type": "integer", - "x-display-name": "Automatically kill a backend connection past a number of glitches", "x-nullable": true }, "h2_be_initial_window_size": { - "type": "integer", - "x-display-name": "Initial window size for outgoing connections" + "description": "Initial window size for outgoing connections", + "type": "integer" }, "h2_be_max_concurrent_streams": { - "type": "integer", - "x-display-name": "Maximum number of concurrent streams per outgoing connection" + "description": "Maximum number of concurrent streams per outgoing connection", + "type": "integer" }, "h2_be_rxbuf": { + "description": "HTTP/2 receive buffer size for outgoing connections", "type": "integer", - "x-display-name": "HTTP/2 receive buffer size for outgoing connections", "x-nullable": true, "x-size": true }, "h2_fe_glitches_threshold": { + "description": "Automatically kill a frontend connection past a number of glitches", "type": "integer", - "x-display-name": "Automatically kill a frontend connection past a number of glitches", "x-nullable": true }, "h2_fe_initial_window_size": { - "type": "integer", - "x-display-name": "Initial window size for incoming connections" + "description": "Initial window size for incoming connections", + "type": "integer" }, "h2_fe_max_concurrent_streams": { - "type": "integer", - "x-display-name": "Maximum number of concurrent streams per incoming connection" + "description": "Maximum number of concurrent streams per incoming connection", + "type": "integer" }, "h2_fe_max_total_streams": { + "description": "Maximum number of total streams processed per incoming HTTP/2 connection", "type": "integer", - "x-display-name": "Maximum number of total streams processed per incoming HTTP/2 connection", "x-nullable": true }, "h2_fe_rxbuf": { + "description": "HTTP/2 receive buffer size for incoming connections", "type": "integer", - "x-display-name": "HTTP/2 receive buffer size for incoming connections", "x-nullable": true, "x-size": true }, @@ -101650,12 +102317,12 @@ func init() { "x-display-name": "HTTP/2 Maximum Frame Size" }, "h2_zero_copy_fwd_send": { + "description": "enable or disable the zero-copy sends of data for the HTTP/2 multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy sends of data for the HTTP/2 multiplexer" + ] }, "http_cookielen": { "type": "integer", @@ -101751,8 +102418,8 @@ func init() { "x-nullable": true }, "peers_max_updates_at_once": { - "type": "integer", - "x-display-name": "Maximum number of stick-table updates at once" + "description": "Maximum number of stick-table updates at once", + "type": "integer" }, "pool_high_fd_ratio": { "type": "integer", @@ -101763,30 +102430,30 @@ func init() { "x-display-name": "Max Used Low FD Ratio" }, "pt_zero_copy_forwarding": { + "description": "enable or disable the zero-copy forwarding of data for the pass-through multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "enable or disable the zero-copy forwarding of data for the pass-through multiplexer" + ] }, "renice_runtime": { + "description": "Scheduling priority applied after the configuration parsing", "type": "integer", "maximum": 19, "minimum": -20, - "x-display-name": "Scheduling priority applied after the configuration parsing", "x-nullable": true }, "renice_startup": { + "description": "Scheduling priority applied before the rest of the configuration", "type": "integer", "maximum": 19, "minimum": -20, - "x-display-name": "Scheduling priority applied before the rest of the configuration", "x-nullable": true }, "ring_queues": { + "description": "Number of write queues in front of ring buffers", "type": "integer", - "x-display-name": "Number of write queues in front of ring buffers", "x-nullable": true }, "runqueue_depth": { @@ -101850,10 +102517,10 @@ func init() { "x-nullable": true }, "reorder_ratio": { + "description": "Ratio applied to the packet reordering threshold", "type": "integer", "maximum": 100, "minimum": 0, - "x-display-name": "Ratio applied to the packet reordering threshold", "x-nullable": true }, "retry_threshold": { @@ -101870,12 +102537,12 @@ func init() { "x-display-name": "QUIC Socket Owner" }, "zero_copy_fwd_send": { + "description": "Enables or disables the zero-copy sends for the QUIC multiplexer", "type": "string", "enum": [ "enabled", "disabled" - ], - "x-display-name": "Enables or disables the zero-copy sends for the QUIC multiplexer" + ] } } }, @@ -101927,13 +102594,13 @@ func init() { "x-size": false }, "ocsp_update_max_delay": { + "description": "SSL Maximum Interval Between Two Automatic Updates of the same OCSP Response", "type": "integer", - "x-display-name": "SSL Maximum Interval Between Two Automatic Updates of the same OCSP Response", "x-nullable": true }, "ocsp_update_min_delay": { + "description": "SSL Minimum Interval Between Two Automatic Updates of the same OCSP Response", "type": "integer", - "x-display-name": "SSL Minimum Interval Between Two Automatic Updates of the same OCSP Response", "x-nullable": true } } @@ -102088,24 +102755,24 @@ func init() { "type": "object", "properties": { "cache_size": { - "type": "integer", - "x-display-name": "Sets the WURFL Useragent cache size" + "description": "Sets the WURFL Useragent cache size", + "type": "integer" }, "data_file": { - "type": "string", - "x-display-name": "The path of the WURFL data file" + "description": "The path of the WURFL data file", + "type": "string" }, "information_list": { - "type": "string", - "x-display-name": "A space-delimited list of WURFL capabilities" + "description": "A space-delimited list of WURFL capabilities", + "type": "string" }, "information_list_separator": { - "type": "string", - "x-display-name": "A char that will be used to separate values in a response header containing WURFL results" + "description": "A char that will be used to separate values in a response header containing WURFL results", + "type": "string" }, "patch_file": { - "type": "string", - "x-display-name": "A list of WURFL patch file paths" + "description": "A list of WURFL patch file paths", + "type": "string" } } } @@ -102126,6 +102793,7 @@ func init() { "in": "query" }, "parent_name": { + "pattern": "^[^\\r\\n\u003c\u003e*;$#\u0026{}\"]+$", "type": "string", "description": "Parent name", "name": "parent_name", diff --git a/generate/go-generate.go b/generate/go-generate.go index 6f78aa48..0f505466 100644 --- a/generate/go-generate.go +++ b/generate/go-generate.go @@ -116,7 +116,7 @@ type ParseData struct { func readServerData(filePath string, pd *ParseData, structName string, attName string, groupName string, isList bool) { typeStruct := fmt.Sprintf("type %s struct {", structName) - dat, err := os.ReadFile(filePath) + dat, err := os.ReadFile(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -345,7 +345,7 @@ func main() { } tmpl = tmpl.Funcs(funcMap) filePath = path.Join(dir, "configuration", "configuration_generated.go") - f, err := os.Create(filePath) + f, err := os.Create(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -363,7 +363,7 @@ func main() { } tmpl = tmpl.Funcs(funcMap) filePath = path.Join(dir, "dataplaneapi_generated.go") - f, err = os.Create(filePath) + f, err = os.Create(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -381,7 +381,7 @@ func main() { } tmpl = tmpl.Funcs(funcMap) filePath = path.Join(dir, "configuration/examples/example-full.yaml") - f, err = os.Create(filePath) + f, err = os.Create(filePath) //nolint:gosec // paths from trusted build tool arguments if err != nil { log.Panic(err) } @@ -471,7 +471,7 @@ func processLine(line string) (Attribute, error) { } func fmtFile(filename string) { - cmd := exec.Command("gofmt", "-s", "-w", filename) + cmd := exec.Command("gofmt", "-s", "-w", filename) //nolint:gosec // paths from trusted build tool arguments err := cmd.Run() if err != nil { log.Fatalf("cmd.Run() failed with %s\n", err) diff --git a/generate/swagger/Dockerfile b/generate/swagger/Dockerfile index 683a4703..d470c5ee 100644 --- a/generate/swagger/Dockerfile +++ b/generate/swagger/Dockerfile @@ -1,6 +1,6 @@ ARG SWAGGER_VERSION -FROM golang:1.25 AS golang +FROM golang:1.26 AS golang FROM quay.io/goswagger/swagger:0.32.3 COPY --from=golang /usr/local/go /usr/local/go diff --git a/go.mod b/go.mod index 75cf877b..8130a401 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/haproxytech/dataplaneapi -go 1.25 +go 1.26 require ( github.com/GehirnInc/crypt v0.0.0-20230320061759-8cc1b52080c5 @@ -15,19 +15,19 @@ require ( github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 github.com/fsnotify/fsnotify v1.9.0 github.com/getkin/kin-openapi v0.133.0 - github.com/go-openapi/errors v0.22.6 - github.com/go-openapi/loads v0.23.2 + github.com/go-openapi/errors v0.22.7 + github.com/go-openapi/loads v0.23.3 github.com/go-openapi/runtime v0.29.0 - github.com/go-openapi/spec v0.22.3 - github.com/go-openapi/strfmt v0.25.0 - github.com/go-openapi/swag v0.25.4 - github.com/go-openapi/swag/cmdutils v0.25.4 - github.com/go-openapi/swag/mangling v0.25.4 - github.com/go-openapi/validate v0.25.1 + github.com/go-openapi/spec v0.22.4 + github.com/go-openapi/strfmt v0.26.1 + github.com/go-openapi/swag v0.25.5 + github.com/go-openapi/swag/cmdutils v0.25.5 + github.com/go-openapi/swag/mangling v0.25.5 + github.com/go-openapi/validate v0.25.2 github.com/google/go-cmp v0.7.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.6.0 - github.com/haproxytech/client-native/v6 v6.3.0 + github.com/haproxytech/client-native/v6 v6.3.5 github.com/jessevdk/go-flags v1.6.1 github.com/joho/godotenv v1.5.1 github.com/json-iterator/go v1.1.12 @@ -36,6 +36,7 @@ require ( github.com/libdns/azure v0.5.0 github.com/libdns/cloudflare v0.2.1 github.com/libdns/cloudns v1.1.0 + github.com/libdns/desec v1.0.1 github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31 github.com/libdns/gandi v1.1.0 github.com/libdns/godaddy v1.1.0 @@ -51,9 +52,11 @@ require ( github.com/libdns/ovh v1.1.0 github.com/libdns/porkbun v1.1.0 github.com/libdns/rfc2136 v1.0.1 + github.com/libdns/route53 v1.6.0 github.com/libdns/scaleway v0.2.3 github.com/libdns/vultr/v2 v2.0.4 github.com/maruel/panicparse/v2 v2.5.0 + github.com/miekg/dns v1.1.64 github.com/nathanaelle/syslog5424/v2 v2.0.5 github.com/rs/cors v1.11.1 github.com/rubyist/circuitbreaker v2.2.1+incompatible @@ -61,8 +64,8 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/stretchr/testify v1.11.1 go.uber.org/automaxprocs v1.6.0 - golang.org/x/net v0.49.0 - golang.org/x/sys v0.40.0 + golang.org/x/net v0.52.0 + golang.org/x/sys v0.42.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -81,6 +84,7 @@ require ( github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect + github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect @@ -94,18 +98,18 @@ require ( github.com/go-logr/logr v1.4.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.3.0 // indirect - github.com/go-openapi/analysis v0.24.2 // indirect - github.com/go-openapi/jsonpointer v0.22.4 // indirect - github.com/go-openapi/jsonreference v0.21.4 // indirect - github.com/go-openapi/swag/conv v0.25.4 // indirect - github.com/go-openapi/swag/fileutils v0.25.4 // indirect - github.com/go-openapi/swag/jsonname v0.25.4 // indirect - github.com/go-openapi/swag/jsonutils v0.25.4 // indirect - github.com/go-openapi/swag/loading v0.25.4 // indirect - github.com/go-openapi/swag/netutils v0.25.4 // indirect - github.com/go-openapi/swag/stringutils v0.25.4 // indirect - github.com/go-openapi/swag/typeutils v0.25.4 // indirect - github.com/go-openapi/swag/yamlutils v0.25.4 // indirect + github.com/go-openapi/analysis v0.25.0 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/jsonreference v0.21.5 // indirect + github.com/go-openapi/swag/conv v0.25.5 // indirect + github.com/go-openapi/swag/fileutils v0.25.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect + github.com/go-openapi/swag/jsonutils v0.25.5 // indirect + github.com/go-openapi/swag/loading v0.25.5 // indirect + github.com/go-openapi/swag/netutils v0.25.5 // indirect + github.com/go-openapi/swag/stringutils v0.25.5 // indirect + github.com/go-openapi/swag/typeutils v0.25.5 // indirect + github.com/go-openapi/swag/yamlutils v0.25.5 // indirect github.com/go-resty/resty/v2 v2.16.5 // indirect github.com/go-viper/mapstructure/v2 v2.5.0 // indirect github.com/gofrs/flock v0.13.0 // indirect @@ -114,6 +118,7 @@ require ( github.com/google/s2a-go v0.1.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect github.com/googleapis/gax-go/v2 v2.14.1 // indirect + github.com/haproxytech/client-native/v5 v5.1.15 // indirect github.com/haproxytech/go-logger v1.1.0 // indirect github.com/haproxytech/go-method-gen v0.1.1 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect @@ -125,14 +130,13 @@ require ( github.com/lestrrat-go/strftime v1.1.1 // indirect github.com/linode/linodego v1.56.0 // indirect github.com/mailru/easyjson v0.9.1 // indirect - github.com/miekg/dns v1.1.64 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 // indirect github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 // indirect - github.com/oklog/ulid v1.3.1 // indirect + github.com/oklog/ulid/v2 v2.1.1 // indirect github.com/ovh/go-ovh v1.7.0 // indirect github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect github.com/perimeterx/marshmallow v1.1.5 // indirect @@ -148,20 +152,19 @@ require ( github.com/vultr/govultr/v3 v3.20.0 // indirect github.com/woodsbury/decimal128 v1.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.mongodb.org/mongo-driver v1.17.7 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect go.opentelemetry.io/otel v1.38.0 // indirect go.opentelemetry.io/otel/metric v1.38.0 // indirect go.opentelemetry.io/otel/trace v1.38.0 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/crypto v0.47.0 // indirect - golang.org/x/mod v0.32.0 // indirect + golang.org/x/crypto v0.49.0 // indirect + golang.org/x/mod v0.34.0 // indirect golang.org/x/oauth2 v0.30.0 // indirect - golang.org/x/sync v0.19.0 // indirect - golang.org/x/text v0.33.0 // indirect + golang.org/x/sync v0.20.0 // indirect + golang.org/x/text v0.35.0 // indirect golang.org/x/time v0.11.0 // indirect - golang.org/x/tools v0.41.0 // indirect + golang.org/x/tools v0.43.0 // indirect google.golang.org/api v0.233.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250505200425-f936aa4a68b2 // indirect google.golang.org/grpc v1.72.0 // indirect diff --git a/go.sum b/go.sum index e2f97c0e..b88267f7 100644 --- a/go.sum +++ b/go.sum @@ -48,6 +48,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebP github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD4WZudeEKZ9/iKpiT6cM1JyEROpXjOcdWv8= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3 h1:jQzRC+0eI/l5mFXVoPTyyolrqyZtKIYaKHSuKJoIJKs= +github.com/aws/aws-sdk-go-v2/service/route53 v1.58.3/go.mod h1:1GNaojT/gG4Ru9tT39ton6kRZ3FvptJ/QRKBoqUOVX4= github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s= github.com/aws/aws-sdk-go-v2/service/sso v1.29.6/go.mod h1:5PfYspyCU5Vw1wNPsxi15LZovOnULudOQuVxphSflQA= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7UT9RpFH3hR6HWL6bIgVY= @@ -95,54 +97,54 @@ github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= -github.com/go-openapi/analysis v0.24.2 h1:6p7WXEuKy1llDgOH8FooVeO+Uq2za9qoAOq4ZN08B50= -github.com/go-openapi/analysis v0.24.2/go.mod h1:x27OOHKANE0lutg2ml4kzYLoHGMKgRm1Cj2ijVOjJuE= -github.com/go-openapi/errors v0.22.6 h1:eDxcf89O8odEnohIXwEjY1IB4ph5vmbUsBMsFNwXWPo= -github.com/go-openapi/errors v0.22.6/go.mod h1:z9S8ASTUqx7+CP1Q8dD8ewGH/1JWFFLX/2PmAYNQLgk= -github.com/go-openapi/jsonpointer v0.22.4 h1:dZtK82WlNpVLDW2jlA1YCiVJFVqkED1MegOUy9kR5T4= -github.com/go-openapi/jsonpointer v0.22.4/go.mod h1:elX9+UgznpFhgBuaMQ7iu4lvvX1nvNsesQ3oxmYTw80= -github.com/go-openapi/jsonreference v0.21.4 h1:24qaE2y9bx/q3uRK/qN+TDwbok1NhbSmGjjySRCHtC8= -github.com/go-openapi/jsonreference v0.21.4/go.mod h1:rIENPTjDbLpzQmQWCj5kKj3ZlmEh+EFVbz3RTUh30/4= -github.com/go-openapi/loads v0.23.2 h1:rJXAcP7g1+lWyBHC7iTY+WAF0rprtM+pm8Jxv1uQJp4= -github.com/go-openapi/loads v0.23.2/go.mod h1:IEVw1GfRt/P2Pplkelxzj9BYFajiWOtY2nHZNj4UnWY= +github.com/go-openapi/analysis v0.25.0 h1:EnjAq1yO8wEO9HbPmY8vLPEIkdZuuFhCAKBPvCB7bCs= +github.com/go-openapi/analysis v0.25.0/go.mod h1:5WFTRE43WLkPG9r9OtlMfqkkvUTYLVVCIxLlEpyF8kE= +github.com/go-openapi/errors v0.22.7 h1:JLFBGC0Apwdzw3484MmBqspjPbwa2SHvpDm0u5aGhUA= +github.com/go-openapi/errors v0.22.7/go.mod h1://QW6SD9OsWtH6gHllUCddOXDL0tk0ZGNYHwsw4sW3w= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/jsonreference v0.21.5 h1:6uCGVXU/aNF13AQNggxfysJ+5ZcU4nEAe+pJyVWRdiE= +github.com/go-openapi/jsonreference v0.21.5/go.mod h1:u25Bw85sX4E2jzFodh1FOKMTZLcfifd1Q+iKKOUxExw= +github.com/go-openapi/loads v0.23.3 h1:g5Xap1JfwKkUnZdn+S0L3SzBDpcTIYzZ5Qaag0YDkKQ= +github.com/go-openapi/loads v0.23.3/go.mod h1:NOH07zLajXo8y55hom0omlHWDVVvCwBM/S+csCK8LqA= github.com/go-openapi/runtime v0.29.0 h1:Y7iDTFarS9XaFQ+fA+lBLngMwH6nYfqig1G+pHxMRO0= github.com/go-openapi/runtime v0.29.0/go.mod h1:52HOkEmLL/fE4Pg3Kf9nxc9fYQn0UsIWyGjGIJE9dkg= -github.com/go-openapi/spec v0.22.3 h1:qRSmj6Smz2rEBxMnLRBMeBWxbbOvuOoElvSvObIgwQc= -github.com/go-openapi/spec v0.22.3/go.mod h1:iIImLODL2loCh3Vnox8TY2YWYJZjMAKYyLH2Mu8lOZs= -github.com/go-openapi/strfmt v0.25.0 h1:7R0RX7mbKLa9EYCTHRcCuIPcaqlyQiWNPTXwClK0saQ= -github.com/go-openapi/strfmt v0.25.0/go.mod h1:nNXct7OzbwrMY9+5tLX4I21pzcmE6ccMGXl3jFdPfn8= -github.com/go-openapi/swag v0.25.4 h1:OyUPUFYDPDBMkqyxOTkqDYFnrhuhi9NR6QVUvIochMU= -github.com/go-openapi/swag v0.25.4/go.mod h1:zNfJ9WZABGHCFg2RnY0S4IOkAcVTzJ6z2Bi+Q4i6qFQ= -github.com/go-openapi/swag/cmdutils v0.25.4 h1:8rYhB5n6WawR192/BfUu2iVlxqVR9aRgGJP6WaBoW+4= -github.com/go-openapi/swag/cmdutils v0.25.4/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= -github.com/go-openapi/swag/conv v0.25.4 h1:/Dd7p0LZXczgUcC/Ikm1+YqVzkEeCc9LnOWjfkpkfe4= -github.com/go-openapi/swag/conv v0.25.4/go.mod h1:3LXfie/lwoAv0NHoEuY1hjoFAYkvlqI/Bn5EQDD3PPU= -github.com/go-openapi/swag/fileutils v0.25.4 h1:2oI0XNW5y6UWZTC7vAxC8hmsK/tOkWXHJQH4lKjqw+Y= -github.com/go-openapi/swag/fileutils v0.25.4/go.mod h1:cdOT/PKbwcysVQ9Tpr0q20lQKH7MGhOEb6EwmHOirUk= -github.com/go-openapi/swag/jsonname v0.25.4 h1:bZH0+MsS03MbnwBXYhuTttMOqk+5KcQ9869Vye1bNHI= -github.com/go-openapi/swag/jsonname v0.25.4/go.mod h1:GPVEk9CWVhNvWhZgrnvRA6utbAltopbKwDu8mXNUMag= -github.com/go-openapi/swag/jsonutils v0.25.4 h1:VSchfbGhD4UTf4vCdR2F4TLBdLwHyUDTd1/q4i+jGZA= -github.com/go-openapi/swag/jsonutils v0.25.4/go.mod h1:7OYGXpvVFPn4PpaSdPHJBtF0iGnbEaTk8AvBkoWnaAY= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4 h1:IACsSvBhiNJwlDix7wq39SS2Fh7lUOCJRmx/4SN4sVo= -github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.4/go.mod h1:Mt0Ost9l3cUzVv4OEZG+WSeoHwjWLnarzMePNDAOBiM= -github.com/go-openapi/swag/loading v0.25.4 h1:jN4MvLj0X6yhCDduRsxDDw1aHe+ZWoLjW+9ZQWIKn2s= -github.com/go-openapi/swag/loading v0.25.4/go.mod h1:rpUM1ZiyEP9+mNLIQUdMiD7dCETXvkkC30z53i+ftTE= -github.com/go-openapi/swag/mangling v0.25.4 h1:2b9kBJk9JvPgxr36V23FxJLdwBrpijI26Bx5JH4Hp48= -github.com/go-openapi/swag/mangling v0.25.4/go.mod h1:6dxwu6QyORHpIIApsdZgb6wBk/DPU15MdyYj/ikn0Hg= -github.com/go-openapi/swag/netutils v0.25.4 h1:Gqe6K71bGRb3ZQLusdI8p/y1KLgV4M/k+/HzVSqT8H0= -github.com/go-openapi/swag/netutils v0.25.4/go.mod h1:m2W8dtdaoX7oj9rEttLyTeEFFEBvnAx9qHd5nJEBzYg= -github.com/go-openapi/swag/stringutils v0.25.4 h1:O6dU1Rd8bej4HPA3/CLPciNBBDwZj9HiEpdVsb8B5A8= -github.com/go-openapi/swag/stringutils v0.25.4/go.mod h1:GTsRvhJW5xM5gkgiFe0fV3PUlFm0dr8vki6/VSRaZK0= -github.com/go-openapi/swag/typeutils v0.25.4 h1:1/fbZOUN472NTc39zpa+YGHn3jzHWhv42wAJSN91wRw= -github.com/go-openapi/swag/typeutils v0.25.4/go.mod h1:Ou7g//Wx8tTLS9vG0UmzfCsjZjKhpjxayRKTHXf2pTE= -github.com/go-openapi/swag/yamlutils v0.25.4 h1:6jdaeSItEUb7ioS9lFoCZ65Cne1/RZtPBZ9A56h92Sw= -github.com/go-openapi/swag/yamlutils v0.25.4/go.mod h1:MNzq1ulQu+yd8Kl7wPOut/YHAAU/H6hL91fF+E2RFwc= -github.com/go-openapi/testify/enable/yaml/v2 v2.0.2 h1:0+Y41Pz1NkbTHz8NngxTuAXxEodtNSI1WG1c/m5Akw4= -github.com/go-openapi/testify/enable/yaml/v2 v2.0.2/go.mod h1:kme83333GCtJQHXQ8UKX3IBZu6z8T5Dvy5+CW3NLUUg= -github.com/go-openapi/testify/v2 v2.0.2 h1:X999g3jeLcoY8qctY/c/Z8iBHTbwLz7R2WXd6Ub6wls= -github.com/go-openapi/testify/v2 v2.0.2/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= -github.com/go-openapi/validate v0.25.1 h1:sSACUI6Jcnbo5IWqbYHgjibrhhmt3vR6lCzKZnmAgBw= -github.com/go-openapi/validate v0.25.1/go.mod h1:RMVyVFYte0gbSTaZ0N4KmTn6u/kClvAFp+mAVfS/DQc= +github.com/go-openapi/spec v0.22.4 h1:4pxGjipMKu0FzFiu/DPwN3CTBRlVM2yLf/YTWorYfDQ= +github.com/go-openapi/spec v0.22.4/go.mod h1:WQ6Ai0VPWMZgMT4XySjlRIE6GP1bGQOtEThn3gcWLtQ= +github.com/go-openapi/strfmt v0.26.1 h1:7zGCHji7zSYDC2tCXIusoxYQz/48jAf2q+sF6wXTG+c= +github.com/go-openapi/strfmt v0.26.1/go.mod h1:Zslk5VZPOISLwmWTMBIS7oiVFem1o1EI6zULY8Uer7Y= +github.com/go-openapi/swag v0.25.5 h1:pNkwbUEeGwMtcgxDr+2GBPAk4kT+kJ+AaB+TMKAg+TU= +github.com/go-openapi/swag v0.25.5/go.mod h1:B3RT6l8q7X803JRxa2e59tHOiZlX1t8viplOcs9CwTA= +github.com/go-openapi/swag/cmdutils v0.25.5 h1:yh5hHrpgsw4NwM9KAEtaDTXILYzdXh/I8Whhx9hKj7c= +github.com/go-openapi/swag/cmdutils v0.25.5/go.mod h1:pdae/AFo6WxLl5L0rq87eRzVPm/XRHM3MoYgRMvG4A0= +github.com/go-openapi/swag/conv v0.25.5 h1:wAXBYEXJjoKwE5+vc9YHhpQOFj2JYBMF2DUi+tGu97g= +github.com/go-openapi/swag/conv v0.25.5/go.mod h1:CuJ1eWvh1c4ORKx7unQnFGyvBbNlRKbnRyAvDvzWA4k= +github.com/go-openapi/swag/fileutils v0.25.5 h1:B6JTdOcs2c0dBIs9HnkyTW+5gC+8NIhVBUwERkFhMWk= +github.com/go-openapi/swag/fileutils v0.25.5/go.mod h1:V3cT9UdMQIaH4WiTrUc9EPtVA4txS0TOmRURmhGF4kc= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/swag/jsonutils v0.25.5 h1:XUZF8awQr75MXeC+/iaw5usY/iM7nXPDwdG3Jbl9vYo= +github.com/go-openapi/swag/jsonutils v0.25.5/go.mod h1:48FXUaz8YsDAA9s5AnaUvAmry1UcLcNVWUjY42XkrN4= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5 h1:SX6sE4FrGb4sEnnxbFL/25yZBb5Hcg1inLeErd86Y1U= +github.com/go-openapi/swag/jsonutils/fixtures_test v0.25.5/go.mod h1:/2KvOTrKWjVA5Xli3DZWdMCZDzz3uV/T7bXwrKWPquo= +github.com/go-openapi/swag/loading v0.25.5 h1:odQ/umlIZ1ZVRteI6ckSrvP6e2w9UTF5qgNdemJHjuU= +github.com/go-openapi/swag/loading v0.25.5/go.mod h1:I8A8RaaQ4DApxhPSWLNYWh9NvmX2YKMoB9nwvv6oW6g= +github.com/go-openapi/swag/mangling v0.25.5 h1:hyrnvbQRS7vKePQPHHDso+k6CGn5ZBs5232UqWZmJZw= +github.com/go-openapi/swag/mangling v0.25.5/go.mod h1:6hadXM/o312N/h98RwByLg088U61TPGiltQn71Iw0NY= +github.com/go-openapi/swag/netutils v0.25.5 h1:LZq2Xc2QI8+7838elRAaPCeqJnHODfSyOa7ZGfxDKlU= +github.com/go-openapi/swag/netutils v0.25.5/go.mod h1:lHbtmj4m57APG/8H7ZcMMSWzNqIQcu0RFiXrPUara14= +github.com/go-openapi/swag/stringutils v0.25.5 h1:NVkoDOA8YBgtAR/zvCx5rhJKtZF3IzXcDdwOsYzrB6M= +github.com/go-openapi/swag/stringutils v0.25.5/go.mod h1:PKK8EZdu4QJq8iezt17HM8RXnLAzY7gW0O1KKarrZII= +github.com/go-openapi/swag/typeutils v0.25.5 h1:EFJ+PCga2HfHGdo8s8VJXEVbeXRCYwzzr9u4rJk7L7E= +github.com/go-openapi/swag/typeutils v0.25.5/go.mod h1:itmFmScAYE1bSD8C4rS0W+0InZUBrB2xSPbWt6DLGuc= +github.com/go-openapi/swag/yamlutils v0.25.5 h1:kASCIS+oIeoc55j28T4o8KwlV2S4ZLPT6G0iq2SSbVQ= +github.com/go-openapi/swag/yamlutils v0.25.5/go.mod h1:Gek1/SjjfbYvM+Iq4QGwa/2lEXde9n2j4a3wI3pNuOQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.1 h1:NZOrZmIb6PTv5LTFxr5/mKV/FjbUzGE7E6gLz7vFoOQ= +github.com/go-openapi/testify/enable/yaml/v2 v2.4.1/go.mod h1:r7dwsujEHawapMsxA69i+XMGZrQ5tRauhLAjV/sxg3Q= +github.com/go-openapi/testify/v2 v2.4.1 h1:zB34HDKj4tHwyUQHrUkpV0Q0iXQ6dUCOQtIqn8hE6Iw= +github.com/go-openapi/testify/v2 v2.4.1/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= +github.com/go-openapi/validate v0.25.2 h1:12NsfLAwGegqbGWr2CnvT65X/Q2USJipmJ9b7xDJZz0= +github.com/go-openapi/validate v0.25.2/go.mod h1:Pgl1LpPPGFnZ+ys4/hTlDiRYQdI1ocKypgE+8Q8BLfY= github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI= github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow= github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM= @@ -175,8 +177,10 @@ github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q= github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA= -github.com/haproxytech/client-native/v6 v6.3.0 h1:bKiQHCW6gKusA2XixfUPy+L/XdEa4LNR6jFMuQ+C908= -github.com/haproxytech/client-native/v6 v6.3.0/go.mod h1:2ybXlzwzdrIOlFl468y/VeGLD5uVS4P7L0TxN9Os+as= +github.com/haproxytech/client-native/v5 v5.1.15 h1:oMqyDlh+vL3yRKiaapc6SESetCIir/Of3F75vtpG1Nk= +github.com/haproxytech/client-native/v5 v5.1.15/go.mod h1:6eT7/KOsczPHFE/op1TDwfo0jQAsMffl7PuXkKJ+Mt0= +github.com/haproxytech/client-native/v6 v6.3.5 h1:VxqYofSbJqECSjwn9Zkrkg1Hjo1BLN59fyFS74uSoFY= +github.com/haproxytech/client-native/v6 v6.3.5/go.mod h1:iEAvgb2AAanfYo/ri7FNFsx92d2e0cjIPaGuioyR+7o= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE= github.com/haproxytech/go-logger v1.1.0/go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM= github.com/haproxytech/go-method-gen v0.1.1 h1:anoX6RjASOqtwxYCeX5JlsF3ETrAU9fQkxA3vi6tRmA= @@ -220,6 +224,8 @@ github.com/libdns/cloudflare v0.2.1 h1:E8aoP5o79AU47t1XyzCgSecST3GvWv/nC3ycibg0t github.com/libdns/cloudflare v0.2.1/go.mod h1:Aq4IXdjalB6mD0ELvKqJiIGim8zSC6mlIshRPMOAb5w= github.com/libdns/cloudns v1.1.0 h1:W+1MadtxKySn3b5RITFTsXgTIvr5VoO5x97cewjlDcs= github.com/libdns/cloudns v1.1.0/go.mod h1:/22V6tYYDALDpM4pw/RGGJ+X2F1Luibty9kKpKvkqBM= +github.com/libdns/desec v1.0.1 h1:q8U+/dE4W7V3N9wsAC6aOceP4vOMKaa02D15N3Gg0dc= +github.com/libdns/desec v1.0.1/go.mod h1:kyNfDM37feCTHJO4ha0SCRafQQS+dQ/kBRWwZYDfrJo= github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31 h1:raIuvxYVJtZ60hREOOL3MS2AS3xA0W2G3grPQ4rGTeo= github.com/libdns/digitalocean v0.0.0-20250606071607-dfa7af5c2e31/go.mod h1:hde/tjNiPFe1lLaf2TtaCAYgJ9j/SGLhaQMpgZlF6e0= github.com/libdns/gandi v1.1.0 h1:gBBbx23xejvOpbUX7HRqCYsROYag5+OUMGhQXzAkol4= @@ -250,6 +256,8 @@ github.com/libdns/porkbun v1.1.0 h1:X763NqXjW26VEl7GvBtF/3CGeuGt9JqoQ35mwIlx40E= github.com/libdns/porkbun v1.1.0/go.mod h1:JL6NfXkkSlLr24AI5Fv0t3/Oa6PXOSOerVsOmr8+URs= github.com/libdns/rfc2136 v1.0.1 h1:aiztZgzI2cd9FAtBNPILz01mQcZs1jMqJ467KKI4UQ0= github.com/libdns/rfc2136 v1.0.1/go.mod h1:Uf4niCfXVgiMgwUrkPdIa5/sqLFdjVhkZj1ZfFAuSq4= +github.com/libdns/route53 v1.6.0 h1:1fZcoCIxagfftw9GBhIqZ2rumEiB0K58n11X7ko2DOg= +github.com/libdns/route53 v1.6.0/go.mod h1:7QGcw/2J0VxcVwHsPYpuo1I6IJLHy77bbOvi1BVK3eE= github.com/libdns/scaleway v0.2.3 h1:krZpbQyl4cyuB6sVLHLfEQ63K1Z+PDiQcFcJBU3Kyp4= github.com/libdns/scaleway v0.2.3/go.mod h1:N9nY2+aeFQu5y439nKT25GHLOhBlRf93WvOqgeX+ztI= github.com/libdns/vultr/v2 v2.0.4 h1:4V1OSiUnYvFfpFBicdM27JEnAF0D694cmmQ3AyNqobA= @@ -283,12 +291,13 @@ github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037 h1:G7ERwszslrBzRxj//J github.com/oasdiff/yaml v0.0.0-20250309154309-f31be36b4037/go.mod h1:2bpvgLBZEtENV5scfDFEtB/5+1M4hkQhDQrccEJ/qGw= github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90 h1:bQx3WeLcUWy+RletIKwUIt4x3t8n2SxavmoclizMb8c= github.com/oasdiff/yaml3 v0.0.0-20250309153720-d2182401db90/go.mod h1:y5+oSEHCPT/DGrS++Wc/479ERge0zTFxaF8PbGKcg2o= -github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s= +github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ= github.com/ovh/go-ovh v1.7.0 h1:V14nF7FwDjQrZt9g7jzcvAAQ3HN6DNShRFRMC3jLoPw= github.com/ovh/go-ovh v1.7.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= github.com/peterbourgon/g2s v0.0.0-20170223122336-d4e7ad98afea h1:sKwxy1H95npauwu8vtF95vG/syrL0p8fSZo/XlDg5gk= @@ -337,8 +346,6 @@ github.com/woodsbury/decimal128 v1.4.0 h1:xJATj7lLu4f2oObouMt2tgGiElE5gO6mSWUjQs github.com/woodsbury/decimal128 v1.4.0/go.mod h1:BP46FUrVjVhdTbKT+XuQh2xfQaGki9LMIRJSFuh6THU= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.7 h1:a9w+U3Vt67eYzcfq3k/OAv284/uUUkL0uP75VE5rCOU= -go.mongodb.org/mongo-driver v1.17.7/go.mod h1:Hy04i7O2kC4RS06ZrhPRqj/u4DTYkFDAAccj+rVKqgQ= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 h1:sbiXRNDSWJOTobXh5HyQKjq6wUC5tNybqjIqDpAY4CU= @@ -357,27 +364,27 @@ go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/crypto v0.47.0 h1:V6e3FRj+n4dbpw86FJ8Fv7XVOql7TEwpHapKoMJ/GO8= -golang.org/x/crypto v0.47.0/go.mod h1:ff3Y9VzzKbwSSEzWqJsJVBnWmRwRSHt/6Op5n9bQc4A= -golang.org/x/mod v0.32.0 h1:9F4d3PHLljb6x//jOyokMv3eX+YDeepZSEo3mFJy93c= -golang.org/x/mod v0.32.0/go.mod h1:SgipZ/3h2Ci89DlEtEXWUk/HteuRin+HHhN+WbNhguU= -golang.org/x/net v0.49.0 h1:eeHFmOGUTtaaPSGNmjBKpbng9MulQsJURQUAfUwY++o= -golang.org/x/net v0.49.0/go.mod h1:/ysNB2EvaqvesRkuLAyjI1ycPZlQHM3q01F02UY/MV8= +golang.org/x/crypto v0.49.0 h1:+Ng2ULVvLHnJ/ZFEq4KdcDd/cfjrrjjNSXNzxg0Y4U4= +golang.org/x/crypto v0.49.0/go.mod h1:ErX4dUh2UM+CFYiXZRTcMpEcN8b/1gxEuv3nODoYtCA= +golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= +golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= +golang.org/x/net v0.52.0 h1:He/TN1l0e4mmR3QqHMT2Xab3Aj3L9qjbhRm78/6jrW0= +golang.org/x/net v0.52.0/go.mod h1:R1MAz7uMZxVMualyPXb+VaqGSa3LIaUqk0eEt3w36Sw= golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= -golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4= -golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= +golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.40.0 h1:DBZZqJ2Rkml6QMQsZywtnjnnGvHza6BTfYFWY9kjEWQ= -golang.org/x/sys v0.40.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= -golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE= -golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8= +golang.org/x/sys v0.42.0 h1:omrd2nAlyT5ESRdCLYdm3+fMfNFE/+Rf4bDIQImRJeo= +golang.org/x/sys v0.42.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.35.0 h1:JOVx6vVDFokkpaq1AEptVzLTpDe9KGpj5tR4/X+ybL8= +golang.org/x/text v0.35.0/go.mod h1:khi/HExzZJ2pGnjenulevKNX1W67CUy0AsXcNubPGCA= golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0= golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg= -golang.org/x/tools v0.41.0 h1:a9b8iMweWG+S0OBnlU36rzLp20z1Rp10w+IY2czHTQc= -golang.org/x/tools v0.41.0/go.mod h1:XSY6eDqxVNiYgezAVqqCeihT4j1U2CCsqvH3WhQpnlg= +golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= +golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.233.0 h1:iGZfjXAJiUFSSaekVB7LzXl6tRfEKhUN7FkZN++07tI= google.golang.org/api v0.233.0/go.mod h1:TCIVLLlcwunlMpZIhIp7Ltk77W+vUSdUKAAIlbxY44c= diff --git a/handlers/bind.go b/handlers/bind.go index 9fd15de3..d2798532 100644 --- a/handlers/bind.go +++ b/handlers/bind.go @@ -96,7 +96,7 @@ func (h *CreateBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para return bind.NewCreateBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewCreateBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -148,7 +148,7 @@ func (h *DeleteBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para return bind.NewDeleteBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewDeleteBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -186,7 +186,7 @@ func (h *GetBindHandlerImpl) Handle(parentType cnconstants.CnParentType, params return bind.NewGetBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewGetBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -212,7 +212,7 @@ func (h *GetAllBindHandlerImpl) Handle(parentType cnconstants.CnParentType, para return bind.NewGetAllBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewGetAllBindFrontendDefault(int(*e.Code)).WithPayload(e) @@ -255,7 +255,7 @@ func (h *ReplaceBindHandlerImpl) Handle(parentType cnconstants.CnParentType, par return bind.NewReplaceBindFrontendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := bindTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := bindTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return bind.NewReplaceBindFrontendDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/consul.go b/handlers/consul.go index 7f759204..87f00ce6 100644 --- a/handlers/consul.go +++ b/handlers/consul.go @@ -65,8 +65,8 @@ func (c *CreateConsulHandlerImpl) Handle(params service_discovery.CreateConsulPa } if params.Data.HealthCheckPolicy != nil && *params.Data.HealthCheckPolicy == models.ConsulHealthCheckPolicyMin && params.Data.HealthCheckPolicyMin <= 0 { e := &models.Error{ - Message: misc.StringP("health_check_policy_min is required for 'min' health_check_policy"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("health_check_policy_min is required for 'min' health_check_policy"), + Code: new(misc.ErrHTTPBadRequest), } return service_discovery.NewCreateConsulDefault(int(*e.Code)).WithPayload(e) } @@ -141,8 +141,8 @@ func (c *ReplaceConsulHandlerImpl) Handle(params service_discovery.ReplaceConsul } if params.Data.HealthCheckPolicy != nil && *params.Data.HealthCheckPolicy == models.ConsulHealthCheckPolicyMin && params.Data.HealthCheckPolicyMin <= 0 { e := &models.Error{ - Message: misc.StringP("health_check_policy_min is required for 'min' health_check_policy"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("health_check_policy_min is required for 'min' health_check_policy"), + Code: new(misc.ErrHTTPBadRequest), } return service_discovery.NewCreateConsulDefault(int(*e.Code)).WithPayload(e) } diff --git a/handlers/fcgi_app.go b/handlers/fcgi_app.go index 5d182cab..2dbed5b9 100644 --- a/handlers/fcgi_app.go +++ b/handlers/fcgi_app.go @@ -44,7 +44,7 @@ func (c CreateFCGIAppHandlerImpl) Handle(params fcgi_app.CreateFCGIAppParams, _ code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -104,7 +104,7 @@ func (d DeleteFCGIAppHandlerImpl) Handle(params fcgi_app.DeleteFCGIAppParams, _ code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -224,7 +224,7 @@ func (r ReplaceFCGIAppHandlerImpl) Handle(params fcgi_app.ReplaceFCGIAppParams, code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } diff --git a/handlers/general_storage.go b/handlers/general_storage.go index eea32d87..d8970144 100644 --- a/handlers/general_storage.go +++ b/handlers/general_storage.go @@ -19,6 +19,7 @@ import ( "bufio" "fmt" "io" + "net/http" "os" "path/filepath" "strings" @@ -41,8 +42,8 @@ type StorageCreateStorageGeneralFileHandlerImpl struct { func (h *StorageCreateStorageGeneralFileHandlerImpl) Handle(params storage.CreateStorageGeneralFileParams, principal any) middleware.Responder { if params.FileUpload == nil { e := &models.Error{ - Code: misc.Int64P(400), - Message: misc.StringP("No file_upload form param specified"), + Code: new(int64(http.StatusBadRequest)), + Message: new("No file_upload form param specified"), } return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) } @@ -199,8 +200,8 @@ func (h *StorageReplaceStorageGeneralFileHandlerImpl) Handle(params storage.Repl if params.FileUpload == nil { e := &models.Error{ - Code: misc.Int64P(400), - Message: misc.StringP("No file_upload form param specified"), + Code: new(int64(http.StatusBadRequest)), + Message: new("No file_upload form param specified"), } return storage.NewReplaceStorageGeneralFileBadRequest().WithPayload(e) } diff --git a/handlers/http_after_response_rule.go b/handlers/http_after_response_rule.go index 9a58c44a..9aeedc22 100644 --- a/handlers/http_after_response_rule.go +++ b/handlers/http_after_response_rule.go @@ -1,6 +1,8 @@ package handlers import ( + "net/http" + "github.com/go-openapi/runtime/middleware" client_native "github.com/haproxytech/client-native/v6" "github.com/haproxytech/client-native/v6/models" @@ -29,8 +31,8 @@ func (c CreateHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.Cn if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return http_after_response_rule.NewCreateHTTPAfterResponseRuleBackendDefault(int(*e.Code)).WithPayload(e) } @@ -80,8 +82,8 @@ func (d DeleteHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.Cn if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return http_after_response_rule.NewDeleteHTTPAfterResponseRuleBackendDefault(int(*e.Code)).WithPayload(e) } @@ -183,8 +185,8 @@ func (r ReplaceHTTPAfterResponseRuleHandlerImpl) Handle(parentType cnconstants.C if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return http_after_response_rule.NewReplaceHTTPAfterResponseRuleBackendDefault(int(*e.Code)).WithPayload(e) } diff --git a/handlers/program.go b/handlers/program.go index 915db1a4..058aad8c 100644 --- a/handlers/program.go +++ b/handlers/program.go @@ -43,7 +43,7 @@ func (d DeleteProgramHandlerImpl) Handle(params process_manager.DeleteProgramPar code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -98,7 +98,7 @@ func (c CreateProgramHandlerImpl) Handle(params process_manager.CreateProgramPar code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } @@ -210,7 +210,7 @@ func (r ReplaceProgramHandlerImpl) Handle(params process_manager.ReplaceProgramP code := misc.ErrHTTPBadRequest e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), + Message: new("Both force_reload and transaction specified, specify only one"), Code: &code, } diff --git a/handlers/quic_initial_rule.go b/handlers/quic_initial_rule.go index a6c6493e..7b9c4a37 100644 --- a/handlers/quic_initial_rule.go +++ b/handlers/quic_initial_rule.go @@ -1,6 +1,8 @@ package handlers import ( + "net/http" + "github.com/go-openapi/runtime/middleware" client_native "github.com/haproxytech/client-native/v6" "github.com/haproxytech/client-native/v6/models" @@ -29,8 +31,8 @@ func (c CreateQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParent if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return quic_initial_rule.NewCreateQUICInitialRuleFrontendDefault(int(*e.Code)).WithPayload(e) } @@ -80,8 +82,8 @@ func (d DeleteQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParent if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return quic_initial_rule.NewDeleteQUICInitialRuleFrontendDefault(int(*e.Code)).WithPayload(e) } @@ -183,8 +185,8 @@ func (r ReplaceQUICInitialRuleHandlerImpl) Handle(parentType cnconstants.CnParen if t != "" && *params.ForceReload { e := &models.Error{ - Message: misc.StringP("Both force_reload and transaction specified, specify only one"), - Code: misc.Int64P(int(misc.ErrHTTPBadRequest)), + Message: new("Both force_reload and transaction specified, specify only one"), + Code: new(int64(http.StatusBadRequest)), } return quic_initial_rule.NewReplaceQUICInitialRuleFrontendDefault(int(*e.Code)).WithPayload(e) } diff --git a/handlers/raw.go b/handlers/raw.go index 01fe1e05..e839df99 100644 --- a/handlers/raw.go +++ b/handlers/raw.go @@ -222,6 +222,9 @@ func executeRuntimeActions(actionsStr string, client client_native.HAProxyClient continue } action := params[0] + if action == "" { + continue + } switch action { case "SetFrontendMaxConn": if len(params) > 2 { diff --git a/handlers/runtime_server.go b/handlers/runtime_server.go index 71370de1..78c65699 100644 --- a/handlers/runtime_server.go +++ b/handlers/runtime_server.go @@ -17,6 +17,7 @@ package handlers import ( "fmt" + "strconv" "strings" "github.com/go-openapi/runtime/middleware" @@ -122,24 +123,80 @@ func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeSer return server.NewReplaceRuntimeServerNotFound().WithPayload(&models.Error{Code: &code, Message: &msg}) } + // save original values for rollback + origOperationalState := rs.OperationalState + origAdminState := rs.AdminState + origWeight := rs.Weight + + var changedOperational, changedAdmin, changedWeight bool + // change operational state if params.Data.OperationalState != "" && rs.OperationalState != params.Data.OperationalState { - err = runtime.SetServerHealth(params.ParentName, params.Name, params.Data.OperationalState) - if err != nil { + if err = runtime.SetServerHealth(params.ParentName, params.Name, params.Data.OperationalState); err != nil { e := misc.HandleError(err) return server.NewReplaceRuntimeServerDefault(int(*e.Code)).WithPayload(e) } + changedOperational = true } // change admin state if params.Data.AdminState != "" && rs.AdminState != params.Data.AdminState { - err = runtime.SetServerState(params.ParentName, params.Name, params.Data.AdminState) - if err != nil { + if err = runtime.SetServerState(params.ParentName, params.Name, params.Data.AdminState); err != nil { + e := misc.HandleError(err) + if changedOperational { + //nolint:errcheck + runtime.SetServerHealth(params.ParentName, params.Name, origOperationalState) + } + return server.NewReplaceRuntimeServerDefault(int(*e.Code)).WithPayload(e) + } + changedAdmin = true + } + + // change weight + if params.Data.Weight != nil && (rs.Weight == nil || *params.Data.Weight != *rs.Weight) { + if err = runtime.SetServerWeight(params.ParentName, params.Name, strconv.FormatInt(*params.Data.Weight, 10)); err != nil { e := misc.HandleError(err) + if changedAdmin { + //nolint:errcheck + runtime.SetServerState(params.ParentName, params.Name, origAdminState) + } + if changedOperational { + //nolint:errcheck + runtime.SetServerHealth(params.ParentName, params.Name, origOperationalState) + } + return server.NewReplaceRuntimeServerDefault(int(*e.Code)).WithPayload(e) + } + changedWeight = true + } - // try to revert operational state and fall silently - //nolint:errcheck - runtime.SetServerHealth(params.ParentName, params.Name, rs.OperationalState) + // change address/port + addrChanged := params.Data.Address != "" && rs.Address != params.Data.Address + portChanged := params.Data.Port != nil && (rs.Port == nil || *params.Data.Port != *rs.Port) + if addrChanged || portChanged { + newAddr := rs.Address + if params.Data.Address != "" { + newAddr = params.Data.Address + } + var newPort int + if params.Data.Port != nil { + newPort = int(*params.Data.Port) + } else if rs.Port != nil { + newPort = int(*rs.Port) + } + if err = runtime.SetServerAddr(params.ParentName, params.Name, newAddr, newPort); err != nil { + e := misc.HandleError(err) + if changedWeight { + //nolint:errcheck + runtime.SetServerWeight(params.ParentName, params.Name, formatWeightPtr(origWeight)) + } + if changedAdmin { + //nolint:errcheck + runtime.SetServerState(params.ParentName, params.Name, origAdminState) + } + if changedOperational { + //nolint:errcheck + runtime.SetServerHealth(params.ParentName, params.Name, origOperationalState) + } return server.NewReplaceRuntimeServerDefault(int(*e.Code)).WithPayload(e) } } @@ -153,6 +210,13 @@ func (h *ReplaceRuntimeServerHandlerImpl) Handle(params server.ReplaceRuntimeSer return server.NewReplaceRuntimeServerOK().WithPayload(rs) } +func formatWeightPtr(w *int64) string { + if w == nil { + return "0" + } + return strconv.FormatInt(*w, 10) +} + // Adds a new server dynamically without modifying the configuration. // Warning: this only works if you have not defined a `default_server` in the defaults // or in the current `backend` section. diff --git a/handlers/runtime_server_test.go b/handlers/runtime_server_test.go index 8b39597f..285f2011 100644 --- a/handlers/runtime_server_test.go +++ b/handlers/runtime_server_test.go @@ -5,7 +5,6 @@ import ( "github.com/haproxytech/client-native/v6/models" cn_runtime "github.com/haproxytech/client-native/v6/runtime" - "github.com/haproxytech/dataplaneapi/misc" ) func TestSerializeRuntimeAddServer(t *testing.T) { @@ -19,7 +18,7 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "basic server", srv: &models.RuntimeAddServer{ Address: "127.0.0.1", - Port: misc.Int64P(8080), + Port: new(int64(8080)), }, version: &cn_runtime.HAProxyVersion{}, want: " 127.0.0.1:8080", @@ -28,8 +27,8 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "server with weight", srv: &models.RuntimeAddServer{ Address: "192.168.1.100", - Port: misc.Int64P(9000), - Weight: misc.Int64P(50), + Port: new(int64(9000)), + Weight: new(int64(50)), }, version: &cn_runtime.HAProxyVersion{}, want: " 192.168.1.100:9000 weight 50", @@ -87,14 +86,14 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "server with multiple options", srv: &models.RuntimeAddServer{ Address: "10.1.1.10", - Port: misc.Int64P(80), - Weight: misc.Int64P(10), + Port: new(int64(80)), + Weight: new(int64(10)), Check: "enabled", Backup: "enabled", Maintenance: "enabled", AgentCheck: "enabled", AgentAddr: "127.0.0.1", - AgentPort: misc.Int64P(5000), + AgentPort: new(int64(5000)), HealthCheckAddress: "127.0.0.2", }, version: &cn_runtime.HAProxyVersion{}, @@ -104,15 +103,15 @@ func TestSerializeRuntimeAddServer(t *testing.T) { name: "server with all fields", srv: &models.RuntimeAddServer{ Address: "10.1.1.10", - Port: misc.Int64P(80), - Weight: misc.Int64P(10), + Port: new(int64(80)), + Weight: new(int64(10)), Check: "enabled", Backup: "enabled", Maintenance: "enabled", AgentCheck: "enabled", AgentAddr: "127.0.0.1", - AgentPort: misc.Int64P(5000), - AgentInter: misc.Int64P(1000), + AgentPort: new(int64(5000)), + AgentInter: new(int64(1000)), AgentSend: "foobar", Allow0rtt: true, Alpn: "h2,http/1.1", @@ -126,22 +125,22 @@ func TestSerializeRuntimeAddServer(t *testing.T) { Ciphersuites: "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256", CrlFile: "/path/to/crl.pem", SslCertificate: "/path/to/cert.pem", - Downinter: misc.Int64P(2000), - ErrorLimit: misc.Int64P(10), - Fall: misc.Int64P(2), - Fastinter: misc.Int64P(500), + Downinter: new(int64(2000)), + ErrorLimit: new(int64(10)), + Fall: new(int64(2)), + Fastinter: new(int64(500)), ForceSslv3: "enabled", ForceTlsv10: "enabled", ForceTlsv11: "enabled", ForceTlsv12: "enabled", ForceTlsv13: "enabled", HealthCheckAddress: "127.0.0.2", - HealthCheckPort: misc.Int64P(8080), - Inter: misc.Int64P(3000), - Maxconn: misc.Int64P(100), - Maxqueue: misc.Int64P(200), - Minconn: misc.Int64P(50), - Rise: misc.Int64P(1), + HealthCheckPort: new(int64(8080)), + Inter: new(int64(3000)), + Maxconn: new(int64(100)), + Maxqueue: new(int64(200)), + Minconn: new(int64(50)), + Rise: new(int64(1)), }, version: &cn_runtime.HAProxyVersion{}, want: ` 10.1.1.10:80 agent-check agent-addr 127.0.0.1 agent-port 5000 agent-inter 1000 agent-send foobar allow-0rtt alpn h2,http/1.1 backup check check-alpn h2 addr 127.0.0.2 port 8080 check-proto HTTP check-send-proxy check-sni example.com check-ssl check-via-socks4 ciphers HIGH:!aNULL:!MD5 ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256 crl-file /path/to/crl.pem crt /path/to/cert.pem disabled downinter 2000 error-limit 10 fall 2 fastinter 500 force-sslv3 force-tlsv10 force-tlsv11 force-tlsv12 force-tlsv13 inter 3000 maxconn 100 maxqueue 200 minconn 50 rise 1 weight 10`, diff --git a/handlers/server.go b/handlers/server.go index 1377daf3..541342db 100644 --- a/handlers/server.go +++ b/handlers/server.go @@ -99,7 +99,7 @@ func (h *CreateServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewCreateServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewCreateServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -187,7 +187,7 @@ func (h *DeleteServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewDeleteServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewDeleteServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -227,7 +227,7 @@ func (h *GetServerHandlerImpl) Handle(parentType cnconstants.CnParentType, param return server.NewGetServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewGetServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -254,7 +254,7 @@ func (h *GetAllServerHandlerImpl) Handle(parentType cnconstants.CnParentType, pa return server.NewGetAllServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewGetAllServerBackendDefault(int(*e.Code)).WithPayload(e) @@ -298,7 +298,7 @@ func (h *ReplaceServerHandlerImpl) Handle(parentType cnconstants.CnParentType, p return server.NewReplaceServerBackendDefault(int(*e.Code)).WithPayload(e) } - pType, pName, err := serverTypeParams(nil, misc.StringP(string(parentType)), ¶ms.ParentName) + pType, pName, err := serverTypeParams(nil, new(string(parentType)), ¶ms.ParentName) if err != nil { e := misc.HandleError(err) return server.NewReplaceServerBackendDefault(int(*e.Code)).WithPayload(e) diff --git a/handlers/spoe_transaction.go b/handlers/spoe_transaction.go index d545b7f0..19e83d09 100644 --- a/handlers/spoe_transaction.go +++ b/handlers/spoe_transaction.go @@ -141,7 +141,7 @@ func (h *SpoeTransactionsGetAllSpoeTransactionHandlerImpl) Handle(params spoe_tr return spoe_transactions.NewGetAllSpoeTransactionDefault(int(*e.Code)).WithPayload(e) } var ms models.SpoeTransactions - if *ts != nil && len(*ts) > 0 { + if len(*ts) > 0 { for _, t := range *ts { m := &models.SpoeTransaction{ Version: t.Version, diff --git a/handlers/ssl_cert_storage.go b/handlers/ssl_cert_storage.go index 9f4100a1..c5565ed6 100644 --- a/handlers/ssl_cert_storage.go +++ b/handlers/ssl_cert_storage.go @@ -214,7 +214,7 @@ func (h *StorageReplaceStorageSSLCertificateHandlerImpl) Handle(params storage.R File: filename, Description: "managed SSL file", StorageName: filepath.Base(filename), - Size: misc.Int64P(len(params.Data)), + Size: new(int64(len(params.Data))), NotAfter: (*strfmt.DateTime)(info.NotAfter), NotBefore: (*strfmt.DateTime)(info.NotBefore), Issuers: info.Issuers, diff --git a/handlers/ssl_crt_list_storage.go b/handlers/ssl_crt_list_storage.go index 2c8e8a53..9c62895d 100644 --- a/handlers/ssl_crt_list_storage.go +++ b/handlers/ssl_crt_list_storage.go @@ -190,7 +190,7 @@ func (h *StorageReplaceStorageSSLCrtListFileHandlerImpl) Handle(params storage.R File: filename, Description: "managed certificate list", StorageName: filepath.Base(filename), - Size: misc.Int64P(len(params.Data)), + Size: new(int64(len(params.Data))), } skipReload := false diff --git a/handlers/transaction.go b/handlers/transaction.go index 1c496862..97d552cc 100644 --- a/handlers/transaction.go +++ b/handlers/transaction.go @@ -89,7 +89,7 @@ func (h *DeleteTransactionHandlerImpl) Handle(params transactions.DeleteTransact if err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewDeleteTransactionDefault(int(*e.Code)).WithPayload(e) @@ -108,7 +108,7 @@ func (h *GetTransactionHandlerImpl) Handle(params transactions.GetTransactionPar if err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewGetTransactionsDefault(int(*e.Code)).WithPayload(e) @@ -155,7 +155,7 @@ func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransact if transaction, err = configuration.GetTransaction(params.ID); err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewCommitTransactionDefault(int(*e.Code)).WithPayload(e) @@ -172,7 +172,7 @@ func (h *CommitTransactionHandlerImpl) Handle(params transactions.CommitTransact if err != nil { e := misc.HandleError(err) if strings.HasSuffix(*e.Message, "does not exist") { - e.Code = misc.Int64P(404) + e.Code = new(int64(404)) return transactions.NewDeleteTransactionNotFound().WithPayload(e) } return transactions.NewCommitTransactionDefault(int(*e.Code)).WithPayload(e) diff --git a/misc/misc.go b/misc/misc.go index 31ecc8a6..294c3f65 100644 --- a/misc/misc.go +++ b/misc/misc.go @@ -102,6 +102,8 @@ func HandleError(err error) *models.Error { code := ErrHTTPInternalServerError if errors.Is(t, client_errors.ErrNotFound) { code = ErrHTTPNotFound + } else if errors.Is(t, client_errors.ErrAlreadyExists) { + code = ErrHTTPConflict } return &models.Error{Code: &code, Message: &msg} } @@ -226,24 +228,11 @@ func GetHTTPStatusFromErr(err error) int { func SetError(code int, msg string) *models.Error { return &models.Error{ - Code: Int64P(code), - Message: StringP(msg), + Code: new(int64(code)), + Message: new(msg), } } -func StringP(s string) *string { - return &s -} - -func Int64P(i int) *int64 { - i64 := int64(i) - return &i64 -} - -func PtrTo[T any](v T) *T { - return &v -} - // extractEnvVar extracts and returns env variable from HAProxy variable // provided in "${SOME_VAR}" format func ExtractEnvVar(pass string) string { diff --git a/operations/acl/create_acl_backend_parameters.go b/operations/acl/create_acl_backend_parameters.go index 4cc2c5db..bc9984e0 100644 --- a/operations/acl/create_acl_backend_parameters.go +++ b/operations/acl/create_acl_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/create_acl_defaults_parameters.go b/operations/acl/create_acl_defaults_parameters.go index f1768048..1649d1fa 100644 --- a/operations/acl/create_acl_defaults_parameters.go +++ b/operations/acl/create_acl_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLDefaultsParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/create_acl_fcgi_app_parameters.go b/operations/acl/create_acl_fcgi_app_parameters.go index b4dc7d85..4e3c9ca1 100644 --- a/operations/acl/create_acl_fcgi_app_parameters.go +++ b/operations/acl/create_acl_fcgi_app_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/create_acl_frontend_parameters.go b/operations/acl/create_acl_frontend_parameters.go index aad64edf..92d8ac3a 100644 --- a/operations/acl/create_acl_frontend_parameters.go +++ b/operations/acl/create_acl_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_backend_parameters.go b/operations/acl/delete_acl_backend_parameters.go index 0227d37b..6691ab8d 100644 --- a/operations/acl/delete_acl_backend_parameters.go +++ b/operations/acl/delete_acl_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLBackendParams creates a new DeleteACLBackendParams object @@ -66,6 +67,7 @@ type DeleteACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_defaults_parameters.go b/operations/acl/delete_acl_defaults_parameters.go index 8f069b4e..caf180b0 100644 --- a/operations/acl/delete_acl_defaults_parameters.go +++ b/operations/acl/delete_acl_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLDefaultsParams creates a new DeleteACLDefaultsParams object @@ -66,6 +67,7 @@ type DeleteACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLDefaultsParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_fcgi_app_parameters.go b/operations/acl/delete_acl_fcgi_app_parameters.go index 41120243..484f14d5 100644 --- a/operations/acl/delete_acl_fcgi_app_parameters.go +++ b/operations/acl/delete_acl_fcgi_app_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLFCGIAppParams creates a new DeleteACLFCGIAppParams object @@ -66,6 +67,7 @@ type DeleteACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/delete_acl_frontend_parameters.go b/operations/acl/delete_acl_frontend_parameters.go index f05ad3d2..b20e19aa 100644 --- a/operations/acl/delete_acl_frontend_parameters.go +++ b/operations/acl/delete_acl_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteACLFrontendParams creates a new DeleteACLFrontendParams object @@ -66,6 +67,7 @@ type DeleteACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_backend_parameters.go b/operations/acl/get_acl_backend_parameters.go index 34ac388e..3c19dec6 100644 --- a/operations/acl/get_acl_backend_parameters.go +++ b/operations/acl/get_acl_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLBackendParams creates a new GetACLBackendParams object @@ -54,6 +55,7 @@ type GetACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLBackendParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_defaults_parameters.go b/operations/acl/get_acl_defaults_parameters.go index 4a6cf33c..e1bef5c5 100644 --- a/operations/acl/get_acl_defaults_parameters.go +++ b/operations/acl/get_acl_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLDefaultsParams creates a new GetACLDefaultsParams object @@ -54,6 +55,7 @@ type GetACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLDefaultsParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_fcgi_app_parameters.go b/operations/acl/get_acl_fcgi_app_parameters.go index ce5ab160..9db4cb9e 100644 --- a/operations/acl/get_acl_fcgi_app_parameters.go +++ b/operations/acl/get_acl_fcgi_app_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLFCGIAppParams creates a new GetACLFCGIAppParams object @@ -54,6 +55,7 @@ type GetACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_acl_frontend_parameters.go b/operations/acl/get_acl_frontend_parameters.go index 1c850bdd..781b7b0c 100644 --- a/operations/acl/get_acl_frontend_parameters.go +++ b/operations/acl/get_acl_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetACLFrontendParams creates a new GetACLFrontendParams object @@ -54,6 +55,7 @@ type GetACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetACLFrontendParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_backend_parameters.go b/operations/acl/get_all_acl_backend_parameters.go index afe3db8f..071ef917 100644 --- a/operations/acl/get_all_acl_backend_parameters.go +++ b/operations/acl/get_all_acl_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLBackendParams creates a new GetAllACLBackendParams object @@ -52,6 +53,7 @@ type GetAllACLBackendParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_defaults_parameters.go b/operations/acl/get_all_acl_defaults_parameters.go index b1c06a7b..7e5d1564 100644 --- a/operations/acl/get_all_acl_defaults_parameters.go +++ b/operations/acl/get_all_acl_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLDefaultsParams creates a new GetAllACLDefaultsParams object @@ -52,6 +53,7 @@ type GetAllACLDefaultsParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLDefaultsParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_fcgi_app_parameters.go b/operations/acl/get_all_acl_fcgi_app_parameters.go index 16e39a18..677b08d8 100644 --- a/operations/acl/get_all_acl_fcgi_app_parameters.go +++ b/operations/acl/get_all_acl_fcgi_app_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLFCGIAppParams creates a new GetAllACLFCGIAppParams object @@ -52,6 +53,7 @@ type GetAllACLFCGIAppParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/get_all_acl_frontend_parameters.go b/operations/acl/get_all_acl_frontend_parameters.go index d3f51e84..3e89c440 100644 --- a/operations/acl/get_all_acl_frontend_parameters.go +++ b/operations/acl/get_all_acl_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllACLFrontendParams creates a new GetAllACLFrontendParams object @@ -52,6 +53,7 @@ type GetAllACLFrontendParams struct { ACLName *string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -121,6 +123,20 @@ func (o *GetAllACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_backend_parameters.go b/operations/acl/replace_acl_backend_parameters.go index b0c54444..ec1478d9 100644 --- a/operations/acl/replace_acl_backend_parameters.go +++ b/operations/acl/replace_acl_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLBackendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_defaults_parameters.go b/operations/acl/replace_acl_defaults_parameters.go index 30d95a54..75d7740f 100644 --- a/operations/acl/replace_acl_defaults_parameters.go +++ b/operations/acl/replace_acl_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLDefaultsParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_fcgi_app_parameters.go b/operations/acl/replace_acl_fcgi_app_parameters.go index b6ad5b8f..7ef73489 100644 --- a/operations/acl/replace_acl_fcgi_app_parameters.go +++ b/operations/acl/replace_acl_fcgi_app_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLFCGIAppParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLFCGIAppParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_acl_frontend_parameters.go b/operations/acl/replace_acl_frontend_parameters.go index e98e70a4..6124fa81 100644 --- a/operations/acl/replace_acl_frontend_parameters.go +++ b/operations/acl/replace_acl_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceACLFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceACLFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_backend_parameters.go b/operations/acl/replace_all_acl_backend_parameters.go index 4a34a42a..56a4018f 100644 --- a/operations/acl/replace_all_acl_backend_parameters.go +++ b/operations/acl/replace_all_acl_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLBackendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_defaults_parameters.go b/operations/acl/replace_all_acl_defaults_parameters.go index febfff9b..d2313dd5 100644 --- a/operations/acl/replace_all_acl_defaults_parameters.go +++ b/operations/acl/replace_all_acl_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLDefaultsParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_fcgi_app_parameters.go b/operations/acl/replace_all_acl_fcgi_app_parameters.go index c3b0d8d8..3fb88d12 100644 --- a/operations/acl/replace_all_acl_fcgi_app_parameters.go +++ b/operations/acl/replace_all_acl_fcgi_app_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLFCGIAppParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLFCGIAppParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLFCGIAppParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl/replace_all_acl_frontend_parameters.go b/operations/acl/replace_all_acl_frontend_parameters.go index 6bfd0e8c..2bb9aba5 100644 --- a/operations/acl/replace_all_acl_frontend_parameters.go +++ b/operations/acl/replace_all_acl_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllACLFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllACLFrontendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllACLFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/add_payload_runtime_acl_parameters.go b/operations/acl_runtime/add_payload_runtime_acl_parameters.go index c6db445d..f7870474 100644 --- a/operations/acl_runtime/add_payload_runtime_acl_parameters.go +++ b/operations/acl_runtime/add_payload_runtime_acl_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,6 +57,7 @@ type AddPayloadRuntimeACLParams struct { Data models.ACLFilesEntries /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -114,5 +116,19 @@ func (o *AddPayloadRuntimeACLParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *AddPayloadRuntimeACLParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go b/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go index b621688c..063ae270 100644 --- a/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go +++ b/operations/acl_runtime/delete_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams creates a new DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams object @@ -47,11 +48,13 @@ type DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams struct { /*File entry ID Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindID(rawDa // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindParentNa // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go b/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go index e9dfc131..a4bccfea 100644 --- a/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go +++ b/operations/acl_runtime/get_services_haproxy_runtime_acls_id_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServicesHaproxyRuntimeAclsIDParams creates a new GetServicesHaproxyRuntimeAclsIDParams object @@ -47,6 +48,7 @@ type GetServicesHaproxyRuntimeAclsIDParams struct { /*ACL file entry ID Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string @@ -82,5 +84,19 @@ func (o *GetServicesHaproxyRuntimeAclsIDParams) bindID(rawData []string, hasKey // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *GetServicesHaproxyRuntimeAclsIDParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go index d8e86e8e..9b861bb8 100644 --- a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go +++ b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_id_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServicesHaproxyRuntimeAclsParentNameEntriesIDParams creates a new GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams object @@ -47,11 +48,13 @@ type GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams struct { /*File entry ID Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindID(rawData // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) bindParentName( // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesIDParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go index db8ee71b..2fd221be 100644 --- a/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go +++ b/operations/acl_runtime/get_services_haproxy_runtime_acls_parent_name_entries_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServicesHaproxyRuntimeAclsParentNameEntriesParams creates a new GetServicesHaproxyRuntimeAclsParentNameEntriesParams object @@ -47,6 +48,7 @@ type GetServicesHaproxyRuntimeAclsParentNameEntriesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -82,5 +84,19 @@ func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesParams) bindParentName(ra // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServicesHaproxyRuntimeAclsParentNameEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go b/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go index ec3501af..015d5a9f 100644 --- a/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go +++ b/operations/acl_runtime/post_services_haproxy_runtime_acls_parent_name_entries_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,6 +57,7 @@ type PostServicesHaproxyRuntimeAclsParentNameEntriesParams struct { Data *models.ACLFileEntry /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -114,5 +116,19 @@ func (o *PostServicesHaproxyRuntimeAclsParentNameEntriesParams) bindParentName(r // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *PostServicesHaproxyRuntimeAclsParentNameEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/acme_runtime/renew_acme_certificate_parameters.go b/operations/acme_runtime/renew_acme_certificate_parameters.go index 7502ab8f..e718a32b 100644 --- a/operations/acme_runtime/renew_acme_certificate_parameters.go +++ b/operations/acme_runtime/renew_acme_certificate_parameters.go @@ -49,6 +49,7 @@ type RenewAcmeCertificateParams struct { /*Certificate file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Certificate string @@ -93,5 +94,19 @@ func (o *RenewAcmeCertificateParams) bindCertificate(rawData []string, hasKey bo } o.Certificate = raw + if err := o.validateCertificate(formats); err != nil { + return err + } + + return nil +} + +// validateCertificate carries on validations for parameter Certificate +func (o *RenewAcmeCertificateParams) validateCertificate(formats strfmt.Registry) error { + + if err := validate.Pattern("certificate", "query", o.Certificate, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/create_backend_switching_rule_parameters.go b/operations/backend_switching_rule/create_backend_switching_rule_parameters.go index 4c1370e7..7f1ce97f 100644 --- a/operations/backend_switching_rule/create_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/create_backend_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateBackendSwitchingRuleParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go b/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go index 73c9dd82..9fc20cc5 100644 --- a/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/delete_backend_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBackendSwitchingRuleParams creates a new DeleteBackendSwitchingRuleParams object @@ -66,6 +67,7 @@ type DeleteBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteBackendSwitchingRuleParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/get_backend_switching_rule_parameters.go b/operations/backend_switching_rule/get_backend_switching_rule_parameters.go index d8b2f113..225f93a7 100644 --- a/operations/backend_switching_rule/get_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/get_backend_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetBackendSwitchingRuleParams creates a new GetBackendSwitchingRuleParams object @@ -54,6 +55,7 @@ type GetBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetBackendSwitchingRuleParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/get_backend_switching_rules_parameters.go b/operations/backend_switching_rule/get_backend_switching_rules_parameters.go index a5a4c8ec..2a80982d 100644 --- a/operations/backend_switching_rule/get_backend_switching_rules_parameters.go +++ b/operations/backend_switching_rule/get_backend_switching_rules_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBackendSwitchingRulesParams creates a new GetBackendSwitchingRulesParams object @@ -48,6 +49,7 @@ type GetBackendSwitchingRulesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetBackendSwitchingRulesParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBackendSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go b/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go index 6b471636..37ce9176 100644 --- a/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go +++ b/operations/backend_switching_rule/replace_backend_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBackendSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceBackendSwitchingRuleParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBackendSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go b/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go index 9904b2f2..9a9de535 100644 --- a/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go +++ b/operations/backend_switching_rule/replace_backend_switching_rules_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceBackendSwitchingRulesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceBackendSwitchingRulesParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBackendSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/create_bind_frontend_parameters.go b/operations/bind/create_bind_frontend_parameters.go index c4859589..2950d706 100644 --- a/operations/bind/create_bind_frontend_parameters.go +++ b/operations/bind/create_bind_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateBindFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateBindFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/create_bind_log_forward_parameters.go b/operations/bind/create_bind_log_forward_parameters.go index 17e1ee63..a31f5a17 100644 --- a/operations/bind/create_bind_log_forward_parameters.go +++ b/operations/bind/create_bind_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateBindLogForwardParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateBindLogForwardParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/create_bind_peer_parameters.go b/operations/bind/create_bind_peer_parameters.go index 34d1976c..4e2013e2 100644 --- a/operations/bind/create_bind_peer_parameters.go +++ b/operations/bind/create_bind_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateBindPeerParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateBindPeerParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/delete_bind_frontend_parameters.go b/operations/bind/delete_bind_frontend_parameters.go index d50810b8..fc760fbe 100644 --- a/operations/bind/delete_bind_frontend_parameters.go +++ b/operations/bind/delete_bind_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBindFrontendParams creates a new DeleteBindFrontendParams object @@ -66,6 +67,7 @@ type DeleteBindFrontendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteBindFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/delete_bind_log_forward_parameters.go b/operations/bind/delete_bind_log_forward_parameters.go index 337ceb87..e36e7bef 100644 --- a/operations/bind/delete_bind_log_forward_parameters.go +++ b/operations/bind/delete_bind_log_forward_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBindLogForwardParams creates a new DeleteBindLogForwardParams object @@ -66,6 +67,7 @@ type DeleteBindLogForwardParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteBindLogForwardParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/delete_bind_peer_parameters.go b/operations/bind/delete_bind_peer_parameters.go index 9bbfd248..74263b8f 100644 --- a/operations/bind/delete_bind_peer_parameters.go +++ b/operations/bind/delete_bind_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteBindPeerParams creates a new DeleteBindPeerParams object @@ -66,6 +67,7 @@ type DeleteBindPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteBindPeerParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_all_bind_frontend_parameters.go b/operations/bind/get_all_bind_frontend_parameters.go index 69fb9cde..e9b6e502 100644 --- a/operations/bind/get_all_bind_frontend_parameters.go +++ b/operations/bind/get_all_bind_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllBindFrontendParams creates a new GetAllBindFrontendParams object @@ -48,6 +49,7 @@ type GetAllBindFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllBindFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_all_bind_log_forward_parameters.go b/operations/bind/get_all_bind_log_forward_parameters.go index 1559a030..7ed0968c 100644 --- a/operations/bind/get_all_bind_log_forward_parameters.go +++ b/operations/bind/get_all_bind_log_forward_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllBindLogForwardParams creates a new GetAllBindLogForwardParams object @@ -48,6 +49,7 @@ type GetAllBindLogForwardParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllBindLogForwardParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_all_bind_peer_parameters.go b/operations/bind/get_all_bind_peer_parameters.go index 38fedf4a..0e3c4eef 100644 --- a/operations/bind/get_all_bind_peer_parameters.go +++ b/operations/bind/get_all_bind_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllBindPeerParams creates a new GetAllBindPeerParams object @@ -48,6 +49,7 @@ type GetAllBindPeerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllBindPeerParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_bind_frontend_parameters.go b/operations/bind/get_bind_frontend_parameters.go index d321c349..6c1ce432 100644 --- a/operations/bind/get_bind_frontend_parameters.go +++ b/operations/bind/get_bind_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBindFrontendParams creates a new GetBindFrontendParams object @@ -53,6 +54,7 @@ type GetBindFrontendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetBindFrontendParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_bind_log_forward_parameters.go b/operations/bind/get_bind_log_forward_parameters.go index d3f4e63f..06f5a992 100644 --- a/operations/bind/get_bind_log_forward_parameters.go +++ b/operations/bind/get_bind_log_forward_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBindLogForwardParams creates a new GetBindLogForwardParams object @@ -53,6 +54,7 @@ type GetBindLogForwardParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetBindLogForwardParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/get_bind_peer_parameters.go b/operations/bind/get_bind_peer_parameters.go index 11b4d84d..71f32902 100644 --- a/operations/bind/get_bind_peer_parameters.go +++ b/operations/bind/get_bind_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetBindPeerParams creates a new GetBindPeerParams object @@ -53,6 +54,7 @@ type GetBindPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetBindPeerParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/replace_bind_frontend_parameters.go b/operations/bind/replace_bind_frontend_parameters.go index eae20d28..9fd3fc85 100644 --- a/operations/bind/replace_bind_frontend_parameters.go +++ b/operations/bind/replace_bind_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBindFrontendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceBindFrontendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBindFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/replace_bind_log_forward_parameters.go b/operations/bind/replace_bind_log_forward_parameters.go index 1b0316bd..6d106acb 100644 --- a/operations/bind/replace_bind_log_forward_parameters.go +++ b/operations/bind/replace_bind_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBindLogForwardParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceBindLogForwardParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBindLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/bind/replace_bind_peer_parameters.go b/operations/bind/replace_bind_peer_parameters.go index 7553bdef..335b82b8 100644 --- a/operations/bind/replace_bind_peer_parameters.go +++ b/operations/bind/replace_bind_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceBindPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceBindPeerParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceBindPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/crt_load/create_crt_load.go b/operations/crt_load/create_crt_load.go index 983a7b94..0321de72 100644 --- a/operations/crt_load/create_crt_load.go +++ b/operations/crt_load/create_crt_load.go @@ -45,7 +45,7 @@ func NewCreateCrtLoad(ctx *middleware.Context, handler CreateCrtLoadHandler) *Cr } /* - CreateCrtLoad swagger:route POST /services/haproxy/configuration/crt_loads CrtLoad createCrtLoad + CreateCrtLoad swagger:route POST /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads CrtLoad createCrtLoad # Add a new certificate to load diff --git a/operations/crt_load/create_crt_load_parameters.go b/operations/crt_load/create_crt_load_parameters.go index b42ab7c7..fcd8782e 100644 --- a/operations/crt_load/create_crt_load_parameters.go +++ b/operations/crt_load/create_crt_load_parameters.go @@ -29,7 +29,6 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -60,7 +59,7 @@ type CreateCrtLoadParams struct { /*Parent crt_store section name Required: true - In: query + In: path */ CrtStore string /* @@ -94,8 +93,8 @@ func (o *CreateCrtLoadParams) BindRequest(r *http.Request, route *middleware.Mat qs := runtime.Values(r.URL.Query()) - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -142,22 +141,15 @@ func (o *CreateCrtLoadParams) BindRequest(r *http.Request, route *middleware.Mat return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *CreateCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/create_crt_load_urlbuilder.go b/operations/crt_load/create_crt_load_urlbuilder.go index dd55a56d..86306092 100644 --- a/operations/crt_load/create_crt_load_urlbuilder.go +++ b/operations/crt_load/create_crt_load_urlbuilder.go @@ -24,13 +24,15 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" "github.com/go-openapi/swag" ) // CreateCrtLoadURL generates an URL for the create crt load operation type CreateCrtLoadURL struct { - CrtStore string + CrtStore string + ForceReload *bool TransactionID *string Version *int64 @@ -59,7 +61,14 @@ func (o *CreateCrtLoadURL) SetBasePath(bp string) { func (o *CreateCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads" + + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on CreateCrtLoadURL") + } _basePath := o._basePath if _basePath == "" { @@ -69,11 +78,6 @@ func (o *CreateCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var forceReloadQ string if o.ForceReload != nil { forceReloadQ = swag.FormatBool(*o.ForceReload) diff --git a/operations/crt_load/delete_crt_load.go b/operations/crt_load/delete_crt_load.go index 9010ee78..46bbf125 100644 --- a/operations/crt_load/delete_crt_load.go +++ b/operations/crt_load/delete_crt_load.go @@ -45,7 +45,7 @@ func NewDeleteCrtLoad(ctx *middleware.Context, handler DeleteCrtLoadHandler) *De } /* - DeleteCrtLoad swagger:route DELETE /services/haproxy/configuration/crt_loads/{certificate} CrtLoad deleteCrtLoad + DeleteCrtLoad swagger:route DELETE /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate} CrtLoad deleteCrtLoad # Delete a certificate load entry diff --git a/operations/crt_load/delete_crt_load_parameters.go b/operations/crt_load/delete_crt_load_parameters.go index 933bb82a..9474d4a1 100644 --- a/operations/crt_load/delete_crt_load_parameters.go +++ b/operations/crt_load/delete_crt_load_parameters.go @@ -28,7 +28,6 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" ) // NewDeleteCrtLoadParams creates a new DeleteCrtLoadParams object @@ -62,7 +61,7 @@ type DeleteCrtLoadParams struct { Certificate string /*Parent crt_store section name Required: true - In: query + In: path */ CrtStore string /*If set, do a force reload, do not wait for the configured reload-delay. Cannot be used when transaction is specified, as changes in transaction are not applied directly to configuration. @@ -96,8 +95,8 @@ func (o *DeleteCrtLoadParams) BindRequest(r *http.Request, route *middleware.Mat res = append(res, err) } - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -135,22 +134,15 @@ func (o *DeleteCrtLoadParams) bindCertificate(rawData []string, hasKey bool, for return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *DeleteCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/delete_crt_load_urlbuilder.go b/operations/crt_load/delete_crt_load_urlbuilder.go index a2f29b39..5d4893dc 100644 --- a/operations/crt_load/delete_crt_load_urlbuilder.go +++ b/operations/crt_load/delete_crt_load_urlbuilder.go @@ -32,8 +32,8 @@ import ( // DeleteCrtLoadURL generates an URL for the delete crt load operation type DeleteCrtLoadURL struct { Certificate string + CrtStore string - CrtStore string ForceReload *bool TransactionID *string Version *int64 @@ -62,7 +62,7 @@ func (o *DeleteCrtLoadURL) SetBasePath(bp string) { func (o *DeleteCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads/{certificate}" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}" certificate := o.Certificate if certificate != "" { @@ -71,6 +71,13 @@ func (o *DeleteCrtLoadURL) Build() (*url.URL, error) { return nil, errors.New("certificate is required on DeleteCrtLoadURL") } + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on DeleteCrtLoadURL") + } + _basePath := o._basePath if _basePath == "" { _basePath = "/v3" @@ -79,11 +86,6 @@ func (o *DeleteCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var forceReloadQ string if o.ForceReload != nil { forceReloadQ = swag.FormatBool(*o.ForceReload) diff --git a/operations/crt_load/get_crt_load.go b/operations/crt_load/get_crt_load.go index 8645a381..aea645fd 100644 --- a/operations/crt_load/get_crt_load.go +++ b/operations/crt_load/get_crt_load.go @@ -45,7 +45,7 @@ func NewGetCrtLoad(ctx *middleware.Context, handler GetCrtLoadHandler) *GetCrtLo } /* - GetCrtLoad swagger:route GET /services/haproxy/configuration/crt_loads/{certificate} CrtLoad getCrtLoad + GetCrtLoad swagger:route GET /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate} CrtLoad getCrtLoad # Return one certificate load entry diff --git a/operations/crt_load/get_crt_load_parameters.go b/operations/crt_load/get_crt_load_parameters.go index 3f1e4603..36461a8a 100644 --- a/operations/crt_load/get_crt_load_parameters.go +++ b/operations/crt_load/get_crt_load_parameters.go @@ -27,7 +27,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" ) // NewGetCrtLoadParams creates a new GetCrtLoadParams object @@ -54,7 +53,7 @@ type GetCrtLoadParams struct { Certificate string /*Parent crt_store name Required: true - In: query + In: path */ CrtStore string /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. @@ -79,8 +78,8 @@ func (o *GetCrtLoadParams) BindRequest(r *http.Request, route *middleware.Matche res = append(res, err) } - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -108,22 +107,15 @@ func (o *GetCrtLoadParams) bindCertificate(rawData []string, hasKey bool, format return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *GetCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/get_crt_load_urlbuilder.go b/operations/crt_load/get_crt_load_urlbuilder.go index 85418e77..500b3d66 100644 --- a/operations/crt_load/get_crt_load_urlbuilder.go +++ b/operations/crt_load/get_crt_load_urlbuilder.go @@ -30,8 +30,8 @@ import ( // GetCrtLoadURL generates an URL for the get crt load operation type GetCrtLoadURL struct { Certificate string + CrtStore string - CrtStore string TransactionID *string _basePath string @@ -58,7 +58,7 @@ func (o *GetCrtLoadURL) SetBasePath(bp string) { func (o *GetCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads/{certificate}" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}" certificate := o.Certificate if certificate != "" { @@ -67,6 +67,13 @@ func (o *GetCrtLoadURL) Build() (*url.URL, error) { return nil, errors.New("certificate is required on GetCrtLoadURL") } + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on GetCrtLoadURL") + } + _basePath := o._basePath if _basePath == "" { _basePath = "/v3" @@ -75,11 +82,6 @@ func (o *GetCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_load/get_crt_loads.go b/operations/crt_load/get_crt_loads.go index 92f750fe..a31d8450 100644 --- a/operations/crt_load/get_crt_loads.go +++ b/operations/crt_load/get_crt_loads.go @@ -45,7 +45,7 @@ func NewGetCrtLoads(ctx *middleware.Context, handler GetCrtLoadsHandler) *GetCrt } /* - GetCrtLoads swagger:route GET /services/haproxy/configuration/crt_loads CrtLoad getCrtLoads + GetCrtLoads swagger:route GET /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads CrtLoad getCrtLoads # Return an array of loaded certificates diff --git a/operations/crt_load/get_crt_loads_parameters.go b/operations/crt_load/get_crt_loads_parameters.go index 8df3b42b..15f88eea 100644 --- a/operations/crt_load/get_crt_loads_parameters.go +++ b/operations/crt_load/get_crt_loads_parameters.go @@ -27,7 +27,6 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" ) // NewGetCrtLoadsParams creates a new GetCrtLoadsParams object @@ -49,7 +48,7 @@ type GetCrtLoadsParams struct { /*Parent crt_store name Required: true - In: query + In: path */ CrtStore string /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. @@ -69,8 +68,8 @@ func (o *GetCrtLoadsParams) BindRequest(r *http.Request, route *middleware.Match qs := runtime.Values(r.URL.Query()) - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -84,22 +83,15 @@ func (o *GetCrtLoadsParams) BindRequest(r *http.Request, route *middleware.Match return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *GetCrtLoadsParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/get_crt_loads_urlbuilder.go b/operations/crt_load/get_crt_loads_urlbuilder.go index d7d9dc24..0f639444 100644 --- a/operations/crt_load/get_crt_loads_urlbuilder.go +++ b/operations/crt_load/get_crt_loads_urlbuilder.go @@ -24,11 +24,13 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) // GetCrtLoadsURL generates an URL for the get crt loads operation type GetCrtLoadsURL struct { - CrtStore string + CrtStore string + TransactionID *string _basePath string @@ -55,7 +57,14 @@ func (o *GetCrtLoadsURL) SetBasePath(bp string) { func (o *GetCrtLoadsURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads" + + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on GetCrtLoadsURL") + } _basePath := o._basePath if _basePath == "" { @@ -65,11 +74,6 @@ func (o *GetCrtLoadsURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_load/replace_crt_load.go b/operations/crt_load/replace_crt_load.go index 3947740f..9d26ef17 100644 --- a/operations/crt_load/replace_crt_load.go +++ b/operations/crt_load/replace_crt_load.go @@ -45,7 +45,7 @@ func NewReplaceCrtLoad(ctx *middleware.Context, handler ReplaceCrtLoadHandler) * } /* - ReplaceCrtLoad swagger:route PUT /services/haproxy/configuration/crt_loads/{certificate} CrtLoad replaceCrtLoad + ReplaceCrtLoad swagger:route PUT /services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate} CrtLoad replaceCrtLoad # Replace a certificate load entry diff --git a/operations/crt_load/replace_crt_load_parameters.go b/operations/crt_load/replace_crt_load_parameters.go index a02980b1..36c25f2d 100644 --- a/operations/crt_load/replace_crt_load_parameters.go +++ b/operations/crt_load/replace_crt_load_parameters.go @@ -29,7 +29,6 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" - "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -65,7 +64,7 @@ type ReplaceCrtLoadParams struct { Certificate string /*Parent crt_store section name Required: true - In: query + In: path */ CrtStore string /* @@ -104,8 +103,8 @@ func (o *ReplaceCrtLoadParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } - qCrtStore, qhkCrtStore, _ := qs.GetOK("crt_store") - if err := o.bindCrtStore(qCrtStore, qhkCrtStore, route.Formats); err != nil { + rCrtStore, rhkCrtStore, _ := route.Params.GetOK("crt_store") + if err := o.bindCrtStore(rCrtStore, rhkCrtStore, route.Formats); err != nil { res = append(res, err) } @@ -166,22 +165,15 @@ func (o *ReplaceCrtLoadParams) bindCertificate(rawData []string, hasKey bool, fo return nil } -// bindCrtStore binds and validates parameter CrtStore from query. +// bindCrtStore binds and validates parameter CrtStore from path. func (o *ReplaceCrtLoadParams) bindCrtStore(rawData []string, hasKey bool, formats strfmt.Registry) error { - if !hasKey { - return errors.Required("crt_store", "query", rawData) - } var raw string if len(rawData) > 0 { raw = rawData[len(rawData)-1] } // Required: true - // AllowEmptyValue: false - - if err := validate.RequiredString("crt_store", "query", raw); err != nil { - return err - } + // Parameter is provided by construction from the route o.CrtStore = raw return nil diff --git a/operations/crt_load/replace_crt_load_urlbuilder.go b/operations/crt_load/replace_crt_load_urlbuilder.go index 8fbfad4b..a3d8b716 100644 --- a/operations/crt_load/replace_crt_load_urlbuilder.go +++ b/operations/crt_load/replace_crt_load_urlbuilder.go @@ -32,8 +32,8 @@ import ( // ReplaceCrtLoadURL generates an URL for the replace crt load operation type ReplaceCrtLoadURL struct { Certificate string + CrtStore string - CrtStore string ForceReload *bool TransactionID *string Version *int64 @@ -62,7 +62,7 @@ func (o *ReplaceCrtLoadURL) SetBasePath(bp string) { func (o *ReplaceCrtLoadURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/services/haproxy/configuration/crt_loads/{certificate}" + var _path = "/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}" certificate := o.Certificate if certificate != "" { @@ -71,6 +71,13 @@ func (o *ReplaceCrtLoadURL) Build() (*url.URL, error) { return nil, errors.New("certificate is required on ReplaceCrtLoadURL") } + crtStore := o.CrtStore + if crtStore != "" { + _path = strings.Replace(_path, "{crt_store}", crtStore, -1) + } else { + return nil, errors.New("crtStore is required on ReplaceCrtLoadURL") + } + _basePath := o._basePath if _basePath == "" { _basePath = "/v3" @@ -79,11 +86,6 @@ func (o *ReplaceCrtLoadURL) Build() (*url.URL, error) { qs := make(url.Values) - crtStoreQ := o.CrtStore - if crtStoreQ != "" { - qs.Set("crt_store", crtStoreQ) - } - var forceReloadQ string if o.ForceReload != nil { forceReloadQ = swag.FormatBool(*o.ForceReload) diff --git a/operations/crt_store/create_crt_store_parameters.go b/operations/crt_store/create_crt_store_parameters.go index 74f66a48..0da9cb92 100644 --- a/operations/crt_store/create_crt_store_parameters.go +++ b/operations/crt_store/create_crt_store_parameters.go @@ -41,10 +41,13 @@ func NewCreateCrtStoreParams() CreateCrtStoreParams { // initialize parameters with default values forceReloadDefault = bool(false) + fullSectionDefault = bool(false) ) return CreateCrtStoreParams{ ForceReload: &forceReloadDefault, + + FullSection: &fullSectionDefault, } } @@ -67,6 +70,11 @@ type CreateCrtStoreParams struct { Default: false */ ForceReload *bool + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. In: query */ @@ -116,6 +124,11 @@ func (o *CreateCrtStoreParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + qTransactionID, qhkTransactionID, _ := qs.GetOK("transaction_id") if err := o.bindTransactionID(qTransactionID, qhkTransactionID, route.Formats); err != nil { res = append(res, err) @@ -155,6 +168,30 @@ func (o *CreateCrtStoreParams) bindForceReload(rawData []string, hasKey bool, fo return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *CreateCrtStoreParams) bindFullSection(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewCreateCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindTransactionID binds and validates parameter TransactionID from query. func (o *CreateCrtStoreParams) bindTransactionID(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/create_crt_store_urlbuilder.go b/operations/crt_store/create_crt_store_urlbuilder.go index 1701a055..7bbc939b 100644 --- a/operations/crt_store/create_crt_store_urlbuilder.go +++ b/operations/crt_store/create_crt_store_urlbuilder.go @@ -31,6 +31,7 @@ import ( // CreateCrtStoreURL generates an URL for the create crt store operation type CreateCrtStoreURL struct { ForceReload *bool + FullSection *bool TransactionID *string Version *int64 @@ -76,6 +77,14 @@ func (o *CreateCrtStoreURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/delete_crt_store_parameters.go b/operations/crt_store/delete_crt_store_parameters.go index 4d40a3a9..f1eabaaf 100644 --- a/operations/crt_store/delete_crt_store_parameters.go +++ b/operations/crt_store/delete_crt_store_parameters.go @@ -38,10 +38,13 @@ func NewDeleteCrtStoreParams() DeleteCrtStoreParams { // initialize parameters with default values forceReloadDefault = bool(false) + fullSectionDefault = bool(false) ) return DeleteCrtStoreParams{ ForceReload: &forceReloadDefault, + + FullSection: &fullSectionDefault, } } @@ -59,6 +62,11 @@ type DeleteCrtStoreParams struct { Default: false */ ForceReload *bool + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*crt_store name Required: true In: path @@ -90,6 +98,11 @@ func (o *DeleteCrtStoreParams) BindRequest(r *http.Request, route *middleware.Ma res = append(res, err) } + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + rName, rhkName, _ := route.Params.GetOK("name") if err := o.bindName(rName, rhkName, route.Formats); err != nil { res = append(res, err) @@ -134,6 +147,30 @@ func (o *DeleteCrtStoreParams) bindForceReload(rawData []string, hasKey bool, fo return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *DeleteCrtStoreParams) bindFullSection(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewDeleteCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindName binds and validates parameter Name from path. func (o *DeleteCrtStoreParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/delete_crt_store_urlbuilder.go b/operations/crt_store/delete_crt_store_urlbuilder.go index 907ce75d..6c8bf776 100644 --- a/operations/crt_store/delete_crt_store_urlbuilder.go +++ b/operations/crt_store/delete_crt_store_urlbuilder.go @@ -34,6 +34,7 @@ type DeleteCrtStoreURL struct { Name string ForceReload *bool + FullSection *bool TransactionID *string Version *int64 @@ -86,6 +87,14 @@ func (o *DeleteCrtStoreURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/edit_crt_store_parameters.go b/operations/crt_store/edit_crt_store_parameters.go index e1a6c098..f34e9d1c 100644 --- a/operations/crt_store/edit_crt_store_parameters.go +++ b/operations/crt_store/edit_crt_store_parameters.go @@ -41,10 +41,13 @@ func NewEditCrtStoreParams() EditCrtStoreParams { // initialize parameters with default values forceReloadDefault = bool(false) + fullSectionDefault = bool(false) ) return EditCrtStoreParams{ ForceReload: &forceReloadDefault, + + FullSection: &fullSectionDefault, } } @@ -67,6 +70,11 @@ type EditCrtStoreParams struct { Default: false */ ForceReload *bool + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*crt_store name Required: true In: path @@ -121,6 +129,11 @@ func (o *EditCrtStoreParams) BindRequest(r *http.Request, route *middleware.Matc res = append(res, err) } + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + rName, rhkName, _ := route.Params.GetOK("name") if err := o.bindName(rName, rhkName, route.Formats); err != nil { res = append(res, err) @@ -165,6 +178,30 @@ func (o *EditCrtStoreParams) bindForceReload(rawData []string, hasKey bool, form return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *EditCrtStoreParams) bindFullSection(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewEditCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindName binds and validates parameter Name from path. func (o *EditCrtStoreParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/edit_crt_store_urlbuilder.go b/operations/crt_store/edit_crt_store_urlbuilder.go index bd409ac0..f3f6e1d9 100644 --- a/operations/crt_store/edit_crt_store_urlbuilder.go +++ b/operations/crt_store/edit_crt_store_urlbuilder.go @@ -34,6 +34,7 @@ type EditCrtStoreURL struct { Name string ForceReload *bool + FullSection *bool TransactionID *string Version *int64 @@ -86,6 +87,14 @@ func (o *EditCrtStoreURL) Build() (*url.URL, error) { qs.Set("force_reload", forceReloadQ) } + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/get_crt_store_parameters.go b/operations/crt_store/get_crt_store_parameters.go index e24fe0b8..783defde 100644 --- a/operations/crt_store/get_crt_store_parameters.go +++ b/operations/crt_store/get_crt_store_parameters.go @@ -27,14 +27,22 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetCrtStoreParams creates a new GetCrtStoreParams object -// -// There are no default values defined in the spec. +// with the default values initialized. func NewGetCrtStoreParams() GetCrtStoreParams { - return GetCrtStoreParams{} + var ( + // initialize parameters with default values + + fullSectionDefault = bool(false) + ) + + return GetCrtStoreParams{ + FullSection: &fullSectionDefault, + } } // GetCrtStoreParams contains all the bound params for the get crt store operation @@ -46,6 +54,11 @@ type GetCrtStoreParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*crt_store name Required: true In: path @@ -68,6 +81,11 @@ func (o *GetCrtStoreParams) BindRequest(r *http.Request, route *middleware.Match qs := runtime.Values(r.URL.Query()) + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + rName, rhkName, _ := route.Params.GetOK("name") if err := o.bindName(rName, rhkName, route.Formats); err != nil { res = append(res, err) @@ -83,6 +101,30 @@ func (o *GetCrtStoreParams) BindRequest(r *http.Request, route *middleware.Match return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *GetCrtStoreParams) bindFullSection(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewGetCrtStoreParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindName binds and validates parameter Name from path. func (o *GetCrtStoreParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/get_crt_store_urlbuilder.go b/operations/crt_store/get_crt_store_urlbuilder.go index cbafc2db..a8961784 100644 --- a/operations/crt_store/get_crt_store_urlbuilder.go +++ b/operations/crt_store/get_crt_store_urlbuilder.go @@ -25,12 +25,15 @@ import ( "net/url" golangswaggerpaths "path" "strings" + + "github.com/go-openapi/swag" ) // GetCrtStoreURL generates an URL for the get crt store operation type GetCrtStoreURL struct { Name string + FullSection *bool TransactionID *string _basePath string @@ -74,6 +77,14 @@ func (o *GetCrtStoreURL) Build() (*url.URL, error) { qs := make(url.Values) + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/crt_store/get_crt_stores_parameters.go b/operations/crt_store/get_crt_stores_parameters.go index 7a9fe822..71f4869a 100644 --- a/operations/crt_store/get_crt_stores_parameters.go +++ b/operations/crt_store/get_crt_stores_parameters.go @@ -27,14 +27,22 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" ) // NewGetCrtStoresParams creates a new GetCrtStoresParams object -// -// There are no default values defined in the spec. +// with the default values initialized. func NewGetCrtStoresParams() GetCrtStoresParams { - return GetCrtStoresParams{} + var ( + // initialize parameters with default values + + fullSectionDefault = bool(false) + ) + + return GetCrtStoresParams{ + FullSection: &fullSectionDefault, + } } // GetCrtStoresParams contains all the bound params for the get crt stores operation @@ -46,6 +54,11 @@ type GetCrtStoresParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` + /*Indicates if the action affects the specified child resources as well + In: query + Default: false + */ + FullSection *bool /*ID of the transaction where we want to add the operation. Cannot be used when version is specified. In: query */ @@ -63,6 +76,11 @@ func (o *GetCrtStoresParams) BindRequest(r *http.Request, route *middleware.Matc qs := runtime.Values(r.URL.Query()) + qFullSection, qhkFullSection, _ := qs.GetOK("full_section") + if err := o.bindFullSection(qFullSection, qhkFullSection, route.Formats); err != nil { + res = append(res, err) + } + qTransactionID, qhkTransactionID, _ := qs.GetOK("transaction_id") if err := o.bindTransactionID(qTransactionID, qhkTransactionID, route.Formats); err != nil { res = append(res, err) @@ -73,6 +91,30 @@ func (o *GetCrtStoresParams) BindRequest(r *http.Request, route *middleware.Matc return nil } +// bindFullSection binds and validates parameter FullSection from query. +func (o *GetCrtStoresParams) bindFullSection(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewGetCrtStoresParams() + return nil + } + + value, err := swag.ConvertBool(raw) + if err != nil { + return errors.InvalidType("full_section", "query", "bool", raw) + } + o.FullSection = &value + + return nil +} + // bindTransactionID binds and validates parameter TransactionID from query. func (o *GetCrtStoresParams) bindTransactionID(rawData []string, hasKey bool, formats strfmt.Registry) error { var raw string diff --git a/operations/crt_store/get_crt_stores_urlbuilder.go b/operations/crt_store/get_crt_stores_urlbuilder.go index ab7c0f86..44e8eae9 100644 --- a/operations/crt_store/get_crt_stores_urlbuilder.go +++ b/operations/crt_store/get_crt_stores_urlbuilder.go @@ -24,10 +24,13 @@ import ( "errors" "net/url" golangswaggerpaths "path" + + "github.com/go-openapi/swag" ) // GetCrtStoresURL generates an URL for the get crt stores operation type GetCrtStoresURL struct { + FullSection *bool TransactionID *string _basePath string @@ -64,6 +67,14 @@ func (o *GetCrtStoresURL) Build() (*url.URL, error) { qs := make(url.Values) + var fullSectionQ string + if o.FullSection != nil { + fullSectionQ = swag.FormatBool(*o.FullSection) + } + if fullSectionQ != "" { + qs.Set("full_section", fullSectionQ) + } + var transactionIDQ string if o.TransactionID != nil { transactionIDQ = *o.TransactionID diff --git a/operations/data_plane_api.go b/operations/data_plane_api.go index ab8ede94..813d4afa 100644 --- a/operations/data_plane_api.go +++ b/operations/data_plane_api.go @@ -4893,7 +4893,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler) } - o.handlers["POST"]["/services/haproxy/configuration/crt_loads"] = crt_load.NewCreateCrtLoad(o.context, o.CrtLoadCreateCrtLoadHandler) + o.handlers["POST"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads"] = crt_load.NewCreateCrtLoad(o.context, o.CrtLoadCreateCrtLoadHandler) if o.handlers["POST"] == nil { o.handlers["POST"] = make(map[string]http.Handler) } @@ -5253,7 +5253,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["DELETE"]["/services/haproxy/configuration/crt_loads/{certificate}"] = crt_load.NewDeleteCrtLoad(o.context, o.CrtLoadDeleteCrtLoadHandler) + o.handlers["DELETE"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}"] = crt_load.NewDeleteCrtLoad(o.context, o.CrtLoadDeleteCrtLoadHandler) if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } @@ -5925,11 +5925,11 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/services/haproxy/configuration/crt_loads/{certificate}"] = crt_load.NewGetCrtLoad(o.context, o.CrtLoadGetCrtLoadHandler) + o.handlers["GET"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}"] = crt_load.NewGetCrtLoad(o.context, o.CrtLoadGetCrtLoadHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/services/haproxy/configuration/crt_loads"] = crt_load.NewGetCrtLoads(o.context, o.CrtLoadGetCrtLoadsHandler) + o.handlers["GET"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads"] = crt_load.NewGetCrtLoads(o.context, o.CrtLoadGetCrtLoadsHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } @@ -6633,7 +6633,7 @@ func (o *DataPlaneAPI) initHandlerCache() { if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) } - o.handlers["PUT"]["/services/haproxy/configuration/crt_loads/{certificate}"] = crt_load.NewReplaceCrtLoad(o.context, o.CrtLoadReplaceCrtLoadHandler) + o.handlers["PUT"]["/services/haproxy/configuration/crt_stores/{crt_store}/crt_loads/{certificate}"] = crt_load.NewReplaceCrtLoad(o.context, o.CrtLoadReplaceCrtLoadHandler) if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) } diff --git a/operations/declare_capture/create_declare_capture_parameters.go b/operations/declare_capture/create_declare_capture_parameters.go index b0a4af84..933707bf 100644 --- a/operations/declare_capture/create_declare_capture_parameters.go +++ b/operations/declare_capture/create_declare_capture_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateDeclareCaptureParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/delete_declare_capture_parameters.go b/operations/declare_capture/delete_declare_capture_parameters.go index 979440dc..475f8083 100644 --- a/operations/declare_capture/delete_declare_capture_parameters.go +++ b/operations/declare_capture/delete_declare_capture_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteDeclareCaptureParams creates a new DeleteDeclareCaptureParams object @@ -66,6 +67,7 @@ type DeleteDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteDeclareCaptureParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/get_declare_capture_parameters.go b/operations/declare_capture/get_declare_capture_parameters.go index 02c47cc4..12ecaec1 100644 --- a/operations/declare_capture/get_declare_capture_parameters.go +++ b/operations/declare_capture/get_declare_capture_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetDeclareCaptureParams creates a new GetDeclareCaptureParams object @@ -54,6 +55,7 @@ type GetDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetDeclareCaptureParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/get_declare_captures_parameters.go b/operations/declare_capture/get_declare_captures_parameters.go index dbc989fe..fe602124 100644 --- a/operations/declare_capture/get_declare_captures_parameters.go +++ b/operations/declare_capture/get_declare_captures_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetDeclareCapturesParams creates a new GetDeclareCapturesParams object @@ -48,6 +49,7 @@ type GetDeclareCapturesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetDeclareCapturesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDeclareCapturesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/replace_declare_capture_parameters.go b/operations/declare_capture/replace_declare_capture_parameters.go index 604e683c..8296e334 100644 --- a/operations/declare_capture/replace_declare_capture_parameters.go +++ b/operations/declare_capture/replace_declare_capture_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceDeclareCaptureParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceDeclareCaptureParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceDeclareCaptureParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/declare_capture/replace_declare_captures_parameters.go b/operations/declare_capture/replace_declare_captures_parameters.go index 2db19806..4d3a6655 100644 --- a/operations/declare_capture/replace_declare_captures_parameters.go +++ b/operations/declare_capture/replace_declare_captures_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceDeclareCapturesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceDeclareCapturesParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceDeclareCapturesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/create_dgram_bind_parameters.go b/operations/dgram_bind/create_dgram_bind_parameters.go index 2678b1e1..73751e37 100644 --- a/operations/dgram_bind/create_dgram_bind_parameters.go +++ b/operations/dgram_bind/create_dgram_bind_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateDgramBindParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateDgramBindParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/delete_dgram_bind_parameters.go b/operations/dgram_bind/delete_dgram_bind_parameters.go index b3995061..55449ba4 100644 --- a/operations/dgram_bind/delete_dgram_bind_parameters.go +++ b/operations/dgram_bind/delete_dgram_bind_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteDgramBindParams creates a new DeleteDgramBindParams object @@ -66,6 +67,7 @@ type DeleteDgramBindParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteDgramBindParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/get_dgram_bind_parameters.go b/operations/dgram_bind/get_dgram_bind_parameters.go index 4355ac22..d4fdb9b9 100644 --- a/operations/dgram_bind/get_dgram_bind_parameters.go +++ b/operations/dgram_bind/get_dgram_bind_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetDgramBindParams creates a new GetDgramBindParams object @@ -53,6 +54,7 @@ type GetDgramBindParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetDgramBindParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/get_dgram_binds_parameters.go b/operations/dgram_bind/get_dgram_binds_parameters.go index c37006e9..29403b67 100644 --- a/operations/dgram_bind/get_dgram_binds_parameters.go +++ b/operations/dgram_bind/get_dgram_binds_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetDgramBindsParams creates a new GetDgramBindsParams object @@ -48,6 +49,7 @@ type GetDgramBindsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetDgramBindsParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetDgramBindsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/dgram_bind/replace_dgram_bind_parameters.go b/operations/dgram_bind/replace_dgram_bind_parameters.go index 3f05f62b..6406a75a 100644 --- a/operations/dgram_bind/replace_dgram_bind_parameters.go +++ b/operations/dgram_bind/replace_dgram_bind_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceDgramBindParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceDgramBindParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceDgramBindParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/create_filter_backend_parameters.go b/operations/filter/create_filter_backend_parameters.go index 0e0f6d25..0a181332 100644 --- a/operations/filter/create_filter_backend_parameters.go +++ b/operations/filter/create_filter_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateFilterBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/create_filter_frontend_parameters.go b/operations/filter/create_filter_frontend_parameters.go index f81af086..0be10a07 100644 --- a/operations/filter/create_filter_frontend_parameters.go +++ b/operations/filter/create_filter_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateFilterFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/delete_filter_backend_parameters.go b/operations/filter/delete_filter_backend_parameters.go index 28e77f9d..72e9b445 100644 --- a/operations/filter/delete_filter_backend_parameters.go +++ b/operations/filter/delete_filter_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteFilterBackendParams creates a new DeleteFilterBackendParams object @@ -66,6 +67,7 @@ type DeleteFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteFilterBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/delete_filter_frontend_parameters.go b/operations/filter/delete_filter_frontend_parameters.go index e7c9af9c..9ced3e6a 100644 --- a/operations/filter/delete_filter_frontend_parameters.go +++ b/operations/filter/delete_filter_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteFilterFrontendParams creates a new DeleteFilterFrontendParams object @@ -66,6 +67,7 @@ type DeleteFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteFilterFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_all_filter_backend_parameters.go b/operations/filter/get_all_filter_backend_parameters.go index 262f48c4..f9872d90 100644 --- a/operations/filter/get_all_filter_backend_parameters.go +++ b/operations/filter/get_all_filter_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllFilterBackendParams creates a new GetAllFilterBackendParams object @@ -48,6 +49,7 @@ type GetAllFilterBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllFilterBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_all_filter_frontend_parameters.go b/operations/filter/get_all_filter_frontend_parameters.go index f7266252..e139eb6c 100644 --- a/operations/filter/get_all_filter_frontend_parameters.go +++ b/operations/filter/get_all_filter_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllFilterFrontendParams creates a new GetAllFilterFrontendParams object @@ -48,6 +49,7 @@ type GetAllFilterFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllFilterFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_filter_backend_parameters.go b/operations/filter/get_filter_backend_parameters.go index 20342b83..11cb7f4c 100644 --- a/operations/filter/get_filter_backend_parameters.go +++ b/operations/filter/get_filter_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetFilterBackendParams creates a new GetFilterBackendParams object @@ -54,6 +55,7 @@ type GetFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetFilterBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/get_filter_frontend_parameters.go b/operations/filter/get_filter_frontend_parameters.go index 5f5bf3b7..41e19dfb 100644 --- a/operations/filter/get_filter_frontend_parameters.go +++ b/operations/filter/get_filter_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetFilterFrontendParams creates a new GetFilterFrontendParams object @@ -54,6 +55,7 @@ type GetFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetFilterFrontendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_all_filter_backend_parameters.go b/operations/filter/replace_all_filter_backend_parameters.go index 50d155c4..43be1332 100644 --- a/operations/filter/replace_all_filter_backend_parameters.go +++ b/operations/filter/replace_all_filter_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllFilterBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllFilterBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_all_filter_frontend_parameters.go b/operations/filter/replace_all_filter_frontend_parameters.go index a29bfad9..f4a2f50f 100644 --- a/operations/filter/replace_all_filter_frontend_parameters.go +++ b/operations/filter/replace_all_filter_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllFilterFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllFilterFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_filter_backend_parameters.go b/operations/filter/replace_filter_backend_parameters.go index 1aed1d8f..bbbdb70d 100644 --- a/operations/filter/replace_filter_backend_parameters.go +++ b/operations/filter/replace_filter_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceFilterBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceFilterBackendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceFilterBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/filter/replace_filter_frontend_parameters.go b/operations/filter/replace_filter_frontend_parameters.go index f302cb4c..26802732 100644 --- a/operations/filter/replace_filter_frontend_parameters.go +++ b/operations/filter/replace_filter_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceFilterFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceFilterFrontendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceFilterFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go index 619314d1..af5eb244 100644 --- a/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/create_http_after_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPAfterResponseRuleBackendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/create_http_after_response_rule_defaults_parameters.go b/operations/http_after_response_rule/create_http_after_response_rule_defaults_parameters.go index dfd9ab9c..dc792ec2 100644 --- a/operations/http_after_response_rule/create_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/create_http_after_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPAfterResponseRuleDefaultsParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPAfterResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go index b4c0fec9..67e16791 100644 --- a/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/create_http_after_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go index 2991d84a..37b51278 100644 --- a/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/delete_http_after_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPAfterResponseRuleBackendParams creates a new DeleteHTTPAfterResponseRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPAfterResponseRuleBackendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/delete_http_after_response_rule_defaults_parameters.go b/operations/http_after_response_rule/delete_http_after_response_rule_defaults_parameters.go index 70e173f5..06c0caeb 100644 --- a/operations/http_after_response_rule/delete_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/delete_http_after_response_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPAfterResponseRuleDefaultsParams creates a new DeleteHTTPAfterResponseRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPAfterResponseRuleDefaultsParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPAfterResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go index b64c8963..ff43a067 100644 --- a/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/delete_http_after_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPAfterResponseRuleFrontendParams creates a new DeleteHTTPAfterResponseRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go index 2e5fcd45..9b2c09bb 100644 --- a/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/get_all_http_after_response_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPAfterResponseRuleBackendParams creates a new GetAllHTTPAfterResponseRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPAfterResponseRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPAfterResponseRuleBackendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_all_http_after_response_rule_defaults_parameters.go b/operations/http_after_response_rule/get_all_http_after_response_rule_defaults_parameters.go index 5977f515..7db8661e 100644 --- a/operations/http_after_response_rule/get_all_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/get_all_http_after_response_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPAfterResponseRuleDefaultsParams creates a new GetAllHTTPAfterResponseRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPAfterResponseRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPAfterResponseRuleDefaultsParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPAfterResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go index 1f4ff913..85d074e4 100644 --- a/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/get_all_http_after_response_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPAfterResponseRuleFrontendParams creates a new GetAllHTTPAfterResponseRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPAfterResponseRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go index a296c30e..8acbb272 100644 --- a/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/get_http_after_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPAfterResponseRuleBackendParams creates a new GetHTTPAfterResponseRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPAfterResponseRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_http_after_response_rule_defaults_parameters.go b/operations/http_after_response_rule/get_http_after_response_rule_defaults_parameters.go index 339de0e2..6b7b28d8 100644 --- a/operations/http_after_response_rule/get_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/get_http_after_response_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPAfterResponseRuleDefaultsParams creates a new GetHTTPAfterResponseRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPAfterResponseRuleDefaultsParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPAfterResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go index af73db0d..f407266f 100644 --- a/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/get_http_after_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPAfterResponseRuleFrontendParams creates a new GetHTTPAfterResponseRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go index 6f98b854..14ca1ad4 100644 --- a/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/replace_all_http_after_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPAfterResponseRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPAfterResponseRuleBackendParams) bindParentName(rawData [] // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_all_http_after_response_rule_defaults_parameters.go b/operations/http_after_response_rule/replace_all_http_after_response_rule_defaults_parameters.go index 345e37ea..f0c6dab8 100644 --- a/operations/http_after_response_rule/replace_all_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/replace_all_http_after_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPAfterResponseRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPAfterResponseRuleDefaultsParams) bindParentName(rawData [ // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPAfterResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go index 8ea77a58..f170a21e 100644 --- a/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/replace_all_http_after_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPAfterResponseRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPAfterResponseRuleFrontendParams) bindParentName(rawData [ // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go b/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go index 477be655..8bf7208e 100644 --- a/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go +++ b/operations/http_after_response_rule/replace_http_after_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPAfterResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPAfterResponseRuleBackendParams) bindParentName(rawData []str // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPAfterResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_http_after_response_rule_defaults_parameters.go b/operations/http_after_response_rule/replace_http_after_response_rule_defaults_parameters.go index 73c11bee..71d0a397 100644 --- a/operations/http_after_response_rule/replace_http_after_response_rule_defaults_parameters.go +++ b/operations/http_after_response_rule/replace_http_after_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPAfterResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPAfterResponseRuleDefaultsParams) bindParentName(rawData []st // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPAfterResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go b/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go index d1b4304e..cbf0063d 100644 --- a/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go +++ b/operations/http_after_response_rule/replace_http_after_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPAfterResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPAfterResponseRuleFrontendParams) bindParentName(rawData []st // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPAfterResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/create_http_check_backend_parameters.go b/operations/http_check/create_http_check_backend_parameters.go index 9e7ba597..63f1f9e1 100644 --- a/operations/http_check/create_http_check_backend_parameters.go +++ b/operations/http_check/create_http_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/create_http_check_defaults_parameters.go b/operations/http_check/create_http_check_defaults_parameters.go index 75b62bed..f237e070 100644 --- a/operations/http_check/create_http_check_defaults_parameters.go +++ b/operations/http_check/create_http_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/delete_http_check_backend_parameters.go b/operations/http_check/delete_http_check_backend_parameters.go index 5255e0e4..0d584fc5 100644 --- a/operations/http_check/delete_http_check_backend_parameters.go +++ b/operations/http_check/delete_http_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPCheckBackendParams creates a new DeleteHTTPCheckBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/delete_http_check_defaults_parameters.go b/operations/http_check/delete_http_check_defaults_parameters.go index 46d2fb26..78af4808 100644 --- a/operations/http_check/delete_http_check_defaults_parameters.go +++ b/operations/http_check/delete_http_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPCheckDefaultsParams creates a new DeleteHTTPCheckDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_all_http_check_backend_parameters.go b/operations/http_check/get_all_http_check_backend_parameters.go index 5155ce84..7d6fc82f 100644 --- a/operations/http_check/get_all_http_check_backend_parameters.go +++ b/operations/http_check/get_all_http_check_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPCheckBackendParams creates a new GetAllHTTPCheckBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPCheckBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_all_http_check_defaults_parameters.go b/operations/http_check/get_all_http_check_defaults_parameters.go index 6e398d48..530043b7 100644 --- a/operations/http_check/get_all_http_check_defaults_parameters.go +++ b/operations/http_check/get_all_http_check_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPCheckDefaultsParams creates a new GetAllHTTPCheckDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPCheckDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_http_check_backend_parameters.go b/operations/http_check/get_http_check_backend_parameters.go index 490eec9a..4641b5a0 100644 --- a/operations/http_check/get_http_check_backend_parameters.go +++ b/operations/http_check/get_http_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPCheckBackendParams creates a new GetHTTPCheckBackendParams object @@ -54,6 +55,7 @@ type GetHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPCheckBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/get_http_check_defaults_parameters.go b/operations/http_check/get_http_check_defaults_parameters.go index de85fd3a..659a8b94 100644 --- a/operations/http_check/get_http_check_defaults_parameters.go +++ b/operations/http_check/get_http_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPCheckDefaultsParams creates a new GetHTTPCheckDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_all_http_check_backend_parameters.go b/operations/http_check/replace_all_http_check_backend_parameters.go index 3569802c..0de9f464 100644 --- a/operations/http_check/replace_all_http_check_backend_parameters.go +++ b/operations/http_check/replace_all_http_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPCheckBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPCheckBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_all_http_check_defaults_parameters.go b/operations/http_check/replace_all_http_check_defaults_parameters.go index 0eb7a155..0f9e6d3c 100644 --- a/operations/http_check/replace_all_http_check_defaults_parameters.go +++ b/operations/http_check/replace_all_http_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPCheckDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPCheckDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_http_check_backend_parameters.go b/operations/http_check/replace_http_check_backend_parameters.go index 77edcfdb..baf0fe75 100644 --- a/operations/http_check/replace_http_check_backend_parameters.go +++ b/operations/http_check/replace_http_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPCheckBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_check/replace_http_check_defaults_parameters.go b/operations/http_check/replace_http_check_defaults_parameters.go index 01775240..608c3351 100644 --- a/operations/http_check/replace_http_check_defaults_parameters.go +++ b/operations/http_check/replace_http_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/create_http_error_rule_backend_parameters.go b/operations/http_error_rule/create_http_error_rule_backend_parameters.go index aeb5b09d..460b32c8 100644 --- a/operations/http_error_rule/create_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/create_http_error_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/create_http_error_rule_defaults_parameters.go b/operations/http_error_rule/create_http_error_rule_defaults_parameters.go index 3c60a513..a3d6f70a 100644 --- a/operations/http_error_rule/create_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/create_http_error_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/create_http_error_rule_frontend_parameters.go b/operations/http_error_rule/create_http_error_rule_frontend_parameters.go index 29024d0a..8d36bcbd 100644 --- a/operations/http_error_rule/create_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/create_http_error_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPErrorRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/delete_http_error_rule_backend_parameters.go b/operations/http_error_rule/delete_http_error_rule_backend_parameters.go index 47f7a25a..f3dbeeea 100644 --- a/operations/http_error_rule/delete_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/delete_http_error_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPErrorRuleBackendParams creates a new DeleteHTTPErrorRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go b/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go index 93dd1b48..27258d55 100644 --- a/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/delete_http_error_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPErrorRuleDefaultsParams creates a new DeleteHTTPErrorRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go b/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go index 091a494e..de566e9f 100644 --- a/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/delete_http_error_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPErrorRuleFrontendParams creates a new DeleteHTTPErrorRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPErrorRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go b/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go index d035242d..d3ca8956 100644 --- a/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/get_all_http_error_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPErrorRuleBackendParams creates a new GetAllHTTPErrorRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPErrorRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go b/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go index 0fef73aa..8cec5c54 100644 --- a/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/get_all_http_error_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPErrorRuleDefaultsParams creates a new GetAllHTTPErrorRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPErrorRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go b/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go index 1ad477c3..67ea2f7a 100644 --- a/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/get_all_http_error_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPErrorRuleFrontendParams creates a new GetAllHTTPErrorRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPErrorRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPErrorRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_http_error_rule_backend_parameters.go b/operations/http_error_rule/get_http_error_rule_backend_parameters.go index e98e511c..e3482ab4 100644 --- a/operations/http_error_rule/get_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/get_http_error_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPErrorRuleBackendParams creates a new GetHTTPErrorRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPErrorRuleBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_http_error_rule_defaults_parameters.go b/operations/http_error_rule/get_http_error_rule_defaults_parameters.go index 291419a8..3488327c 100644 --- a/operations/http_error_rule/get_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/get_http_error_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPErrorRuleDefaultsParams creates a new GetHTTPErrorRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/get_http_error_rule_frontend_parameters.go b/operations/http_error_rule/get_http_error_rule_frontend_parameters.go index 9fff8ee0..501ba61c 100644 --- a/operations/http_error_rule/get_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/get_http_error_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPErrorRuleFrontendParams creates a new GetHTTPErrorRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPErrorRuleFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go b/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go index ac8581e9..cb0175d0 100644 --- a/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/replace_all_http_error_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPErrorRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPErrorRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go b/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go index 46e22230..3f2b175a 100644 --- a/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/replace_all_http_error_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPErrorRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go b/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go index e31239a1..22f9b9eb 100644 --- a/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/replace_all_http_error_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPErrorRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPErrorRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_http_error_rule_backend_parameters.go b/operations/http_error_rule/replace_http_error_rule_backend_parameters.go index cbb6f4f7..369a8e58 100644 --- a/operations/http_error_rule/replace_http_error_rule_backend_parameters.go +++ b/operations/http_error_rule/replace_http_error_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPErrorRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPErrorRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPErrorRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go b/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go index 6b883e15..6efba41d 100644 --- a/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go +++ b/operations/http_error_rule/replace_http_error_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPErrorRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPErrorRuleDefaultsParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPErrorRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go b/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go index 2fca35e8..c31306f9 100644 --- a/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go +++ b/operations/http_error_rule/replace_http_error_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPErrorRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPErrorRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPErrorRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/create_http_request_rule_backend_parameters.go b/operations/http_request_rule/create_http_request_rule_backend_parameters.go index 41a9c904..c4f657c6 100644 --- a/operations/http_request_rule/create_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/create_http_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/create_http_request_rule_defaults_parameters.go b/operations/http_request_rule/create_http_request_rule_defaults_parameters.go index b11f6ee6..c366e061 100644 --- a/operations/http_request_rule/create_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/create_http_request_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPRequestRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/create_http_request_rule_frontend_parameters.go b/operations/http_request_rule/create_http_request_rule_frontend_parameters.go index f14c1300..2dbec60c 100644 --- a/operations/http_request_rule/create_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/create_http_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/delete_http_request_rule_backend_parameters.go b/operations/http_request_rule/delete_http_request_rule_backend_parameters.go index 11d009ad..deb88138 100644 --- a/operations/http_request_rule/delete_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/delete_http_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPRequestRuleBackendParams creates a new DeleteHTTPRequestRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/delete_http_request_rule_defaults_parameters.go b/operations/http_request_rule/delete_http_request_rule_defaults_parameters.go index d4371873..78a4a794 100644 --- a/operations/http_request_rule/delete_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/delete_http_request_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPRequestRuleDefaultsParams creates a new DeleteHTTPRequestRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPRequestRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go b/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go index d020eb92..08258bb8 100644 --- a/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/delete_http_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPRequestRuleFrontendParams creates a new DeleteHTTPRequestRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go b/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go index 79dd9c24..95b385cd 100644 --- a/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/get_all_http_request_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPRequestRuleBackendParams creates a new GetAllHTTPRequestRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPRequestRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_all_http_request_rule_defaults_parameters.go b/operations/http_request_rule/get_all_http_request_rule_defaults_parameters.go index d44850d0..c14eda83 100644 --- a/operations/http_request_rule/get_all_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/get_all_http_request_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPRequestRuleDefaultsParams creates a new GetAllHTTPRequestRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPRequestRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPRequestRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go b/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go index 3d65849b..42d07fbc 100644 --- a/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/get_all_http_request_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPRequestRuleFrontendParams creates a new GetAllHTTPRequestRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPRequestRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_http_request_rule_backend_parameters.go b/operations/http_request_rule/get_http_request_rule_backend_parameters.go index 84ba784c..31971b57 100644 --- a/operations/http_request_rule/get_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/get_http_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPRequestRuleBackendParams creates a new GetHTTPRequestRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPRequestRuleBackendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_http_request_rule_defaults_parameters.go b/operations/http_request_rule/get_http_request_rule_defaults_parameters.go index 8360f053..35ec54f2 100644 --- a/operations/http_request_rule/get_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/get_http_request_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPRequestRuleDefaultsParams creates a new GetHTTPRequestRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPRequestRuleDefaultsParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/get_http_request_rule_frontend_parameters.go b/operations/http_request_rule/get_http_request_rule_frontend_parameters.go index 1a737167..f0339384 100644 --- a/operations/http_request_rule/get_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/get_http_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPRequestRuleFrontendParams creates a new GetHTTPRequestRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPRequestRuleFrontendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go b/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go index 9b266644..74b7a9df 100644 --- a/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/replace_all_http_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPRequestRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPRequestRuleBackendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_all_http_request_rule_defaults_parameters.go b/operations/http_request_rule/replace_all_http_request_rule_defaults_parameters.go index 74433bc2..d0bb936f 100644 --- a/operations/http_request_rule/replace_all_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/replace_all_http_request_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPRequestRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPRequestRuleDefaultsParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go b/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go index 44460cf2..ac2cb12a 100644 --- a/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/replace_all_http_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPRequestRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPRequestRuleFrontendParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_http_request_rule_backend_parameters.go b/operations/http_request_rule/replace_http_request_rule_backend_parameters.go index 167200cc..1989031a 100644 --- a/operations/http_request_rule/replace_http_request_rule_backend_parameters.go +++ b/operations/http_request_rule/replace_http_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPRequestRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_http_request_rule_defaults_parameters.go b/operations/http_request_rule/replace_http_request_rule_defaults_parameters.go index 4aca19cc..cc8cfd1a 100644 --- a/operations/http_request_rule/replace_http_request_rule_defaults_parameters.go +++ b/operations/http_request_rule/replace_http_request_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPRequestRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go b/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go index e84ee71f..8d564b42 100644 --- a/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go +++ b/operations/http_request_rule/replace_http_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPRequestRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/create_http_response_rule_backend_parameters.go b/operations/http_response_rule/create_http_response_rule_backend_parameters.go index ed06a582..cc6f350b 100644 --- a/operations/http_response_rule/create_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/create_http_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/create_http_response_rule_defaults_parameters.go b/operations/http_response_rule/create_http_response_rule_defaults_parameters.go index d967f025..cf9e1d53 100644 --- a/operations/http_response_rule/create_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/create_http_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPResponseRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/create_http_response_rule_frontend_parameters.go b/operations/http_response_rule/create_http_response_rule_frontend_parameters.go index f700f54c..68340a9c 100644 --- a/operations/http_response_rule/create_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/create_http_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/delete_http_response_rule_backend_parameters.go b/operations/http_response_rule/delete_http_response_rule_backend_parameters.go index a038ceb2..874bea03 100644 --- a/operations/http_response_rule/delete_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/delete_http_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPResponseRuleBackendParams creates a new DeleteHTTPResponseRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/delete_http_response_rule_defaults_parameters.go b/operations/http_response_rule/delete_http_response_rule_defaults_parameters.go index 5b206894..707ec0bf 100644 --- a/operations/http_response_rule/delete_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/delete_http_response_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPResponseRuleDefaultsParams creates a new DeleteHTTPResponseRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPResponseRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go b/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go index ec5b77ee..8b1d456b 100644 --- a/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/delete_http_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteHTTPResponseRuleFrontendParams creates a new DeleteHTTPResponseRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go b/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go index 4f9d5de5..81a20f3b 100644 --- a/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/get_all_http_response_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPResponseRuleBackendParams creates a new GetAllHTTPResponseRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllHTTPResponseRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_all_http_response_rule_defaults_parameters.go b/operations/http_response_rule/get_all_http_response_rule_defaults_parameters.go index 085c476a..07841ed4 100644 --- a/operations/http_response_rule/get_all_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/get_all_http_response_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPResponseRuleDefaultsParams creates a new GetAllHTTPResponseRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllHTTPResponseRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPResponseRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go b/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go index 0c4a366e..14da2d70 100644 --- a/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/get_all_http_response_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllHTTPResponseRuleFrontendParams creates a new GetAllHTTPResponseRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllHTTPResponseRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_http_response_rule_backend_parameters.go b/operations/http_response_rule/get_http_response_rule_backend_parameters.go index 53be771f..abd155c0 100644 --- a/operations/http_response_rule/get_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/get_http_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPResponseRuleBackendParams creates a new GetHTTPResponseRuleBackendParams object @@ -54,6 +55,7 @@ type GetHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPResponseRuleBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_http_response_rule_defaults_parameters.go b/operations/http_response_rule/get_http_response_rule_defaults_parameters.go index c9ef817e..a9a4ac6e 100644 --- a/operations/http_response_rule/get_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/get_http_response_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPResponseRuleDefaultsParams creates a new GetHTTPResponseRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPResponseRuleDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/get_http_response_rule_frontend_parameters.go b/operations/http_response_rule/get_http_response_rule_frontend_parameters.go index 6e9ee92d..15988b64 100644 --- a/operations/http_response_rule/get_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/get_http_response_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetHTTPResponseRuleFrontendParams creates a new GetHTTPResponseRuleFrontendParams object @@ -54,6 +55,7 @@ type GetHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetHTTPResponseRuleFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go b/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go index 2ed736be..1b923048 100644 --- a/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/replace_all_http_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPResponseRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPResponseRuleBackendParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_all_http_response_rule_defaults_parameters.go b/operations/http_response_rule/replace_all_http_response_rule_defaults_parameters.go index 576e44e5..bda52a7d 100644 --- a/operations/http_response_rule/replace_all_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/replace_all_http_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPResponseRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPResponseRuleDefaultsParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go b/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go index 5b117c23..55d72d0f 100644 --- a/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/replace_all_http_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllHTTPResponseRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllHTTPResponseRuleFrontendParams) bindParentName(rawData []stri // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_http_response_rule_backend_parameters.go b/operations/http_response_rule/replace_http_response_rule_backend_parameters.go index 9e7b2038..25739afa 100644 --- a/operations/http_response_rule/replace_http_response_rule_backend_parameters.go +++ b/operations/http_response_rule/replace_http_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPResponseRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_http_response_rule_defaults_parameters.go b/operations/http_response_rule/replace_http_response_rule_defaults_parameters.go index 342c5502..683bfeeb 100644 --- a/operations/http_response_rule/replace_http_response_rule_defaults_parameters.go +++ b/operations/http_response_rule/replace_http_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPResponseRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go b/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go index 0cdab708..d163934a 100644 --- a/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go +++ b/operations/http_response_rule/replace_http_response_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceHTTPResponseRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceHTTPResponseRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceHTTPResponseRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_backend_parameters.go b/operations/log_target/create_log_target_backend_parameters.go index b642be2f..fa5bd648 100644 --- a/operations/log_target/create_log_target_backend_parameters.go +++ b/operations/log_target/create_log_target_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_defaults_parameters.go b/operations/log_target/create_log_target_defaults_parameters.go index be3778fe..cae00239 100644 --- a/operations/log_target/create_log_target_defaults_parameters.go +++ b/operations/log_target/create_log_target_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_frontend_parameters.go b/operations/log_target/create_log_target_frontend_parameters.go index a92b211e..16242beb 100644 --- a/operations/log_target/create_log_target_frontend_parameters.go +++ b/operations/log_target/create_log_target_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_log_forward_parameters.go b/operations/log_target/create_log_target_log_forward_parameters.go index b09d6390..77b44307 100644 --- a/operations/log_target/create_log_target_log_forward_parameters.go +++ b/operations/log_target/create_log_target_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetLogForwardParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/create_log_target_peer_parameters.go b/operations/log_target/create_log_target_peer_parameters.go index df9ae9b5..1222c3d9 100644 --- a/operations/log_target/create_log_target_peer_parameters.go +++ b/operations/log_target/create_log_target_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateLogTargetPeerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_backend_parameters.go b/operations/log_target/delete_log_target_backend_parameters.go index 332c7854..7d712cef 100644 --- a/operations/log_target/delete_log_target_backend_parameters.go +++ b/operations/log_target/delete_log_target_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetBackendParams creates a new DeleteLogTargetBackendParams object @@ -66,6 +67,7 @@ type DeleteLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_defaults_parameters.go b/operations/log_target/delete_log_target_defaults_parameters.go index f15f4784..bbb16883 100644 --- a/operations/log_target/delete_log_target_defaults_parameters.go +++ b/operations/log_target/delete_log_target_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetDefaultsParams creates a new DeleteLogTargetDefaultsParams object @@ -66,6 +67,7 @@ type DeleteLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_frontend_parameters.go b/operations/log_target/delete_log_target_frontend_parameters.go index 3e346055..ce2560f1 100644 --- a/operations/log_target/delete_log_target_frontend_parameters.go +++ b/operations/log_target/delete_log_target_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetFrontendParams creates a new DeleteLogTargetFrontendParams object @@ -66,6 +67,7 @@ type DeleteLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_log_forward_parameters.go b/operations/log_target/delete_log_target_log_forward_parameters.go index 14118574..06218c00 100644 --- a/operations/log_target/delete_log_target_log_forward_parameters.go +++ b/operations/log_target/delete_log_target_log_forward_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetLogForwardParams creates a new DeleteLogTargetLogForwardParams object @@ -66,6 +67,7 @@ type DeleteLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetLogForwardParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/delete_log_target_peer_parameters.go b/operations/log_target/delete_log_target_peer_parameters.go index 9d913948..f2460e69 100644 --- a/operations/log_target/delete_log_target_peer_parameters.go +++ b/operations/log_target/delete_log_target_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteLogTargetPeerParams creates a new DeleteLogTargetPeerParams object @@ -66,6 +67,7 @@ type DeleteLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteLogTargetPeerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_backend_parameters.go b/operations/log_target/get_all_log_target_backend_parameters.go index b8a6f24c..3e52b153 100644 --- a/operations/log_target/get_all_log_target_backend_parameters.go +++ b/operations/log_target/get_all_log_target_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetBackendParams creates a new GetAllLogTargetBackendParams object @@ -48,6 +49,7 @@ type GetAllLogTargetBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_defaults_parameters.go b/operations/log_target/get_all_log_target_defaults_parameters.go index 393d187d..467c0430 100644 --- a/operations/log_target/get_all_log_target_defaults_parameters.go +++ b/operations/log_target/get_all_log_target_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetDefaultsParams creates a new GetAllLogTargetDefaultsParams object @@ -48,6 +49,7 @@ type GetAllLogTargetDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_frontend_parameters.go b/operations/log_target/get_all_log_target_frontend_parameters.go index 3707ca4e..feaa7c93 100644 --- a/operations/log_target/get_all_log_target_frontend_parameters.go +++ b/operations/log_target/get_all_log_target_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetFrontendParams creates a new GetAllLogTargetFrontendParams object @@ -48,6 +49,7 @@ type GetAllLogTargetFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_log_forward_parameters.go b/operations/log_target/get_all_log_target_log_forward_parameters.go index a4fa352a..aeb16fa8 100644 --- a/operations/log_target/get_all_log_target_log_forward_parameters.go +++ b/operations/log_target/get_all_log_target_log_forward_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetLogForwardParams creates a new GetAllLogTargetLogForwardParams object @@ -48,6 +49,7 @@ type GetAllLogTargetLogForwardParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetLogForwardParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_all_log_target_peer_parameters.go b/operations/log_target/get_all_log_target_peer_parameters.go index 31c67090..9cba6874 100644 --- a/operations/log_target/get_all_log_target_peer_parameters.go +++ b/operations/log_target/get_all_log_target_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllLogTargetPeerParams creates a new GetAllLogTargetPeerParams object @@ -48,6 +49,7 @@ type GetAllLogTargetPeerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllLogTargetPeerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_backend_parameters.go b/operations/log_target/get_log_target_backend_parameters.go index 01ea6552..8fe34520 100644 --- a/operations/log_target/get_log_target_backend_parameters.go +++ b/operations/log_target/get_log_target_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetBackendParams creates a new GetLogTargetBackendParams object @@ -54,6 +55,7 @@ type GetLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_defaults_parameters.go b/operations/log_target/get_log_target_defaults_parameters.go index f47aaa88..c7b818b0 100644 --- a/operations/log_target/get_log_target_defaults_parameters.go +++ b/operations/log_target/get_log_target_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetDefaultsParams creates a new GetLogTargetDefaultsParams object @@ -54,6 +55,7 @@ type GetLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetDefaultsParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_frontend_parameters.go b/operations/log_target/get_log_target_frontend_parameters.go index 31412579..c83a7f78 100644 --- a/operations/log_target/get_log_target_frontend_parameters.go +++ b/operations/log_target/get_log_target_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetFrontendParams creates a new GetLogTargetFrontendParams object @@ -54,6 +55,7 @@ type GetLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetFrontendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_log_forward_parameters.go b/operations/log_target/get_log_target_log_forward_parameters.go index dfcc8f30..0f4f4d93 100644 --- a/operations/log_target/get_log_target_log_forward_parameters.go +++ b/operations/log_target/get_log_target_log_forward_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetLogForwardParams creates a new GetLogTargetLogForwardParams object @@ -54,6 +55,7 @@ type GetLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetLogForwardParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/get_log_target_peer_parameters.go b/operations/log_target/get_log_target_peer_parameters.go index 27d9a7a4..b5cee8df 100644 --- a/operations/log_target/get_log_target_peer_parameters.go +++ b/operations/log_target/get_log_target_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetLogTargetPeerParams creates a new GetLogTargetPeerParams object @@ -54,6 +55,7 @@ type GetLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetLogTargetPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_backend_parameters.go b/operations/log_target/replace_all_log_target_backend_parameters.go index ef4dd2f2..18179994 100644 --- a/operations/log_target/replace_all_log_target_backend_parameters.go +++ b/operations/log_target/replace_all_log_target_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetBackendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_defaults_parameters.go b/operations/log_target/replace_all_log_target_defaults_parameters.go index 3a5c341a..c03bfa8d 100644 --- a/operations/log_target/replace_all_log_target_defaults_parameters.go +++ b/operations/log_target/replace_all_log_target_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetDefaultsParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_frontend_parameters.go b/operations/log_target/replace_all_log_target_frontend_parameters.go index f0d87f43..503e859d 100644 --- a/operations/log_target/replace_all_log_target_frontend_parameters.go +++ b/operations/log_target/replace_all_log_target_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetFrontendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_log_forward_parameters.go b/operations/log_target/replace_all_log_target_log_forward_parameters.go index 39b16410..9f0db41a 100644 --- a/operations/log_target/replace_all_log_target_log_forward_parameters.go +++ b/operations/log_target/replace_all_log_target_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetLogForwardParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetLogForwardParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_all_log_target_peer_parameters.go b/operations/log_target/replace_all_log_target_peer_parameters.go index c5ae7f2e..91dc775b 100644 --- a/operations/log_target/replace_all_log_target_peer_parameters.go +++ b/operations/log_target/replace_all_log_target_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllLogTargetPeerParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllLogTargetPeerParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_backend_parameters.go b/operations/log_target/replace_log_target_backend_parameters.go index 41bc5ff0..f008cf82 100644 --- a/operations/log_target/replace_log_target_backend_parameters.go +++ b/operations/log_target/replace_log_target_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_defaults_parameters.go b/operations/log_target/replace_log_target_defaults_parameters.go index 4236fbdb..e0eecfc8 100644 --- a/operations/log_target/replace_log_target_defaults_parameters.go +++ b/operations/log_target/replace_log_target_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_frontend_parameters.go b/operations/log_target/replace_log_target_frontend_parameters.go index f67f2b9e..486d5452 100644 --- a/operations/log_target/replace_log_target_frontend_parameters.go +++ b/operations/log_target/replace_log_target_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetFrontendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_log_forward_parameters.go b/operations/log_target/replace_log_target_log_forward_parameters.go index 6cf285b4..371e3284 100644 --- a/operations/log_target/replace_log_target_log_forward_parameters.go +++ b/operations/log_target/replace_log_target_log_forward_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetLogForwardParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetLogForwardParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetLogForwardParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/log_target/replace_log_target_peer_parameters.go b/operations/log_target/replace_log_target_peer_parameters.go index 1814733a..8de69326 100644 --- a/operations/log_target/replace_log_target_peer_parameters.go +++ b/operations/log_target/replace_log_target_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceLogTargetPeerParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceLogTargetPeerParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceLogTargetPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/add_map_entry_parameters.go b/operations/maps/add_map_entry_parameters.go index 42fe282f..4ca0afcb 100644 --- a/operations/maps/add_map_entry_parameters.go +++ b/operations/maps/add_map_entry_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type AddMapEntryParams struct { ForceSync *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -158,5 +160,19 @@ func (o *AddMapEntryParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *AddMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/add_payload_runtime_map_parameters.go b/operations/maps/add_payload_runtime_map_parameters.go index 3d7600f5..769a0e79 100644 --- a/operations/maps/add_payload_runtime_map_parameters.go +++ b/operations/maps/add_payload_runtime_map_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type AddPayloadRuntimeMapParams struct { ForceSync *bool /*Map file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -158,5 +160,19 @@ func (o *AddPayloadRuntimeMapParams) bindName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *AddPayloadRuntimeMapParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/clear_runtime_map_parameters.go b/operations/maps/clear_runtime_map_parameters.go index f7ff5e02..7e1af377 100644 --- a/operations/maps/clear_runtime_map_parameters.go +++ b/operations/maps/clear_runtime_map_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewClearRuntimeMapParams creates a new ClearRuntimeMapParams object @@ -65,6 +66,7 @@ type ClearRuntimeMapParams struct { ForceSync *bool /*Map file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -159,5 +161,19 @@ func (o *ClearRuntimeMapParams) bindName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *ClearRuntimeMapParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/delete_runtime_map_entry_parameters.go b/operations/maps/delete_runtime_map_entry_parameters.go index bc360d5d..9e4ee0ee 100644 --- a/operations/maps/delete_runtime_map_entry_parameters.go +++ b/operations/maps/delete_runtime_map_entry_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteRuntimeMapEntryParams creates a new DeleteRuntimeMapEntryParams object @@ -61,11 +62,13 @@ type DeleteRuntimeMapEntryParams struct { ForceSync *bool /*Map id Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -137,6 +140,20 @@ func (o *DeleteRuntimeMapEntryParams) bindID(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *DeleteRuntimeMapEntryParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -151,5 +168,19 @@ func (o *DeleteRuntimeMapEntryParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteRuntimeMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/get_one_runtime_map_parameters.go b/operations/maps/get_one_runtime_map_parameters.go index 3805121e..b705bf12 100644 --- a/operations/maps/get_one_runtime_map_parameters.go +++ b/operations/maps/get_one_runtime_map_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetOneRuntimeMapParams creates a new GetOneRuntimeMapParams object @@ -47,6 +48,7 @@ type GetOneRuntimeMapParams struct { /*Map file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetOneRuntimeMapParams) bindName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetOneRuntimeMapParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/get_runtime_map_entry_parameters.go b/operations/maps/get_runtime_map_entry_parameters.go index 99f67a04..a6ae472c 100644 --- a/operations/maps/get_runtime_map_entry_parameters.go +++ b/operations/maps/get_runtime_map_entry_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetRuntimeMapEntryParams creates a new GetRuntimeMapEntryParams object @@ -47,11 +48,13 @@ type GetRuntimeMapEntryParams struct { /*Map id Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *GetRuntimeMapEntryParams) bindID(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *GetRuntimeMapEntryParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *GetRuntimeMapEntryParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetRuntimeMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/replace_runtime_map_entry_parameters.go b/operations/maps/replace_runtime_map_entry_parameters.go index 2c6d3eeb..d46cfb5d 100644 --- a/operations/maps/replace_runtime_map_entry_parameters.go +++ b/operations/maps/replace_runtime_map_entry_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewReplaceRuntimeMapEntryParams creates a new ReplaceRuntimeMapEntryParams object @@ -67,11 +68,13 @@ type ReplaceRuntimeMapEntryParams struct { ForceSync *bool /*Map id Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -166,6 +169,20 @@ func (o *ReplaceRuntimeMapEntryParams) bindID(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ID = raw + if err := o.validateID(formats); err != nil { + return err + } + + return nil +} + +// validateID carries on validations for parameter ID +func (o *ReplaceRuntimeMapEntryParams) validateID(formats strfmt.Registry) error { + + if err := validate.Pattern("id", "path", o.ID, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -180,5 +197,19 @@ func (o *ReplaceRuntimeMapEntryParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceRuntimeMapEntryParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/maps/show_runtime_map_parameters.go b/operations/maps/show_runtime_map_parameters.go index 1448e28b..a747c5a0 100644 --- a/operations/maps/show_runtime_map_parameters.go +++ b/operations/maps/show_runtime_map_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewShowRuntimeMapParams creates a new ShowRuntimeMapParams object @@ -47,6 +48,7 @@ type ShowRuntimeMapParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -82,5 +84,19 @@ func (o *ShowRuntimeMapParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ShowRuntimeMapParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go index c43e6439..41ab9129 100644 --- a/operations/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/create_quic_initial_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateQUICInitialRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go index 54bc1a59..88da5fb6 100644 --- a/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/create_quic_initial_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateQUICInitialRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go index 64dbb979..2f5302bf 100644 --- a/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/delete_quic_initial_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteQUICInitialRuleDefaultsParams creates a new DeleteQUICInitialRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteQUICInitialRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go index ce8f2e4e..ac805060 100644 --- a/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/delete_quic_initial_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteQUICInitialRuleFrontendParams creates a new DeleteQUICInitialRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteQUICInitialRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go index 6e65f062..ae20b325 100644 --- a/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/get_all_quic_initial_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllQUICInitialRuleDefaultsParams creates a new GetAllQUICInitialRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllQUICInitialRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllQUICInitialRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go index c170f28f..5ba86056 100644 --- a/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/get_all_quic_initial_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllQUICInitialRuleFrontendParams creates a new GetAllQUICInitialRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllQUICInitialRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllQUICInitialRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go index ce1a92c5..0abbed99 100644 --- a/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/get_quic_initial_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetQUICInitialRuleDefaultsParams creates a new GetQUICInitialRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetQUICInitialRuleDefaultsParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go index 23e63f55..eee7a486 100644 --- a/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/get_quic_initial_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetQUICInitialRuleFrontendParams creates a new GetQUICInitialRuleFrontendParams object @@ -54,6 +55,7 @@ type GetQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetQUICInitialRuleFrontendParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go index f20ec7f3..48e9ce40 100644 --- a/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/replace_all_quic_initial_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllQUICInitialRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllQUICInitialRuleDefaultsParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go index f79b9fca..c88405f3 100644 --- a/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/replace_all_quic_initial_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllQUICInitialRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllQUICInitialRuleFrontendParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go b/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go index b75eb5ec..29db635f 100644 --- a/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go +++ b/operations/quic_initial_rule/replace_quic_initial_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceQUICInitialRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceQUICInitialRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceQUICInitialRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go b/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go index fc787cc3..6ca81e0e 100644 --- a/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go +++ b/operations/quic_initial_rule/replace_quic_initial_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceQUICInitialRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceQUICInitialRuleFrontendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceQUICInitialRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go index 56ab506d..22ceb67b 100644 --- a/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/create_s_s_l_front_use_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateSSLFrontUseParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateSSLFrontUseParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go index afa39255..ee25a2cc 100644 --- a/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/delete_s_s_l_front_use_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSSLFrontUseParams creates a new DeleteSSLFrontUseParams object @@ -66,6 +67,7 @@ type DeleteSSLFrontUseParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteSSLFrontUseParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go b/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go index 523398b6..1d937b1a 100644 --- a/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go +++ b/operations/s_s_l_front_use/get_all_s_s_l_front_uses_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSSLFrontUsesParams creates a new GetAllSSLFrontUsesParams object @@ -48,6 +49,7 @@ type GetAllSSLFrontUsesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllSSLFrontUsesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSSLFrontUsesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go index 06688e6a..3a92948b 100644 --- a/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/get_s_s_l_front_use_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetSSLFrontUseParams creates a new GetSSLFrontUseParams object @@ -54,6 +55,7 @@ type GetSSLFrontUseParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetSSLFrontUseParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go b/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go index a7633591..2e16ed70 100644 --- a/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go +++ b/operations/s_s_l_front_use/replace_s_s_l_front_use_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceSSLFrontUseParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceSSLFrontUseParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSSLFrontUseParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/add_ca_entry_parameters.go b/operations/s_s_l_runtime/add_ca_entry_parameters.go index 1c9ba040..54bc4498 100644 --- a/operations/s_s_l_runtime/add_ca_entry_parameters.go +++ b/operations/s_s_l_runtime/add_ca_entry_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // AddCaEntryMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type AddCaEntryParams struct { FileUpload io.ReadCloser /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *AddCaEntryParams) bindName(rawData []string, hasKey bool, formats strfm // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *AddCaEntryParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/add_crt_list_entry_parameters.go b/operations/s_s_l_runtime/add_crt_list_entry_parameters.go index 1abba27b..016d72dd 100644 --- a/operations/s_s_l_runtime/add_crt_list_entry_parameters.go +++ b/operations/s_s_l_runtime/add_crt_list_entry_parameters.go @@ -57,6 +57,7 @@ type AddCrtListEntryParams struct { Data *models.SslCrtListEntry /*SSL crt-list filename Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Name string @@ -124,5 +125,19 @@ func (o *AddCrtListEntryParams) bindName(rawData []string, hasKey bool, formats } o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *AddCrtListEntryParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "query", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/delete_ca_file_parameters.go b/operations/s_s_l_runtime/delete_ca_file_parameters.go index d615cd2e..8cb08f9e 100644 --- a/operations/s_s_l_runtime/delete_ca_file_parameters.go +++ b/operations/s_s_l_runtime/delete_ca_file_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteCaFileParams creates a new DeleteCaFileParams object @@ -47,6 +48,7 @@ type DeleteCaFileParams struct { /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *DeleteCaFileParams) bindName(rawData []string, hasKey bool, formats str // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteCaFileParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/delete_cert_parameters.go b/operations/s_s_l_runtime/delete_cert_parameters.go index ac1f0001..f65f67f3 100644 --- a/operations/s_s_l_runtime/delete_cert_parameters.go +++ b/operations/s_s_l_runtime/delete_cert_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteCertParams creates a new DeleteCertParams object @@ -47,6 +48,7 @@ type DeleteCertParams struct { /*SSL certificate name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *DeleteCertParams) bindName(rawData []string, hasKey bool, formats strfm // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteCertParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/delete_crl_parameters.go b/operations/s_s_l_runtime/delete_crl_parameters.go index 58b11f14..bc686b2e 100644 --- a/operations/s_s_l_runtime/delete_crl_parameters.go +++ b/operations/s_s_l_runtime/delete_crl_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteCrlParams creates a new DeleteCrlParams object @@ -47,6 +48,7 @@ type DeleteCrlParams struct { /*CRL file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *DeleteCrlParams) bindName(rawData []string, hasKey bool, formats strfmt // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteCrlParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go b/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go index 15c5ead0..123eea21 100644 --- a/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go +++ b/operations/s_s_l_runtime/delete_crt_list_entry_parameters.go @@ -50,6 +50,7 @@ type DeleteCrtListEntryParams struct { /*SSL cert entry name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ CertFile string @@ -60,6 +61,7 @@ type DeleteCrtListEntryParams struct { LineNumber *int64 /*SSL crt list name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Name string @@ -114,6 +116,20 @@ func (o *DeleteCrtListEntryParams) bindCertFile(rawData []string, hasKey bool, f } o.CertFile = raw + if err := o.validateCertFile(formats); err != nil { + return err + } + + return nil +} + +// validateCertFile carries on validations for parameter CertFile +func (o *DeleteCrtListEntryParams) validateCertFile(formats strfmt.Registry) error { + + if err := validate.Pattern("cert_file", "query", o.CertFile, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -172,5 +188,19 @@ func (o *DeleteCrtListEntryParams) bindName(rawData []string, hasKey bool, forma } o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteCrtListEntryParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "query", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go b/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go index 6bfaf35e..b1ab3c7e 100644 --- a/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go +++ b/operations/s_s_l_runtime/get_all_crt_list_entries_parameters.go @@ -49,6 +49,7 @@ type GetAllCrtListEntriesParams struct { /*SSL crt-list filename Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: query */ Name string @@ -93,5 +94,19 @@ func (o *GetAllCrtListEntriesParams) bindName(rawData []string, hasKey bool, for } o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetAllCrtListEntriesParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "query", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_ca_entry_parameters.go b/operations/s_s_l_runtime/get_ca_entry_parameters.go index c012263a..fbeb1fb8 100644 --- a/operations/s_s_l_runtime/get_ca_entry_parameters.go +++ b/operations/s_s_l_runtime/get_ca_entry_parameters.go @@ -55,6 +55,7 @@ type GetCaEntryParams struct { Index int64 /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -128,5 +129,19 @@ func (o *GetCaEntryParams) bindName(rawData []string, hasKey bool, formats strfm // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetCaEntryParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_ca_file_parameters.go b/operations/s_s_l_runtime/get_ca_file_parameters.go index 10615eb1..ec6ddd3b 100644 --- a/operations/s_s_l_runtime/get_ca_file_parameters.go +++ b/operations/s_s_l_runtime/get_ca_file_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetCaFileParams creates a new GetCaFileParams object @@ -47,6 +48,7 @@ type GetCaFileParams struct { /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetCaFileParams) bindName(rawData []string, hasKey bool, formats strfmt // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetCaFileParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_cert_parameters.go b/operations/s_s_l_runtime/get_cert_parameters.go index 7c80231f..0f86b3fa 100644 --- a/operations/s_s_l_runtime/get_cert_parameters.go +++ b/operations/s_s_l_runtime/get_cert_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetCertParams creates a new GetCertParams object @@ -47,6 +48,7 @@ type GetCertParams struct { /*SSL certificate name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetCertParams) bindName(rawData []string, hasKey bool, formats strfmt.R // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetCertParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/get_crl_parameters.go b/operations/s_s_l_runtime/get_crl_parameters.go index 9bd39538..caab0d1a 100644 --- a/operations/s_s_l_runtime/get_crl_parameters.go +++ b/operations/s_s_l_runtime/get_crl_parameters.go @@ -55,6 +55,7 @@ type GetCrlParams struct { Index *int64 /*CRL file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -134,5 +135,19 @@ func (o *GetCrlParams) bindName(rawData []string, hasKey bool, formats strfmt.Re // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetCrlParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/replace_cert_parameters.go b/operations/s_s_l_runtime/replace_cert_parameters.go index 05478796..9b864833 100644 --- a/operations/s_s_l_runtime/replace_cert_parameters.go +++ b/operations/s_s_l_runtime/replace_cert_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // ReplaceCertMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type ReplaceCertParams struct { FileUpload io.ReadCloser /*SSL certificate name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *ReplaceCertParams) bindName(rawData []string, hasKey bool, formats strf // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *ReplaceCertParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/replace_crl_parameters.go b/operations/s_s_l_runtime/replace_crl_parameters.go index 8a31f685..9b2fb2a5 100644 --- a/operations/s_s_l_runtime/replace_crl_parameters.go +++ b/operations/s_s_l_runtime/replace_crl_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // ReplaceCrlMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type ReplaceCrlParams struct { FileUpload io.ReadCloser /*CRL file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *ReplaceCrlParams) bindName(rawData []string, hasKey bool, formats strfm // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *ReplaceCrlParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/s_s_l_runtime/set_ca_file_parameters.go b/operations/s_s_l_runtime/set_ca_file_parameters.go index 947cec04..cb9248a1 100644 --- a/operations/s_s_l_runtime/set_ca_file_parameters.go +++ b/operations/s_s_l_runtime/set_ca_file_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // SetCaFileMaxParseMemory sets the maximum size in bytes for @@ -62,6 +63,7 @@ type SetCaFileParams struct { FileUpload io.ReadCloser /*SSL CA file name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -122,5 +124,19 @@ func (o *SetCaFileParams) bindName(rawData []string, hasKey bool, formats strfmt // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *SetCaFileParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/add_runtime_server_parameters.go b/operations/server/add_runtime_server_parameters.go index 279d8777..94b7b1f2 100644 --- a/operations/server/add_runtime_server_parameters.go +++ b/operations/server/add_runtime_server_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,6 +57,7 @@ type AddRuntimeServerParams struct { Data *models.RuntimeAddServer /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -114,5 +116,19 @@ func (o *AddRuntimeServerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *AddRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/create_server_backend_parameters.go b/operations/server/create_server_backend_parameters.go index b09ed44a..b28f7bda 100644 --- a/operations/server/create_server_backend_parameters.go +++ b/operations/server/create_server_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/create_server_peer_parameters.go b/operations/server/create_server_peer_parameters.go index 2b37d5da..1aed15f1 100644 --- a/operations/server/create_server_peer_parameters.go +++ b/operations/server/create_server_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerPeerParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/create_server_ring_parameters.go b/operations/server/create_server_ring_parameters.go index e3683e1f..1bc6ae44 100644 --- a/operations/server/create_server_ring_parameters.go +++ b/operations/server/create_server_ring_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerRingParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerRingParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_runtime_server_parameters.go b/operations/server/delete_runtime_server_parameters.go index ec68099b..0515b863 100644 --- a/operations/server/delete_runtime_server_parameters.go +++ b/operations/server/delete_runtime_server_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteRuntimeServerParams creates a new DeleteRuntimeServerParams object @@ -47,11 +48,13 @@ type DeleteRuntimeServerParams struct { /*Server name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *DeleteRuntimeServerParams) bindName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *DeleteRuntimeServerParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *DeleteRuntimeServerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_server_backend_parameters.go b/operations/server/delete_server_backend_parameters.go index d6b2c147..9872c57a 100644 --- a/operations/server/delete_server_backend_parameters.go +++ b/operations/server/delete_server_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerBackendParams creates a new DeleteServerBackendParams object @@ -66,6 +67,7 @@ type DeleteServerBackendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteServerBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_server_peer_parameters.go b/operations/server/delete_server_peer_parameters.go index 82d2f6d9..9145d395 100644 --- a/operations/server/delete_server_peer_parameters.go +++ b/operations/server/delete_server_peer_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerPeerParams creates a new DeleteServerPeerParams object @@ -66,6 +67,7 @@ type DeleteServerPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteServerPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/delete_server_ring_parameters.go b/operations/server/delete_server_ring_parameters.go index 50207734..8fb2fc89 100644 --- a/operations/server/delete_server_ring_parameters.go +++ b/operations/server/delete_server_ring_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerRingParams creates a new DeleteServerRingParams object @@ -66,6 +67,7 @@ type DeleteServerRingParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteServerRingParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_runtime_server_parameters.go b/operations/server/get_all_runtime_server_parameters.go index 3694a36c..7b94f93c 100644 --- a/operations/server/get_all_runtime_server_parameters.go +++ b/operations/server/get_all_runtime_server_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllRuntimeServerParams creates a new GetAllRuntimeServerParams object @@ -47,6 +48,7 @@ type GetAllRuntimeServerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -82,5 +84,19 @@ func (o *GetAllRuntimeServerParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_server_backend_parameters.go b/operations/server/get_all_server_backend_parameters.go index 90a9b74a..bae343a5 100644 --- a/operations/server/get_all_server_backend_parameters.go +++ b/operations/server/get_all_server_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllServerBackendParams creates a new GetAllServerBackendParams object @@ -48,6 +49,7 @@ type GetAllServerBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllServerBackendParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_server_peer_parameters.go b/operations/server/get_all_server_peer_parameters.go index acad0f2a..bff9e260 100644 --- a/operations/server/get_all_server_peer_parameters.go +++ b/operations/server/get_all_server_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllServerPeerParams creates a new GetAllServerPeerParams object @@ -48,6 +49,7 @@ type GetAllServerPeerParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllServerPeerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_all_server_ring_parameters.go b/operations/server/get_all_server_ring_parameters.go index 260cf427..aee35be5 100644 --- a/operations/server/get_all_server_ring_parameters.go +++ b/operations/server/get_all_server_ring_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllServerRingParams creates a new GetAllServerRingParams object @@ -48,6 +49,7 @@ type GetAllServerRingParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllServerRingParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_runtime_server_parameters.go b/operations/server/get_runtime_server_parameters.go index fbf48706..58bec938 100644 --- a/operations/server/get_runtime_server_parameters.go +++ b/operations/server/get_runtime_server_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetRuntimeServerParams creates a new GetRuntimeServerParams object @@ -47,11 +48,13 @@ type GetRuntimeServerParams struct { /*Server name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -92,6 +95,20 @@ func (o *GetRuntimeServerParams) bindName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetRuntimeServerParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -106,5 +123,19 @@ func (o *GetRuntimeServerParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_server_backend_parameters.go b/operations/server/get_server_backend_parameters.go index 9db9eae2..df538727 100644 --- a/operations/server/get_server_backend_parameters.go +++ b/operations/server/get_server_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerBackendParams creates a new GetServerBackendParams object @@ -53,6 +54,7 @@ type GetServerBackendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetServerBackendParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_server_peer_parameters.go b/operations/server/get_server_peer_parameters.go index 314b5649..9cb0bad9 100644 --- a/operations/server/get_server_peer_parameters.go +++ b/operations/server/get_server_peer_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerPeerParams creates a new GetServerPeerParams object @@ -53,6 +54,7 @@ type GetServerPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetServerPeerParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/get_server_ring_parameters.go b/operations/server/get_server_ring_parameters.go index ebf089f3..3116cab4 100644 --- a/operations/server/get_server_ring_parameters.go +++ b/operations/server/get_server_ring_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerRingParams creates a new GetServerRingParams object @@ -53,6 +54,7 @@ type GetServerRingParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetServerRingParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_runtime_server_parameters.go b/operations/server/replace_runtime_server_parameters.go index 21fd8a27..12c0d076 100644 --- a/operations/server/replace_runtime_server_parameters.go +++ b/operations/server/replace_runtime_server_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -56,11 +57,13 @@ type ReplaceRuntimeServerParams struct { Data *models.RuntimeServer /*Server name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +127,20 @@ func (o *ReplaceRuntimeServerParams) bindName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *ReplaceRuntimeServerParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } @@ -138,5 +155,19 @@ func (o *ReplaceRuntimeServerParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceRuntimeServerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_server_backend_parameters.go b/operations/server/replace_server_backend_parameters.go index 816221fb..b8679871 100644 --- a/operations/server/replace_server_backend_parameters.go +++ b/operations/server/replace_server_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerBackendParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceServerBackendParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_server_peer_parameters.go b/operations/server/replace_server_peer_parameters.go index 8149b2de..5172a948 100644 --- a/operations/server/replace_server_peer_parameters.go +++ b/operations/server/replace_server_peer_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerPeerParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceServerPeerParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerPeerParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server/replace_server_ring_parameters.go b/operations/server/replace_server_ring_parameters.go index 542aa0fc..827389f7 100644 --- a/operations/server/replace_server_ring_parameters.go +++ b/operations/server/replace_server_ring_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerRingParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceServerRingParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerRingParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/create_server_switching_rule_parameters.go b/operations/server_switching_rule/create_server_switching_rule_parameters.go index d9db693a..2c93d947 100644 --- a/operations/server_switching_rule/create_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/create_server_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateServerSwitchingRuleParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/delete_server_switching_rule_parameters.go b/operations/server_switching_rule/delete_server_switching_rule_parameters.go index 9524aabf..fe908ee1 100644 --- a/operations/server_switching_rule/delete_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/delete_server_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerSwitchingRuleParams creates a new DeleteServerSwitchingRuleParams object @@ -66,6 +67,7 @@ type DeleteServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteServerSwitchingRuleParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/get_server_switching_rule_parameters.go b/operations/server_switching_rule/get_server_switching_rule_parameters.go index b2060b50..b8eec247 100644 --- a/operations/server_switching_rule/get_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/get_server_switching_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetServerSwitchingRuleParams creates a new GetServerSwitchingRuleParams object @@ -54,6 +55,7 @@ type GetServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetServerSwitchingRuleParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/get_server_switching_rules_parameters.go b/operations/server_switching_rule/get_server_switching_rules_parameters.go index b5ef8ec4..17fd10d9 100644 --- a/operations/server_switching_rule/get_server_switching_rules_parameters.go +++ b/operations/server_switching_rule/get_server_switching_rules_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerSwitchingRulesParams creates a new GetServerSwitchingRulesParams object @@ -48,6 +49,7 @@ type GetServerSwitchingRulesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetServerSwitchingRulesParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/replace_server_switching_rule_parameters.go b/operations/server_switching_rule/replace_server_switching_rule_parameters.go index 5b138025..c0c922e3 100644 --- a/operations/server_switching_rule/replace_server_switching_rule_parameters.go +++ b/operations/server_switching_rule/replace_server_switching_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceServerSwitchingRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceServerSwitchingRuleParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerSwitchingRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_switching_rule/replace_server_switching_rules_parameters.go b/operations/server_switching_rule/replace_server_switching_rules_parameters.go index 2dcfd584..b34dcc25 100644 --- a/operations/server_switching_rule/replace_server_switching_rules_parameters.go +++ b/operations/server_switching_rule/replace_server_switching_rules_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceServerSwitchingRulesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceServerSwitchingRulesParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerSwitchingRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/create_server_template_parameters.go b/operations/server_template/create_server_template_parameters.go index 96e43990..4218d629 100644 --- a/operations/server_template/create_server_template_parameters.go +++ b/operations/server_template/create_server_template_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateServerTemplateParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateServerTemplateParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/delete_server_template_parameters.go b/operations/server_template/delete_server_template_parameters.go index 174599c1..327110c6 100644 --- a/operations/server_template/delete_server_template_parameters.go +++ b/operations/server_template/delete_server_template_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteServerTemplateParams creates a new DeleteServerTemplateParams object @@ -61,6 +62,7 @@ type DeleteServerTemplateParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -155,6 +157,20 @@ func (o *DeleteServerTemplateParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/get_server_template_parameters.go b/operations/server_template/get_server_template_parameters.go index e7925320..c8c59a75 100644 --- a/operations/server_template/get_server_template_parameters.go +++ b/operations/server_template/get_server_template_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerTemplateParams creates a new GetServerTemplateParams object @@ -48,6 +49,7 @@ type GetServerTemplateParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetServerTemplateParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/get_server_templates_parameters.go b/operations/server_template/get_server_templates_parameters.go index 06b3a7c3..23952d7c 100644 --- a/operations/server_template/get_server_templates_parameters.go +++ b/operations/server_template/get_server_templates_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetServerTemplatesParams creates a new GetServerTemplatesParams object @@ -48,6 +49,7 @@ type GetServerTemplatesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetServerTemplatesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetServerTemplatesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/server_template/replace_server_template_parameters.go b/operations/server_template/replace_server_template_parameters.go index 01aa8802..a4bf1a44 100644 --- a/operations/server_template/replace_server_template_parameters.go +++ b/operations/server_template/replace_server_template_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceServerTemplateParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -186,6 +188,20 @@ func (o *ReplaceServerTemplateParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceServerTemplateParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_agent_parameters.go b/operations/spoe/create_spoe_agent_parameters.go index f5b6011f..034c7994 100644 --- a/operations/spoe/create_spoe_agent_parameters.go +++ b/operations/spoe/create_spoe_agent_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeAgentParams struct { Data *models.SpoeAgent /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -145,6 +147,20 @@ func (o *CreateSpoeAgentParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_group_parameters.go b/operations/spoe/create_spoe_group_parameters.go index 68c6fbd8..74fcea5b 100644 --- a/operations/spoe/create_spoe_group_parameters.go +++ b/operations/spoe/create_spoe_group_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeGroupParams struct { Data *models.SpoeGroup /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -145,6 +147,20 @@ func (o *CreateSpoeGroupParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_message_parameters.go b/operations/spoe/create_spoe_message_parameters.go index e40e8c7f..169f0811 100644 --- a/operations/spoe/create_spoe_message_parameters.go +++ b/operations/spoe/create_spoe_message_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeMessageParams struct { Data *models.SpoeMessage /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -145,6 +147,20 @@ func (o *CreateSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/create_spoe_scope_parameters.go b/operations/spoe/create_spoe_scope_parameters.go index 271c52db..69685581 100644 --- a/operations/spoe/create_spoe_scope_parameters.go +++ b/operations/spoe/create_spoe_scope_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -57,6 +58,7 @@ type CreateSpoeScopeParams struct { Data models.SpoeScope /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -135,6 +137,20 @@ func (o *CreateSpoeScopeParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_agent_parameters.go b/operations/spoe/delete_spoe_agent_parameters.go index edd90454..c4422c59 100644 --- a/operations/spoe/delete_spoe_agent_parameters.go +++ b/operations/spoe/delete_spoe_agent_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeAgentParams creates a new DeleteSpoeAgentParams object @@ -54,6 +55,7 @@ type DeleteSpoeAgentParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -138,6 +140,20 @@ func (o *DeleteSpoeAgentParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_group_parameters.go b/operations/spoe/delete_spoe_group_parameters.go index 640fffbf..316b6da7 100644 --- a/operations/spoe/delete_spoe_group_parameters.go +++ b/operations/spoe/delete_spoe_group_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeGroupParams creates a new DeleteSpoeGroupParams object @@ -54,6 +55,7 @@ type DeleteSpoeGroupParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -138,6 +140,20 @@ func (o *DeleteSpoeGroupParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_message_parameters.go b/operations/spoe/delete_spoe_message_parameters.go index b5d25b11..7b669068 100644 --- a/operations/spoe/delete_spoe_message_parameters.go +++ b/operations/spoe/delete_spoe_message_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeMessageParams creates a new DeleteSpoeMessageParams object @@ -54,6 +55,7 @@ type DeleteSpoeMessageParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -138,6 +140,20 @@ func (o *DeleteSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/delete_spoe_scope_parameters.go b/operations/spoe/delete_spoe_scope_parameters.go index d4a3423b..4d49094e 100644 --- a/operations/spoe/delete_spoe_scope_parameters.go +++ b/operations/spoe/delete_spoe_scope_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteSpoeScopeParams creates a new DeleteSpoeScopeParams object @@ -54,6 +55,7 @@ type DeleteSpoeScopeParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *DeleteSpoeScopeParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_agent_parameters.go b/operations/spoe/get_all_spoe_agent_parameters.go index 2d3c4e52..423faef3 100644 --- a/operations/spoe/get_all_spoe_agent_parameters.go +++ b/operations/spoe/get_all_spoe_agent_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeAgentParams creates a new GetAllSpoeAgentParams object @@ -48,6 +49,7 @@ type GetAllSpoeAgentParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetAllSpoeAgentParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_group_parameters.go b/operations/spoe/get_all_spoe_group_parameters.go index 115dc82c..18a0e017 100644 --- a/operations/spoe/get_all_spoe_group_parameters.go +++ b/operations/spoe/get_all_spoe_group_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeGroupParams creates a new GetAllSpoeGroupParams object @@ -48,6 +49,7 @@ type GetAllSpoeGroupParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetAllSpoeGroupParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_message_parameters.go b/operations/spoe/get_all_spoe_message_parameters.go index 97d1f285..b80f1a53 100644 --- a/operations/spoe/get_all_spoe_message_parameters.go +++ b/operations/spoe/get_all_spoe_message_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeMessageParams creates a new GetAllSpoeMessageParams object @@ -48,6 +49,7 @@ type GetAllSpoeMessageParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,6 +106,20 @@ func (o *GetAllSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_all_spoe_scope_parameters.go b/operations/spoe/get_all_spoe_scope_parameters.go index 7a59fb33..5e56d058 100644 --- a/operations/spoe/get_all_spoe_scope_parameters.go +++ b/operations/spoe/get_all_spoe_scope_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllSpoeScopeParams creates a new GetAllSpoeScopeParams object @@ -48,6 +49,7 @@ type GetAllSpoeScopeParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllSpoeScopeParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_agent_parameters.go b/operations/spoe/get_spoe_agent_parameters.go index 1b3115bf..0fba4b05 100644 --- a/operations/spoe/get_spoe_agent_parameters.go +++ b/operations/spoe/get_spoe_agent_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeAgentParams creates a new GetSpoeAgentParams object @@ -53,6 +54,7 @@ type GetSpoeAgentParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *GetSpoeAgentParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_configuration_version_parameters.go b/operations/spoe/get_spoe_configuration_version_parameters.go index b1fe0cb0..ec84d164 100644 --- a/operations/spoe/get_spoe_configuration_version_parameters.go +++ b/operations/spoe/get_spoe_configuration_version_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeConfigurationVersionParams creates a new GetSpoeConfigurationVersionParams object @@ -48,6 +49,7 @@ type GetSpoeConfigurationVersionParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetSpoeConfigurationVersionParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeConfigurationVersionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_group_parameters.go b/operations/spoe/get_spoe_group_parameters.go index e239498b..2790fe56 100644 --- a/operations/spoe/get_spoe_group_parameters.go +++ b/operations/spoe/get_spoe_group_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeGroupParams creates a new GetSpoeGroupParams object @@ -53,6 +54,7 @@ type GetSpoeGroupParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *GetSpoeGroupParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_message_parameters.go b/operations/spoe/get_spoe_message_parameters.go index adc0c956..cad1e323 100644 --- a/operations/spoe/get_spoe_message_parameters.go +++ b/operations/spoe/get_spoe_message_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeMessageParams creates a new GetSpoeMessageParams object @@ -53,6 +54,7 @@ type GetSpoeMessageParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -128,6 +130,20 @@ func (o *GetSpoeMessageParams) bindParentName(rawData []string, hasKey bool, for // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/get_spoe_scope_parameters.go b/operations/spoe/get_spoe_scope_parameters.go index 9de86820..53f188e3 100644 --- a/operations/spoe/get_spoe_scope_parameters.go +++ b/operations/spoe/get_spoe_scope_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeScopeParams creates a new GetSpoeScopeParams object @@ -53,6 +54,7 @@ type GetSpoeScopeParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetSpoeScopeParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeScopeParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/replace_spoe_agent_parameters.go b/operations/spoe/replace_spoe_agent_parameters.go index c75dd592..fa4dad3a 100644 --- a/operations/spoe/replace_spoe_agent_parameters.go +++ b/operations/spoe/replace_spoe_agent_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -62,6 +63,7 @@ type ReplaceSpoeAgentParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *ReplaceSpoeAgentParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSpoeAgentParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/replace_spoe_group_parameters.go b/operations/spoe/replace_spoe_group_parameters.go index 886eb744..80ec1c73 100644 --- a/operations/spoe/replace_spoe_group_parameters.go +++ b/operations/spoe/replace_spoe_group_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -62,6 +63,7 @@ type ReplaceSpoeGroupParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *ReplaceSpoeGroupParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSpoeGroupParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe/replace_spoe_message_parameters.go b/operations/spoe/replace_spoe_message_parameters.go index 62ff7eff..0116b744 100644 --- a/operations/spoe/replace_spoe_message_parameters.go +++ b/operations/spoe/replace_spoe_message_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -62,6 +63,7 @@ type ReplaceSpoeMessageParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *ReplaceSpoeMessageParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceSpoeMessageParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/commit_spoe_transaction_parameters.go b/operations/spoe_transactions/commit_spoe_transaction_parameters.go index 4b800638..48e681ce 100644 --- a/operations/spoe_transactions/commit_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/commit_spoe_transaction_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewCommitSpoeTransactionParams creates a new CommitSpoeTransactionParams object @@ -66,6 +67,7 @@ type CommitSpoeTransactionParams struct { ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -151,5 +153,19 @@ func (o *CommitSpoeTransactionParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CommitSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/delete_spoe_transaction_parameters.go b/operations/spoe_transactions/delete_spoe_transaction_parameters.go index 87e2a78f..0966dc70 100644 --- a/operations/spoe_transactions/delete_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/delete_spoe_transaction_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewDeleteSpoeTransactionParams creates a new DeleteSpoeTransactionParams object @@ -52,6 +53,7 @@ type DeleteSpoeTransactionParams struct { ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -106,5 +108,19 @@ func (o *DeleteSpoeTransactionParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/get_all_spoe_transaction_parameters.go b/operations/spoe_transactions/get_all_spoe_transaction_parameters.go index a8f271ce..4235375f 100644 --- a/operations/spoe_transactions/get_all_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/get_all_spoe_transaction_parameters.go @@ -49,6 +49,7 @@ type GetAllSpoeTransactionParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -95,6 +96,20 @@ func (o *GetAllSpoeTransactionParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/get_spoe_transaction_parameters.go b/operations/spoe_transactions/get_spoe_transaction_parameters.go index 57e33f8d..272d84fa 100644 --- a/operations/spoe_transactions/get_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/get_spoe_transaction_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetSpoeTransactionParams creates a new GetSpoeTransactionParams object @@ -52,6 +53,7 @@ type GetSpoeTransactionParams struct { ID string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -106,5 +108,19 @@ func (o *GetSpoeTransactionParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/spoe_transactions/start_spoe_transaction_parameters.go b/operations/spoe_transactions/start_spoe_transaction_parameters.go index 17791634..a441ca9a 100644 --- a/operations/spoe_transactions/start_spoe_transaction_parameters.go +++ b/operations/spoe_transactions/start_spoe_transaction_parameters.go @@ -50,6 +50,7 @@ type StartSpoeTransactionParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -97,6 +98,20 @@ func (o *StartSpoeTransactionParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *StartSpoeTransactionParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/create_stick_rule_parameters.go b/operations/stick_rule/create_stick_rule_parameters.go index e24c1b04..8e988ef9 100644 --- a/operations/stick_rule/create_stick_rule_parameters.go +++ b/operations/stick_rule/create_stick_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateStickRuleParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/delete_stick_rule_parameters.go b/operations/stick_rule/delete_stick_rule_parameters.go index bff42efe..517757e1 100644 --- a/operations/stick_rule/delete_stick_rule_parameters.go +++ b/operations/stick_rule/delete_stick_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteStickRuleParams creates a new DeleteStickRuleParams object @@ -66,6 +67,7 @@ type DeleteStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteStickRuleParams) bindParentName(rawData []string, hasKey bool, fo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/get_stick_rule_parameters.go b/operations/stick_rule/get_stick_rule_parameters.go index 952dfd31..0136150c 100644 --- a/operations/stick_rule/get_stick_rule_parameters.go +++ b/operations/stick_rule/get_stick_rule_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetStickRuleParams creates a new GetStickRuleParams object @@ -54,6 +55,7 @@ type GetStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetStickRuleParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/get_stick_rules_parameters.go b/operations/stick_rule/get_stick_rules_parameters.go index 0e77aeb3..dcf5332a 100644 --- a/operations/stick_rule/get_stick_rules_parameters.go +++ b/operations/stick_rule/get_stick_rules_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetStickRulesParams creates a new GetStickRulesParams object @@ -48,6 +49,7 @@ type GetStickRulesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetStickRulesParams) bindParentName(rawData []string, hasKey bool, form // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetStickRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/replace_stick_rule_parameters.go b/operations/stick_rule/replace_stick_rule_parameters.go index 4bab91a9..57b2e652 100644 --- a/operations/stick_rule/replace_stick_rule_parameters.go +++ b/operations/stick_rule/replace_stick_rule_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceStickRuleParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceStickRuleParams) bindParentName(rawData []string, hasKey bool, f // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceStickRuleParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_rule/replace_stick_rules_parameters.go b/operations/stick_rule/replace_stick_rules_parameters.go index 58ba13f6..6b1c433f 100644 --- a/operations/stick_rule/replace_stick_rules_parameters.go +++ b/operations/stick_rule/replace_stick_rules_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceStickRulesParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceStickRulesParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceStickRulesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/get_stick_table_entries_parameters.go b/operations/stick_table/get_stick_table_entries_parameters.go index f214233f..6ab149d1 100644 --- a/operations/stick_table/get_stick_table_entries_parameters.go +++ b/operations/stick_table/get_stick_table_entries_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetStickTableEntriesParams creates a new GetStickTableEntriesParams object @@ -52,10 +53,12 @@ type GetStickTableEntriesParams struct { */ Count *int64 /*A list of filters in format data. separated by comma + Pattern: ^[^\r\n;#]+$ In: query */ Filter *string /*Key which we want the entries for + Pattern: ^[^\r\n;#]+$ In: query */ Key *string @@ -65,6 +68,7 @@ type GetStickTableEntriesParams struct { Offset *int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -149,6 +153,20 @@ func (o *GetStickTableEntriesParams) bindFilter(rawData []string, hasKey bool, f } o.Filter = &raw + if err := o.validateFilter(formats); err != nil { + return err + } + + return nil +} + +// validateFilter carries on validations for parameter Filter +func (o *GetStickTableEntriesParams) validateFilter(formats strfmt.Registry) error { + + if err := validate.Pattern("filter", "query", *o.Filter, `^[^\r\n;#]+$`); err != nil { + return err + } + return nil } @@ -167,6 +185,20 @@ func (o *GetStickTableEntriesParams) bindKey(rawData []string, hasKey bool, form } o.Key = &raw + if err := o.validateKey(formats); err != nil { + return err + } + + return nil +} + +// validateKey carries on validations for parameter Key +func (o *GetStickTableEntriesParams) validateKey(formats strfmt.Registry) error { + + if err := validate.Pattern("key", "query", *o.Key, `^[^\r\n;#]+$`); err != nil { + return err + } + return nil } @@ -204,5 +236,19 @@ func (o *GetStickTableEntriesParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetStickTableEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/get_stick_table_parameters.go b/operations/stick_table/get_stick_table_parameters.go index dc7b61e4..ef34e3e8 100644 --- a/operations/stick_table/get_stick_table_parameters.go +++ b/operations/stick_table/get_stick_table_parameters.go @@ -26,6 +26,7 @@ import ( "github.com/go-openapi/errors" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetStickTableParams creates a new GetStickTableParams object @@ -47,6 +48,7 @@ type GetStickTableParams struct { /*Stick table name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ Name string @@ -82,5 +84,19 @@ func (o *GetStickTableParams) bindName(rawData []string, hasKey bool, formats st // Parameter is provided by construction from the route o.Name = raw + if err := o.validateName(formats); err != nil { + return err + } + + return nil +} + +// validateName carries on validations for parameter Name +func (o *GetStickTableParams) validateName(formats strfmt.Registry) error { + + if err := validate.Pattern("name", "path", o.Name, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/set_stick_table_entries.go b/operations/stick_table/set_stick_table_entries.go index 71d0a195..dacceead 100644 --- a/operations/stick_table/set_stick_table_entries.go +++ b/operations/stick_table/set_stick_table_entries.go @@ -103,6 +103,7 @@ type SetStickTableEntriesBody struct { // key // Required: true + // Pattern: ^[^\r\n;#]+$ Key *string `json:"key"` } @@ -150,6 +151,10 @@ func (o *SetStickTableEntriesBody) validateKey(formats strfmt.Registry) error { return err } + if err := validate.Pattern("stick_table_entry"+"."+"key", "body", *o.Key, `^[^\r\n;#]+$`); err != nil { + return err + } + return nil } diff --git a/operations/stick_table/set_stick_table_entries_parameters.go b/operations/stick_table/set_stick_table_entries_parameters.go index f6067e32..47cb3a3a 100644 --- a/operations/stick_table/set_stick_table_entries_parameters.go +++ b/operations/stick_table/set_stick_table_entries_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewSetStickTableEntriesParams creates a new SetStickTableEntriesParams object @@ -48,6 +49,7 @@ type SetStickTableEntriesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -104,5 +106,19 @@ func (o *SetStickTableEntriesParams) bindParentName(rawData []string, hasKey boo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *SetStickTableEntriesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/create_table_parameters.go b/operations/table/create_table_parameters.go index 722a4edc..c9822c5c 100644 --- a/operations/table/create_table_parameters.go +++ b/operations/table/create_table_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type CreateTableParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *CreateTableParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/delete_table_parameters.go b/operations/table/delete_table_parameters.go index 6e3a5fc6..42b45dac 100644 --- a/operations/table/delete_table_parameters.go +++ b/operations/table/delete_table_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTableParams creates a new DeleteTableParams object @@ -66,6 +67,7 @@ type DeleteTableParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -169,6 +171,20 @@ func (o *DeleteTableParams) bindParentName(rawData []string, hasKey bool, format // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/get_table_parameters.go b/operations/table/get_table_parameters.go index 3e4d1ae9..437ea201 100644 --- a/operations/table/get_table_parameters.go +++ b/operations/table/get_table_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetTableParams creates a new GetTableParams object @@ -53,6 +54,7 @@ type GetTableParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -118,6 +120,20 @@ func (o *GetTableParams) bindParentName(rawData []string, hasKey bool, formats s // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/get_tables_parameters.go b/operations/table/get_tables_parameters.go index cdf2856d..a1c15173 100644 --- a/operations/table/get_tables_parameters.go +++ b/operations/table/get_tables_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetTablesParams creates a new GetTablesParams object @@ -48,6 +49,7 @@ type GetTablesParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetTablesParams) bindParentName(rawData []string, hasKey bool, formats // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTablesParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/table/replace_table_parameters.go b/operations/table/replace_table_parameters.go index 257018ce..fc9373e0 100644 --- a/operations/table/replace_table_parameters.go +++ b/operations/table/replace_table_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTableParams struct { Name string /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -200,6 +202,20 @@ func (o *ReplaceTableParams) bindParentName(rawData []string, hasKey bool, forma // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTableParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/create_tcp_check_backend_parameters.go b/operations/tcp_check/create_tcp_check_backend_parameters.go index eccb3a07..0170d661 100644 --- a/operations/tcp_check/create_tcp_check_backend_parameters.go +++ b/operations/tcp_check/create_tcp_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPCheckBackendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/create_tcp_check_defaults_parameters.go b/operations/tcp_check/create_tcp_check_defaults_parameters.go index 44fb6302..521d6617 100644 --- a/operations/tcp_check/create_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/create_tcp_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/delete_tcp_check_backend_parameters.go b/operations/tcp_check/delete_tcp_check_backend_parameters.go index e3a771cf..a4f1e813 100644 --- a/operations/tcp_check/delete_tcp_check_backend_parameters.go +++ b/operations/tcp_check/delete_tcp_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPCheckBackendParams creates a new DeleteTCPCheckBackendParams object @@ -66,6 +67,7 @@ type DeleteTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPCheckBackendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/delete_tcp_check_defaults_parameters.go b/operations/tcp_check/delete_tcp_check_defaults_parameters.go index 16582b44..713482b9 100644 --- a/operations/tcp_check/delete_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/delete_tcp_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPCheckDefaultsParams creates a new DeleteTCPCheckDefaultsParams object @@ -66,6 +67,7 @@ type DeleteTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_all_tcp_check_backend_parameters.go b/operations/tcp_check/get_all_tcp_check_backend_parameters.go index 2871e6f8..8d916238 100644 --- a/operations/tcp_check/get_all_tcp_check_backend_parameters.go +++ b/operations/tcp_check/get_all_tcp_check_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPCheckBackendParams creates a new GetAllTCPCheckBackendParams object @@ -48,6 +49,7 @@ type GetAllTCPCheckBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPCheckBackendParams) bindParentName(rawData []string, hasKey bo // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_all_tcp_check_defaults_parameters.go b/operations/tcp_check/get_all_tcp_check_defaults_parameters.go index 3001d2e3..41f60a29 100644 --- a/operations/tcp_check/get_all_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/get_all_tcp_check_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPCheckDefaultsParams creates a new GetAllTCPCheckDefaultsParams object @@ -48,6 +49,7 @@ type GetAllTCPCheckDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_tcp_check_backend_parameters.go b/operations/tcp_check/get_tcp_check_backend_parameters.go index 499447cc..ffa5cb2f 100644 --- a/operations/tcp_check/get_tcp_check_backend_parameters.go +++ b/operations/tcp_check/get_tcp_check_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPCheckBackendParams creates a new GetTCPCheckBackendParams object @@ -54,6 +55,7 @@ type GetTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPCheckBackendParams) bindParentName(rawData []string, hasKey bool, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/get_tcp_check_defaults_parameters.go b/operations/tcp_check/get_tcp_check_defaults_parameters.go index 8ea37fff..a9e4fae5 100644 --- a/operations/tcp_check/get_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/get_tcp_check_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPCheckDefaultsParams creates a new GetTCPCheckDefaultsParams object @@ -54,6 +55,7 @@ type GetTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey bool // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_all_tcp_check_backend_parameters.go b/operations/tcp_check/replace_all_tcp_check_backend_parameters.go index 16c59bed..deadf502 100644 --- a/operations/tcp_check/replace_all_tcp_check_backend_parameters.go +++ b/operations/tcp_check/replace_all_tcp_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPCheckBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPCheckBackendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go b/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go index 6bad0a9c..98cd03f1 100644 --- a/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/replace_all_tcp_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPCheckDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPCheckDefaultsParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_tcp_check_backend_parameters.go b/operations/tcp_check/replace_tcp_check_backend_parameters.go index 2519c621..5e436eee 100644 --- a/operations/tcp_check/replace_tcp_check_backend_parameters.go +++ b/operations/tcp_check/replace_tcp_check_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPCheckBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPCheckBackendParams) bindParentName(rawData []string, hasKey b // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPCheckBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_check/replace_tcp_check_defaults_parameters.go b/operations/tcp_check/replace_tcp_check_defaults_parameters.go index 9e1bd36b..bbb4f53c 100644 --- a/operations/tcp_check/replace_tcp_check_defaults_parameters.go +++ b/operations/tcp_check/replace_tcp_check_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPCheckDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPCheckDefaultsParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPCheckDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go index d26e46fe..2e8d135b 100644 --- a/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/create_tcp_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPRequestRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/create_tcp_request_rule_defaults_parameters.go b/operations/tcp_request_rule/create_tcp_request_rule_defaults_parameters.go index 67b0f6d1..ec7f17db 100644 --- a/operations/tcp_request_rule/create_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/create_tcp_request_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPRequestRuleDefaultsParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go index 1bb09dc4..13daf0d8 100644 --- a/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/create_tcp_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPRequestRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go index a91a9ade..c3ad3589 100644 --- a/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/delete_tcp_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPRequestRuleBackendParams creates a new DeleteTCPRequestRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPRequestRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/delete_tcp_request_rule_defaults_parameters.go b/operations/tcp_request_rule/delete_tcp_request_rule_defaults_parameters.go index 6aafb50f..4a1815b6 100644 --- a/operations/tcp_request_rule/delete_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/delete_tcp_request_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPRequestRuleDefaultsParams creates a new DeleteTCPRequestRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPRequestRuleDefaultsParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go index f08d511b..a447ba1b 100644 --- a/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/delete_tcp_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPRequestRuleFrontendParams creates a new DeleteTCPRequestRuleFrontendParams object @@ -66,6 +67,7 @@ type DeleteTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPRequestRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go index 4b5640fb..ddc13b1b 100644 --- a/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/get_all_tcp_request_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPRequestRuleBackendParams creates a new GetAllTCPRequestRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllTCPRequestRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPRequestRuleBackendParams) bindParentName(rawData []string, has // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_all_tcp_request_rule_defaults_parameters.go b/operations/tcp_request_rule/get_all_tcp_request_rule_defaults_parameters.go index 0c5b28dc..ff2c2e6a 100644 --- a/operations/tcp_request_rule/get_all_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/get_all_tcp_request_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPRequestRuleDefaultsParams creates a new GetAllTCPRequestRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllTCPRequestRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPRequestRuleDefaultsParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go index 41f2eda9..260567bd 100644 --- a/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/get_all_tcp_request_rule_frontend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPRequestRuleFrontendParams creates a new GetAllTCPRequestRuleFrontendParams object @@ -48,6 +49,7 @@ type GetAllTCPRequestRuleFrontendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPRequestRuleFrontendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go index 7eef7832..96eca69a 100644 --- a/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/get_tcp_request_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPRequestRuleBackendParams creates a new GetTCPRequestRuleBackendParams object @@ -54,6 +55,7 @@ type GetTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPRequestRuleBackendParams) bindParentName(rawData []string, hasKey // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_tcp_request_rule_defaults_parameters.go b/operations/tcp_request_rule/get_tcp_request_rule_defaults_parameters.go index 181d7b1f..40303edc 100644 --- a/operations/tcp_request_rule/get_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/get_tcp_request_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPRequestRuleDefaultsParams creates a new GetTCPRequestRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPRequestRuleDefaultsParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go index 96e8b0f6..0b44994c 100644 --- a/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/get_tcp_request_rule_frontend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPRequestRuleFrontendParams creates a new GetTCPRequestRuleFrontendParams object @@ -54,6 +55,7 @@ type GetTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPRequestRuleFrontendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go index 92bedea6..9868f289 100644 --- a/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/replace_all_tcp_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPRequestRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPRequestRuleBackendParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_all_tcp_request_rule_defaults_parameters.go b/operations/tcp_request_rule/replace_all_tcp_request_rule_defaults_parameters.go index 4795742a..7a16c0ce 100644 --- a/operations/tcp_request_rule/replace_all_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/replace_all_tcp_request_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPRequestRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPRequestRuleDefaultsParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go index 3d386463..22749d09 100644 --- a/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/replace_all_tcp_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPRequestRuleFrontendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPRequestRuleFrontendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go b/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go index 4c11e122..546ce8e8 100644 --- a/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go +++ b/operations/tcp_request_rule/replace_tcp_request_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPRequestRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPRequestRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPRequestRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_tcp_request_rule_defaults_parameters.go b/operations/tcp_request_rule/replace_tcp_request_rule_defaults_parameters.go index c94104d5..f68d164a 100644 --- a/operations/tcp_request_rule/replace_tcp_request_rule_defaults_parameters.go +++ b/operations/tcp_request_rule/replace_tcp_request_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPRequestRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPRequestRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPRequestRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go b/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go index cb1bd52e..143da8d8 100644 --- a/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go +++ b/operations/tcp_request_rule/replace_tcp_request_rule_frontend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPRequestRuleFrontendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPRequestRuleFrontendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPRequestRuleFrontendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go index 1e80ee9c..59a4169e 100644 --- a/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/create_tcp_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPResponseRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/create_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/create_tcp_response_rule_defaults_parameters.go index 24eea127..e0aff736 100644 --- a/operations/tcp_response_rule/create_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/create_tcp_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type CreateTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *CreateTCPResponseRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *CreateTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go index 1d5e4f9b..356fce97 100644 --- a/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/delete_tcp_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPResponseRuleBackendParams creates a new DeleteTCPResponseRuleBackendParams object @@ -66,6 +67,7 @@ type DeleteTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPResponseRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/delete_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/delete_tcp_response_rule_defaults_parameters.go index 4216d8c2..d1d46cac 100644 --- a/operations/tcp_response_rule/delete_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/delete_tcp_response_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewDeleteTCPResponseRuleDefaultsParams creates a new DeleteTCPResponseRuleDefaultsParams object @@ -66,6 +67,7 @@ type DeleteTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -174,6 +176,20 @@ func (o *DeleteTCPResponseRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *DeleteTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go index ea8ca33b..a0f6d6a4 100644 --- a/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/get_all_tcp_response_rule_backend_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPResponseRuleBackendParams creates a new GetAllTCPResponseRuleBackendParams object @@ -48,6 +49,7 @@ type GetAllTCPResponseRuleBackendParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPResponseRuleBackendParams) bindParentName(rawData []string, ha // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/get_all_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/get_all_tcp_response_rule_defaults_parameters.go index dc8b543b..98167e7b 100644 --- a/operations/tcp_response_rule/get_all_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/get_all_tcp_response_rule_defaults_parameters.go @@ -27,6 +27,7 @@ import ( "github.com/go-openapi/runtime" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" ) // NewGetAllTCPResponseRuleDefaultsParams creates a new GetAllTCPResponseRuleDefaultsParams object @@ -48,6 +49,7 @@ type GetAllTCPResponseRuleDefaultsParams struct { /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -94,6 +96,20 @@ func (o *GetAllTCPResponseRuleDefaultsParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetAllTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go index 55cc0465..7d3b4441 100644 --- a/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/get_tcp_response_rule_backend_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPResponseRuleBackendParams creates a new GetTCPResponseRuleBackendParams object @@ -54,6 +55,7 @@ type GetTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPResponseRuleBackendParams) bindParentName(rawData []string, hasKe // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/get_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/get_tcp_response_rule_defaults_parameters.go index be37635f..8f104c8e 100644 --- a/operations/tcp_response_rule/get_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/get_tcp_response_rule_defaults_parameters.go @@ -28,6 +28,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // NewGetTCPResponseRuleDefaultsParams creates a new GetTCPResponseRuleDefaultsParams object @@ -54,6 +55,7 @@ type GetTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -124,6 +126,20 @@ func (o *GetTCPResponseRuleDefaultsParams) bindParentName(rawData []string, hasK // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *GetTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go index eccae8c8..fdba05e5 100644 --- a/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/replace_all_tcp_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPResponseRuleBackendParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPResponseRuleBackendParams) bindParentName(rawData []string // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/replace_all_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/replace_all_tcp_response_rule_defaults_parameters.go index e515668f..fed7afd4 100644 --- a/operations/tcp_response_rule/replace_all_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/replace_all_tcp_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -69,6 +70,7 @@ type ReplaceAllTCPResponseRuleDefaultsParams struct { ForceReload *bool /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -176,6 +178,20 @@ func (o *ReplaceAllTCPResponseRuleDefaultsParams) bindParentName(rawData []strin // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceAllTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go b/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go index b9141c45..763fc83f 100644 --- a/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go +++ b/operations/tcp_response_rule/replace_tcp_response_rule_backend_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPResponseRuleBackendParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPResponseRuleBackendParams) bindParentName(rawData []string, h // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPResponseRuleBackendParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go b/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go index 8233dfce..84c9c388 100644 --- a/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go +++ b/operations/tcp_response_rule/replace_tcp_response_rule_defaults_parameters.go @@ -29,6 +29,7 @@ import ( "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" "github.com/haproxytech/client-native/v6/models" ) @@ -74,6 +75,7 @@ type ReplaceTCPResponseRuleDefaultsParams struct { Index int64 /*Parent name Required: true + Pattern: ^[^\r\n<>*;$#&{}"]+$ In: path */ ParentName string @@ -205,6 +207,20 @@ func (o *ReplaceTCPResponseRuleDefaultsParams) bindParentName(rawData []string, // Parameter is provided by construction from the route o.ParentName = raw + if err := o.validateParentName(formats); err != nil { + return err + } + + return nil +} + +// validateParentName carries on validations for parameter ParentName +func (o *ReplaceTCPResponseRuleDefaultsParams) validateParentName(formats strfmt.Registry) error { + + if err := validate.Pattern("parent_name", "path", o.ParentName, `^[^\r\n<>*;$#&{}"]+$`); err != nil { + return err + } + return nil } diff --git a/runtime/commands/stack.go b/runtime/commands/stack.go index 844a87fc..bf56fee9 100644 --- a/runtime/commands/stack.go +++ b/runtime/commands/stack.go @@ -100,16 +100,15 @@ func MakeStackDump() (string, error) { if len(bucket.CreatedBy.Calls) != 0 { extra += fmt.Sprintf(" [Created by %s.%s @ %s:%d]", bucket.CreatedBy.Calls[0].Func.DirName, bucket.CreatedBy.Calls[0].Func.Name, bucket.CreatedBy.Calls[0].SrcName, bucket.CreatedBy.Calls[0].Line) } - result.WriteString(fmt.Sprintf("%d: %s%s\n", len(bucket.IDs), bucket.State, extra)) + fmt.Fprintf(&result, "%d: %s%s\n", len(bucket.IDs), bucket.State, extra) // Print the stack lines. for _, line := range bucket.Stack.Calls { arg := line.Args - result.WriteString(fmt.Sprintf( - " %-*s %-*s %s(%s)\n", + fmt.Fprintf(&result, " %-*s %-*s %s(%s)\n", pkgLen, line.Func.DirName, srcLen, fmt.Sprintf("%s:%d", line.SrcName, line.Line), - line.Func.Name, &arg)) + line.Func.Name, &arg) } if bucket.Stack.Elided { result.WriteString(" (...)\n")