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
[template public getInitializationValueForType(type: String, upper: Integer)]
[if upper = -1]['[]'/][elseif type = 'String']""[elseif type = 'Boolean']false[elseif type = 'Integer']0[elseif type = 'Real']0.0[else]nil[/if]
[/template]
But with those defaults, we can't tell if the parameter was never set or set to the default value. This is especially problematic with stockLimiation. If a product doesn't have a stock limitation then the only way to indicate that is to omit the attribute.
When exporting data via the connector, you can override the default with nil and then the attribute will not appear in the output. But when importing RDF documents, we don't override every missing attribute with nil. Even if you add the attribute with a null value to the RDF document the parser will ignore it.
@lecoqlibre Do we need the default values? Or can we set them all to nil to mark them as unset.
The text was updated successfully, but these errors were encountered:
I guess it's OK to use nil instead the default value except for the semanticId property. Did you try it already @mkllnk? Especially when exporting/importing?
The connector initialises all semantic objects with defaults:
connector-codegen/src/org/datafoodconsortium/connector/codegen/ruby/operation.mtl
Lines 42 to 44 in 64e2089
But with those defaults, we can't tell if the parameter was never set or set to the default value. This is especially problematic with
stockLimiation
. If a product doesn't have a stock limitation then the only way to indicate that is to omit the attribute.When exporting data via the connector, you can override the default with
nil
and then the attribute will not appear in the output. But when importing RDF documents, we don't override every missing attribute withnil
. Even if you add the attribute with a null value to the RDF document the parser will ignore it.@lecoqlibre Do we need the default values? Or can we set them all to
nil
to mark them as unset.The text was updated successfully, but these errors were encountered: