<@U01AS8LGX41> could you please give an example of...
# dev-frontend
a
@charles could you please give an example of rather complex jsonSchema that is supposed to be used for catalog? Probably with inner fields and etc? Or at least which source can have one. Also I do not see cleanedName and dataType for fields anymore. Thats what we had
Copy code
name: string;
cleanedName: string;
type: string;
dataType: string;
and I only receive now
type
and
name
. Also just in case I have selected bad source that doesn’t have
cleanedName
-
cleanedName
was renamed to
aliasName
on root level. Should I assume that we can receive such field?
c
I managed to semi-generate this catalog from stripe with nested jsonSchema: (you might want to edit it and remove namespace related stuffs, those are new fields in another PR)
Yes, fields don’t have
cleanedName
or
dataType
(or
selected
) anymore… As they are part of the jsonSchema, i’ve treated them as immutable so far… I am simply passing the root node around, thus i am not traversing the json schema to touch the fields etc I don’t know if that’s something i should be doing or not?
a
could I assume that we can still have it later, so I will just override getter instead of removing the field totally.
Also 1 more note @Chris (deprecated profile) , does it really makes sense to send jsonschema back on updates and create? I suppose that Stream is now immutable as selected is now stored within configuration. Shouldn’t we just send configuration then?
c
That would depend if we re-introduce some configuration inside the json schema or not? how are we going to clean field names, change their types and possibly select/unselect them, right?
a
yes
so its not possible to select now fields anymore, right?
Only all the stream? Because we now have only stream.config.selected
c
Yes, for now we can configure only streams (not fields) with this refacto
c
is it okay if we just pass the json schema for now? i think this will change more in the future so i'd rather stick with something that resemebles what we already have since we don't know yet.
it is possible we move in the direction you described artem and not pass the jsonschema
a
For now I am just passing jsonSchema as it may require additional changes on UI too 🙂
c
@Artem Astapenko I’ve got a more complex catalog.json now:
This one includes
AnyOf
too
a
wait, we have anyOf?
I have not heard that we will need to support that too
and how are we going to display it on frontend? Should user be able to select only 1? Or any of them can be selected?
c
it’s a
AnyOf
nested down in the json schema object at
customers.sources
which can be either an object or an array i think in the UI you don’t need to show the nested streams but just the top level
customers
?
a
ammm @charles isn’t it what we are trying to achieve? Otherwise how do we see traversing the jsonSchema if one fields we need to display and others not
c
i thought we had discussed this as part of fully supporting json schema. my bad, if we did not.
before we get too far into the details, how artem, how big a deal is it to add anyof? like how much more work is it?
for the first iteration of what we're doing, i'm not super convinced we need it (as far as i can tell neither facbook nor google ads have anyofs in their schemas)
a
I am not even sure how we are going to display it in UI and not sure that it will be easy to add support for that right now.
c
so while we will need to support this very soon, if we have everything except oneof / anyof then i think thats an okay state.
a
so as for anyOf - I can display just customer.sources, right?
c
okay. can we get to a place where we support everything but oneof / anyof? if the ui encounters a oneof or anyof it ignores it. so it won't break and it will still send it back to the api, but it won't try to render it.
if we do this, does that keep everything on track for this week? then in the weekly sync next week we can talk more about how to handle anyof/oneof?
a
I think yes
👍 1
c
okay. let's do that.
we have a customer that we want to show all of this to on Friday morning (san francisco time). is that still going to be possible?
a
then it means I have no choice except having it done by that moment 🙂
💪 1
c
thanks!