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

Merge oasv3 feature branch into master - Prep for OASv3 Release #776

Merged
merged 15 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 13 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,28 @@ jobs:

jdk8:
docker:
- image: cimg/openjdk:8.0-node
- image: cimg/openjdk:8.0.345-node
environment:
JVM_OPTS: -Xmx3200m
JVM_OPTS: -Xmx3200m
steps: *build_steps

jdk11:
docker:
- image: cimg/openjdk:11.0-node
- image: cimg/openjdk:11.0.16-node
environment:
JVM_OPTS: -Xmx3200m
steps: *build_steps

jdk17:
docker:
- image: cimg/openjdk:17.0.4-node
environment:
JVM_OPTS: -Xmx3200m
JVM_OPTS: -Xmx3200m
steps: *build_steps

workflows:
build_and_test:
jobs:
- jdk8
- jdk11
- jdk17
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ travis_phantomjs

# api.yaml will be fetched from NPM, the local copy will not be used.
src/swagger/api.yaml
/api/src/main/java/com/okta/sdk/client/AppMain.java
40 changes: 40 additions & 0 deletions MIGRATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,46 @@

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 8.x.x to 10.x.x

In previous versions we use an Open API v2 specification for the management APIs, and an Okta custom client generator to generate the SDK components.
A new version of the Open API specification v3 has been released, and new well-known open source generators are now available to automatically generate code from this specification.

This revision will embrace the Open Source [openapi-generator](https://github.com/OpenAPITools/openapi-generator) to auto generate the code from Okta's reference specification (v3) of the Management APIs.

### Okta client vs API clients

In older version, you would instantiate a global `Client` and access the Okta resources using the Management APIs.
Now, each API area (such as Users, Groups, Applications etc.) would have its own specific client, so you will only instantiate those clients you are interested in:

_Earlier:_

```java
Client client = Clients.builder()
.setOrgUrl("https://{yourOktaDomain}") // e.g. https://dev-123456.okta.com
.setClientCredentials(new TokenClientCredentials("{apiToken}"))
.build();

User user = client.getUser("a-user-id");

Application app = client.getApplication("appId");
```

_Now:_

```java
ApiClient client = Clients.builder()
.setOrgUrl("https://{yourOktaDomain}") // e.g. https://dev-123456.okta.com
.setClientCredentials(new TokenClientCredentials("{apiToken}"))
.build();

UserApi userApi = new UserApi(client);
User user = userApi.getUser("userId");

ApplicationApi applicationApi = new ApplicationApi(client);
Application app = applicationApi.getApplication("appId", null);
```

## Migrating from 7.x.x to 8.0.0

Version 8.0.0 of this SDK introduces few breaking changes from previous versions.
Expand Down
Loading