added validator for v2

This commit is contained in:
Tony Tam
2014-09-25 21:23:05 -07:00
parent 3492c72024
commit 8918fa1c24
5 changed files with 1598 additions and 1511 deletions

View File

@@ -14,13 +14,15 @@ class MainView extends Backbone.View
if (sorterName == "alpha") # sort top level paths if alpha
@model.apisArray.sort sorter
log @model
if @model.info and @model.info.license and typeof @model.info.license is 'string'
name = @model.info.license
url = @model.info.licenseUrl
@model.info.license = {}
@model.info.license.name = name
@model.info.license.url = url
if @model.url.indexOf('http://localhost') is -1 and @model.swaggerVersion is 2
@model.validatorUrl = @model.url
render: ->
# Render the outer container for resources