Repository navigation
Expand file tree
/
Copy pathopenapi.yaml
More file actions
2448 lines (2359 loc) · 72.5 KB
/
Copy pathopenapi.yaml
File metadata and controls
2448 lines (2359 loc) · 72.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.1.0
info:
title: JobReady API
version: 1.0.0
description: |
JobReady is an AI-powered job application tracker that helps candidates manage their job search end-to-end.
Core capabilities:
- Auth & Profiles — JWT-based registration/login; structured candidate profiles (experience, education, skills, certifications, languages).
- Application Tracking — create applications by pasting a job description; manage status transitions (Applied → Interviewing → Offer → Rejected); auto-link incoming emails to the correct application.
- Gmail Integration — connect/disconnect Gmail accounts; fetch and store application-related emails; surface follow-up recommendations for stale applications.
- AI Features — tailored cover letter generation, candidate-role fit analysis with gap identification, and email-based insights — all driven by the candidate profile and target job description.
- Document Management — store and retrieve AI-generated cover letters and fit analyses.
contact:
name: JobReady Support
servers:
- url: http://localhost:8080
description: Local development (API Gateway)
- url: https://api.jobready.com
description: Production
security:
- BearerAuth: []
tags:
- name: Auth
description: Authentication and session management
- name: Email
description: Gmail integration — connect/disconnect accounts and read fetched emails
- name: Applications
description: Job application tracking — create applications, store job descriptions, and manage status transitions
- name: Chat
description: AI career-assistant chat — sessions and messages
- name: JobPostings
description: AI-assisted job-posting utilities — extract structured fields from a posting URL
- name: Documents
description: Candidate profile (experience, education, skills, languages) and AI-generated documents (cover letters, resumes)
paths:
/api/v1/auth/register:
post:
tags: [Auth]
summary: Register a new user
description: |
Creates a new account and signs the user in immediately — no separate login step.
Access and refresh tokens are delivered as HttpOnly cookies (never in the body);
the response body carries the authenticated user's profile.
security: []
operationId: register
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RegisterRequest'
responses:
'201':
description: Account created; session cookies set
headers:
Set-Cookie:
$ref: '#/components/headers/SessionCookies'
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
'409':
description: Email already registered
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error (e.g. password too short or missing a required character class)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Too many registration attempts from this address; retry after the period in the Retry-After header
headers:
Retry-After:
description: Seconds until registration may be retried
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/auth/login:
post:
tags: [Auth]
summary: Login with email and password
description: |
Verifies credentials and sets HttpOnly access + refresh cookies.
Tokens are never returned in the body; the body carries the user's profile.
security: []
operationId: login
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LoginRequest'
responses:
'200':
description: Login successful; session cookies set
headers:
Set-Cookie:
$ref: '#/components/headers/SessionCookies'
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
'401':
description: Invalid credentials
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Account temporarily locked after too many failed attempts; retry after the period in the Retry-After header
headers:
Retry-After:
description: Seconds until login may be retried
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/auth/refresh:
post:
tags: [Auth]
summary: Refresh access token
description: |
Reads the refresh token from the `jr_refresh` HttpOnly cookie, rotates it,
and sets a fresh access + refresh cookie pair. The old refresh token is
immediately invalidated. No request body — the cookie carries the token.
security: []
operationId: refreshToken
responses:
'204':
description: New session cookies set
headers:
Set-Cookie:
$ref: '#/components/headers/SessionCookies'
'401':
description: Refresh cookie missing, invalid, expired, or already rotated
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/auth/logout:
post:
tags: [Auth]
summary: Logout and invalidate the session
description: |
Revokes the refresh token read from the `jr_refresh` cookie and clears both
session cookies (`jr_access`, `jr_refresh`). No request body.
operationId: logout
security:
- CookieAuth: []
- BearerAuth: []
responses:
'204':
description: Logged out; session cookies cleared
headers:
Set-Cookie:
$ref: '#/components/headers/ClearedCookies'
'401':
description: Missing or invalid session
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/auth/me:
get:
tags: [Auth]
summary: Get current user info
description: |
Returns the authenticated user's profile, resolved from the JWT `sub` claim.
The access token is taken from the `jr_access` cookie (or, behind the gateway,
the translated `Authorization: Bearer` header).
operationId: getMe
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: Current user
content:
application/json:
schema:
$ref: '#/components/schemas/UserResponse'
'401':
description: Missing or expired access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/email/connections/gmail/authorize:
post:
tags: [Email]
summary: Start the Gmail OAuth2 consent flow
description: |
Returns a Google consent URL the client should redirect the user to. The URL carries a
signed, short-lived `state` token bound to the authenticated user (`sub` claim) and a
single-use nonce; the callback verifies it to prevent CSRF/replay and account-binding attacks.
operationId: authorizeGmail
responses:
'200':
description: Consent URL generated
content:
application/json:
schema:
$ref: '#/components/schemas/GmailAuthorizeResponse'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/chat/sessions:
get:
tags: [Chat]
summary: List chat sessions
description: List all sessions for the authenticated user, newest first.
operationId: listChatSessions
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: Sessions retrieved
content:
application/json:
schema:
$ref: '#/components/schemas/SessionListResponse'
'401':
description: Missing or expired access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
tags: [Chat]
summary: Create a chat session
description: Creates a new chat session for the authenticated user.
operationId: createChatSession
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateSessionRequest'
responses:
'201':
description: Session created
content:
application/json:
schema:
$ref: '#/components/schemas/SessionResponse'
'401':
description: Missing or expired access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error (e.g. invalid session_type)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/email/connections/gmail/callback:
get:
tags: [Email]
summary: Gmail OAuth2 redirect callback
description: |
Google redirects here with `code` and `state`. The service verifies the `state` signature
and nonce (rejecting forged/expired/replayed values), derives the user from the verified
payload, exchanges the code for tokens, stores the connection, and redirects the browser
back to the frontend. This endpoint is reached by the browser, not called service-to-service,
so it is unauthenticated — the signed `state` is the trust anchor.
operationId: gmailOAuthCallback
security: []
parameters:
- name: code
in: query
required: true
schema:
type: string
- name: state
in: query
required: true
schema:
type: string
responses:
'302':
description: Connection stored; browser redirected back to the frontend
headers:
Location:
description: Frontend URL the user is returned to
schema:
type: string
'400':
description: Missing/invalid code or state, or token exchange failed
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/email/connections:
get:
tags: [Email]
summary: Get the current user's email connection status
operationId: getEmailConnection
responses:
'200':
description: Connection status
content:
application/json:
schema:
$ref: '#/components/schemas/EmailConnectionStatus'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags: [Email]
summary: Disconnect the current user's email account
description: Deletes the stored OAuth connection for the authenticated user.
operationId: deleteEmailConnection
responses:
'204':
description: Connection deleted (idempotent — 204 even if none existed)
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/chat/sessions/{session_id}:
delete:
tags: [Chat]
summary: Delete a chat session
description: Deletes a session and all its messages via cascade. Returns 404 if not found or not owned by the user.
operationId: deleteChatSession
security:
- CookieAuth: []
- BearerAuth: []
parameters:
- name: session_id
in: path
required: true
schema:
type: string
format: uuid
responses:
'204':
description: Session and all its messages deleted
'401':
description: Missing or expired access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Session not found or not owned by user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/email/messages:
get:
tags: [Email]
summary: List stored emails for the current user
description: Returns the emails fetched by the background poller for the authenticated user, newest first.
operationId: listEmailMessages
parameters:
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 100
default: 20
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
responses:
'200':
description: Stored emails
content:
application/json:
schema:
$ref: '#/components/schemas/EmailMessageList'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/applications:
post:
tags: [Applications]
summary: Create a job application
description: |
Creates a job application for the authenticated user. The owner is resolved from the
JWT `sub` claim — `user_id` is never accepted from the request body. New applications
start in the `draft` stage unless `stage` is provided.
operationId: createApplication
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateApplicationRequest'
responses:
'201':
description: Application created
content:
application/json:
schema:
$ref: '#/components/schemas/JobApplication'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
tags: [Applications]
summary: List the current user's job applications
description: |
Returns the authenticated user's applications, newest first. Optionally filtered by
stage and paginated; `total` always reflects the full filtered count.
operationId: listApplications
security:
- CookieAuth: []
- BearerAuth: []
parameters:
- name: stage
in: query
required: false
schema:
$ref: '#/components/schemas/ApplicationStage'
- name: limit
in: query
required: false
schema:
type: integer
minimum: 1
maximum: 100
- name: offset
in: query
required: false
schema:
type: integer
minimum: 0
default: 0
responses:
'200':
description: The user's applications
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationList'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/applications/summary:
get:
tags: [Applications]
summary: Per-stage application counts
description: |
Returns how many of the authenticated user's applications are in each stage, plus the
total — lets the dashboard render its pipeline without fetching every row.
operationId: getApplicationSummary
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: Stage counts
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationSummary'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/applications/{id}/recommendations:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
tags: [Applications]
summary: List recommendations for an application
description: |
Returns stored next-best-action recommendations for one application owned by the
authenticated user, newest first.
operationId: listRecommendations
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: The application's recommendations
content:
application/json:
schema:
$ref: '#/components/schemas/RecommendationList'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
post:
tags: [Applications]
summary: Add a recommendation to an application
description: |
Stores a next-best-action recommendation on an application owned by the authenticated
user. Persistence only — generating recommendations is out of scope for this service.
operationId: createRecommendation
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateRecommendationRequest'
responses:
'201':
description: Recommendation created
content:
application/json:
schema:
$ref: '#/components/schemas/Recommendation'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/applications/{id}/recommendations/{recommendationId}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
- name: recommendationId
in: path
required: true
schema:
type: string
format: uuid
delete:
tags: [Applications]
summary: Delete a recommendation
description: Deletes one recommendation from an application owned by the authenticated user.
operationId: deleteRecommendation
security:
- CookieAuth: []
- BearerAuth: []
responses:
'204':
description: Recommendation deleted
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application or recommendation for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/applications/{id}/events:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
tags: [Applications]
summary: List an application's timeline events
description: |
Returns the timeline of an application owned by the authenticated user, newest first
by `occurred_at`. Events are appended automatically — from detected emails (source
`email`) and from manual stage changes (source `manual`) — and record exactly when
each step happened.
operationId: listApplicationEvents
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: The application's timeline events
content:
application/json:
schema:
$ref: '#/components/schemas/ApplicationEventList'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/applications/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
get:
tags: [Applications]
summary: Get a single job application
description: Returns one application owned by the authenticated user.
operationId: getApplication
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: The application
content:
application/json:
schema:
$ref: '#/components/schemas/JobApplication'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags: [Applications]
summary: Update a job application
description: |
Updates an application owned by the authenticated user, including stage transitions
(`draft` → `applied` → `follow_up` → `interview` → `offer` → `closed`).
operationId: updateApplication
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateApplicationRequest'
responses:
'200':
description: Updated application
content:
application/json:
schema:
$ref: '#/components/schemas/JobApplication'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags: [Applications]
summary: Delete a job application
description: Deletes an application owned by the authenticated user.
operationId: deleteApplication
security:
- CookieAuth: []
- BearerAuth: []
responses:
'204':
description: Application deleted
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such application for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/job-postings/extract:
post:
tags: [JobPostings]
summary: Extract job-posting fields from a URL
description: |
Fetches a public job-posting page and uses the AI assistant to extract structured
fields (company, job title, job description) for pre-filling a new application.
Extraction is best-effort — any field the page does not reveal comes back `null`,
and clients must keep all fields editable and fall back to manual entry on error.
Error codes (unified `Error` schema): `URL_INVALID` (400 — malformed URL, unsupported
scheme, or a private/internal address), `FETCH_FAILED` (422 — the page timed out,
blocked the fetch, is not HTML, or is too large), `EXTRACTION_FAILED` (422 — the
page was fetched but no job-posting fields could be identified).
operationId: extractJobPosting
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/JobPostingExtractRequest'
responses:
'200':
description: Extracted fields (nullable where the page lacked the information)
content:
application/json:
schema:
$ref: '#/components/schemas/JobPostingExtraction'
'400':
description: Invalid or disallowed URL (`URL_INVALID`)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: The page could not be fetched or yielded no fields (`FETCH_FAILED`, `EXTRACTION_FAILED`)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/profile:
get:
tags: [Documents]
summary: Get the current user's full profile
description: |
Returns the authenticated user's profile basics together with all sub-resources
(work experiences, educations, skills, languages) in one aggregate. Returns 404
when the user has not created a profile yet — clients use this to detect that
onboarding is still needed.
operationId: getProfile
security:
- CookieAuth: []
- BearerAuth: []
responses:
'200':
description: The user's aggregated profile
content:
application/json:
schema:
$ref: '#/components/schemas/ProfileAggregateResponse'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No profile exists for this user yet
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
put:
tags: [Documents]
summary: Create or update the current user's profile basics
description: |
Upserts the profile basics keyed on the JWT `sub` — creates the profile on first
call, updates it afterwards. Sub-resources are managed via their own endpoints.
operationId: upsertProfile
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ProfileRequest'
responses:
'200':
description: The saved profile basics
content:
application/json:
schema:
$ref: '#/components/schemas/Profile'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/profile/work-experiences:
post:
tags: [Documents]
summary: Add a work experience
description: |
Adds a work experience to the authenticated user's profile. The profile basics
must exist first (404 otherwise). Reads happen via the profile aggregate.
operationId: createWorkExperience
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorkExperienceRequest'
responses:
'201':
description: Work experience created
content:
application/json:
schema:
$ref: '#/components/schemas/WorkExperience'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No profile exists for this user yet
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/api/v1/profile/work-experiences/{id}:
parameters:
- name: id
in: path
required: true
schema:
type: string
format: uuid
put:
tags: [Documents]
summary: Update a work experience
operationId: updateWorkExperience
security:
- CookieAuth: []
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/WorkExperienceRequest'
responses:
'200':
description: Updated work experience
content:
application/json:
schema:
$ref: '#/components/schemas/WorkExperience'
'401':
description: Missing or invalid access token
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: No such work experience for this user
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'422':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
delete:
tags: [Documents]
summary: Delete a work experience
operationId: deleteWorkExperience
security:
- CookieAuth: []