Skip to content
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 6 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ stages:
- pip install -r test-requirements.txt
- pytest --cov=okta

pytest-3.7:
extends: .pytest
image: python:3.7-alpine
pytest-3.8:
extends: .pytest
image: python:3.8-alpine
pytest-3.9:
extends: .pytest
image: python:3.9-alpine
Expand All @@ -29,3 +23,9 @@ pytest-3.10:
pytest-3.11:
extends: .pytest
image: python:3.11-alpine
pytest-3.12:
extends: .pytest
image: python:3.12-alpine
pytest-3.13:
extends: .pytest
image: python:3.13-alpine
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ref: https://docs.travis-ci.com/user/languages/python
language: python
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
# uncomment the following if needed
#- "3.11-dev" # 3.11 development branch
#- "nightly" # nightly build
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Okta Python SDK Changelog

# 3.0.1
- Updated the SDK with the latest management openapi specifications.
- Added pagination support for list operations. Usage documentation is available in PAGINATION_GUIDE.md.
- We have stopped using the npm version of the openapi-generator-cli due to issues with the restriction setting variable configuration. Hence, please use the JAR file of openapi-generator-cli to generate the SDK. You can download the latest JAR file from: https://openapi-generator.tech/docs/installation#jar

# 3.0.0

## OKTA SDK PYTHON COMPREHENSIVE API MIGRATION REPORT
Expand Down
43 changes: 25 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,40 @@ $ git commit -m "descriptive commit message for your changes"

> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.

## Generate models and resource clients
## Generate models and APIs

Models and resource clients are auto-generated in accordance with specific openapi spec version https://github.com/okta/okta-management-openapi-spec.
In order to make changes in models and/or resource clients you need to determine what is the root of changes:
Models and APIs are auto-generated in accordance with specific openapi spec defined in openapi/api.yaml file.
In order to make changes in models and/or APIs you need to determine what is the root of changes:

### if change is needed because of new version of openapi spec has been released, then:
### Prerequisites
1. We have stopped using the npm version of the openapi-generator-cli due to issues with the restriction setting variable configuration:
2. Hence, please use the JAR file of openapi-generator-cli to generate the SDK. You can download the latest JAR file from: https://openapi-generator.tech/docs/installation#jar
3. Make sure you have Java installed on your machine to run the JAR file.
4. Place the downloaded JAR file in the `openapi` directory of the project.
5. Run the `generate.sh` script located in the `openapi` directory to generate the SDK.
6. The `generate.sh` script is already configured to use the JAR file for generating the SDK.

1. get specific openapi spec version (v2.7.1 in the following example):
```sh
cd openapi
npm install @okta/openapi@2.7.1
```
or copy file `https://github.com/okta/okta-management-openapi-spec/blob/master/dist/spec.json` to `openapi/node_modules/@okta/openapi/dist/spec.json` (in order to get specific version of a file use release tags or clone repo and checkout specific commit)
### if change is needed because of new version of openapi spec that has been released, then:

2. re-generate okta-sdk-python (in openapi directory):
```sh
yarn build
```
1. Make changes to the management.yaml file.
2. Re-generate SDK and verify SDK generation is successfully.

a. Change directory to openapi. `cd openapi`

b. Run the build script to re-generate the Okta SDK Python package:
`generate.sh`
3. Raise the PR mentioning details about the changes made to the management.yaml file.

### if change isn't related to new openapi spec version, for example, update template for models, then:

1. edit needed templates under `openapi/templates` directory

2. re-generate okta-sdk-python (in openapi directory):
```sh
yarn build
```

a. Change directory to openapi. `cd openapi`

b. Run the build script to re-generate the Okta SDK Python package:
`generate.sh`

## Adding/Changing Tests

Expand Down Expand Up @@ -146,4 +153,4 @@ You can delete these deprecated branches with the following:
$ git checkout master
$ git branch -D feature_x
$ git push origin :feature_x
```
```
Loading