Sha256: 7fd536a662dc2a236e2c8b59aa41a69a5bbad8c32c951b698c6edc9519cb9e55
Contents?: true
Size: 661 Bytes
Versions: 5
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true require 'oas_objs/helpers' module OpenApi module DSL # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#header-object class HeaderObj < Hash include Helpers attr_accessor :processed, :schema def initialize(desc = '', schema) self.schema = SchemaObj.new(schema) self.processed = { description: desc } end def process processed.merge!(schema: schema.process) end end end end __END__ Header Object Example { "description": "The number of allowed requests in the current period", "schema": { "type": "integer" } }
Version data entries
5 entries across 5 versions & 1 rubygems