Skip to content

Commit

Permalink
Add support for property example
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian committed May 21, 2024
1 parent f2a973a commit 7ccf7bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion assets/js/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,17 @@ $(function () {
name = property.xml.name;
}
if (typeof property.type != 'undefined') {
example[name] = buildExample(property.type, definitions, optional);
example[name] = buildExample(property.type, definitions, optional);
}
if (typeof property.$ref != 'undefined' && property.$ref != type) {
example[name] = buildExample(property.$ref, definitions, optional);
}
if (typeof property.items != 'undefined' && property.items.$ref != type) {
example[name].push(buildExample(property.items.$ref, definitions, optional));
}
if (property.example) {
example[name] = property.example;
}
}
});
}
Expand Down

0 comments on commit 7ccf7bf

Please sign in to comment.