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 27 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
2 changes: 1 addition & 1 deletion THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License.

This project includes:
Animal Sniffer Annotations under MIT license
Apache Commons Codec under The Apache Software License, Version 2.0
Apache Commons Codec under Apache License, Version 2.0
Apache Commons Lang under Apache License, Version 2.0
Apache HttpClient under Apache License, Version 2.0
Apache HttpCore under Apache License, Version 2.0
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,11 @@ protected Date getDateProperty(DateProperty key) {
return null;
}

//TODO: review this
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import com.okta.sdk.resource.user.UserCredentials;
import com.okta.sdk.resource.user.UserNextLogin;
import com.okta.sdk.resource.user.UserProfile;
import com.okta.sdk.resource.user.UserType;
import com.okta.sdk.resource.user.type.UserType;

import java.util.Arrays;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ class GeneratedResourceTest {
} else if (property instanceof IntegerProperty) {
value = 42
} else if (property instanceof DateProperty) {
value = "2001-07-04T12:08:56.235-0700"
value = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
.parse("2001-07-04T12:08:56.235-0700")
} else if (property instanceof MapProperty) {
value = [one: "two"]
} else if (property instanceof ResourceReference) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ class AuthorizationServerIT extends ITSupport {
assertThat(createdPolicyRule, notNullValue())
assertThat(createdPolicyRule.getType(), equalTo(AuthorizationServerPolicyRule.TypeEnum.ACCESS))

createdPolicyRule.deletePolicyRule(createdAuthorizationServer.getId())
createdPolicyRule.delete(createdAuthorizationServer.getId())

// delete may not effect immediately in the backend
sleep(getTestOperationDelay())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class LinkedObjectsIT extends ITSupport {
.setType(LinkedObjectDetailsType.USER)

LinkedObject linkedObject = client.instantiate(LinkedObject)
.setName(primary.getName())
.setPrimary(primary)
.setAssociated(associated)
registerForCleanup(linkedObject)
Expand Down Expand Up @@ -88,7 +87,6 @@ class LinkedObjectsIT extends ITSupport {
.setType(LinkedObjectDetailsType.USER)

LinkedObject linkedObject = client.instantiate(LinkedObject)
.setName(primary.getName())
.setPrimary(primary)
.setAssociated(associated)
registerForCleanup(linkedObject)
Expand Down Expand Up @@ -127,7 +125,6 @@ class LinkedObjectsIT extends ITSupport {
.setType(LinkedObjectDetailsType.USER)

LinkedObject linkedObject = client.instantiate(LinkedObject)
.setName(primary.getName())
.setPrimary(primary)
.setAssociated(associated)
registerForCleanup(linkedObject)
Expand Down Expand Up @@ -168,7 +165,6 @@ class LinkedObjectsIT extends ITSupport {
.setType(LinkedObjectDetailsType.USER)

LinkedObject linkedObject1 = client.instantiate(LinkedObject)
.setName(primary1.getName())
.setPrimary(primary1)
.setAssociated(associated1)
registerForCleanup(linkedObject1)
Expand All @@ -193,7 +189,6 @@ class LinkedObjectsIT extends ITSupport {
.setType(LinkedObjectDetailsType.USER)

LinkedObject linkedObject2 = client.instantiate(LinkedObject)
.setName(primary2.getName())
.setPrimary(primary2)
.setAssociated(associated2)
registerForCleanup(linkedObject2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.okta.sdk.tests.it

import com.okta.sdk.resource.user.UserType
import com.okta.sdk.resource.user.type.UserType
import com.okta.sdk.tests.it.util.ITSupport
import org.testng.annotations.Test
import wiremock.org.apache.commons.lang3.RandomStringUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import com.okta.sdk.resource.user.UserBuilder
import com.okta.sdk.resource.user.UserCredentials
import com.okta.sdk.resource.user.UserList
import com.okta.sdk.resource.user.UserStatus
import com.okta.sdk.resource.user.UserType
import com.okta.sdk.resource.user.type.UserType
import com.okta.sdk.tests.Scenario
import com.okta.sdk.tests.it.util.ITSupport
import org.testng.Assert
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ trait ClientProvider implements IHookable {
toBeDeleted.reverse().each { deletable ->
try {
if (deletable instanceof User ||
deletable instanceof GroupRule ||
deletable instanceof Application ||
deletable instanceof AuthorizationServer ||
deletable instanceof EventHook ||
Expand All @@ -195,9 +194,6 @@ trait ClientProvider implements IHookable {
deletable instanceof IdentityProvider) {
deletable.deactivate()
}
if (deletable instanceof LinkedObject) {
deletable.setName(deletable.getPrimary().getName())
}
deletable.delete()
}
catch (Exception e) {
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<snakeyaml.version>1.26</snakeyaml.version>
<bouncycastle.version>1.68</bouncycastle.version>
<jjwt.version>0.11.1</jjwt.version>
<okta.sdk.previousVersion>3.0.3</okta.sdk.previousVersion>
<okta.sdk.previousVersion>3.0.4-SNAPSHOT</okta.sdk.previousVersion><!-- TODO: Revert this -->
<okta.commons.version>1.2.5</okta.commons.version>

<github.slug>okta/okta-sdk-java</github.slug>
Expand Down Expand Up @@ -343,8 +343,8 @@
</oldVersion>
<parameter>
<onlyModified>true</onlyModified>
<breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
<breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
<breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications><!-- TODO: Revert to true-->
<breakBuildBasedOnSemanticVersioning>false</breakBuildBasedOnSemanticVersioning>
<postAnalysisScript>${root.dir}/src/japicmp/postAnalysisScript.groovy</postAnalysisScript>
</parameter>
</configuration>
Expand Down
Loading