async function getSchemaFormat(schemaUrl) {
  try {
    const res = await fetch(schemaUrl)
    /** @type {any} */
    const data = await res.json()
    const schemaUri = data.$schema || ''
    const draftMatch = /draft-(\d+)[-\w]*/i.exec(schemaUri)
    if (draftMatch) {
      return `JsonSchema/draft-${draftMatch[1]}`
    }
    return 'JsonSchema'
  } catch {
    return 'JsonSchema'
  }
}
Determines the schema format by fetching the schema and reading its $schema URI.
@param {string} schemaUrl - The schema URL.
@returns {Promise<string>} - The schema format (e.g., JsonSchema/draft-07).