Sha256: d2410c779b1a3dccd820ca1d4836cc7166bacc565ebc433a9f491cf8eb9bbb98
Contents?: true
Size: 402 Bytes
Versions: 24
Compression:
Stored size: 402 Bytes
Contents
# frozen_string_literal: true module Cocina module Generator # Class for generating from an openapi array class SchemaArray < SchemaBase def generate "attribute :#{name.camelize(:lower)}, Types::Strict::Array.of(#{array_of_type}).default([].freeze)" end def array_of_type schema_doc.items.name || dry_datatype(schema_doc.items) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems