Skip to content

Commit 847a8f5

Browse files
authored
feat: add oneOf discriminator to idp protocol response (#563)
* feat: add oneOf discriminator to idp protocol response * fix: indentation in discriminator for roles
1 parent bd55f2b commit 847a8f5

9 files changed

Lines changed: 268 additions & 768 deletions

.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24891,22 +24891,22 @@ paths:
2489124891
oneOf:
2489224892
- $ref: '#/components/schemas/StandardRole'
2489324893
- $ref: '#/components/schemas/CustomRole'
24894-
discriminator:
24895-
propertyName: type
24896-
mapping:
24897-
API_ACCESS_MANAGEMENT_ADMIN: '#/components/schemas/StandardRole'
24898-
APP_ADMIN: '#/components/schemas/StandardRole'
24899-
GROUP_MEMBERSHIP_ADMIN: '#/components/schemas/StandardRole'
24900-
HELP_DESK_ADMIN: '#/components/schemas/StandardRole'
24901-
ORG_ADMIN: '#/components/schemas/StandardRole'
24902-
READ_ONLY_ADMIN: '#/components/schemas/StandardRole'
24903-
REPORT_ADMIN: '#/components/schemas/StandardRole'
24904-
SUPER_ADMIN: '#/components/schemas/StandardRole'
24905-
USER_ADMIN: '#/components/schemas/StandardRole'
24906-
ACCESS_CERTIFICATIONS_ADMIN: '#/components/schemas/CustomRole'
24907-
ACCESS_REQUESTS_ADMIN: '#/components/schemas/CustomRole'
24908-
WORKFLOWS_ADMIN: '#/components/schemas/CustomRole'
24909-
CUSTOM: '#/components/schemas/CustomRole'
24894+
discriminator:
24895+
propertyName: type
24896+
mapping:
24897+
API_ACCESS_MANAGEMENT_ADMIN: '#/components/schemas/StandardRole'
24898+
APP_ADMIN: '#/components/schemas/StandardRole'
24899+
GROUP_MEMBERSHIP_ADMIN: '#/components/schemas/StandardRole'
24900+
HELP_DESK_ADMIN: '#/components/schemas/StandardRole'
24901+
ORG_ADMIN: '#/components/schemas/StandardRole'
24902+
READ_ONLY_ADMIN: '#/components/schemas/StandardRole'
24903+
REPORT_ADMIN: '#/components/schemas/StandardRole'
24904+
SUPER_ADMIN: '#/components/schemas/StandardRole'
24905+
USER_ADMIN: '#/components/schemas/StandardRole'
24906+
ACCESS_CERTIFICATIONS_ADMIN: '#/components/schemas/CustomRole'
24907+
ACCESS_REQUESTS_ADMIN: '#/components/schemas/CustomRole'
24908+
WORKFLOWS_ADMIN: '#/components/schemas/CustomRole'
24909+
CUSTOM: '#/components/schemas/CustomRole'
2491024910
'403':
2491124911
$ref: '#/components/responses/ErrorAccessDenied403'
2491224912
'404':
@@ -37697,6 +37697,14 @@ components:
3769737697
- $ref: '#/components/schemas/ProtocolOidc'
3769837698
- $ref: '#/components/schemas/ProtocolMtls'
3769937699
- $ref: '#/components/schemas/ProtocolIdVerification'
37700+
discriminator:
37701+
propertyName: type
37702+
mapping:
37703+
SAML2: '#/components/schemas/ProtocolSaml'
37704+
OAUTH2: '#/components/schemas/ProtocolOAuth'
37705+
OIDC: '#/components/schemas/ProtocolOidc'
37706+
MTLS: '#/components/schemas/ProtocolMtls'
37707+
ID_PROOFING: '#/components/schemas/ProtocolIdVerification'
3770037708
status:
3770137709
$ref: '#/components/schemas/LifecycleStatus'
3770237710
type:

okta/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,6 @@ Class | Method | HTTP request | Description
889889
- [ApplicationVisibilityHide](docs/ApplicationVisibilityHide.md)
890890
- [AssignGroupOwnerRequestBody](docs/AssignGroupOwnerRequestBody.md)
891891
- [AssignRoleRequest](docs/AssignRoleRequest.md)
892-
- [AssignRoleToClient200Response](docs/AssignRoleToClient200Response.md)
893892
- [AssignRoleToClientRequest](docs/AssignRoleToClientRequest.md)
894893
- [AssignRoleToGroup200Response](docs/AssignRoleToGroup200Response.md)
895894
- [AssignRoleToGroupRequest](docs/AssignRoleToGroupRequest.md)

okta/api/openapi.yaml

Lines changed: 26 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -40987,22 +40987,6 @@ paths:
4098740987
content:
4098840988
application/json:
4098940989
schema:
40990-
discriminator:
40991-
mapping:
40992-
API_ACCESS_MANAGEMENT_ADMIN: "#/components/schemas/StandardRole"
40993-
APP_ADMIN: "#/components/schemas/StandardRole"
40994-
GROUP_MEMBERSHIP_ADMIN: "#/components/schemas/StandardRole"
40995-
HELP_DESK_ADMIN: "#/components/schemas/StandardRole"
40996-
ORG_ADMIN: "#/components/schemas/StandardRole"
40997-
READ_ONLY_ADMIN: "#/components/schemas/StandardRole"
40998-
REPORT_ADMIN: "#/components/schemas/StandardRole"
40999-
SUPER_ADMIN: "#/components/schemas/StandardRole"
41000-
USER_ADMIN: "#/components/schemas/StandardRole"
41001-
ACCESS_CERTIFICATIONS_ADMIN: "#/components/schemas/CustomRole"
41002-
ACCESS_REQUESTS_ADMIN: "#/components/schemas/CustomRole"
41003-
WORKFLOWS_ADMIN: "#/components/schemas/CustomRole"
41004-
CUSTOM: "#/components/schemas/CustomRole"
41005-
propertyName: type
4100640990
items:
4100740991
$ref: "#/components/schemas/listRolesForClient_200_response_inner"
4100840992
type: array
@@ -41066,7 +41050,7 @@ paths:
4106641050
content:
4106741051
application/json:
4106841052
schema:
41069-
$ref: "#/components/schemas/assignRoleToClient_200_response"
41053+
$ref: "#/components/schemas/listRolesForClient_200_response_inner"
4107041054
description: Success
4107141055
"403":
4107241056
content:
@@ -41180,7 +41164,7 @@ paths:
4118041164
content:
4118141165
application/json:
4118241166
schema:
41183-
$ref: "#/components/schemas/assignRoleToClient_200_response"
41167+
$ref: "#/components/schemas/listRolesForClient_200_response_inner"
4118441168
description: Success
4118541169
"403":
4118641170
content:
@@ -82100,6 +82084,22 @@ components:
8210082084
- $ref: "#/components/schemas/DynamicNetworkZone"
8210182085
- $ref: "#/components/schemas/EnhancedDynamicNetworkZone"
8210282086
listRolesForClient_200_response_inner:
82087+
discriminator:
82088+
mapping:
82089+
API_ACCESS_MANAGEMENT_ADMIN: "#/components/schemas/StandardRole"
82090+
APP_ADMIN: "#/components/schemas/StandardRole"
82091+
GROUP_MEMBERSHIP_ADMIN: "#/components/schemas/StandardRole"
82092+
HELP_DESK_ADMIN: "#/components/schemas/StandardRole"
82093+
ORG_ADMIN: "#/components/schemas/StandardRole"
82094+
READ_ONLY_ADMIN: "#/components/schemas/StandardRole"
82095+
REPORT_ADMIN: "#/components/schemas/StandardRole"
82096+
SUPER_ADMIN: "#/components/schemas/StandardRole"
82097+
USER_ADMIN: "#/components/schemas/StandardRole"
82098+
ACCESS_CERTIFICATIONS_ADMIN: "#/components/schemas/CustomRole"
82099+
ACCESS_REQUESTS_ADMIN: "#/components/schemas/CustomRole"
82100+
WORKFLOWS_ADMIN: "#/components/schemas/CustomRole"
82101+
CUSTOM: "#/components/schemas/CustomRole"
82102+
propertyName: type
8210382103
oneOf:
8210482104
- $ref: "#/components/schemas/StandardRole"
8210582105
- $ref: "#/components/schemas/CustomRole"
@@ -82123,26 +82123,6 @@ components:
8212382123
oneOf:
8212482124
- $ref: "#/components/schemas/StandardRoleAssignmentSchema"
8212582125
- $ref: "#/components/schemas/CustomRoleAssignmentSchema"
82126-
assignRoleToClient_200_response:
82127-
discriminator:
82128-
mapping:
82129-
API_ACCESS_MANAGEMENT_ADMIN: "#/components/schemas/StandardRole"
82130-
APP_ADMIN: "#/components/schemas/StandardRole"
82131-
GROUP_MEMBERSHIP_ADMIN: "#/components/schemas/StandardRole"
82132-
HELP_DESK_ADMIN: "#/components/schemas/StandardRole"
82133-
ORG_ADMIN: "#/components/schemas/StandardRole"
82134-
READ_ONLY_ADMIN: "#/components/schemas/StandardRole"
82135-
REPORT_ADMIN: "#/components/schemas/StandardRole"
82136-
SUPER_ADMIN: "#/components/schemas/StandardRole"
82137-
USER_ADMIN: "#/components/schemas/StandardRole"
82138-
ACCESS_CERTIFICATIONS_ADMIN: "#/components/schemas/CustomRole"
82139-
ACCESS_REQUESTS_ADMIN: "#/components/schemas/CustomRole"
82140-
WORKFLOWS_ADMIN: "#/components/schemas/CustomRole"
82141-
CUSTOM: "#/components/schemas/CustomRole"
82142-
propertyName: type
82143-
oneOf:
82144-
- $ref: "#/components/schemas/StandardRole"
82145-
- $ref: "#/components/schemas/CustomRole"
8214682126
AIAgentOperationListResponse__links:
8214782127
allOf:
8214882128
- $ref: "#/components/schemas/LinksSelf"
@@ -84216,6 +84196,14 @@ components:
8421684196
IdentityProvider_protocol:
8421784197
description: "IdP-specific protocol settings for endpoints, bindings, and algorithms\
8421884198
\ used to connect with the IdP and validate messages"
84199+
discriminator:
84200+
mapping:
84201+
SAML2: "#/components/schemas/ProtocolSaml"
84202+
OAUTH2: "#/components/schemas/ProtocolOAuth"
84203+
OIDC: "#/components/schemas/ProtocolOidc"
84204+
MTLS: "#/components/schemas/ProtocolMtls"
84205+
ID_PROOFING: "#/components/schemas/ProtocolIdVerification"
84206+
propertyName: type
8421984207
oneOf:
8422084208
- $ref: "#/components/schemas/ProtocolSaml"
8422184209
- $ref: "#/components/schemas/ProtocolOAuth"

okta/api_role_assignment_client.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ type RoleAssignmentClientAPI interface {
5353
AssignRoleToClient(ctx context.Context, clientId string) ApiAssignRoleToClientRequest
5454

5555
// AssignRoleToClientExecute executes the request
56-
// @return AssignRoleToClient200Response
57-
AssignRoleToClientExecute(r ApiAssignRoleToClientRequest) (*AssignRoleToClient200Response, *APIResponse, error)
56+
// @return ListRolesForClient200ResponseInner
57+
AssignRoleToClientExecute(r ApiAssignRoleToClientRequest) (*ListRolesForClient200ResponseInner, *APIResponse, error)
5858

5959
/*
6060
DeleteRoleFromClient Unassign a client role
@@ -99,8 +99,8 @@ type RoleAssignmentClientAPI interface {
9999
RetrieveClientRole(ctx context.Context, clientId string, roleAssignmentId string) ApiRetrieveClientRoleRequest
100100

101101
// RetrieveClientRoleExecute executes the request
102-
// @return AssignRoleToClient200Response
103-
RetrieveClientRoleExecute(r ApiRetrieveClientRoleRequest) (*AssignRoleToClient200Response, *APIResponse, error)
102+
// @return ListRolesForClient200ResponseInner
103+
RetrieveClientRoleExecute(r ApiRetrieveClientRoleRequest) (*ListRolesForClient200ResponseInner, *APIResponse, error)
104104
}
105105

106106
// RoleAssignmentClientAPIService RoleAssignmentClientAPI service
@@ -119,7 +119,7 @@ func (r ApiAssignRoleToClientRequest) AssignRoleToClientRequest(assignRoleToClie
119119
return r
120120
}
121121

122-
func (r ApiAssignRoleToClientRequest) Execute() (*AssignRoleToClient200Response, *APIResponse, error) {
122+
func (r ApiAssignRoleToClientRequest) Execute() (*ListRolesForClient200ResponseInner, *APIResponse, error) {
123123
return r.ApiService.AssignRoleToClientExecute(r)
124124
}
125125

@@ -149,13 +149,13 @@ func (a *RoleAssignmentClientAPIService) AssignRoleToClient(ctx context.Context,
149149

150150
// Execute executes the request
151151
//
152-
// @return AssignRoleToClient200Response
153-
func (a *RoleAssignmentClientAPIService) AssignRoleToClientExecute(r ApiAssignRoleToClientRequest) (*AssignRoleToClient200Response, *APIResponse, error) {
152+
// @return ListRolesForClient200ResponseInner
153+
func (a *RoleAssignmentClientAPIService) AssignRoleToClientExecute(r ApiAssignRoleToClientRequest) (*ListRolesForClient200ResponseInner, *APIResponse, error) {
154154
var (
155155
localVarHTTPMethod = http.MethodPost
156156
localVarPostBody interface{}
157157
formFiles []formFile
158-
localVarReturnValue *AssignRoleToClient200Response
158+
localVarReturnValue *ListRolesForClient200ResponseInner
159159
localVarHTTPResponse *http.Response
160160
localAPIResponse *APIResponse
161161
err error
@@ -620,7 +620,7 @@ type ApiRetrieveClientRoleRequest struct {
620620
retryCount int32
621621
}
622622

623-
func (r ApiRetrieveClientRoleRequest) Execute() (*AssignRoleToClient200Response, *APIResponse, error) {
623+
func (r ApiRetrieveClientRoleRequest) Execute() (*ListRolesForClient200ResponseInner, *APIResponse, error) {
624624
return r.ApiService.RetrieveClientRoleExecute(r)
625625
}
626626

@@ -646,13 +646,13 @@ func (a *RoleAssignmentClientAPIService) RetrieveClientRole(ctx context.Context,
646646

647647
// Execute executes the request
648648
//
649-
// @return AssignRoleToClient200Response
650-
func (a *RoleAssignmentClientAPIService) RetrieveClientRoleExecute(r ApiRetrieveClientRoleRequest) (*AssignRoleToClient200Response, *APIResponse, error) {
649+
// @return ListRolesForClient200ResponseInner
650+
func (a *RoleAssignmentClientAPIService) RetrieveClientRoleExecute(r ApiRetrieveClientRoleRequest) (*ListRolesForClient200ResponseInner, *APIResponse, error) {
651651
var (
652652
localVarHTTPMethod = http.MethodGet
653653
localVarPostBody interface{}
654654
formFiles []formFile
655-
localVarReturnValue *AssignRoleToClient200Response
655+
localVarReturnValue *ListRolesForClient200ResponseInner
656656
localVarHTTPResponse *http.Response
657657
localAPIResponse *APIResponse
658658
err error

0 commit comments

Comments
 (0)