Този сайт работи по-добре с JavaScript.
Начало
Каталог
Помощ
Вход
bubblev
/
swagger-ui
Наблюдаван
4
Харесван
0
Разклонения
0
Код
Задачи
0
Заявки за сливане
0
Версии
0
Уики
Activity
Преглед на файлове
added separate request and response templates
bubble
Tony Tam
преди 11 години
родител
2dd2eb9e50
ревизия
7b9f8a2651
променени са
4 файла
, в които са
добавени 48
реда и са
изтрити 0
реда
Разделен изглед
Diff Options
Показване на статистика
Download Patch File
Download Diff File
+14
-0
src/main/coffeescript/view/ParameterContentTypeView.coffee
+14
-0
src/main/coffeescript/view/ResponseContentTypeView.coffee
+10
-0
src/main/template/parameter_content_type.handlebars
+10
-0
src/main/template/response_content_type.handlebars
+ 14
- 0
src/main/coffeescript/view/ParameterContentTypeView.coffee
Целия файл
@@ -0,0 +1,14 @@
class ParameterContentTypeView extends Backbone.View
initialize: ->
render: ->
template = @template()
$(@el).html(template(@model))
$('label[for=parameterContentType]', $(@el)).text('Parameter content type:')
@
template: ->
Handlebars.templates.parameter_content_type
+ 14
- 0
src/main/coffeescript/view/ResponseContentTypeView.coffee
Целия файл
@@ -0,0 +1,14 @@
class ResponseContentTypeView extends Backbone.View
initialize: ->
render: ->
template = @template()
$(@el).html(template(@model))
$('label[for=responseContentType]', $(@el)).text('Response Content Type')
@
template: ->
Handlebars.templates.response_content_type
+ 10
- 0
src/main/template/parameter_content_type.handlebars
Целия файл
@@ -0,0 +1,10 @@
<label for="parameterContentType"></label>
<select name="parameterContentType">
{{#if consumes}}
{{#each consumes}}
<option value="{{{this}}}">{{{this}}}</option>
{{/each}}
{{else}}
<option value="application/json">application/json</option>
{{/if}}
</select>
+ 10
- 0
src/main/template/response_content_type.handlebars
Целия файл
@@ -0,0 +1,10 @@
<label for="responseContentType"></label>
<select name="responseContentType">
{{#if produces}}
{{#each produces}}
<option value="{{{this}}}">{{{this}}}</option>
{{/each}}
{{else}}
<option value="application/json">application/json</option>
{{/if}}
</select>
Пиши
Преглед
Зареждане…
Отказ
Запис