You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -208,10 +208,30 @@ export function withRoles<T extends FastifyZodOpenApiSchema>(
208
208
security,
209
209
"x-required-roles": roles,
210
210
"x-disable-api-key-auth": disableApiKeyAuth,
211
-
description:
212
-
roles.length>0
213
-
? `${disableApiKeyAuth ? "API key authentication is not permitted for this route.\n\n" : ""}Requires one of the following roles: ${roles.join(", ")}.${schema.description ? `\n\n${schema.description}` : ""}`
214
-
: "Requires valid authentication but no specific role.",
211
+
description: `
212
+
${
213
+
disableApiKeyAuth
214
+
? `
215
+
> [!important]
216
+
> This resource cannot be accessed with an API key.
217
+
`
218
+
: ""
219
+
}
220
+
221
+
${
222
+
schema.description
223
+
? `
224
+
#### Description
225
+
<hr />
226
+
${schema.description}
227
+
`
228
+
: ""
229
+
}
230
+
231
+
#### Authorization
232
+
<hr />
233
+
${roles.length>0 ? `Requires any of the following roles:\n\n${roles.map((item)=>`* ${AppRoleHumanMapper[item]} (<code>${item}</code>)`).join("\n")}` : "Requires valid authentication but no specific authorization."}
0 commit comments