Skip to content

Commit ac07810

Browse files
authored
Update jsons with omitting (#130)
[IAM] Hotfix results schema What this PR does / why we need it Fix issues with json.Marshal and nil structs === RUN TestFederatedMappingLifecycle --- PASS: TestFederatedMappingLifecycle (4.52s) PASS Process finished with exit code 0 === RUN TestMappingCreateRequest --- PASS: TestMappingCreateRequest (0.01s) === RUN TestMappingGetRequest --- PASS: TestMappingGetRequest (0.00s) === RUN TestMappingListRequest --- PASS: TestMappingListRequest (0.00s) === RUN TestMappingUpdateRequest --- PASS: TestMappingUpdateRequest (0.00s) === RUN TestMappingDeleteRequest --- PASS: TestMappingDeleteRequest (0.00s) PASS Process finished with exit code 0 Reviewed-by: None <None> Reviewed-by: Anton Sidelnikov <None> Reviewed-by: Anton Kachurin <katchuring@gmail.com>
1 parent 3374f89 commit ac07810

File tree

1 file changed

+5
-11
lines changed
  • openstack/identity/v3/federation/mappings

1 file changed

+5
-11
lines changed

openstack/identity/v3/federation/mappings/results.go

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,15 @@ type Mapping struct {
1818
}
1919

2020
type Rule struct {
21-
Local []LocalRule `json:"local"`
22-
Remote []RemoteRule `json:"remote"`
23-
}
24-
25-
type LocalRule struct {
26-
User *UserOpts `json:"user"`
27-
Group *GroupOpts `json:"group"`
28-
Groups string `json:"groups"`
21+
Local []LocalRuleOpts `json:"local"`
22+
Remote []RemoteRule `json:"remote"`
2923
}
3024

3125
type RemoteRule struct {
3226
Type string `json:"type"`
33-
NotAnyOf []string `json:"not_any_of"`
34-
AnyOneOf []string `json:"any_one_of"`
35-
Regex bool `json:"regex"`
27+
NotAnyOf []string `json:"not_any_of,omitempty"`
28+
AnyOneOf []string `json:"any_one_of,omitempty"`
29+
Regex bool `json:"regex,omitempty"`
3630
}
3731

3832
type mappingResult struct {

0 commit comments

Comments
 (0)