openapi-explorer 0.10.416 → 0.10.418

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.
@@ -105,23 +105,11 @@ export function getSampleValueByType(schemaObj, fallbackPropertyName, skipExampl
105
105
 
106
106
  const example = Array.isArray(schemaObj.examples) ? schemaObj.examples[0] : (_Object$values$0$valu = (_Object$values$ = Object.values(schemaObj.examples || {})[0]) === null || _Object$values$ === void 0 ? void 0 : _Object$values$.value) !== null && _Object$values$0$valu !== void 0 ? _Object$values$0$valu : schemaObj.example;
107
107
 
108
- if (example === '') {
109
- return '';
110
- }
111
-
112
- if (example === null) {
113
- return null;
114
- }
115
-
116
- if (example === 0) {
117
- return 0;
118
- }
119
-
120
108
  if (skipExampleStrings && typeof example === 'string') {
121
109
  return '';
122
110
  }
123
111
 
124
- if (example) {
112
+ if (typeof example !== 'undefined') {
125
113
  return example;
126
114
  }
127
115
 
@@ -121,23 +121,11 @@ function getSampleValueByType(schemaObj, fallbackPropertyName, skipExampleString
121
121
 
122
122
  const example = Array.isArray(schemaObj.examples) ? schemaObj.examples[0] : (_Object$values$0$valu = (_Object$values$ = Object.values(schemaObj.examples || {})[0]) === null || _Object$values$ === void 0 ? void 0 : _Object$values$.value) !== null && _Object$values$0$valu !== void 0 ? _Object$values$0$valu : schemaObj.example;
123
123
 
124
- if (example === '') {
125
- return '';
126
- }
127
-
128
- if (example === null) {
129
- return null;
130
- }
131
-
132
- if (example === 0) {
133
- return 0;
134
- }
135
-
136
124
  if (skipExampleStrings && typeof example === 'string') {
137
125
  return '';
138
126
  }
139
127
 
140
- if (example) {
128
+ if (typeof example !== 'undefined') {
141
129
  return example;
142
130
  }
143
131
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openapi-explorer",
3
- "version": "0.10.416",
3
+ "version": "0.10.418",
4
4
  "description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
5
5
  "author": "Rhosys Developers <developers@rhosys.ch>",
6
6
  "type": "module",