Sha256: ac136547c0a4f5e5a554a3f1e67d920ed6e7a1d202c7761948ee63f8c4d61395

Contents?: true

Size: 536 Bytes

Versions: 10

Compression:

Stored size: 536 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Endpoints
    class Configs < Grape::API
      namespace :configs do
        desc "Get configs", {
          is_array: true,
          success: Entities::Config,
          summary: "Get configs"
        }
        get "/" do
          configs = (Mihari.analyzers + Mihari.emitters + Mihari.enrichers).filter_map do |klass|
            Mihari::Structs::Config.from_class(klass)
          end

          present(configs, with: Entities::Config)
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mihari-5.6.2 lib/mihari/web/endpoints/configs.rb
mihari-5.6.1 lib/mihari/web/endpoints/configs.rb
mihari-5.6.0 lib/mihari/web/endpoints/configs.rb
mihari-5.5.0 lib/mihari/web/endpoints/configs.rb
mihari-5.4.9 lib/mihari/web/endpoints/configs.rb
mihari-5.4.8 lib/mihari/web/endpoints/configs.rb
mihari-5.4.7 lib/mihari/web/endpoints/configs.rb
mihari-5.4.6 lib/mihari/web/endpoints/configs.rb
mihari-5.4.5 lib/mihari/web/endpoints/configs.rb
mihari-5.4.4 lib/mihari/web/endpoints/configs.rb