@mono blaine: Thanks for good pointers. At one point I'll have to fix 1.9 issues.
@Zyclops: A technically correct way would indeed be to use the @property tag, but 'id', 'front', 'back' aren't properties of the Model instance itself, they are sub-properties of data property:
Code:
/**
* @property {Object} data
* @property {Number} data.id An ID...
* @property {String} data.front Front...
* @property {String} data.back Back...
*/
But this is quite clumsy way to do it. Instead I'd suggest you document them as config options (which they really are), and additionally document the class itself as extending just Object - I'd assume in this context you only are interested of the fields, all the cruft inherited from Ext.data.Model would just clutter things up:
Code:
/**
* @extends Object
* The template stores HTML that defines what will be shown on the.. bla bla
*/
Ext.define('Template', {
extend: 'Ext.data.Model',
fields: [
/**
* @cfg {Number} id ...
*/
{name: 'id', type: 'int'},
/**
* @cfg {String} front ...
*/
{name: 'front', type: 'string'},
/**
* @cfg {String} back ...
*/
{name: 'back', type: 'string'}
]
});