flows: fix schema for flow executor

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-16 19:13:31 +02:00
parent 07dc648470
commit 589f806b7c
3 changed files with 16 additions and 2 deletions

View File

@ -161,7 +161,7 @@ class FlowExecutorView(APIView):
@extend_schema( @extend_schema(
responses={200: Challenge()}, responses={200: Challenge()},
request=ChallengeResponse(), request=OpenApiTypes.OBJECT,
parameters=[ parameters=[
OpenApiParameter( OpenApiParameter(
name="query", name="query",

View File

@ -3198,6 +3198,20 @@ paths:
required: true required: true
tags: tags:
- flows - flows
requestBody:
content:
application/json:
schema:
type: object
additionalProperties: {}
application/x-www-form-urlencoded:
schema:
type: object
additionalProperties: {}
multipart/form-data:
schema:
type: object
additionalProperties: {}
security: security:
- authentik: [] - authentik: []
- cookieAuth: [] - cookieAuth: []

View File

@ -114,7 +114,7 @@ export class FlowExecutor extends LitElement implements StageHost {
this.loading = true; this.loading = true;
return new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolveRaw({ return new FlowsApi(DEFAULT_CONFIG).flowsExecutorSolveRaw({
flowSlug: this.flowSlug, flowSlug: this.flowSlug,
data: formData || {}, requestBody: formData || {},
query: window.location.search.substring(1), query: window.location.search.substring(1),
}).then((challengeRaw) => { }).then((challengeRaw) => {
return challengeRaw.raw.json(); return challengeRaw.raw.json();