These are chat archives for ProtoDef-io/node-protodef

2nd
Feb 2017
Romain Beaumont
@rom1504
Feb 02 2017 09:42
ok so
what the hell is the point of "typeName":"native"
well I kind of understand the point but it's not checked anywhere, it's not very easy to check and well...
ok well let's let it be for now
Romain Beaumont
@rom1504
Feb 02 2017 09:50
ah yeah have to recursively add the type def in the validator I guess
ok will finish this later
Robin Lambertz
@roblabla
Feb 02 2017 09:51
Originally, the point was that nodejs would find those, and npm install the missing datatypes.
e.g. npm install protodef-<datatype name>
I never ended up implementing this.
Romain Beaumont
@rom1504
Feb 02 2017 09:53
ah yeah that might be useful for this. To implement optional schemas and not have everything be "unvalidated" I decided to have schema for everything including the simple datatypes. So only the type that are actually added without a schema have the default schema
that make it possible to remove my "simpleDataType" schema which just said "some string"
but
it means I have to have the complete list of existing types
except the protocol.json format define new ones
so I'll have to handle that
I also believe it means the protocol.json cannot be validated in one json schema validation step
Robin Lambertz
@roblabla
Feb 02 2017 09:55
(Oh and as a general rule, I'd rather like forcing people to write the "native" thing anyway because it makes it easy to know what datatype your impl needs to support)
Romain Beaumont
@rom1504
Feb 02 2017 09:55
because types might be different in one namespace or another
oh except if I generate the protocol json schema structure automatically based on the protocol.json namespace structure
well I'll see
I bet the resulting code will be just a few lines anyway
Robin Lambertz
@roblabla
Feb 02 2017 09:59
a few thousand lines later
:P