[lib.constants] route keys are optional, in case of empty routers

This commit is contained in:
Maxime Alves LIRMM@home 2021-12-01 12:20:32 +01:00
parent 53ecbb58fc
commit 1ec244b60f

View File

@ -17,7 +17,7 @@ is_callable_dotted_notation = lambda x: re.match(
r'^(([a-zA-Z_])+\.?)*:[a-zA-Z_]+$', 'ab_c.TEST:get')
ROUTE_SCHEMA = Schema({
str: { # path
Optional(str): { # path - Optional when no routes
str: { # method
'callable': is_callable_dotted_notation,
'docs': lambda n: True, # Should validate an openAPI spec