The generator for the Kinde Elixir SDK.
This generator creates an SDK in Elixir that can authenticate to Kinde using the Authorization Code grant or the Authorization Code with PKCE grant via the OAuth 2.0 protocol. It can also access the Kinde Management API using the client credentials grant.
Also, see the SDKs section in Kinde’s contributing guidelines.
-
Clone the repository to your machine:
git clone https://github.com/kinde-oss/kinde-elixir-sdk-generator.git
-
Go into the project:
cd kinde-elixir-sdk-generator
-
Install the OpenAPI Generator tool:
Run the following commands to generate the SDK:
openapi-generator-cli generate -i kinde.yml -g elixir -c kinde-config.yml -o kinde-elixir-sdk --skip-validate-spec
Note: Instead of openapi-generator-cli
, you can also use: openapi-generator
.
The SDK gets outputted to: kinde-elixir-sdk
, which you can enter via:
cd kinde-elixir-sdk
kinde-config.yml
is the config file that generates the SDK files, and you will need to update the config file with the SDK file paths.
Change the first part of the file list to the path of the SDK files. In case the SDK is located at the previous directory, no changes are needed to be made.
For example, the YAML file will become for each file from:
../kinde-elixir-sdk/lib/kinde_sdk/sdk/authorization_code.ex:
destinationFilename: lib/kinde_sdk/sdk/authorization_code.ex
To:
/path/to/sdk/authorization_code.ex:
destinationFilename: lib/kinde_sdk/sdk/authorization_code.ex
Install the following dependency after generation:
{:plug, "~> 1.13"},
{:plug_cowboy, "~> 2.0"},
{:jason, "~> 1.3"},
{:httpoison, "~> 0.7"}
Please refer to Kinde’s contributing guidelines.
By contributing to Kinde, you agree that your contributions will be licensed under its MIT License.