Explains the return value of active_directory.POST

Returning a list of errors seems uncommon.
This commit is contained in:
Carlos Nihelton 2023-02-06 22:52:49 -03:00
parent 0ea977a6cc
commit fe25d07eca
No known key found for this signature in database
GPG Key ID: 6FE346D245197E9A
1 changed files with 5 additions and 0 deletions

View File

@ -407,6 +407,11 @@ class API:
class active_directory: class active_directory:
def GET() -> Optional[ADConnectionInfo]: ... def GET() -> Optional[ADConnectionInfo]: ...
# POST must validate the payload before configuring the controller,
# which may contain several errors as described in [ADValidationResult]
# simultaneously - such as invalid chars on the admin name and DC name
# starting with a hyphen or a dot. Thus this must returns a List
# of errors [ADValidationResult.OK] on success.
def POST(data: Payload[ADConnectionInfo]) \ def POST(data: Payload[ADConnectionInfo]) \
-> List[ADValidationResult]: ... -> List[ADValidationResult]: ...