ci: regenerated with OpenAPI Doc 0.0.3, Speakeasy CLI 1.193.0

This commit is contained in:
speakeasybot
2024-02-23 14:46:43 +00:00
parent 2b4d612003
commit 41ce744f6d
52 changed files with 3004 additions and 968 deletions

View File

@@ -8,6 +8,7 @@ import (
"math/big"
"reflect"
"regexp"
"strconv"
"strings"
"time"
@@ -63,6 +64,29 @@ func Contains(slice []string, item string) bool {
return false
}
func MatchStatusCodes(expectedCodes []string, statusCode int) bool {
for _, codeStr := range expectedCodes {
code, err := strconv.Atoi(codeStr)
if err == nil {
if code == statusCode {
return true
}
continue
}
codeRange, err := strconv.Atoi(string(codeStr[0]))
if err != nil {
continue
}
if statusCode >= (codeRange*100) && statusCode < ((codeRange+1)*100) {
return true
}
}
return false
}
func parseStructTag(tagKey string, field reflect.StructField) map[string]string {
tag := field.Tag.Get(tagKey)
if tag == "" {