forked from kevadesu/forgejo
go1.16 (#14783)
This commit is contained in:
parent
030646eea4
commit
47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions
2
vendor/github.com/go-swagger/go-swagger/cmd/swagger/commands/generate/spec.go
generated
vendored
2
vendor/github.com/go-swagger/go-swagger/cmd/swagger/commands/generate/spec.go
generated
vendored
|
@ -37,7 +37,7 @@ type SpecFile struct {
|
|||
ScanModels bool `long:"scan-models" short:"m" description:"includes models that were annotated with 'swagger:model'"`
|
||||
Compact bool `long:"compact" description:"when present, doesn't prettify the json"`
|
||||
Output flags.Filename `long:"output" short:"o" description:"the file to write to"`
|
||||
Input flags.Filename `long:"input" short:"i" description:"the file to use as input"`
|
||||
Input flags.Filename `long:"input" short:"i" description:"an input swagger file with which to merge"`
|
||||
Include []string `long:"include" short:"c" description:"include packages matching pattern"`
|
||||
Exclude []string `long:"exclude" short:"x" description:"exclude packages matching pattern"`
|
||||
IncludeTags []string `long:"include-tag" short:"" description:"include routes having specified tags (can be specified many times)"`
|
||||
|
|
2
vendor/github.com/go-swagger/go-swagger/cmd/swagger/commands/generate/spec_go111.go
generated
vendored
2
vendor/github.com/go-swagger/go-swagger/cmd/swagger/commands/generate/spec_go111.go
generated
vendored
|
@ -24,7 +24,7 @@ type SpecFile struct {
|
|||
ScanModels bool `long:"scan-models" short:"m" description:"includes models that were annotated with 'swagger:model'"`
|
||||
Compact bool `long:"compact" description:"when present, doesn't prettify the json"`
|
||||
Output flags.Filename `long:"output" short:"o" description:"the file to write to"`
|
||||
Input flags.Filename `long:"input" short:"i" description:"the file to use as input"`
|
||||
Input flags.Filename `long:"input" short:"i" description:"an input swagger file with which to merge"`
|
||||
Include []string `long:"include" short:"c" description:"include packages matching pattern"`
|
||||
Exclude []string `long:"exclude" short:"x" description:"exclude packages matching pattern"`
|
||||
IncludeTags []string `long:"include-tag" short:"" description:"include routes having specified tags (can be specified many times)"`
|
||||
|
|
6
vendor/github.com/go-swagger/go-swagger/cmd/swagger/swagger.go
generated
vendored
6
vendor/github.com/go-swagger/go-swagger/cmd/swagger/swagger.go
generated
vendored
|
@ -19,16 +19,10 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
"github.com/go-openapi/loads"
|
||||
"github.com/go-openapi/loads/fmts"
|
||||
"github.com/go-swagger/go-swagger/cmd/swagger/commands"
|
||||
flags "github.com/jessevdk/go-flags"
|
||||
)
|
||||
|
||||
func init() {
|
||||
loads.AddLoader(fmts.YAMLMatcher, fmts.YAMLDoc)
|
||||
}
|
||||
|
||||
var opts struct {
|
||||
// General options applicable to all commands
|
||||
Quiet func() `long:"quiet" short:"q" description:"silence logs"`
|
||||
|
|
120
vendor/github.com/go-swagger/go-swagger/generator/bindata.go
generated
vendored
120
vendor/github.com/go-swagger/go-swagger/generator/bindata.go
generated
vendored
File diff suppressed because one or more lines are too long
8
vendor/github.com/go-swagger/go-swagger/generator/template_repo.go
generated
vendored
8
vendor/github.com/go-swagger/go-swagger/generator/template_repo.go
generated
vendored
|
@ -635,7 +635,7 @@ func pascalize(arg string) string {
|
|||
return "Empty"
|
||||
case 1: // handle special case when we have a single rune that is not handled by swag.ToGoName
|
||||
switch runes[0] {
|
||||
case '+', '-', '#', '_': // those cases are handled differently than swag utility
|
||||
case '+', '-', '#', '_', '*', '/', '=': // those cases are handled differently than swag utility
|
||||
return prefixForName(arg)
|
||||
}
|
||||
}
|
||||
|
@ -654,6 +654,12 @@ func prefixForName(arg string) string {
|
|||
return "Minus"
|
||||
case '#':
|
||||
return "HashTag"
|
||||
case '*':
|
||||
return "Asterisk"
|
||||
case '/':
|
||||
return "ForwardSlash"
|
||||
case '=':
|
||||
return "EqualSign"
|
||||
// other cases ($,@ etc..) handled by swag.ToGoName
|
||||
}
|
||||
return "Nr"
|
||||
|
|
3
vendor/github.com/go-swagger/go-swagger/generator/types.go
generated
vendored
3
vendor/github.com/go-swagger/go-swagger/generator/types.go
generated
vendored
|
@ -583,7 +583,7 @@ func (t *typeResolver) resolveObject(schema *spec.Schema, isAnonymous bool) (res
|
|||
|
||||
// only complex map elements are nullable (when not forced by x-nullable)
|
||||
// TODO: figure out if required to check when not discriminated like arrays?
|
||||
et.IsNullable = t.isNullable(schema.AdditionalProperties.Schema)
|
||||
et.IsNullable = !et.IsArray && t.isNullable(schema.AdditionalProperties.Schema)
|
||||
if et.IsNullable {
|
||||
result.GoType = "map[string]*" + et.GoType
|
||||
} else {
|
||||
|
@ -866,6 +866,7 @@ func (t *typeResolver) ResolveSchema(schema *spec.Schema, isAnonymous, isRequire
|
|||
// non-embedded external type: by default consider that validation is enabled (SkipExternalValidation: false)
|
||||
result.SkipExternalValidation = swag.BoolValue(extType.Hints.NoValidation)
|
||||
}
|
||||
|
||||
if nullable, ok := t.isNullableOverride(schema); ok {
|
||||
result.IsNullable = nullable
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue