{{ $formatMap := newScratch }}

        {{ range $pattern, $schema := .patternProperties }}
            {{ $formatId := or (index $schema "x-pattern-format") "string" }}

            {{ if $formatMap.Get $formatId }}
                {{ errorf "'%s' pattern format is defined more than once for the same property" $formatId }}
            {{ end }}

            {{ $formatMap.Set $formatId (partial "property-type" $schema) }}
        {{ end }}

        {{/* First generate the type string for each format. */}}
 