summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-swagger/go-swagger/generator/templates/schemaembedded.gotmpl
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-swagger/go-swagger/generator/templates/schemaembedded.gotmpl')
-rw-r--r--vendor/github.com/go-swagger/go-swagger/generator/templates/schemaembedded.gotmpl21
1 files changed, 0 insertions, 21 deletions
diff --git a/vendor/github.com/go-swagger/go-swagger/generator/templates/schemaembedded.gotmpl b/vendor/github.com/go-swagger/go-swagger/generator/templates/schemaembedded.gotmpl
deleted file mode 100644
index 58e1a949c..000000000
--- a/vendor/github.com/go-swagger/go-swagger/generator/templates/schemaembedded.gotmpl
+++ /dev/null
@@ -1,21 +0,0 @@
-{{ define "schemaEmbedded" }}
-type {{ pascalize .Name }} struct {
- {{ if .ElemType.IsNullable }}*{{ end }}{{ .ElemType.GoType }}
-}
-
-func ({{.ReceiverName }} {{ if or .IsTuple .IsComplexObject }}*{{ end }}{{ if .Discriminates }}{{ camelize .Name }}{{ else if .IsExported }}{{ pascalize .Name }}{{ else }}{{ .Name }}{{ end }}) Validate(formats strfmt.Registry) error {
- var f any = {{ .ReceiverName }}.{{ dropPackage .ElemType.GoType }}
- if v, ok := f.(runtime.Validatable) ; ok {
- return v.Validate(formats)
- }
- return nil
-}
-
-func ({{.ReceiverName }} {{ if or .IsTuple .IsComplexObject }}*{{ end }}{{ if .Discriminates }}{{ camelize .Name }}{{ else if .IsExported }}{{ pascalize .Name }}{{ else }}{{ .Name }}{{ end }}) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
- var f any = {{ .ReceiverName }}.{{ dropPackage .ElemType.GoType }}
- if v, ok := f.(runtime.ContextValidatable) ; ok {
- return v.ContextValidate(ctx, formats)
- }
- return nil
-}
-{{- end }}