github.com/thetreep/go-swagger@v0.0.0-20240223100711-35af64f14f01/generator/templates/serializers/schemaserializer.gotmpl (about) 1 {{ define "schemaSerializer" }}{{/* switches to the appropriate serializer for any given type */}} 2 {{- if and .IsSubType (not .HasBaseType) }} 3 {{ template "hasDiscriminatedSerializer" . }} 4 {{- else if .IsTuple }} 5 {{ template "tupleSerializer" . }} 6 {{- else if .HasBaseType }} 7 {{ template "hasDiscriminatedSerializer" . }} 8 {{- else if .IsAdditionalProperties }} 9 {{ template "additionalPropertiesSerializer" . }} 10 {{- else if and (gt (len .AllOf) 0) (not .IsSubType ) }} 11 {{ template "allOfSerializer" . }} 12 {{- else if and .IsComplexObject .StrictAdditionalProperties }} 13 {{ template "noAdditionalPropertiesSerializer" . }} 14 {{- end }} 15 {{- end }}