mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 00:04:42 +00:00
Let built-in modules describe the classes Iris's own classes hold (registerHeldType)
This commit is contained in:
1 parent
46676fd99b
commit
668d46bd91
12 files changed
+131
-3
No files matched your search
@@ -47,6 +47,7 @@ final class PackSchemaBuilder {
|
||||
private PackSchema describe(FeatureCatalog catalog) {
|
||||
var features = catalogued(catalog).map(this::draft).toList();
|
||||
var resources = catalog.resourceKinds().stream().map(this::describe).toList();
|
||||
catalog.heldTypes().forEach(this::draft);
|
||||
requireUniqueSnippets();
|
||||
var types = completeTypes();
|
||||
return new PackSchema(features.stream().map(feature -> feature.complete(types)).toList(), resources,
|
||||
@@ -97,6 +98,10 @@ final class PackSchemaBuilder {
|
||||
return Stream.concat(settings, objects).sorted(Comparator.comparing(catalogued -> catalogued.descriptor().id()));
|
||||
}
|
||||
|
||||
private void draft(HeldTypeRegistration held) {
|
||||
drafts.settings(SchemaSource.heldType(held));
|
||||
}
|
||||
|
||||
private FeatureDraft draft(Catalogued catalogued) {
|
||||
var owner = ownerOf(catalogued.descriptor());
|
||||
drafts.settings(SchemaSource.settings(catalogued.descriptor(), owner));
|
||||
|
||||
Reference in new issue
Block a user