Sha256: 441e995373d21713ce428491589a46f939d7040f2b605dd73bc78bd76c9c67e5
Contents?: true
Size: 609 Bytes
Versions: 9
Compression:
Stored size: 609 Bytes
Contents
module Restspec module Docs class TemplateContext def namespace_store Restspec::NamespaceStore end def endpoints_store Restspec::EndpointStore end def schema_store Restspec::SchemaStore end def json_example(schema) sample = Restspec::Schema::SchemaExample.new(schema).value JSON.pretty_generate(sample).gsub(/^/, ' ') end def json_example_code(schema) "<div class=\"highlight highlight-json\"> <pre><code>#{json_example(schema)}</pre></code> </div>" end end end end
Version data entries
9 entries across 9 versions & 1 rubygems