<commit_before>module Endpoints
  class Schema < Base
    get "/schema.json" do
      content_type("application/schema+json")
      response.headers["Cache-Control"] = "public, max-age=3600"
      unless File.exists?(schema_filename)
        raise Pliny::Errors::NotFound.new("This application does not have a schema file.")
      end
      File.read(schema_filename)
    end

    private

    def schema_filename
      "#{Config.root}/schema/schema.json"
    end
  end
end<commit_msg>Improve schema.rb styling<commit_after>module Endpoints
  class Schema < Base
    get "/schema.json" do
      content_type "application/schema+json"
      headers["Cache-Control"] = "public, max-age=3600"
      unless File.exists?(schema_filename)
        message = "This application does not have a schema file."
        raise Pliny::Errors::NotFound.new(message)
      end
      File.read(schema_filename)
    end

    private

    def schema_filename
      "#{Config.root}/schema/schema.json"
    end
  end
end
{'fraction_non_alphanumeric': 0.10320641282565131, 'fraction_numerical': 0.008016032064128256, 'mean_word_length': 2.9800796812749004, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2254155', 'n_tokens_mistral': 297, 'n_tokens_neox': 290, 'n_words': 70}