Skip to content

Commit

Permalink
Merge to Master for Release 1.0 (#80)
Browse files Browse the repository at this point in the history
* Adds go-dep setup

* Begin Makefile build

* adds editorconfig file

* Adds .gitignore

* Adds spec.json file

* Adds default .md files

* Updates Readme badges

* Adds .travis.yml placeholder

* updates Makefile to remove only spec.json on pull-spec

* updates Makefile to remove only spec.json on pull-spec

* Adds Configuration reader

* Updates the Readme for configuration details

* Removes merge libraries from project

* Updates Readme

* Initial Request Executor

* Adds content type to header when body is being posted

* Adds accept header

* WIP

* Generate the user agent string

* Spec an temaplates

* Remove go-swagger stuff

* Setting up okta/openapi

* Adding all operations

* Clean up generated files

* Remove generated files

* Update vendor files

* Updates templates

* Updates openapi generator

* Updates generator

* Fixes bug with POST calls

* Updates with first User Integration Test

* Converting tests to use stretchr/testify

* Adds Query Params setup

* Refactor requests

* Removes old request functions

* convert user profile to map

* Updates the User Profile integration tests

* Adds suspend/unsuspend integration test

* Updates IT tests to add User Password Change

* Adds IT for User Password Reset Link

* IT for Expire Password

* IT for Change Recovery Question

* Updates array responses for API calls

* User IT testing finished

* Removes With* functions

* Removes pointer to pointer check on qp

* Updates group it tests

* Updates build task to run go fmt

* Caching WIP

* WIP

* WIP

* Adds caching to Request Executor

* WIP

* Caching enabled for GET requests.  Clears cache item on all POST, PUT, and DELETE requests

* Remove GoCache

* Remove Go-Cache

* Adds unit test for cache key generation

* Updates CacheKey unit test to remove other deps

* Adds test to make sure items can be stored in cache

* Updates tests

* Code Review Changes

* Updates to return Cache from New*

* Adds back in go-cache

* removes map-cache

* Updates cache tests to go-cache

* Only set cache item if not a collection

* Remove Magic Number Status Codes

* Cleanup comments

* Updates around PR review

* Converting properties to private

* Makes a copy of request when pulling from cache

* Updates tests with correct message

* Update version

* Rebuild templates for operations to be correct

* Updates tests for flaky test

* Updates Readme

* Fixes Factors based on Readme

* Updates Readme with additional options in Client

* Update Readme

* Removed duplicate license badge

* Updates authn part of readme

* Updates Travis to run tests

* Update code gen to incldue all methods for Factors.  Also removes un-needed use of nil in query params for methods that do not support query params

* Update code gen to incldue all methods for Factors.  Also removes un-needed use of nil in query params for methods that do not support query params

* WIP

* WIP

* WIP

* Updates tests and listApplications

* Removed extra factor call

* Updates application integration tests

* Adds factor integration testing

* Update code gen to incldue all methods for Factors.  Also removes un-needed use of nil in query params for methods that do not support query params

* Update code gen to incldue all methods for Factors.  Also removes un-needed use of nil in query params for methods that do not support query params

* WIP

* WIP

* WIP

* Updates tests and listApplications

* Removed extra factor call

* Updates application integration tests

* Adds factor integration testing

* Updates Readme

* Change Params.String() function to use url.Values for serialization

The previous version of this marshelled the Params structure to JSON, then
unmarshaled the JSON in order to construct a URL-escaped query params. Now
we directly generate from the template variables a direct encoder to
url.Values.

Fixes #27

* Adds Contributing Guide

* Fix deserialisation of error causes

* changes over to go.mod

* Make travis run go mod download

* Includes go-yaml

* Remove go-cache from ignore and update go mod config

* update readme and add contributing

* fix type of ErrorCauses field in the Error struct

* Rebase Develop

* README: Make provided example consistent with the rest of the documentation.

* updates spec

* Updates spec to 1.11

* Resolves errors in 1.11.0 generator

* Updates version of go-cache

* Trying to fix build for tip

* Updates timestamp

* Adds tests for confirming that you can modify applicaton settings application during update and create

* Changes base ApplicationSettingsApplication to a map[string]interface

* modifies the config struct to no longer be an object you pass to a new client

* Updates tests newClient

* Splits activate and deactivate tests for applicaitons

* Updates tests for API Token check

* Merges in Master (#79)

* Adds go-dep setup

* Begin Makefile build

* adds editorconfig file

* Adds .gitignore

* Adds spec.json file

* Adds default .md files

* Updates Readme badges

* Adds .travis.yml placeholder

* updates Makefile to remove only spec.json on pull-spec

* Adds Configuration reader

* Updates the Readme for configuration details

* Removes merge libraries from project

* Updates Readme

* Initial Request Executor

* Adds content type to header when body is being posted

* Adds accept header

* WIP

* Generate the user agent string

* Spec an temaplates

* Remove go-swagger stuff

* Setting up okta/openapi

* Adding all operations

* Clean up generated files

* Remove generated files

* Update vendor files

* Updates templates

* Updates openapi generator

* Updates generator

* Fixes bug with POST calls

* Updates with first User Integration Test

* Converting tests to use stretchr/testify

* Adds Query Params setup

* Refactor requests

* Removes old request functions

* convert user profile to map

* Updates the User Profile integration tests

* Adds suspend/unsuspend integration test

* Updates IT tests to add User Password Change

* Adds IT for User Password Reset Link

* IT for Expire Password

* IT for Change Recovery Question

* Updates array responses for API calls

* User IT testing finished

* Removes With* functions

* Removes pointer to pointer check on qp

* Updates group it tests

* Updates build task to run go fmt

* Caching WIP

* WIP

* WIP

* Adds caching to Request Executor

* WIP

* Caching enabled for GET requests.  Clears cache item on all POST, PUT, and DELETE requests

* Remove GoCache

* Remove Go-Cache

* Adds unit test for cache key generation

* Updates CacheKey unit test to remove other deps

* Adds test to make sure items can be stored in cache

* Updates tests

* Code Review Changes

* Updates to return Cache from New*

* Adds back in go-cache

* removes map-cache

* Updates cache tests to go-cache

* Only set cache item if not a collection

* Remove Magic Number Status Codes

* Cleanup comments

* Updates around PR review

* Converting properties to private

* Makes a copy of request when pulling from cache

* Updates tests with correct message

* Update version

* Rebuild templates for operations to be correct

* Updates tests for flaky test

* Updates Readme

* Fixes Factors based on Readme

* Updates Readme with additional options in Client

* Update Readme

* Removed duplicate license badge

* Updates authn part of readme

* Updates Travis to run tests

* Updates readme to prep for 1.0

* Fix the Retty applicaiton to application typo

* Travis to test tip and 1.12
  • Loading branch information
bretterer authored Aug 5, 2019
1 parent 2395a5f commit da407cb
Show file tree
Hide file tree
Showing 168 changed files with 4,880 additions and 799 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
/vendor/bin/
/vendor/pkg/
/vendor/src/
/vendor
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
language: go

go:
- 1.9.x
- 1.10.x
- 1.12.x
- tip

script:
- go mod download
- make test

124 changes: 124 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
Contributing to Okta Open Source Repos
======================================

Sign the CLA
------------

If you haven't already, [sign the CLA](https://developer.okta.com/cla/). Common questions/answers are also listed on the CLA page.

Summary
-------
This document covers how to contribute to an Okta Open Source project. These instructions assume you have a GitHub
.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to
your own fork of the Okta Golang SDK project and you will submit a Pull Request for your changes to be added.

_Lets get started!!!_


Fork the code
-------------

In your browser, navigate to: [https://github.com/okta/okta-sdk-golang](https://github.com/okta/okta-sdk-golang)

Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.

On your computer, follow these steps to setup a local repository for working on the Okta Golang SDK:

``` bash
$ git clone https://github.com/YOUR_ACCOUNT/okta-sdk-golang.git
$ cd okta-sdk-golang
$ git remote add upstream https://github.com/okta/okta-sdk-golang.git
$ git checkout develop
$ git fetch upstream
$ git rebase upstream/develop
```


Making changes
--------------

It is important that you create a new branch to make changes on and that you do not change the `develop`
branch (other than to rebase in changes from `upstream/develop`). In this example I will assume you will be making
your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the Okta Golang SDK project.

It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.

``` bash
$ git checkout develop
$ git checkout -b feature_x
(make your changes)
$ git status
$ git add <files>
$ 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`.

Rebase `feature_x` to include updates from `upstream/develop`
------------------------------------------------------------

It is important that you maintain an up-to-date `develop` branch in your local repository. This is done by rebasing in
the code changes from `upstream/develop` (the official Okta Java SDK project repository) into your local repository.
You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.

This process will do the following:

1. Checkout your local `develop` branch
2. Synchronize your local `develop` branch with the `upstream/develop` so you have all the latest changes from the
project
3. Rebase the latest project code into your `feature_x` branch so it is up-to-date with the upstream code

``` bash
$ git checkout develop
$ git fetch upstream
$ git rebase upstream/develop
$ git checkout feature_x
$ git rebase develop
```

> Now your `feature_x` branch is up-to-date with all the code in `upstream/develop`.

Make a GitHub Pull Request to contribute your changes
-----------------------------------------------------

When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.

> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/develop`
_before_ you do this.

``` bash
$ git push origin master
$ git push origin feature_x
```

Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request.

To initiate the pull request, do the following:

1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT/okta-sdk-golang](https://github
.com/YOUR_ACCOUNT/okta-sdk-golang)
2. Click the new button called '**Compare & pull request**' that showed up just above the main area in your forked repository
3. Validate the pull request will be into the upstream `develop` and will be from your `feature_x` branch
4. Enter a detailed description of the work you have done and then click '**Send pull request**'

If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly.


Cleaning up after a successful pull request
-------------------------------------------

Once the `feature_x` branch has been committed into the `upstream/develop` branch, your local `feature_x` branch and
the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.

> **IMPORTANT:** Make sure that your changes are in `upstream/develop` before you delete your `feature_x` and
`origin/feature_x` branches!

You can delete these deprecated branches with the following:

``` bash
$ git checkout master
$ git branch -D feature_x
$ git push origin :feature_x
```
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ generate-files:
@echo "$(COLOR_OKTA)Generating SDK Files...$(COLOR_NONE)"
cd openapi && yarn generator
@echo "$(COLOR_OK)Running Go Fmt on generated files...$(COLOR_NONE)"
go fmt ./okta
gofmt -w ./okta

pull-spec:
@echo "$(COLOR_OKTA)Pulling in latest spec...$(COLOR_NONE)"
Expand Down
Loading

0 comments on commit da407cb

Please sign in to comment.