def describe(shallow = true, example: nil)
      description = {}
      # Clone the common options
      TOP_LEVEL_OPTIONS.each do |option_name|
        description[option_name] = options[option_name] if options.key? option_name
      end

      # Make sure this option definition is not mistaken for the real generated example
      if (ex_def = description.delete(:example))
        description[:example_definition] = ex_def
      end

      special_options = options.keys - TOP_LEVEL_OPTIONS - INTERNAL_OPTIONS
      description[:options] = {} unless special_options.empty?
      special_options.each do |opt_name|
        description[:options][opt_name] = options[opt_name]
      end
      # Change the reference option to the actual class name.
      if (reference = options[:reference])
        description[:options][:reference] = reference.name
      end

      description[:type] = type.describe(shallow, example: example)
      # Move over any example from the type, into the attribute itself
      if (ex = description[:type].delete(:example))
        description[:example] = dump(ex)
      end

      description
    end
def describe(shallow = true, example: nil)
      description = {}
      # Clone the common options
      TOP_LEVEL_OPTIONS.each do |option_name|
        description[option_name] = options[option_name] if options.key? option_name
      end

      # Make sure this option definition is not mistaken for the real generated example
      if (ex_def = description.delete(:example))
        description[:example_definition] = ex_def
      end

      special_options = options.keys - TOP_LEVEL_OPTIONS - INTERNAL_OPTIONS
      description[:options] = {} unless special_options.empty?
      special_options.each do |opt_name|
        description[:options][opt_name] = options[opt_name]
      end
      # Change the reference option to the actual class name.
      if (reference = options[:reference])
        description[:options][:reference] = reference.name
      end

      description[:type] = type.describe(shallow, example: example)
      # Move over any example from the type, into the attribute itself
      if (ex = description[:type].delete(:example))
        description[:example] = dump(ex)
      end

      description
    end
Options we don't want to expose when describing attributes