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
Copy file name to clipboardExpand all lines: modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JakartaSecurityAnnotationProcessor.java
+70-14Lines changed: 70 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -40,35 +40,38 @@
40
40
* always be reconciled, so this class emits the least restrictive annotation that
41
41
* is still correct for the OR group.
42
42
*
43
-
* <p>A single vendor extension {@code x-jakarta-roles-allowed} carries the value to
44
-
* emit:
43
+
* <p>Two mutually exclusive vendor extensions carry the emission decision:
45
44
* <ul>
46
-
* <li>{@code ["**"]} for the any-authenticated-user case, producing
47
-
* {@code @RolesAllowed({"**"})}.
48
-
* <li>A sorted, deduplicated list of scope names (e.g. {@code ["admin", "user"]})
49
-
* when every OR alternative is scoped, producing
45
+
* <li>{@code x-jakarta-roles-allowed} = {@code ["**"]} for the any-authenticated-user
46
+
* case, producing {@code @RolesAllowed({"**"})}.
47
+
* <li>{@code x-jakarta-roles-allowed} = sorted, deduplicated list of scope names
48
+
* (e.g. {@code ["admin", "user"]}) when every OR alternative is scoped, producing
50
49
* {@code @RolesAllowed({"admin","user"})}.
51
-
* <li>Unset when the operation does not qualify (anonymous OR alternative,
52
-
* mixed-scope AND group, etc.).
50
+
* <li>{@code x-jakarta-permit-all} = {@code true} when the operation is unauthenticated
51
+
* (explicit {@code security: []}, an anonymous {@code - {}} OR alternative, or an
public {{#supportAsync}}{{#useMutiny}}Uni{{/useMutiny}}{{^useMutiny}}CompletionStage{{/useMutiny}}<{{/supportAsync}}{{#returnJBossResponse}}{{>returnResponseTypeInterface}}{{/returnJBossResponse}}{{^returnJBossResponse}}Response{{/returnJBossResponse}}{{#supportAsync}}>{{/supportAsync}} {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>cookieParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{^-last}},{{/-last}}{{/allParams}}) {
0 commit comments