lib/generators/jsonapi/swagger/swagger_generator.rb
def array_items_type(attribute, col = nil)
      items_type = col.type if col

      type_info = resource_klass.attribute_type_info

      if type_info && type_info&.[](attribute.to_sym).is_a?(Hash) && type_info&.[](attribute.to_sym)&.[](:items_type)
        items_type = type_info&.[](attribute.to_sym)&.[](:items_type)
        items_type = swagger_type_from_column_type(items_type) if items_type
      end

      return :string if items_type.blank?

      items_type.to_sym
    end
# derives the items type of an array type.
derives the items type of an array type.
derives the items type of an array type .
def array_items_type(attribute, col = nil)
      items_type = col.type if col
      type_info = resource_klass.attribute_type_info
      if type_info && type_info&.[](attribute.to_sym).is_a?(Hash) && type_info&.[](attribute.to_sym)&.[](:items_type)
        items_type = type_info&.[](attribute.to_sym)&.[](:items_type)
        items_type = swagger_type_from_column_type(items_type) if items_type
      end
      return :string if items_type.blank?
      items_type.to_sym
    end
def array_items_type ( attribute , col = nil ) items_type = col . type if col type_info = resource_klass . attribute_type_info if type_info && type_info &. [] ( attribute . to_sym ) . is_a? ( Hash ) && type_info &. [] ( attribute . to_sym ) &. [] ( :items_type ) items_type = type_info &. [] ( attribute . to_sym ) &. [] ( :items_type ) items_type = swagger_type_from_column_type ( items_type ) if items_type end return :string if items_type . blank? items_type . to_sym end
derives the items type of an array type.
derives the items type of an array type .
attribute
col