Skip to content

Commit 95a3711

Browse files
committed
Tried to fix JSON formatting again
1 parent fd5f461 commit 95a3711

File tree

1 file changed

+33
-35
lines changed

1 file changed

+33
-35
lines changed

specs/permissions.md

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,24 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S
1212
The canonical model for a permissions document is a JSON [JSON] object. When serialized in a JSON document, that format is identified with the "application/permissions+json" media type.
1313

1414
```json
15-
{
16-
  "permissions": {
17-
    "PrintSettings.Read.All": {
18-
      "schemes": {
19-
        "DelegatedWork": {
20-
          "type": "DelegatedWork",
21-
          "description": "Allow signed in user to read print settings",
22-
        }
23-
      },
24-
      "pathSets": [
25-
        {
26-
          "schemes": ["DelegatedWork"],
27-
          "methods": ["GET"],
28-
          "paths": {
29-
            "/print/settings": {}
30-
          }
31-
        }
32-
      ]
33-
    }
15+
{
16+
"permissions": {
17+
"PrintSettings.Read.All": {
18+
"schemes": {
19+
"DelegatedWork": {
20+
"type": "DelegatedWork",
21+
"description": "Allow signed in user to read print settings"
22+
}
23+
},
24+
"pathSets": [{
25+
"schemes": ["DelegatedWork"],
26+
"methods": ["GET"],
27+
"paths": {
28+
"/print/settings": {}
29+
}
30+
}]
31+
}
32+
}
3433
}
3534
```
3635
In this example, the claim "PrintSettings.Read.All" is required when using the "DelegatedWork" security scheme to access the resource "/print/settings" using the "GET" method.
@@ -83,22 +82,21 @@ A pathSet object identifies a set of paths that are accessible via the identifie
8382
> Note: The design chosen was intentional to encourage permission creators to ensure support for methods and schemes is as consistent as possible. This produces a better developer experience for API consumers.
8483
8584
```json
86-
"pathSets": [
87-
  {
88-
    "schemes": ["DelegatedWork"],
89-
    "methods": ["GET"],
90-
    "paths": {
91-
"/print/settings": {}
92-
    }
93-
  },
94-
  {
95-
    "schemes": ["Application"],
96-
    "methods": ["GET,POST"],
97-
    "paths": {
98-
"/print/settings": {}
99-
    }
100-
  }
101-
]
85+
"pathSets": [{
86+
"schemes": ["DelegatedWork"],
87+
"methods": ["GET"],
88+
"paths": {
89+
"/print/settings": {}
90+
}
91+
},
92+
{
93+
"schemes": ["Application"],
94+
"methods": ["GET,POST"],
95+
"paths": {
96+
"/print/settings": {}
97+
}
98+
}
99+
]
102100
```
103101

104102
### schemes

0 commit comments

Comments
 (0)