Skip to content

Commit 9d72278

Browse files
authored
Improve RoleMappingRule definition (#3749)
1 parent 29dfe09 commit 9d72278

File tree

3 files changed

+35
-74
lines changed

3 files changed

+35
-74
lines changed

output/schema/schema.json

Lines changed: 31 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 1 addition & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/security/_types/RoleMappingRule.ts

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,15 @@
1717
* under the License.
1818
*/
1919

20-
import { Names } from '@_types/common'
20+
import { SingleKeyDictionary } from '@spec_utils/Dictionary'
21+
import { Field, FieldValue } from '@_types/common'
2122

2223
/**
2324
* @variants container
2425
*/
2526
export class RoleMappingRule {
2627
any?: RoleMappingRule[]
2728
all?: RoleMappingRule[]
28-
// `field` should have been defined as SingleKeyDictionary<String, ScalarValue|ScalarValue[]>
29-
// However, this was initially defined as a container with a limited number of variants,
30-
// and was later made non_exhaustive to limit breaking changes.
31-
field?: FieldRule
29+
field?: SingleKeyDictionary<Field, FieldValue | FieldValue[]>
3230
except?: RoleMappingRule
3331
}
34-
35-
/**
36-
* @variants container
37-
* @non_exhaustive
38-
*/
39-
export class FieldRule {
40-
username?: Names
41-
dn?: Names
42-
groups?: Names
43-
}

0 commit comments

Comments
 (0)