Browse Source

Unified code style nullable description parameter

We define unified parameter types for validating a request reference,
such as 'boolean', 'url' and 'description'. In order to keep the code
style consistent, each schema should use it in addition to its own
specific parameters.

For catalog schema, parameter 'description' in _region_properties and
_endpoint_group_properties has different definitions, which reduces the
readability of the code.

Change-Id: Ia94bc3368f3623a91ffde9a78d2310f8a8e290c2
changes/21/587721/1
zlyqqq 3 years ago
parent
commit
91b4009094
  1. 4
      keystone/catalog/schema.py

4
keystone/catalog/schema.py

@ -20,9 +20,7 @@ _service_properties_type = {
}
_region_properties = {
'description': {
'type': ['string', 'null'],
},
'description': validation.nullable(parameter_types.description),
# NOTE(lbragstad): Regions use ID differently. The user can specify the ID
# or it will be generated automatically.
'id': {

Loading…
Cancel
Save