<commit_before>module Openapi
  class SwaggerRoot
    include Swagger::Blocks

    def self.build_specification(config, controller_classes)
      schema = Rails.env.production? ? 'https' : 'http'

      swagger_root do
        key :swagger,  '2.0'
        key :host,     ENV['HOST'] || 'localhost:3000'
        key :basePath, config[:base_path] || '/api'
        key :consumes, %w(application/json)
        key :produces, %w(application/json text/csv)
        key :schemes,  [schema]

        info do
          key :title,       config[:title] || 'Default'
          key :description, config[:description] || ''
          key :version,     config[:version] || '1.0'
        end
<commit_msg>Support both https/http out of the box<commit_after>module Openapi
  class SwaggerRoot
    include Swagger::Blocks

    def self.build_specification(config, controller_classes)
      swagger_root do
        key :swagger,  '2.0'
        key :host,     ENV['HOST'] || 'localhost:3000'
        key :basePath, config[:base_path] || '/api'
        key :consumes, %w(application/json)
        key :produces, %w(application/json text/csv)
        key :schemes,  ['https', 'http']

        info do
          key :title,       config[:title] || 'Default'
          key :description, config[:description] || ''
          key :version,     config[:version] || '1.0'
        end

{'fraction_non_alphanumeric': 0.1296978629329403, 'fraction_numerical': 0.011790714812085483, 'mean_word_length': 2.4035087719298245, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6120226', 'n_tokens_mistral': 420, 'n_tokens_neox': 405, 'n_words': 103}