@@ -7,6 +7,7 @@ namespace CoreSystem.Forms {
77 }
88
99 @ doc ("Response after uploading a cover image." )
10+ @ example (#{ imageUrl : "https://example.com/images/form-cover-123.webp" })
1011 model FormCoverUploadResponse {
1112 @ doc ("The temporary full URL of the uploaded image." )
1213 imageUrl : string ;
@@ -47,6 +48,24 @@ namespace CoreSystem.Forms {
4748 }
4849
4950 @ doc ("The structure of a form." )
51+ @ example (#{
52+ id : "9a843aa0-8451-4e3b-b6a0-8c0e994e9040" ,
53+ title : "SDC 2025 Recruitment Form" ,
54+ description : "Join us for an exciting journey in software development!" ,
55+ previewMessage : "Join us for an exciting journey" ,
56+ status : FormStatus .published ,
57+ unitId : "d26e9c90-4747-496b-9953-7e7c4f97643f" ,
58+ lastEditor : "3c5fa073-7b97-43a3-bc44-ddc98f390a08" ,
59+ deadline : utcDateTime.fromISO ("2025-03-31T23:59:59Z" ),
60+ publishTime : utcDateTime.fromISO ("2025-02-01T00:00:00Z" ),
61+ messageAfterSubmission : "Thank you for your application! We'll get back to you soon." ,
62+ dressing : #{ color : "#0066cc" , headerFont : "LINESeedTW" , questionFont : "LINESeedTW" , textFont : "LINESeedTW" },
63+ coverImage : "https://example.com/images/form-cover.webp" ,
64+ googleSheetUrl : "https://docs.google.com/spreadsheets/d/1ABC123/edit" ,
65+ visibility : FormVisibility .public ,
66+ createdAt : utcDateTime.fromISO ("2025-01-15T10:00:00Z" ),
67+ updatedAt : utcDateTime.fromISO ("2025-02-10T14:30:00Z" ),
68+ })
5069 model Form {
5170 @ doc ("The form's unique identifier." )
5271 id : uuid ;
@@ -114,6 +133,13 @@ namespace CoreSystem.Forms {
114133 }
115134
116135 @ doc ("A section within a form, grouping questions together." )
136+ @ example (#{
137+ id : "b23f2668-c2dc-4213-88fe-eceedff46398" ,
138+ formId : "9a843aa0-8451-4e3b-b6a0-8c0e994e9040" ,
139+ title : "Personal Information" ,
140+ description : "Please provide your basic information" ,
141+ questions : #[],
142+ })
117143 model Section {
118144 @ doc ("Unique identifier." )
119145 id : uuid ;
@@ -159,12 +185,14 @@ namespace CoreSystem.Forms {
159185 }
160186
161187 @ doc ("Response model for listing all sections and questions in a form." )
188+ @ example (#{ sections : #[] })
162189 model ListSectionsResponse {
163190 sections : Section [];
164191 }
165192
166193 // form recipientUser
167194 @ doc ("The basic info of a user that can receive the form." )
195+ @ example (#{ id : "3c5fa073-7b97-43a3-bc44-ddc98f390a08" , name : "John Doe" })
168196 model RecipientUser {
169197 id : uuid ;
170198 name : string ;
@@ -181,35 +209,41 @@ namespace CoreSystem.Forms {
181209 }
182210
183211 @ doc ("The result of recipients selection (no duplicated)." )
212+ @ example (#{ recipients : #[#{ id : "3c5fa073-7b97-43a3-bc44-ddc98f390a08" , name : "John Doe" }] })
184213 model RecipientSelectionResponse {
185214 recipients : RecipientUser [];
186215 }
187216
188217 @ doc ("Response after publishing a form." )
218+ @ example (#{ visibility : FormVisibility .public })
189219 model FormPublishResponse {
190220 @ doc ("The visibility setting of the form. Public forms are visible to all logged-in users. Private forms require a direct link to access." )
191221 visibility : FormVisibility ;
192222 }
193223
194224 @ doc ("Response containing the Gmail address for Google Sheet permissions." )
225+ @ example (#{ email : "core-system-bot@example.com" })
195226 model GoogleSheetEmailResponse {
196227 @ doc ("The Gmail address that should be added to Google Sheet permissions so the system can modify the form." )
197228 email : string ;
198229 }
199230
200231 @ doc ("Request body for verifying a Google Sheet URL." )
232+ @ example (#{ googleSheetUrl : "https://docs.google.com/spreadsheets/d/1ABC123XYZ/edit" })
201233 model GoogleSheetVerifyRequest {
202234 @ doc ("The Google Sheet URL provided by user." )
203235 googleSheetUrl : string ;
204236 }
205237
206238 @ doc ("Verification result for the given Google Sheet URL." )
239+ @ example (#{ isValid : true })
207240 model GoogleSheetVerifyResponse {
208241 @ doc ("Indicates whether the Google Sheet URL is valid and accessible." )
209242 isValid : boolean ;
210243 }
211244
212245 @ doc ("A font definition used in form dressing." )
246+ @ example (#{ id : "LINESeedTW" , name : "LINE Seed TW" })
213247 model Font {
214248 @ doc ("The unique identifier of the font." )
215249 id : string ;
0 commit comments