<commit_before>module JsonSchema::Faker::Strategy
  class Simple
    def call(schema, hint: nil, position:)
      if ::JsonSchema::Faker::Configuration.logger
        ::JsonSchema::Faker::Configuration.logger.debug "current position: #{position}"
        ::JsonSchema::Faker::Configuration.logger.debug "current hint:     #{hint.inspect}"
      end

      raise "here comes nil for schema at #{position}" unless schema

      # merge one_of/any_of/all_of
      ::JsonSchema::Faker::Configuration.logger.debug schema.inspect_schema if ::JsonSchema::Faker::Configuration.logger
      schema = compact_schema(schema, position: position)

      return schema.default if schema.default

      if schema.not
        hint ||= {}<commit_msg>:bulb: ability to generate faker for format<commit_after>module JsonSchema::Faker::Strategy
  class Simple
    class << self
      def formats
        @formats ||= {}
      end
    end

    def call(schema, hint: nil, position:)
      if ::JsonSchema::Faker::Configuration.logger
        ::JsonSchema::Faker::Configuration.logger.debug "current position: #{position}"
        ::JsonSchema::Faker::Configuration.logger.debug "current hint:     #{hint.inspect}"
      end

      raise "here comes nil for schema at #{position}" unless schema

      # merge one_of/any_of/all_of
      ::JsonSchema::Faker::Configuration.logger.debug schema.inspect_schema if ::JsonSchema::Faker::Configuration.logger
      schema = compact_schema(schema, position: position)

      return schema.default if schema.default
      return self.class.formats(schema.format).call(schema, hint: hint, position: position) if self.class.formats.has_key?(schema.format)

      if schema.not
        hint ||= {}
{'fraction_non_alphanumeric': 0.11733800350262696, 'fraction_numerical': 0.0, 'mean_word_length': 3.6324324324324326, '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': '6802333', 'n_tokens_mistral': 470, 'n_tokens_neox': 461, 'n_words': 115}