Sha256: 43179329301b01c01952fb7a4f546f75ee357bc7fd62baf5d719750fa3c7d3e1
Contents?: true
Size: 655 Bytes
Versions: 10
Compression:
Stored size: 655 Bytes
Contents
# frozen_string_literal: true class ReeSwagger::BuildSchema include Ree::FnDSL fn :build_schema do link :build_endpoint_schema link 'ree_swagger/dto/endpoint_dto', -> { EndpointDto } end contract(String, String, String, ArrayOf[EndpointDto] => Hash) def call(title:, description:, version:, endpoints:) { openapi: "3.0.0", info: { title: title, description: description, version: version }, paths: endpoints.each_with_object(Hash.new { _1[_2] = {} }) { path_dto = build_endpoint_schema(_1) _2[path_dto.path].merge!(path_dto.schema) } } end end
Version data entries
10 entries across 10 versions & 1 rubygems