Merge "Address explicit nullable types in network"
This commit is contained in:
@@ -1342,7 +1342,7 @@ def get_schema(param_data):
|
||||
elif "type:list_of_any_key_specs_or_none" in schema_data:
|
||||
logging.warning("TODO: Implement type:list_of_any_key_specs_or_none")
|
||||
schema = {
|
||||
"type": "array",
|
||||
"type": ["array", "null"],
|
||||
"items": {"type": "object", "extraProperties": True},
|
||||
"x-openstack": {"todo": "implementme"},
|
||||
}
|
||||
@@ -1353,7 +1353,7 @@ def get_schema(param_data):
|
||||
elif "type:ip_address" in schema_data:
|
||||
schema = {"type": "string"}
|
||||
elif "type:ip_address_or_none" in schema_data:
|
||||
schema = {"type": "string"}
|
||||
schema = {"type": ["string", "null"]}
|
||||
elif "type:subnet_or_none" in schema_data:
|
||||
schema = {"type": ["string", "null"]}
|
||||
elif "type:fip_dns_host_name" in schema_data:
|
||||
@@ -1404,7 +1404,7 @@ def get_schema(param_data):
|
||||
elif "type:dict_or_empty" in schema_data:
|
||||
schema = get_schema(schema_data["type:dict_or_empty"])
|
||||
elif "type:list_of_subnets_or_none" in schema_data:
|
||||
schema = {"type": "array", "items": {"type": "string"}}
|
||||
schema = {"type": ["array", "null"], "items": {"type": "string"}}
|
||||
if convert_to:
|
||||
# Nice way to get type of the field, isn't it?
|
||||
if convert_to.__name__ == "convert_to_boolean":
|
||||
|
||||
Reference in New Issue
Block a user