Skip to content

Commit 75e7b7a

Browse files
deploy: 9ecf5cb
1 parent 4181c67 commit 75e7b7a

477 files changed

Lines changed: 956 additions & 575 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openapi.1.0.0.yaml

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,127 @@ paths:
529529
encoding:
530530
coverImage:
531531
contentType: application/json
532+
/api/forms/{formId}/highlight:
533+
get:
534+
operationId: Forms_getFormHighlight
535+
summary: Get Form Highlight
536+
description: Get the highlight question and its response statistics for a specific form. Returns 200 with questionId=null when no highlight is configured.
537+
parameters:
538+
- name: formId
539+
in: path
540+
required: true
541+
schema:
542+
$ref: '#/components/schemas/uuid'
543+
responses:
544+
'200':
545+
description: The request has succeeded.
546+
content:
547+
application/json:
548+
schema:
549+
$ref: '#/components/schemas/Forms.HighlightResponse'
550+
'404':
551+
description: The server cannot find the requested resource.
552+
content:
553+
application/json:
554+
schema:
555+
$ref: '#/components/schemas/NotFound'
556+
tags:
557+
- Forms
558+
put:
559+
operationId: Forms_setFormHighlight
560+
summary: Set Form Highlight
561+
description: Set or update the highlight question for a specific form. Returns 400 if the question is not a choice-based type (singleChoice, multipleChoice, dropdown, detailedMultipleChoice).
562+
parameters:
563+
- name: formId
564+
in: path
565+
required: true
566+
schema:
567+
$ref: '#/components/schemas/uuid'
568+
responses:
569+
'200':
570+
description: The request has succeeded.
571+
content:
572+
application/json:
573+
schema:
574+
$ref: '#/components/schemas/Forms.HighlightResponse'
575+
'400':
576+
description: The server could not understand the request due to invalid syntax.
577+
content:
578+
application/json:
579+
schema:
580+
$ref: '#/components/schemas/BadRequest'
581+
'404':
582+
description: The server cannot find the requested resource.
583+
content:
584+
application/json:
585+
schema:
586+
$ref: '#/components/schemas/NotFound'
587+
tags:
588+
- Forms
589+
requestBody:
590+
required: true
591+
content:
592+
application/json:
593+
schema:
594+
$ref: '#/components/schemas/Forms.HighlightRequest'
595+
patch:
596+
operationId: Forms_updateFormHighlight
597+
summary: Update Form Highlight
598+
description: 'Partially update the configured highlight for a specific form. Currently supports updating displayTitle only. Send displayTitle: null to fall back to the question''s current title.'
599+
parameters:
600+
- name: formId
601+
in: path
602+
required: true
603+
schema:
604+
$ref: '#/components/schemas/uuid'
605+
responses:
606+
'200':
607+
description: The request has succeeded.
608+
content:
609+
application/json:
610+
schema:
611+
$ref: '#/components/schemas/Forms.HighlightResponse'
612+
'400':
613+
description: The server could not understand the request due to invalid syntax.
614+
content:
615+
application/json:
616+
schema:
617+
$ref: '#/components/schemas/BadRequest'
618+
'404':
619+
description: The server cannot find the requested resource.
620+
content:
621+
application/json:
622+
schema:
623+
$ref: '#/components/schemas/NotFound'
624+
tags:
625+
- Forms
626+
requestBody:
627+
required: true
628+
content:
629+
application/json:
630+
schema:
631+
$ref: '#/components/schemas/Forms.HighlightPatchRequest'
632+
delete:
633+
operationId: Forms_clearFormHighlight
634+
summary: Clear Form Highlight
635+
description: Clear the highlight question for a specific form.
636+
parameters:
637+
- name: formId
638+
in: path
639+
required: true
640+
schema:
641+
$ref: '#/components/schemas/uuid'
642+
responses:
643+
'204':
644+
description: 'There is no content to send for this request, but the headers may be useful. '
645+
'404':
646+
description: The server cannot find the requested resource.
647+
content:
648+
application/json:
649+
schema:
650+
$ref: '#/components/schemas/NotFound'
651+
tags:
652+
- Forms
532653
/api/forms/{formId}/publish:
533654
post:
534655
operationId: Forms_publishForm
@@ -2826,6 +2947,98 @@ components:
28262947
description: Verification result for the given Google Sheet URL.
28272948
examples:
28282949
- isValid: true
2950+
Forms.HighlightChoice:
2951+
type: object
2952+
required:
2953+
- choiceId
2954+
- name
2955+
- count
2956+
properties:
2957+
choiceId:
2958+
allOf:
2959+
- $ref: '#/components/schemas/uuid'
2960+
description: The unique identifier of the choice.
2961+
name:
2962+
type: string
2963+
description: The name/text of the choice.
2964+
count:
2965+
type: integer
2966+
format: int32
2967+
description: Number of responses (draft + submitted) that selected this choice.
2968+
description: A choice with its response count for highlight statistics.
2969+
examples:
2970+
- choiceId: f421cfc2-2b84-4da9-9629-011af609935a
2971+
name: 大一
2972+
count: 42
2973+
Forms.HighlightPatchRequest:
2974+
type: object
2975+
properties:
2976+
displayTitle:
2977+
anyOf:
2978+
- type: string
2979+
- type: 'null'
2980+
description: Custom display title for the highlight. Send null to fall back to the question's current title.
2981+
description: Request body for partially updating a form's highlight.
2982+
examples:
2983+
- displayTitle: Updated highlight title
2984+
Forms.HighlightRequest:
2985+
type: object
2986+
required:
2987+
- questionId
2988+
properties:
2989+
questionId:
2990+
allOf:
2991+
- $ref: '#/components/schemas/uuid'
2992+
description: The question ID to highlight. Must be a choice-based question (singleChoice, multipleChoice, dropdown, detailedMultipleChoice).
2993+
displayTitle:
2994+
anyOf:
2995+
- type: string
2996+
- type: 'null'
2997+
description: Custom display title for the highlight. If omitted or null, the backend falls back to the question's current title.
2998+
description: Request body for setting a form's highlight question.
2999+
examples:
3000+
- questionId: ee894524-4bd8-4a64-8fd2-a53b39ca94cd
3001+
displayTitle: 年級分佈統計
3002+
Forms.HighlightResponse:
3003+
type: object
3004+
required:
3005+
- questionId
3006+
- questionTitle
3007+
- displayTitle
3008+
- choices
3009+
properties:
3010+
questionId:
3011+
anyOf:
3012+
- $ref: '#/components/schemas/uuid'
3013+
- type: 'null'
3014+
description: The highlighted question's unique identifier. Null if no highlight is configured.
3015+
questionTitle:
3016+
anyOf:
3017+
- type: string
3018+
- type: 'null'
3019+
description: The current title of the highlighted question, fetched from the question. Null if no highlight is configured.
3020+
displayTitle:
3021+
anyOf:
3022+
- type: string
3023+
- type: 'null'
3024+
description: The display title shown on the dashboard. Equals stored custom title if set, otherwise falls back to questionTitle. Null if no highlight is configured.
3025+
choices:
3026+
type: array
3027+
items:
3028+
$ref: '#/components/schemas/Forms.HighlightChoice'
3029+
description: Response counts per choice option. Empty array if no highlight is configured.
3030+
description: Response model for a form's highlight question statistics. When no highlight is configured, questionId is null and all other fields are null or empty.
3031+
examples:
3032+
- questionId: ee894524-4bd8-4a64-8fd2-a53b39ca94cd
3033+
questionTitle: 你的年級是?
3034+
displayTitle: 年級分佈統計
3035+
choices:
3036+
- choiceId: f421cfc2-2b84-4da9-9629-011af609935a
3037+
name: 大一
3038+
count: 42
3039+
- choiceId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
3040+
name: 大二
3041+
count: 30
28293042
Forms.ListSectionsResponse:
28303043
type: object
28313044
required:
@@ -4604,12 +4817,27 @@ components:
46044817
type: object
46054818
required:
46064819
- formId
4820+
- totalCount
4821+
- draftCount
4822+
- submittedCount
46074823
- responses
46084824
properties:
46094825
formId:
46104826
allOf:
46114827
- $ref: '#/components/schemas/uuid'
46124828
description: The form ID.
4829+
totalCount:
4830+
type: integer
4831+
format: int32
4832+
description: Total number of responses for this form.
4833+
draftCount:
4834+
type: integer
4835+
format: int32
4836+
description: Number of responses in draft state.
4837+
submittedCount:
4838+
type: integer
4839+
format: int32
4840+
description: Number of submitted responses.
46134841
responses:
46144842
type: array
46154843
items:
@@ -4618,6 +4846,9 @@ components:
46184846
description: Response model for listing all responses of a form
46194847
examples:
46204848
- formId: 9a843aa0-8451-4e3b-b6a0-8c0e994e9040
4849+
totalCount: 150
4850+
draftCount: 30
4851+
submittedCount: 120
46214852
responses: []
46224853
Responses.OauthAnswer:
46234854
type: object

redocly/index.html

Lines changed: 69 additions & 11 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)