You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: json_schema_reference_string.rb
    path of file: ./repos/vets-api/modules/appeals_api/app/swagger/appeals_api
    
    the code of the file until where you have to start completion: # frozen_string_lit
    
    def to_swagger
      raise ArgumentError, "Invalid reference: #{ref.inspect}" unless valid?

      return "#{SWAGGER_DEF_PATH}/#{definition_name}" if definition_name

      SWAGGER_DEF_PATH
    end