sourcey / spectacle

Beautiful static documentation generator for OpenAPI/Swagger 2.0
https://sourcey.com/spectacle
Other
1.28k stars 337 forks source link

Respnose lose schema properties #172

Open birbird opened 6 years ago

birbird commented 6 years ago

It seems the response section only shows the type field, lose all others. The properties description is important. response

The code from https://github.com/sourcey/spectacle/blob/master/app/views/partials/swagger/responses.hbs#L26

        {{#each responses}}
          {{#schemaReferenceContext $ref}}
            <div class="prop-row prop-group">
              <div class="prop-name">
                {{! Use response-code and http-name as text}}
                <div class="prop-title">{{@key}} {{httpResponseCode @key}}</div>
                {{#if schema}}
                  <div class="prop-ref">{{>json-schema/reference schema}}</div>
                  <!-- <span class="swagger-global"></span> <span class="json-schema-reference"><a href="{{$ref}}">{{$ref}}</a></span> -->
                {{/if}}
              </div>
              <div class="prop-value">
                {{md description}}
              </div>
            </div>
            {{#if schema.type}}
              <div class="prop-row prop-inner">
                <div class="prop-name">type</div>
                <div class="prop-value">{{>json-schema/datatype schema}}</div>
              </div>
            {{/if}}
          {{/schemaReferenceContext}}
        {{/each}}