@stoplight/elements-core 7.5.4 → 7.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__fixtures__/operations/string-numeric-enums.d.ts +3 -0
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -987,7 +987,7 @@ const booleanOptions = [
|
|
|
987
987
|
{ label: 'True', value: 'true' },
|
|
988
988
|
];
|
|
989
989
|
function enumOptions(enumValues, required) {
|
|
990
|
-
const options = map(enumValues, v => ({ value:
|
|
990
|
+
const options = map(enumValues, v => ({ value: typeof v === 'number' ? v : String(v) }));
|
|
991
991
|
return required ? options : [{ label: 'Not Set', value: '' }, ...options];
|
|
992
992
|
}
|
|
993
993
|
function parameterOptions(parameter) {
|
package/index.js
CHANGED
|
@@ -1042,7 +1042,7 @@ const booleanOptions = [
|
|
|
1042
1042
|
{ label: 'True', value: 'true' },
|
|
1043
1043
|
];
|
|
1044
1044
|
function enumOptions(enumValues, required) {
|
|
1045
|
-
const options = map__default["default"](enumValues, v => ({ value:
|
|
1045
|
+
const options = map__default["default"](enumValues, v => ({ value: typeof v === 'number' ? v : String(v) }));
|
|
1046
1046
|
return required ? options : [{ label: 'Not Set', value: '' }, ...options];
|
|
1047
1047
|
}
|
|
1048
1048
|
function parameterOptions(parameter) {
|
package/index.mjs
CHANGED
|
@@ -987,7 +987,7 @@ const booleanOptions = [
|
|
|
987
987
|
{ label: 'True', value: 'true' },
|
|
988
988
|
];
|
|
989
989
|
function enumOptions(enumValues, required) {
|
|
990
|
-
const options = map(enumValues, v => ({ value:
|
|
990
|
+
const options = map(enumValues, v => ({ value: typeof v === 'number' ? v : String(v) }));
|
|
991
991
|
return required ? options : [{ label: 'Not Set', value: '' }, ...options];
|
|
992
992
|
}
|
|
993
993
|
function parameterOptions(parameter) {
|