Skip to content

Commit

Permalink
Make Schema Collapsed by Default
Browse files Browse the repository at this point in the history
I think this gives a better ux since schema can be guessed from example and it tends to be way longer than the body itself. Having it displayed by default is a bit distracting.
  • Loading branch information
piti118 committed Sep 12, 2017
1 parent c52a482 commit 8e48db0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions templates/mixins.jade
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,14 @@ mixin RequestResponseBody(request, collapse, showBlank)
!= self.highlight(request.body, null, ['json', 'yaml', 'xml', 'javascript'])
div(style="height: 1px;")
if request.schema
h5 Schema
pre: code
!= self.highlight(request.schema, null, ['json', 'yaml', 'xml'])
div
h5(style='display: inline;') Schema
.collapse-button
span.close Hide
span.open Show
.collapse-content
pre: code
!= self.highlight(request.schema, null, ['json', 'yaml', 'xml'])
div(style="height: 1px;")
if !request.hasContent
.description.text-muted This response has no content.
Expand Down

0 comments on commit 8e48db0

Please sign in to comment.