Sha256: 912c6132d230bd64962de03823ff25463ae95aa493d844a60906d725a1bc45e9
Contents?: true
Size: 470 Bytes
Versions: 19
Compression:
Stored size: 470 Bytes
Contents
module Endpoints class Schema < Base get "/schema.json" do content_type "application/schema+json" headers["Cache-Control"] = "public, max-age=3600" unless File.exist?(schema_filename) message = "This application does not have a schema file." raise Pliny::Errors::NotFound, message end File.read(schema_filename) end private def schema_filename "#{Config.root}/schema/schema.json" end end end
Version data entries
19 entries across 19 versions & 1 rubygems