Skip to content

Commit 4a8933b

Browse files
authored
Merge pull request #301 from zewish/main
add: raw value for enums
2 parents 71d44a1 + 494d591 commit 4a8933b

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)