Sha256: fa3f28e269c917c58595fe9e1a4ba352e802c7b195301179add11e808fe67890
Contents?: true
Size: 770 Bytes
Versions: 22
Compression:
Stored size: 770 Bytes
Contents
# frozen_string_literal: true require 'json' require 'appmap/service/validator/config_validator' module AppMap module Command module AgentSetup ValidateStruct = Struct.new(:config_file) class Validate < ValidateStruct def perform schema_path = File.expand_path('../../../../../config-schema.yml', __FILE__) schema = YAML.safe_load(File.read(schema_path)) result = { version: 2, errors: config_validator.violations.map(&:to_h), schema: schema } puts JSON.pretty_generate(result) end private def config_validator @validator ||= Service::Validator::ConfigValidator.new(config_file) end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems