stages/prompt: annotate PromptChallengeResponse's additionalProperties
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
af504e13a2
commit
8ecac59eca
|
@ -67,4 +67,11 @@ def postprocess_schema_responses(result, generator, **kwargs): # noqa: W0613
|
|||
spectacular_settings.APPEND_COMPONENTS
|
||||
)
|
||||
|
||||
# This is a workaround for authentik/stages/prompt/stage.py
|
||||
# since the serializer PromptChallengeResponse
|
||||
# accepts dynamic keys
|
||||
for component in result["components"]["schemas"]:
|
||||
if component == "PromptChallengeResponseRequest":
|
||||
comp = result["components"]["schemas"][component]
|
||||
comp["additionalProperties"] = {}
|
||||
return result
|
||||
|
|
|
@ -23321,6 +23321,7 @@ components:
|
|||
component:
|
||||
type: string
|
||||
default: ak-stage-prompt
|
||||
additionalProperties: {}
|
||||
PromptRequest:
|
||||
type: object
|
||||
description: Prompt Serializer
|
||||
|
|
|
@ -160,7 +160,7 @@ export class IdentificationStage extends BaseStage<IdentificationChallenge, Iden
|
|||
label=${label}
|
||||
?required="${true}"
|
||||
class="pf-c-form__group"
|
||||
.errors=${(this.challenge?.responseErrors || {})["uidField"]}>
|
||||
.errors=${(this.challenge?.responseErrors || {})["uid_field"]}>
|
||||
<!-- @ts-ignore -->
|
||||
<input type=${type}
|
||||
name="uidField"
|
||||
|
|
Reference in a new issue