Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing spec inconsistencies with Open API repo spec (v2.3.0) #558

Merged
merged 40 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
92bfbc6
1. definitions.Application.x-openapi-v3-discriminator.mapping.SAML_1_1
sergiishamrai-okta Feb 25, 2021
aa8b77a
2. Not finished yet
sergiishamrai-okta Feb 25, 2021
3cbcf58
removed #2
sergiishamrai-okta Feb 26, 2021
c96d8f5
2. Missing code discriminator: https://github.com/okta/openapi/blob/d…
sergiishamrai-okta Feb 26, 2021
ea4c7c0
remove code duplication
sergiishamrai-okta Mar 1, 2021
955c419
1. Remove unused SamlApplicationV1
sergiishamrai-okta Mar 2, 2021
f9fbc0b
Whitespaces for generated code updated
sergiishamrai-okta Mar 5, 2021
0bdb070
4. supportedMDMFrameworks and platforms
sergiishamrai-okta Mar 9, 2021
ed1b10e
copyright is back
sergiishamrai-okta Mar 9, 2021
a334466
fix for enums inside list/array
sergiishamrai-okta Mar 9, 2021
995012e
clean code
sergiishamrai-okta Mar 9, 2021
84f6487
revert changes
sergiishamrai-okta Mar 9, 2021
bb165a9
Merge branch 'master' into okta-349906-open-api
sergiishamrai-okta Mar 9, 2021
9f8e8fc
clean code
sergiishamrai-okta Mar 9, 2021
6eb9ac8
new method + do not break the build in case of binary incompatibility
sergiishamrai-okta Mar 9, 2021
43bc492
do not break the build in case of binary incompatibility
sergiishamrai-okta Mar 9, 2021
e262015
LinkedObject object fixes
sergiishamrai-okta Mar 9, 2021
5e65cc0
LinkedObject object ITs
sergiishamrai-okta Mar 9, 2021
1b22cea
buggy implementation updateAuthorizationServerPolicy operation
sergiishamrai-okta Mar 9, 2021
8ccca1c
sync last updates + UserType object
sergiishamrai-okta Mar 10, 2021
bc17bfc
UTs updated
sergiishamrai-okta Mar 10, 2021
3d92248
UserFactor delete method
sergiishamrai-okta Mar 10, 2021
564eba3
Deletable interface issue
sergiishamrai-okta Mar 15, 2021
1532c41
Deletable interface issue
sergiishamrai-okta Mar 15, 2021
ae181a7
AuthorizationServerPolicyRule::deletePolicyRule renamed
sergiishamrai-okta Mar 15, 2021
e4eebd8
Merge branch 'master' into okta-349906-open-api
sergiishamrai-okta Mar 15, 2021
ac730e1
delete LinkedObject properly
sergiishamrai-okta Mar 15, 2021
f9419e8
CleanUp LinkedObjects
sergiishamrai-okta Mar 15, 2021
3723dbf
remove cleanUpLinkedObjects
sergiishamrai-okta Mar 15, 2021
3b08f8f
CreateUserRequest updated
sergiishamrai-okta Mar 16, 2021
2596dd7
Merge branch 'master' into okta-349906-open-api
sergiishamrai-okta Mar 16, 2021
67772c8
v2.3.0
sergiishamrai-okta Mar 16, 2021
ef9b375
Rollback unnecessary changes
sergiishamrai-okta Mar 16, 2021
c482df8
Disable build breaking for now
sergiishamrai-okta Mar 16, 2021
6a91121
Working on Migration guide
sergiishamrai-okta Mar 16, 2021
fe75882
Imports updated
sergiishamrai-okta Mar 17, 2021
abc19b3
Migration guide updated
sergiishamrai-okta Mar 17, 2021
d19a245
Migration guide updated
sergiishamrai-okta Mar 18, 2021
85e5c8a
v4.0.0-SNAPSHOT + Migration guide updated
sergiishamrai-okta Mar 18, 2021
664d579
ITs for ApplicationUserSchema
sergiishamrai-okta Mar 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
309 changes: 309 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,315 @@

This SDK uses semantic versioning and follows Okta's [library version policy](https://developer.okta.com/code/library-versions/). In short, we do not make breaking changes unless the major version changes!

## Migrating from 3.x.x to 4.0.0

Version 4.0.0 of this SDK introduces a number of breaking changes from previous versions.
In addition to many new classes/interfaces, some existing classes/interfaces are no longer backward compatible due to method renaming and signature changes.

### Package `com.okta.sdk.client.Client`

Below methods have undergone a signature change.
- `User createUser(User user, Boolean active, Boolean provider, UserNextLogin nextLogin)` signature changed to `User createUser(CreateUserRequest createUserRequest, Boolean active, Boolean provider, UserNextLogin nextLogin)`
- `User createUser(User user)` signature changed to `User createUser(CreateUserRequest createUserRequest)`
- First argument type changed from `User` to `CreateUserRequest`

Below methods have been added.
- `UserSchema updateApplicationUserProfile(String appInstanceId, UserSchema userSchema)`
- `UserSchema updateApplicationUserProfile(String appInstanceId)`
- `UserSchema updateUserProfile(String schemaId, UserSchema userSchema)`

### Package `com.okta.sdk.resource.user.type.UserType`

Class `com.okta.sdk.resource.user.UserType` moved under `com.okta.sdk.resource.user.type.UserType`
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved

### Package `com.okta.sdk.resource.user.type.UserTypeList`

Class `com.okta.sdk.resource.user.UserTypeList` moved under `com.okta.sdk.resource.user.type.UserTypeList`
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved

### Package `com.okta.sdk.ds.RequestBuilder`

Below method has been added.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- `InputStream getRaw(String href)`

### Package `com.okta.sdk.resource.application.JsonWebKey`

Below methods have been added.
- `JsonWebKey setAlg(String alg)`
- `JsonWebKey setCreated(Date created)`
- `JsonWebKey setE(String e)`
- `JsonWebKey setExpiresAt(Date expiresAt)`
- `JsonWebKey setKeyOps(List<String> keyOps)`
- `JsonWebKey setKid(String kid)`
- `JsonWebKey setKty(String kty)`
- `JsonWebKey setLastUpdated(Date lastUpdated)`
- `JsonWebKey setN(String n)`
- `JsonWebKey setStatus(String status)`
- `JsonWebKey setUse(String use)`
- `JsonWebKey setX5t(String x5t)`
- `JsonWebKey setX5tS256(String x5tS256)`
- `JsonWebKey setX5u(String x5u)`

### Package `com.okta.sdk.resource.application.OpenIdConnectApplicationIdpInitiatedLogin`

This is a newly created interface with methods listed below.

- `List<String> getDefaultScope()`
- `OpenIdConnectApplicationIdpInitiatedLogin setDefaultScope(List<String> defaultScope)`
- `String getMode()`
- `OpenIdConnectApplicationIdpInitiatedLogin setMode(String mode)`

### Package `com.okta.sdk.resource.application.OpenIdConnectApplicationSettingsClient`

Below methods have been added.

- `OpenIdConnectApplicationIdpInitiatedLogin getIdpInitiatedLogin()`
- `OpenIdConnectApplicationSettingsClient setIdpInitiatedLogin(OpenIdConnectApplicationIdpInitiatedLogin idpInitiatedLogin)`

### Package `com.okta.sdk.resource.application.SamlApplicationSettingsSignOn`

Below methods have been added.

- `SingleLogout getSlo()`
- `SpCertificate getSpCertificate()`
- `SamlApplicationSettingsSignOn setSlo(SingleLogout slo)`
- `SamlApplicationSettingsSignOn setSpCertificate(SpCertificate spCertificate)`

### Package `com.okta.sdk.resource.application.SamlApplicationV1`

The Interface has been removed.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
The Interface `com.okta.sdk.resource.application.SamlApplication` should be used instead.


### Package `com.okta.sdk.resource.application.SingleLogout`

This is a newly created interface with methods listed below.

- `Boolean getEnabled()`
- `String getIssuer()`
- `String getLogoutUrl()`
- `SingleLogout setEnabled(Boolean enabled)`
- `SingleLogout setIssuer(String issuer)`
- `SingleLogout setLogoutUrl(String logoutUrl)`

### Package `com.okta.sdk.resource.application.SpCertificate`

This is a newly created interface with methods listed below.

- `List<String> getX5c()`
- `SpCertificate setX5c(List<String> x5c)`

### Package `com.okta.sdk.resource.authorization.server.AuthorizationServerPolicy`

Below method has been renamed to keep naming consistency.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- Renamed `deletePolicy` to `delete`

Below method has undergone a signature change.
- `void deletePolicyRule(String ruleId)` signature changed to `void deletePolicyRule(String authServerId, String ruleId)`

Below method has undergone a signature change and renamed to keep naming consistency.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- `AuthorizationServerPolicy updatePolicy(String authServerId, AuthorizationServerPolicy authServerPolicy)` changed to `AuthorizationServerPolicy update(String authServerId)`

### Package `com.okta.sdk.resource.authorization.server.policy.AuthorizationServerPolicyRule`

Below method has been renamed to keep naming consistency.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- Renamed `deletePolicyRule` to `delete`

### Package `com.okta.sdk.resource.inline.hook.InlineHookChannelConfig`

Below methods have been added.

- `String getMethod()`
- `InlineHookChannelConfig setMethod(String method)`

### Package `com.okta.sdk.resource.linked.object.LinkedObject`

Below methods have been removed.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- `String getName()`
- `LinkedObject setName(String name)`

### Package `com.okta.sdk.resource.log.LogCredentialProvider`

Enum `LogCredentialProvider` has the below field defined:
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- `OKTA_CREDENTIAL_PROVIDER("OKTA_CREDENTIAL_PROVIDER")`

### Package `com.okta.sdk.resource.policy.DevicePolicyRuleConditionPlatform$SupportedMDMFrameworksEnum`

Interface `com.okta.sdk.resource.policy.MDMFrameworks` moved under `com.okta.sdk.resource.policy.DevicePolicyRuleConditionPlatform$SupportedMDMFrameworksEnum`
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved

### Package `com.okta.sdk.resource.policy.DevicePolicyRuleConditionPlatform$TypesEnum`

Interface `com.okta.sdk.resource.policy.Platforms` moved under `com.okta.sdk.resource.policy.DevicePolicyRuleConditionPlatform$TypesEnum`
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved

### Package `com.okta.sdk.resource.user.factor.PushUserFactor`

Below method has been added
- `PushUserFactor setExpiresAt(Date expiresAt)`

### Package `com.okta.sdk.resource.user.factor.UserFactor`

Below method has been renamed to keep naming consistency.
sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved
- Renamed `deleteFactor` to `delete`

### Package `com.okta.sdk.resource.user.schema.UserSchema`

This is a newly created interface with methods listed below.
- `String getCreated()`
- `UserSchemaDefinitions getDefinitions()`
- `String getId()`
- `String getLastUpdated()`
- `Map getLinks()`
- `String getName()`
- `Map getProperties()`
- `String getSchema()`
- `String getTitle()`
- `String getType()`
- `UserSchema setDefinitions(UserSchemaDefinitions definitions)`
- `UserSchema setTitle(String title)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaAttribute`

This is a newly created interface with methods listed below.
- `String getDescription()`
- `UserSchemaAttributeMaster getMaster()`
- `Integer getMaxLength()`
- `Integer getMinLength()`
- `String getMutability()`
- `List getPermissions()`
- `Boolean getRequired()`
- `String getScope()`
- `String getTitle()`
- `String getType()`
- `UserSchemaAttribute setDescription(String description)`
- `UserSchemaAttribute setMaster(UserSchemaAttributeMaster master)`
- `UserSchemaAttribute setMaxLength(Integer maxLength)`
- `UserSchemaAttribute setMinLength(Integer minLength)`
- `UserSchemaAttribute setMutability(String mutability)`
- `UserSchemaAttribute setPermissions(List permissions)`
- `UserSchemaAttribute setRequired(Boolean required)`
- `UserSchemaAttribute setScope(String scope)`
- `UserSchemaAttribute setTitle(String title)`
- `UserSchemaAttribute setType(String type)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaAttributeMaster`

This is a newly created interface with methods listed below.
- `String getType()`
- `UserSchemaAttributeMaster setType(String type)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaAttributePermission`

This is a newly created interface with methods listed below.
- `String getAction()`
- `String getPrincipal()`
- `UserSchemaAttributePermission setAction(String action)`
- `UserSchemaAttributePermission setPrincipal(String principal)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaBase`

This is a newly created interface with methods listed below.
- `String getId()`
- `UserSchemaBaseProperties getProperties()`
- `List<String> getRequired()`
- `String getType()`
- `UserSchemaBase setProperties(UserSchemaBaseProperties properties)`
- `UserSchemaBase setRequired(List<String> required)`
- `UserSchemaBase setType(String type)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaBaseProperties`

This is a newly created interface with methods listed below.
- `UserSchemaAttribute getCity()`
- `UserSchemaAttribute getCostCenter()`
- `UserSchemaAttribute getCountryCode()`
- `UserSchemaAttribute getDepartment()`
- `UserSchemaAttribute getDisplayName()`
- `UserSchemaAttribute getDivision()`
- `UserSchemaAttribute getEmail()`
- `UserSchemaAttribute getEmployeeNumber()`
- `UserSchemaAttribute getFirstName()`
- `UserSchemaAttribute getHonorificPrefix()`
- `UserSchemaAttribute getHonorificSuffix()`
- `UserSchemaAttribute getLastName()`
- `UserSchemaAttribute getLocale()`
- `UserSchemaAttribute getLogin()`
- `UserSchemaAttribute getManager()`
- `UserSchemaAttribute getManagerId()`
- `UserSchemaAttribute getMiddleName()`
- `UserSchemaAttribute getMobilePhone()`
- `UserSchemaAttribute getNickName()`
- `UserSchemaAttribute getOrganization()`
- `UserSchemaAttribute getPostalAddress()`
- `UserSchemaAttribute getPreferredLanguage()`
- `UserSchemaAttribute getPrimaryPhone()`
- `UserSchemaAttribute getProfileUrl()`
- `UserSchemaAttribute getSecondEmail()`
- `UserSchemaAttribute getState()`
- `UserSchemaAttribute getStreetAddress()`
- `UserSchemaAttribute getTimezone()`
- `UserSchemaAttribute getTitle()`
- `UserSchemaAttribute getUserType()`
- `UserSchemaAttribute getZipCode()`
- `UserSchemaBaseProperties setCity(UserSchemaAttribute city)`
- `UserSchemaBaseProperties setCostCenter(UserSchemaAttribute costCenter)`
- `UserSchemaBaseProperties setCountryCode(UserSchemaAttribute countryCode)`
- `UserSchemaBaseProperties setDepartment(UserSchemaAttribute department)`
- `UserSchemaBaseProperties setDisplayName(UserSchemaAttribute displayName)`
- `UserSchemaBaseProperties setDivision(UserSchemaAttribute division)`
- `UserSchemaBaseProperties setEmail(UserSchemaAttribute email)`
- `UserSchemaBaseProperties setEmployeeNumber(UserSchemaAttribute employeeNumber)`
- `UserSchemaBaseProperties setFirstName(UserSchemaAttribute firstName)`
- `UserSchemaBaseProperties setHonorificPrefix(UserSchemaAttribute honorificPrefix)`
- `UserSchemaBaseProperties setHonorificSuffix(UserSchemaAttribute honorificSuffix)`
- `UserSchemaBaseProperties setLastName(UserSchemaAttribute lastName)`
- `UserSchemaBaseProperties setLocale(UserSchemaAttribute locale)`
- `UserSchemaBaseProperties setLogin(UserSchemaAttribute login)`
- `UserSchemaBaseProperties setManager(UserSchemaAttribute manager)`
- `UserSchemaBaseProperties setManagerId(UserSchemaAttribute managerId)`
- `UserSchemaBaseProperties setMiddleName(UserSchemaAttribute middleName)`
- `UserSchemaBaseProperties setMobilePhone(UserSchemaAttribute mobilePhone)`
- `UserSchemaBaseProperties setNickName(UserSchemaAttribute nickName)`
- `UserSchemaBaseProperties setOrganization(UserSchemaAttribute organization)`
- `UserSchemaBaseProperties setPostalAddress(UserSchemaAttribute postalAddress)`
- `UserSchemaBaseProperties setPreferredLanguage(UserSchemaAttribute preferredLanguage)`
- `UserSchemaBaseProperties setPrimaryPhone(UserSchemaAttribute primaryPhone)`
- `UserSchemaBaseProperties setProfileUrl(UserSchemaAttribute profileUrl)`
- `UserSchemaBaseProperties setSecondEmail(UserSchemaAttribute secondEmail)`
- `UserSchemaBaseProperties setState(UserSchemaAttribute state)`
- `UserSchemaBaseProperties setStreetAddress(UserSchemaAttribute streetAddress)`
- `UserSchemaBaseProperties setTimezone(UserSchemaAttribute timezone)`
- `UserSchemaBaseProperties setTitle(UserSchemaAttribute title)`
- `UserSchemaBaseProperties setUserType(UserSchemaAttribute userType)`
- `UserSchemaBaseProperties setZipCode(UserSchemaAttribute zipCode)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaDefinitions`

This is a newly created interface with methods listed below.
- `UserSchemaBase getBase()`
- `UserSchemaPublic getCustom()`
- `UserSchemaDefinitions setBase(UserSchemaBase base)`
- `UserSchemaDefinitions setCustom(UserSchemaPublic custom)`

### Package `com.okta.sdk.resource.user.schema.UserSchemaPublic`

This is a newly created interface with methods listed below.
- `String getId()`
- `Map<String, Object> getProperties()`
- `List<String> getRequired()`
- `String getType()`
- `UserSchemaPublic setProperties(Map<String, Object> properties)`
- `UserSchemaPublic setRequired(List<String> required)`
- `UserSchemaPublic setType(String type)`

### Package `com.okta.sdk.resource.user.User`

Below method has undergone a signature change and renamed to keep naming consistency.
- `void addAllAppsAsTargetToRole()` to `void addAllAppsAsTarget(String roleId)`
- `void deleteFactor()` to `void deleteFactor(String factorId)`

sergiishamrai-okta marked this conversation as resolved.
Show resolved Hide resolved




## Migrating from 2.x.x to 3.0.0

Version 3.0.0 of this SDK introduces a number of breaking changes from previous versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import com.okta.commons.lang.Classes;
import com.okta.sdk.client.Client;
import com.okta.sdk.resource.user.type.UserType;

import java.util.Arrays;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ protected Date getDateProperty(DateProperty key) {
return null;
}

if(value instanceof Date) {
arvindkrishnakumar-okta marked this conversation as resolved.
Show resolved Hide resolved
return (Date)value;
}

try {
return dateFormatter.parse(String.valueOf(value));
} catch (ParseException e) {
Expand Down
Loading