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 9f0aa95 commit 49fb422Copy full SHA for 49fb422
src/ExampleGenerator.js
@@ -1274,7 +1274,20 @@ export class ExampleGenerator extends AmfHelperMixin(Object) {
1274
}
1275
});
1276
} else {
1277
- let value = this._computeJsonPropertyValue(range);
+ const aKey = this._getAmfKey(this.ns.aml.vocabularies.shapes.anyOf);
1278
+ let value
1279
+ const anyOf = this._ensureArray(range[aKey]);
1280
+ if(anyOf){
1281
+ for(let anyOfIndex=0; i<anyOf.length; anyOfIndex++) {
1282
+ const exampleValue = this._computeJsonPropertyValue(anyOf[anyOfIndex]);
1283
+ if(exampleValue!==null){
1284
+ value = exampleValue;
1285
+ break;
1286
+ }
1287
1288
+ }else{
1289
+ value = this._computeJsonPropertyValue(range);
1290
1291
if (value === undefined) {
1292
value = '';
1293
0 commit comments