https://linen.dev logo
#dev-frontend
Title
# dev-frontend
a

Artem Astapenko

02/10/2021, 1:02 AM
@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

Chris (deprecated profile)

02/10/2021, 8:41 AM
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

Artem Astapenko

02/10/2021, 10:42 AM
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

Chris (deprecated profile)

02/10/2021, 10:56 AM
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

Artem Astapenko

02/10/2021, 11:05 AM
yes
so its not possible to select now fields anymore, right?
Only all the stream? Because we now have only stream.config.selected
c

Chris (deprecated profile)

02/10/2021, 11:06 AM
Yes, for now we can configure only streams (not fields) with this refacto
c

charles

02/10/2021, 4:41 PM
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

Artem Astapenko

02/10/2021, 4:42 PM
For now I am just passing jsonSchema as it may require additional changes on UI too 🙂
c

Chris (deprecated profile)

02/10/2021, 4:45 PM
@Artem Astapenko I’ve got a more complex catalog.json now:
This one includes
AnyOf
too
a

Artem Astapenko

02/10/2021, 4:46 PM
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

Chris (deprecated profile)

02/10/2021, 4:50 PM
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

Artem Astapenko

02/10/2021, 4:53 PM
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

charles

02/10/2021, 4:53 PM
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

Artem Astapenko

02/10/2021, 4:55 PM
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

charles

02/10/2021, 4:55 PM
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

Artem Astapenko

02/10/2021, 4:55 PM
so as for anyOf - I can display just customer.sources, right?
c

charles

02/10/2021, 4:56 PM
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

Artem Astapenko

02/10/2021, 5:04 PM
I think yes
👍 1
c

charles

02/10/2021, 5:04 PM
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

Artem Astapenko

02/10/2021, 5:07 PM
then it means I have no choice except having it done by that moment 🙂
💪 1
c

charles

02/10/2021, 5:09 PM
thanks!
3 Views