File tree 2 files changed +25
-2
lines changed
2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -25543,13 +25543,36 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
25543
25543
statusCode = ref5[q];
25544
25544
statusCode.isXML = isXML;
25545
25545
statusCode.isJSON = isJSON;
25546
+ if (!_.isUndefined(statusCode.headers)) {
25547
+ statusCode.headers = this.parseHeadersType(statusCode.headers);
25548
+ }
25546
25549
this.addStatusCode(statusCode);
25547
25550
}
25548
25551
25549
25552
this.showSnippet();
25550
25553
return this;
25551
25554
},
25552
25555
25556
+ parseHeadersType: function (headers) {
25557
+ var map = {
25558
+ 'string': {
25559
+ 'date-time': 'dateTime',
25560
+ 'date' : 'date'
25561
+ }
25562
+ };
25563
+
25564
+ _.forEach(headers, function (header) {
25565
+ var value;
25566
+ header = header || {};
25567
+ value = map[header.type] && map[header.type][header.format];
25568
+ if (!_.isUndefined(value)) {
25569
+ header.type = value;
25570
+ }
25571
+ });
25572
+
25573
+ return headers;
25574
+ },
25575
+
25553
25576
contains: function (produces, type) {
25554
25577
return produces.filter(function (val) {
25555
25578
if (val.indexOf(type) > -1) {
You can’t perform that action at this time.
0 commit comments