mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-03 00:17:15 +00:00
fix required properties for json schemas
This commit is contained in:
parent
e5cb4d82a3
commit
e38dae0a32
@ -140,6 +140,8 @@ public class SchemaBuilder {
|
|||||||
|
|
||||||
JSONObject property = buildProperty(k, c);
|
JSONObject property = buildProperty(k, c);
|
||||||
|
|
||||||
|
if (property.getBoolean("!required"))
|
||||||
|
required.put(k.getName());
|
||||||
property.remove("!required");
|
property.remove("!required");
|
||||||
properties.put(k.getName(), property);
|
properties.put(k.getName(), property);
|
||||||
}
|
}
|
||||||
@ -512,8 +514,9 @@ public class SchemaBuilder {
|
|||||||
d.add(fancyType);
|
d.add(fancyType);
|
||||||
d.add(getDescription(k.getType()));
|
d.add(getDescription(k.getType()));
|
||||||
|
|
||||||
if (k.getType().isAnnotationPresent(Snippet.class)) {
|
Snippet snippet = k.getType().getDeclaredAnnotation(Snippet.class);
|
||||||
String sm = k.getType().getDeclaredAnnotation(Snippet.class).value();
|
if (snippet != null) {
|
||||||
|
String sm = snippet.value();
|
||||||
d.add(" ");
|
d.add(" ");
|
||||||
d.add("You can instead specify \"snippet/" + sm + "/some-name.json\" to use a snippet file instead of specifying it here.");
|
d.add("You can instead specify \"snippet/" + sm + "/some-name.json\" to use a snippet file instead of specifying it here.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user