Skip to content

Commit 494d591

Browse files
committed
add: raw value for enums
1 parent e54f61c commit 494d591

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adaptor.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,12 @@ function transform(api, defaults, callback) {
10201020
entry["allowableValues.values"] = schema.enum;
10211021
entry.allowableValues.values = schema.enum;
10221022
for (let v of schema.enum) {
1023-
let e = { name: v, nameInCamelCase: Case.camel(v), value: '"'+v+'"' }; // insane, why aren't the quotes in the template?
1023+
let e = {
1024+
name: v,
1025+
nameInCamelCase: Case.camel(v),
1026+
value: '"'+v+'"',
1027+
valueRaw: v
1028+
};
10241029
entry.allowableValues.enumVars.push(e);
10251030
}
10261031
entry.allowableValues.enumVars = convertArray(entry.allowableValues.enumVars);

0 commit comments

Comments
 (0)