Skip to content

Commit

Permalink
Merge pull request #420 from okta/hot-fix
Browse files Browse the repository at this point in the history
hot fix for terraform
  • Loading branch information
duytiennguyen-okta committed Nov 29, 2023
2 parents 65eaaba + 9ac2570 commit d158800
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .generator/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ additionalProperties:
enumClassPrefix: true
generateInterfaces: true
packageName: okta
packageVersion: 3.0.17
packageVersion: 3.0.19
useOneOfDiscriminatorLookup: true
disallowAdditionalPropertiesIfNotPresent: false
files:
Expand Down
18 changes: 2 additions & 16 deletions .generator/okta-management-APIs-oasv3-enum-inheritance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26705,9 +26705,6 @@ components:
profile:
type: object
description: Contains any valid JSON schema for specifying properties that can be referenced from a request (only available to OAuth 2.0 client apps)
additionalProperties:
type: object
properties: {}
signOnMode:
$ref: '#/components/schemas/ApplicationSignOnMode'
status:
Expand Down Expand Up @@ -35891,20 +35888,9 @@ components:
readOnly: true
nullable: true
transitioningToStatus:
type: string
description: The target status of an in-progress asynchronous status transition. This property is only returned if the user's state is transitioning.
readOnly: true
nullable: true
enum:
- ACTIVE
- DEPROVISIONED
- PROVISIONED
$ref: '#/components/schemas/UserStatus'
type:
type: string
description: |-
The user type that determines the schema for the user's profile. The `type` property is a map that identifies
the User Type (see [User Types](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/UserType/#tag/UserType)).
Currently it contains a single element, `id`. It can be specified when creating a new user, and may be updated by an administrator on a full replace of an existing user (but not a partial update).
$ref: '#/components/schemas/UserType'
_embedded:
type: object
description: If specified, includes embedded resources related to the user
Expand Down
3 changes: 2 additions & 1 deletion .generator/templates/api_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package okta
import (
"os"
"path"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -387,7 +388,7 @@ func Test_Scope_Consent_Grant_Operation_For_Application(t *testing.T) {
var grant *OAuth2ScopeConsentGrant
t.Run("grant consent to scope", func(t *testing.T) {
payload := OAuth2ScopeConsentGrant{}
payload.SetIssuer(apiClient.cfg.Okta.Client.OrgUrl)
payload.SetIssuer(strings.TrimRight(apiClient.cfg.Okta.Client.OrgUrl, "/"))
payload.SetScopeId("okta.users.read")
grant, _, err = apiClient.ApplicationGrantsAPI.GrantConsentToScope(apiClient.cfg.Context, createdApp.OpenIdConnectApplication.GetId()).OAuth2ScopeConsentGrant(payload).Execute()
assert.Nil(t, err, "grant consent to scope should not error")
Expand Down
2 changes: 1 addition & 1 deletion .generator/templates/api_idp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func Test_Get_Key(t *testing.T) {
t.Run("get list idp keys", func(t *testing.T) {
lidpk, _, err := apiClient.IdentityProviderAPI.ListIdentityProviderKeys(apiClient.cfg.Context).Execute()
require.NoError(t, err, "Could not get list idp")
assert.Equal(t, len(lidpk), 1)
assert.Equal(t, len(lidpk), 3)
})
_, err = apiClient.IdentityProviderAPI.DeleteIdentityProviderKey(apiClient.cfg.Context, createdKey.GetKid()).Execute()
require.NoError(t, err, "Clean up idp key should not error")
Expand Down
3 changes: 2 additions & 1 deletion .generator/templates/api_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,14 @@ func Test_Activate_Policy(t *testing.T) {
}

// ACCESS/AUTHENTICATION POLICY ONLY
// TODO Used to work, now fail with 401
func Test_Clone_Policy(t *testing.T) {
createdPolicy, _, err := setupAccessPolicy(randomTestString())
require.NoError(t, err, "Creating a new policy should not error")
var policyID string
t.Run("clone policy", func(t *testing.T) {
policy, _, err := apiClient.PolicyAPI.ClonePolicy(apiClient.cfg.Context, createdPolicy.AccessPolicy.GetId()).Execute()
require.NoError(t, err, "Could not get policy by ID")
require.NoError(t, err, "Could not clone policy")
policyID = policy.AccessPolicy.GetId()
assert.NotEqual(t, createdPolicy.AccessPolicy.GetId(), policy.AccessPolicy.GetId())
assert.Equal(t, fmt.Sprintf("[cloned] %v", createdPolicy.AccessPolicy.GetName()), policy.AccessPolicy.GetName())
Expand Down

0 comments on commit d158800

Please sign in to comment.