Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Commit 6e522eb

Browse files
committed
Fix references inside array and map
Added map and array cases to avro_refs.test.lua. Rewritten avro_refs.test.lua to avoid nullable types in case of avro-schema-2* (it does not work in many cases). Thanks to Roman Proskin (@opomuc) for catching it up.
1 parent 005331b commit 6e522eb

File tree

2 files changed

+266
-149
lines changed

2 files changed

+266
-149
lines changed

graphql/avro_helpers.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,12 @@ function avro_helpers.expand_references(avro_schema, opts)
225225
elseif avro_t == 'array' or avro_t == 'array*' then
226226
local res = table.copy(avro_schema)
227227
res.items = avro_helpers.expand_references(avro_schema.items,
228-
{definitons = definitions})
228+
{definitions = definitions})
229229
return res
230230
elseif avro_t == 'map' or avro_t == 'map*' then
231231
local res = table.copy(avro_schema)
232232
res.values = avro_helpers.expand_references(avro_schema.values,
233-
{definitons = definitions})
233+
{definitions = definitions})
234234
return res
235235
elseif avro_helpers.is_scalar_type(avro_t) then
236236
return avro_schema

0 commit comments

Comments
 (0)