<commit_before>{{ $parameters := .parameters }}
{{ $name := "" }}

{{ $paramArr := slice }}
{{ range .parameters }}
  {{ $paramArr = $paramArr | append .in }}
{{ end }}
{{ $paramArr = uniq $paramArr }}

<h3 class="mbm">Request</h3>
{{ range $paramArr }}
  {{ $paramType := . }}
  <h4 class="mb-border bb pbxs fw600"><span class="ttc">{{ $paramType }}</span> parameters</h4>
  <dl class="desc-list mbl">
  {{ range $parameters }}
    {{ if eq .in $paramType }}
      {{ $example := "" }}
      {{ $enum := slice }}
      {{ $type := "any" }}

  <div class="flex flex-wrap mb-border bb bw1 pvs">
    <dt class="plxs">
      <code>{{ .name }}</code>
      {{ if eq .required true }}
        <br><span class="mb-badge mb-badge--red">Required</span>
      {{ end }}
    </dt>
    <dd class="plxs">
      {{ .description }}
      {{ range $key,$value := . }}
        {{ if eq $key "name" }}
          {{ $name = $value }}
        {{ end }}

        {{ if reflect.IsMap . }}
          {{ if eq $key "schema" }}
            {{ range $k,$v := $value }}
              {{ if eq $k "type" }}
                {{ $type = $v }}
              {{ end }}
              {{ if eq $k "enum" }}
                {{ $enum = $v }}
              {{ end }}
            {{ end }}
          {{ end }}
        {{ else if eq $key "example" }}
          {{ $example = delimit (slice $name $value) "=" }}
        {{ end }}
      {{ end }}

      {{ if and (reflect.IsSlice $enum) ( gt (len $enum) 0 ) }}
          <div class="text-note">
            {{ if gt (len $enum) 1 }}
              Enum:
            {{ else }}
              Value:
            {{ end }}
          </div>
          {{ range $enum }}
            <code class="mbxs db maxwmaxc">{{.}}</code>
          {{ end }}
      {{ end }}

      {{ if gt (len $example) 0 }}
          <div class="text-note">Example:</div>
          <code class="mbxs db maxwmaxc">{{$example}}</code>
      {{ end }}

      <div class="text-note gray">
        {{$type}}
      </div>
    </dd>
  </div>
    {{ end }}
  {{ end }}
  </dl>
{{ end }}<commit_msg>Arrange request data more like response schema<commit_after>{{ $parameters := .parameters }}
{{ $name := "" }}

{{ $paramArr := slice }}
{{ range .parameters }}
  {{ $paramArr = $paramArr | append .in }}
{{ end }}
{{ $paramArr = uniq $paramArr }}

<h3 class="mbm">Request</h3>
{{ range $paramArr }}
  {{ $paramType := . }}
  <h4 class="mb-border bb pbxs fw600"><span class="ttc">{{ $paramType }}</span> parameters</h4>
  <dl class="desc-list mbl">
  {{ range $parameters }}
    {{ if eq .in $paramType }}
      {{ $example := "" }}
      {{ $enum := slice }}
      {{ $type := "any" }}

      {{ range $key, $value := . }}
      {{ if eq $key "name" }}
        {{ $name = $value }}
      {{ else if eq $key "schema" }}
        {{ with .type }}
          {{ $type = . }}
        {{ end }}
        {{ with .enum }}
          {{ $enum = . }}
        {{ end }}
      {{ else if eq $key "example" }}
        {{ $example = delimit (slice $name $value) "=" }}
      {{ end }}
    {{ end }}

  <div class="flex flex-wrap mb-border bb bw1 pvs">
    <dt class="pls">
      <code>{{ .name }}</code>
      {{ if eq .required true }}
        <br><span class="mb-badge mb-badge--red">Required</span>
      {{ end }}
    </dt>
    <dd class="pls">
      {{ .description }}
      <div class="text-note gray">
        {{ $type }}
      </div>

      {{ if and (reflect.IsSlice $enum) ( gt (len $enum) 0 ) }}
          <div class="text-note">
            {{ if gt (len $enum) 1 }}
              Enum:
            {{ else }}
              Value:
            {{ end }}
          </div>
          {{ range $enum }}
            <code class="mbxs db maxwmaxc">{{.}}</code>
          {{ end }}
      {{ end }}

      {{ if gt (len $example) 0 }}
          <div class="text-note">Example:</div>
          <code class="mbxs db maxwmaxc">{{$example}}</code>
      {{ end }}
    </dd>
  </div>
    {{ end }}
  {{ end }}
  </dl>
{{ end }}
{'fraction_non_alphanumeric': 0.21926074930852402, 'fraction_numerical': 0.0055318078953985415, 'mean_word_length': 1.6626506024096386, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3288509', 'n_tokens_mistral': 1326, 'n_tokens_neox': 1294, 'n_words': 324}