apigear-io / cli

The ApiGear client as go project
https://apigear.io
MIT License
1 stars 2 forks source link

maps data types #128

Open jryannel opened 6 months ago

jryannel commented 6 months ago

Support maps data types, such as map<int,string> in apigear. At the same time it might also be sense to rename the array type to array<int>.

In yaml this would be:

- name: value
  type: int
  map: string

or

- name: value
  type: int
  key: string
  map: true

We need to adapt all filters to generate maps and check the key types (can only be comparable types, e.g. int and strings). Bools, floats, structs, enums or interfaces shall not be allowed.

jryannel commented 2 months ago

We will not implement this at the current time. The rework on parsing the IDL and ensuring only int, strings, structs, enums are used as keys is currently too high. Maybe layer.