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
When parsing json/browser_protocol.json to generate API libraries, a strategy for interpreting absent properties and parameters with non-zero defaults cannot be reasonably developed as default values are only specified, somewhat inconsistently, in the description.
For instance:
{
"domains": [
{
"domain": "CSS",
"types": [
{
"id": "CSSProperty",
"description": "CSS property declaration data.",
"type": "object",
"properties": [
{
"name": "parsedOk",
"description": "Whether the property is understood by the browser (implies `true` if absent).",
"optional": true,
"type": "boolean"
}
]
}
]
}
]
}
"parsedOk" is only ever returned when false; and as the zero value for boolean is also false, in statically typed languages like Go at least; the value is always false. If the default value for properties such as this where available in the JSON schema document, we could generate correct API libraries by parsing the schema alone.
The text was updated successfully, but these errors were encountered:
When parsing json/browser_protocol.json to generate API libraries, a strategy for interpreting absent properties and parameters with non-zero defaults cannot be reasonably developed as default values are only specified, somewhat inconsistently, in the description.
For instance:
"parsedOk" is only ever returned when false; and as the zero value for boolean is also false, in statically typed languages like Go at least; the value is always false. If the default value for properties such as this where available in the JSON schema document, we could generate correct API libraries by parsing the schema alone.
The text was updated successfully, but these errors were encountered: