We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 841fbec commit 22482f5Copy full SHA for 22482f5
src/utils/Utils.ts
@@ -64,6 +64,16 @@ function replaceTag(match: string, mediaTypeModel: MediaTypeModel): string {
64
return '{{ INVALID TEMPLATE TAG - operator ENUM is only applicable on an array }}';
65
}
66
return obj.join(', ');
67
+ } else if (operator === 'FIRST') {
68
+ if (!Array.isArray(obj)) {
69
+ return '{{ INVALID TEMPLATE TAG - operator FIRST is only applicable on an array }}';
70
+ }
71
+ return obj[0];
72
+ } else if (operator === 'LAST') {
73
74
+ return '{{ INVALID TEMPLATE TAG - operator LAST is only applicable on an array }}';
75
76
+ return obj[obj.length - 1];
77
78
79
return `{{ INVALID TEMPLATE TAG - unknown operator ${operator} }}`;
0 commit comments