@@ -109,42 +109,46 @@ public InvitationController(MailBox mailBox,
109109
110110 @ PostMapping ("" )
111111 @ Operation (summary = "Invite member for existing Role" ,
112- description = "Invite a member for an existing role. An invitation email will be sent. Do not forget to set guestRoleIncluded to true." +
113- "At least one email must be either present in invites or invitations. When using the invitations you can also specify the " +
114- "internalPlaceholderIdentifier, which will be used as the id in the SCIM POST to /User." ,
112+ description = """
113+ Invite a member for an existing role. An invitation email will be sent. Do not forget to set guestRoleIncluded to true.
114+ At least one email must be either present in invites or invitations. When using the invitations you can also specify the
115+ internalPlaceholderIdentifier, which will be used as the id in the SCIM POST to /User.
116+ """ ,
115117 requestBody = @ io .swagger .v3 .oas .annotations .parameters .RequestBody (
116118 required = true ,
117119 content = {@ Content (
118120 mediaType = "application/json" ,
119- examples = {
120- @ ExampleObject (
121- name = "Invitation example" ,
122- summary = "Example invitation request " ,
123- value = """
124- {
125- "intendedAuthority ": "INVITER" ,
126- "message ": "Personal message included in the email",
127- "language": "en",
128- "guestRoleIncluded": true ,
129- "invites ": [
130- "admin@service.org"
131- ] ,
132- "invitations ": [{
133- "email": "admin2@service.org"
134- "internalPlaceholderIdentifier": "4EFF937F-EE78-4A54-9FD8-A214FD64D7E1" ,
135- }],
136- "roleIdentifiers": [
137- 99
138- ] ,
139- "roleExpiryDate ": 1760788376,
140- "expiryDate": 1730461976
141- }
142- """
143- )} )}
121+ schema = @ Schema ( implementation = InvitationRequest . class ),
122+ examples = { @ ExampleObject (value = """
123+ {
124+ "intendedAuthority": "INVITER ",
125+ "message": "Personal message included in the email",
126+ "language": "en",
127+ "guestRoleIncluded ": true ,
128+ "invites ": [
129+ "admin@service.org"
130+ ] ,
131+ "invitesWithInternalPlaceholderIdentifiers ": [
132+ {
133+ "email": "admin2@service.org" ,
134+ "internalPlaceholderIdentifier ": "4EFF937F-EE78-4A54-9FD8-A214FD64D7E1"
135+ }
136+ ] ,
137+ "roleIdentifiers": [
138+ 99
139+ ],
140+ "roleExpiryDate": 1760788376 ,
141+ "expiryDate ": 1730461976
142+ }
143+ """
144+ )}
145+ )}
144146 ),
145147 responses = {
146148 @ ApiResponse (responseCode = "201" , description = "Created" ,
147- content = {@ Content (schema = @ Schema (implementation = InvitationResponse .class ),
149+ content = {@ Content (
150+ mediaType = "application/json" ,
151+ schema = @ Schema (implementation = InvitationResponse .class ),
148152 examples = {@ ExampleObject (value = """
149153 {
150154 "status": 201,
@@ -158,20 +162,25 @@ public InvitationController(MailBox mailBox,
158162 """
159163 )})}),
160164 @ ApiResponse (responseCode = "400" , description = "BadRequest" ,
161- content = {@ Content (schema = @ Schema (implementation = StatusResponse .class ),
162- examples = {@ ExampleObject (value = """
163- {
164- "timestamp": 1717672263253,
165- "status": 400,
166- "error": "BadRequest",
167- "exception": "access.exception.UserRestrictionException",
168- "message": "No access to application",
169- "path": "/api/internal/invite/invitations"
170- }
171- """
172- )})}),
165+ content = {@ Content (
166+ mediaType = "application/json" ,
167+ schema = @ Schema (implementation = StatusResponse .class ),
168+ examples = {
169+ @ ExampleObject (value = """
170+ {
171+ "timestamp": 1717672263253,
172+ "status": 400,
173+ "error": "BadRequest",
174+ "exception": "access.exception.UserRestrictionException",
175+ "message": "No access to application",
176+ "path": "/api/internal/invite/invitations"
177+ }
178+ """
179+ )})}),
173180 @ ApiResponse (responseCode = "404" , description = "Role not found" ,
174- content = {@ Content (schema = @ Schema (implementation = StatusResponse .class ),
181+ content = {@ Content (
182+ mediaType = "application/json" ,
183+ schema = @ Schema (implementation = StatusResponse .class ),
175184 examples = {@ ExampleObject (value = """
176185 {
177186 "timestamp": 1717672263253,
0 commit comments