Skip to content

Commit

Permalink
feat(model generator): add a model schema as a standard place to list…
Browse files Browse the repository at this point in the history
… and document your model's ttributes
  • Loading branch information
cueedee committed Aug 26, 2016
1 parent 0b10652 commit 58ac9e1
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion generators/model/templates/model.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

'use strict'


###*<% if ( description ) { %>
# <%- description %>
#<% } %>
Expand All @@ -29,7 +30,30 @@
# @constructor<% } %>
###

class <%- className %> extends Backbone.Model<% if ( singleton ) { %>
class <%- className %> extends Backbone.Model

###*
# List of [valid attribute names](#attrs).
#
# @property schema
#
# @type Array[String]
# @static
# @final
###

###*
# The `<%- className %>`'s unique identifier.
#
# @attribute id
#
# @type String
###

schema: [

'id'
]<% if ( singleton ) { %>


## Export singleton.
Expand Down

0 comments on commit 58ac9e1

Please sign in to comment.