diff --git a/output/schema/schema.json b/output/schema/schema.json index d5bb518ba8..260ddb9bd8 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -195534,53 +195534,6 @@ ], "specLocation": "security/_types/CreatedStatus.ts#L20-L22" }, - { - "kind": "interface", - "name": { - "name": "FieldRule", - "namespace": "security._types" - }, - "properties": [ - { - "name": "username", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Names", - "namespace": "_types" - } - } - }, - { - "name": "dn", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Names", - "namespace": "_types" - } - } - }, - { - "name": "groups", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "Names", - "namespace": "_types" - } - } - } - ], - "specLocation": "security/_types/RoleMappingRule.ts#L35-L43", - "variants": { - "kind": "container", - "nonExhaustive": true - } - }, { "kind": "interface", "name": { @@ -196727,10 +196680,36 @@ "name": "field", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "FieldRule", - "namespace": "security._types" + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + }, + "singleKey": true, + "value": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "FieldValue", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FieldValue", + "namespace": "_types" + } + } + } + ] } } }, @@ -196746,7 +196725,7 @@ } } ], - "specLocation": "security/_types/RoleMappingRule.ts#L22-L33", + "specLocation": "security/_types/RoleMappingRule.ts#L23-L31", "variants": { "kind": "container" } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 3e53dc2c7f..45b86054e7 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -18193,12 +18193,6 @@ export interface SecurityCreatedStatus { created: boolean } -export interface SecurityFieldRule { - username?: Names - dn?: Names - groups?: Names -} - export interface SecurityFieldSecurity { except?: Fields grant?: Fields @@ -18299,7 +18293,7 @@ export interface SecurityRoleMapping { export interface SecurityRoleMappingRule { any?: SecurityRoleMappingRule[] all?: SecurityRoleMappingRule[] - field?: SecurityFieldRule + field?: Partial> except?: SecurityRoleMappingRule } diff --git a/specification/security/_types/RoleMappingRule.ts b/specification/security/_types/RoleMappingRule.ts index 236549b6d4..7082ca13ad 100644 --- a/specification/security/_types/RoleMappingRule.ts +++ b/specification/security/_types/RoleMappingRule.ts @@ -17,7 +17,8 @@ * under the License. */ -import { Names } from '@_types/common' +import { SingleKeyDictionary } from '@spec_utils/Dictionary' +import { Field, FieldValue } from '@_types/common' /** * @variants container @@ -25,19 +26,6 @@ import { Names } from '@_types/common' export class RoleMappingRule { any?: RoleMappingRule[] all?: RoleMappingRule[] - // `field` should have been defined as SingleKeyDictionary - // However, this was initially defined as a container with a limited number of variants, - // and was later made non_exhaustive to limit breaking changes. - field?: FieldRule + field?: SingleKeyDictionary except?: RoleMappingRule } - -/** - * @variants container - * @non_exhaustive - */ -export class FieldRule { - username?: Names - dn?: Names - groups?: Names -}