Skip to content

Commit 195107e

Browse files
Merge pull request #33 from apiaddicts/fix/rules_41_43
fix: adding more description to rule 041
2 parents 6823d16 + 040b8af commit 195107e

File tree

1 file changed

+31
-0
lines changed
  • src/main/resources/org/sonar/l10n/openapi/rules/openapi/apim/wso2

1 file changed

+31
-0
lines changed

src/main/resources/org/sonar/l10n/openapi/rules/openapi/apim/wso2/OAR041.html

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,34 @@ <h2>Compliant Solution</h2>
3030
x-scope: read
3131
x-aut-type: "Application &amp; Application User"
3232
</pre>
33+
<h2>Noncompliant Code Example (OpenAPI 3)</h2>
34+
<pre>
35+
openapi: "3.0.0"
36+
x-wso2-security:
37+
apim:
38+
x-wso2-scopes:
39+
- name: read
40+
key: read
41+
roles: READ_ROLE
42+
description: Allows users to view records
43+
paths:
44+
/pets:
45+
get:
46+
x-scope: read
47+
</pre>
48+
<h2>Compliant Solution (OpenAPI 3)</h2>
49+
<pre>
50+
openapi: "3.0.0"
51+
x-wso2-security:
52+
apim:
53+
x-wso2-scopes:
54+
- name: read
55+
key: read
56+
roles: READ_ROLE
57+
description: Allows users to view records
58+
paths:
59+
/pets:
60+
get:
61+
x-scope: read
62+
x-aut-type: "Application &amp; Application User"
63+
</pre>

0 commit comments

Comments
 (0)