danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 480 forks source link

How to hide Schema segment? #245

Closed imyellow closed 8 years ago

imyellow commented 8 years ago

When I use + Attributes in Response,it will add Schema to html code auto, how can I disable it? thanks.

scullingworth commented 8 years ago

You can do this by modifying the default Jade template. Make a copy of index.jade, mixins.jade and scripts.js from the Olio template, then in mixins.jade remove:

             if request.schema
                h5 Schema
                pre: code
                    != self.highlight(request.schema, null, ['json', 'yaml', 'xml'])
                div(style="height: 1px;")

and run aglio with --theme-template /path/to/new/template/index.jade option.

This seems like a very useful change as I did the same thing to ours. Seems like this should be added as an option to the Olio theme.