Skip to content

BasicTemplateSet

Alexander Krutov edited this page Jun 26, 2015 · 15 revisions

This is a base class for two predefined template sets used by Radish: SimpleTemplateSet and BootstrapTemplateSet.

The BasicTemplateSet class is needed as a layer because two template sets use the same templating logic, inluding common tags, replacement rules and template names. The difference between template sets is only in appearance of output content.

Below is a comprehensive information about templates and tags defined in BasicTemplateSet (and therefore in two descendant template sets).

Page

Template for whole documentation page. Inherited from AbstractTemplateSet. Tags:

  • {{title}} — title of the documentation page. Will be displayed at the top of the documentation page. To set the title, please use a Title property of BasicTemplateSet;
  • {{methods-list}} — list of REST API methods. Will be replaced by rendering results of Method template;
  • {{json-methods-list}} — will be replaced by JSON object that contains info about REST API methods. Used for navigation and for searching by methods.

MethodsGroup

Template for displaying information about group of methods. There are two tags defined:

  • {{title}} — for displaying group's title;
  • {{description}} — for displaying group's description;

Method

Template for displaying information about particular REST API method. Tags:

  • {{method}} — displays REST API method type defined by MethodAttribute.MethodType , like GET, POST, PUT and etc.;
  • {{id}} — displays unique id of a method defined by MethodAttribute.Id;
  • {{title}} — displays method title defined by MethodAttribute.Title;
  • {{description}} — displays a method description defined by MethodAttribute.Description;
  • {{request-parameters-list}} — will be replaced by table of request parameters, defined with [RequestParameterAttribute] (./Attributes#requestparameterattribute);
  • {{request-body}} — will be replaced by request body info, defined with [RequestBodyAttribute] (./Attributes#requestbodyattribute);
  • {{request-body-example}} — will be replaced by request body example, defined with [RequestBodyExampleAttribute] (./Attributes#requestbodyexampleattribute);
  • {{response-body}} —
  • {{response-body-example}} —
  • {{response-codes-list}} —

Clone this wiki locally