public boolean isTopLevelPointer(String pointer) {
        return pointer.startsWith(rootDefinitionPointer)
                && countSegments(pointer) == rootDefinitionSegments + 1;
    }
Checks if the given JSON pointer points to a top-level definition.

<p>Note that this expects the pointer to exactly start with the same
string that is configured as {@link JsonSchemaConfig#getDefinitionPointer()},
or the default value of "#/definitions". If the number of segments
in the provided pointer is also equal to the number of segments
in the default pointer + 1, then it is considered a top-level pointer.

@param pointer Pointer to check.
@return Returns true if this is a top-level definition pointer.
smithy-jsonschema/src/main/java/software/amazon/smithy/jsonschema/JsonSchemaConverter.java