fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
This commit is contained in:
36
vendor/github.com/getkin/kin-openapi/openapi3/schema_pattern.go
generated
vendored
Normal file
36
vendor/github.com/getkin/kin-openapi/openapi3/schema_pattern.go
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
package openapi3
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var patRewriteCodepoints = regexp.MustCompile(`(?P<replaced_with_slash_x>\\u)(?P<code>[0-9A-F]{4})`)
|
||||
|
||||
// See https://pkg.go.dev/regexp/syntax
|
||||
func intoGoRegexp(re string) string {
|
||||
return patRewriteCodepoints.ReplaceAllString(re, `\x{${code}}`)
|
||||
}
|
||||
|
||||
// NOTE: racey WRT [writes to schema.Pattern] vs [reads schema.Pattern then writes to compiledPatterns]
|
||||
func (schema *Schema) compilePattern(c RegexCompilerFunc) (cp RegexMatcher, err error) {
|
||||
pattern := schema.Pattern
|
||||
if c != nil {
|
||||
cp, err = c(pattern)
|
||||
} else {
|
||||
cp, err = regexp.Compile(intoGoRegexp(pattern))
|
||||
}
|
||||
if err != nil {
|
||||
schemaErr := &SchemaError{
|
||||
Schema: schema,
|
||||
SchemaField: "pattern",
|
||||
Origin: err,
|
||||
Reason: fmt.Sprintf("cannot compile pattern %q: %v", pattern, err),
|
||||
}
|
||||
err = newSchemaPatternRegexError(pattern, schemaErr, schema.Origin)
|
||||
return
|
||||
}
|
||||
|
||||
compiledPatterns.Store(pattern, cp)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user