Array of Arrays argument

Should it be possible to create an argument of type {:array, {:array, :integer}}? Right now I'm getting a compile error.
** (KeyError) key :type not found in: [min_length: [type: :non_neg_integer, doc: "A minimum length for the items"], items: [type: :any, doc: "A schema for individual items"], max_length: [type: :non_neg_integer, doc: "A maximum length for the items"], nil_items?: [type: :boolean, doc: "Whether or not the list can contain nil items", default: false], empty_values: [type: {:list, :any}, doc: "A set of values that, if encountered, will be considered an empty list.", default: [""]]]
(elixir 1.14.3) lib/keyword.ex:1115: Keyword.update!/4
(elixir 1.14.3) lib/keyword.ex:1111: Keyword.update!/4
(spark 0.3.9) lib/spark/options_helpers.ex:143: anonymous fn/1 in Spark.OptionsHelpers.sanitize_schema/1
(elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(spark 0.3.9) lib/spark/options_helpers.ex:110: Spark.OptionsHelpers.validate/2
(ash 2.5.16) lib/ash/type/type.ex:949: Ash.Type.validate_constraints/2
(ash 2.5.16) lib/ash/type/type.ex:936: Ash.Type.set_type_transformation/1
lib/jdl_engine/inventory/resources/hotel.ex:111: (module)
** (KeyError) key :type not found in: [min_length: [type: :non_neg_integer, doc: "A minimum length for the items"], items: [type: :any, doc: "A schema for individual items"], max_length: [type: :non_neg_integer, doc: "A maximum length for the items"], nil_items?: [type: :boolean, doc: "Whether or not the list can contain nil items", default: false], empty_values: [type: {:list, :any}, doc: "A set of values that, if encountered, will be considered an empty list.", default: [""]]]
(elixir 1.14.3) lib/keyword.ex:1115: Keyword.update!/4
(elixir 1.14.3) lib/keyword.ex:1111: Keyword.update!/4
(spark 0.3.9) lib/spark/options_helpers.ex:143: anonymous fn/1 in Spark.OptionsHelpers.sanitize_schema/1
(elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
(spark 0.3.9) lib/spark/options_helpers.ex:110: Spark.OptionsHelpers.validate/2
(ash 2.5.16) lib/ash/type/type.ex:949: Ash.Type.validate_constraints/2
(ash 2.5.16) lib/ash/type/type.ex:936: Ash.Type.set_type_transformation/1
lib/jdl_engine/inventory/resources/hotel.ex:111: (module)
3 Replies
ZachDaniel
ZachDaniel•3y ago
🤔 it should be possible, but perhaps there is a bug. Could you make an issue in ash core please?
barnabasj
barnabasjOP•3y ago
Will do
ZachDaniel
ZachDaniel•3y ago
This is fixed in main 😄

Did you find this page helpful?