Sha256: 6108fc43b092e1259632a7e4e0ad5f01843f5b897dab4186ce97ee3ae1dcaabe
Contents?: true
Size: 577 Bytes
Versions: 14
Compression:
Stored size: 577 Bytes
Contents
require "json_test_data" module Rambo module RamlModels class Body attr_reader :body, :type def initialize(raml) @body = raml end def content_type body.content_type end def example @example ||= body.example || generate_from_schema || {}.to_json end def schema @schema ||= body.schema end private def generate_from_schema return nil unless body.schema JSON.pretty_generate(JsonTestData.generate!(body.schema, ruby: true)) end end end end
Version data entries
14 entries across 14 versions & 1 rubygems