private static boolean isInsideAnnotationBody(SchemaNode node) {
        Node currentNode = node;
        while (currentNode != null) {
            if (currentNode.getSchemaNode().isSchemaASTInstance(annotationBody.class)) return true;
            currentNode = currentNode.getParent();
        }
        return false;
    }
IdentifyType identifies types in the schema document
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/schemadocument/parser/schema/IdentifyType.java