You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In practice, it's sometimes hard to check for the type of each key, especially when dealing with external APIs (e.g. responses from DialogFlow, etc.) and having to convert all values to strings. Otherwise, these requests often result in HTTP 400 responses.
Describe the solution you'd like
We could allow for lists or numbers inside the user-defined data object by stringifying all metadata values per default before storing them and parsing them back to JSON before delivering them via the HTTP API, web socket or webhooks.
The text was updated successfully, but these errors were encountered:
Tl;dr This should be much easier to do than anticipated. I hadn't thought about it back then @juan-sebastian and @abhi-airy, but it should be possible to add an optional field to the backend/avro/metadata.avsc that explicates the type of the value (string, list, number) with string being the null default.
Then in the MetadataObjectMapper we can set/read this field. The only caveat of course is that you won't be able to concurrently edit lists, but I guess that's to be expected
Is your feature request related to a problem? Please describe.
As documented here (https://airy.co/docs/core/api/endpoints/metadata), metadata upserts can only contain values of type string or object values (i.e. no lists or numbers).
In practice, it's sometimes hard to check for the type of each key, especially when dealing with external APIs (e.g. responses from DialogFlow, etc.) and having to convert all values to strings. Otherwise, these requests often result in HTTP 400 responses.
Describe the solution you'd like
We could allow for lists or numbers inside the user-defined
data
object by stringifying all metadata values per default before storing them and parsing them back to JSON before delivering them via the HTTP API, web socket or webhooks.The text was updated successfully, but these errors were encountered: