Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
963a3aa
initial elixir configuration
Jul 13, 2021
4f2bbca
tweaking config
Jul 13, 2021
27abe8a
adding custom elixir templates to set mix.exs package information
Sep 21, 2021
25c01b9
tweaking hex configuration for package publishing
Jul 13, 2021
1a5a9ff
refining elixir mix.exs template
Jul 14, 2021
9b82ce9
remove manual templates, instlal elixir in Dockerfile
Sep 21, 2021
c17fcd3
adding elixir build into prep and release scripts
Sep 21, 2021
5835149
removing sudo from docker build
Sep 21, 2021
e226412
correctly generating elixir from scripts
Sep 21, 2021
85bd0e5
drop _ex elixir suffix
Nov 2, 2021
319ad0d
remove elixir license copy from generation
Nov 2, 2021
2ea2a10
generate hydra v1.11.4 elixir
Feb 16, 2022
5c51215
generate client v0.0.1-alpha.102 for elixir
Feb 16, 2022
9e6ad2f
generate keto v0.8.0-alpha.0.pre.1 for elixir
Feb 16, 2022
83dad7d
generate kratos v0.8.2-alpha.1 for elixir
Feb 16, 2022
43b5940
generate oathkeeper v0.38.20-beta.1 for elixir
Feb 16, 2022
ecbfbf0
Update elixir.yml
Feb 23, 2022
7ac7c3b
overwrite version with raw version in mix files
Feb 23, 2022
d44b916
regenerate elixir clients with correct version
Feb 23, 2022
0b04c8f
regenerate elixir clients with correct module name
Feb 23, 2022
683f352
Merge remote-tracking branch 'origin/master' into tobbbles/master
aeneasr May 26, 2022
33e7c87
Merge remote-tracking branch 'origin/master' into tobbbles/master
aeneasr May 26, 2022
0ed15c2
u
aeneasr May 27, 2022
6ffa243
u
aeneasr May 27, 2022
b2d2e3d
u
aeneasr May 27, 2022
65f2ee9
u
aeneasr May 27, 2022
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
  •  
  •  
  •  
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ RUN \
apt-get update && \
apt-get install dart=2.13.4-1

# elixir
RUN \
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \
dpkg -i erlang-solutions_2.0_all.deb && \
apt-get -q update && apt-get install --no-install-recommends -y -q esl-erlang elixir && \
rm erlang-solutions_2.0_all.deb && \
mix local.hex --force

# rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

Expand Down Expand Up @@ -125,4 +133,4 @@ RUN go build -o /usr/local/bin/ory github.com/ory/cli
RUN swagger version
RUN ory version

ENTRYPOINT /bin/bash
ENTRYPOINT /bin/bash
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ desired version.
You may also manually build and publish this image using:

```shell script
docker build -t oryd/sdk:latest .
docker build --platform linux/amd64 -t oryd/sdk:latest .
docker tag oryd/sdk:latest oryd/sdk:v0.0.34
docker push oryd/sdk:v0.0.34
```
Expand All @@ -20,7 +20,7 @@ docker push oryd/sdk:v0.0.34
If you wish to debug some generators or build steps, you can run the image locally:

```shell script
docker run --mount type=bind,source="$(pwd)",target=/sdk --name sdk --user "$(id -u):$(id -g)" -it oryd/sdk:v0.0.47 /bin/sh
docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/sdk --name sdk --user "$(id -u):$(id -g)" -it oryd/sdk:latest /bin/sh
```

### Debugging Failing CircleCI Tests
Expand All @@ -29,13 +29,12 @@ If a CircleCI tests fails ([see example](https://app.circleci.com/pipelines/gith
you may run the following code snippet to reproduce the failure locally:

```shell script
docker run --mount type=bind,source="$(pwd)",target=/project -it oryd/sdk:v0.0.47 /bin/sh
docker run --platform linux/amd64 --mount type=bind,source="$(pwd)",target=/project -it oryd/sdk:latest /bin/sh

export FORCE_VERSION=v1.11.0
export FORCE_PROJECT=hydra # or hydra or something else
cd /project

cp spec/api.json "/sdk/spec/${CIRCLE_PROJECT_REPONAME}/v0.0.1-test.0.json"
./scripts/generate.sh
./scripts/test.sh
```
Expand Down
20 changes: 20 additions & 0 deletions clients/client/elixir/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# The directory Mix will write compiled artifacts to.
/_build

# If you run "mix test --cover", coverage assets end up here.
/cover

# The directory Mix downloads your dependencies sources to.
/deps

# Where 3rd-party dependencies like ExDoc output generated docs.
/doc

# Ignore .fetch files in case you like to edit your project deps locally.
/.fetch

# If the VM crashes, it generates a dump, let's ignore it too.
erl_crash.dump

# Also ignore archive artifacts (built via "mix archive.build").
*.ez
23 changes: 23 additions & 0 deletions clients/client/elixir/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
116 changes: 116 additions & 0 deletions clients/client/elixir/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
.gitignore
.openapi-generator-ignore
README.md
config/config.exs
lib/client/api/metadata.ex
lib/client/api/v0alpha0.ex
lib/client/api/v0alpha2.ex
lib/client/connection.ex
lib/client/deserializer.ex
lib/client/model/active_project.ex
lib/client/model/admin_create_identity_body.ex
lib/client/model/admin_create_self_service_recovery_link_body.ex
lib/client/model/admin_update_identity_body.ex
lib/client/model/api_token.ex
lib/client/model/authenticator_assurance_level.ex
lib/client/model/cloud_account.ex
lib/client/model/cname_settings.ex
lib/client/model/create_custom_hostname_body.ex
lib/client/model/create_subscription_payload.ex
lib/client/model/error_authenticator_assurance_level_not_satisfied.ex
lib/client/model/generic_error.ex
lib/client/model/health_not_ready_status.ex
lib/client/model/health_status.ex
lib/client/model/identity.ex
lib/client/model/identity_credentials.ex
lib/client/model/identity_credentials_type.ex
lib/client/model/identity_preset.ex
lib/client/model/identity_schema.ex
lib/client/model/identity_schema_location.ex
lib/client/model/identity_schema_validation_result.ex
lib/client/model/identity_state.ex
lib/client/model/inline_object.ex
lib/client/model/inline_response_200.ex
lib/client/model/inline_response_200_1.ex
lib/client/model/inline_response_503.ex
lib/client/model/invite_payload.ex
lib/client/model/is_owner_for_project_by_slug.ex
lib/client/model/is_owner_for_project_by_slug_payload.ex
lib/client/model/json_error.ex
lib/client/model/needs_privileged_session_error.ex
lib/client/model/null_plan.ex
lib/client/model/pagination.ex
lib/client/model/project.ex
lib/client/model/project_host.ex
lib/client/model/project_invite.ex
lib/client/model/project_revision.ex
lib/client/model/project_revision_hook.ex
lib/client/model/project_revision_identity_schema.ex
lib/client/model/project_revision_third_party_login_provider.ex
lib/client/model/project_slug.ex
lib/client/model/quota_project_member_seats.ex
lib/client/model/recovery_address.ex
lib/client/model/revoked_sessions.ex
lib/client/model/schema_patch.ex
lib/client/model/self_service_browser_location_change_required_error.ex
lib/client/model/self_service_error.ex
lib/client/model/self_service_flow_expired_error.ex
lib/client/model/self_service_login_flow.ex
lib/client/model/self_service_logout_url.ex
lib/client/model/self_service_recovery_flow.ex
lib/client/model/self_service_recovery_flow_state.ex
lib/client/model/self_service_recovery_link.ex
lib/client/model/self_service_registration_flow.ex
lib/client/model/self_service_settings_flow.ex
lib/client/model/self_service_settings_flow_state.ex
lib/client/model/self_service_verification_flow.ex
lib/client/model/self_service_verification_flow_state.ex
lib/client/model/session.ex
lib/client/model/session_authentication_method.ex
lib/client/model/session_device.ex
lib/client/model/settings_profile_form_config.ex
lib/client/model/stripe_customer_response.ex
lib/client/model/submit_self_service_login_flow_body.ex
lib/client/model/submit_self_service_login_flow_with_lookup_secret_method_body.ex
lib/client/model/submit_self_service_login_flow_with_oidc_method_body.ex
lib/client/model/submit_self_service_login_flow_with_password_method_body.ex
lib/client/model/submit_self_service_login_flow_with_totp_method_body.ex
lib/client/model/submit_self_service_login_flow_with_web_authn_method_body.ex
lib/client/model/submit_self_service_logout_flow_without_browser_body.ex
lib/client/model/submit_self_service_recovery_flow_body.ex
lib/client/model/submit_self_service_recovery_flow_with_link_method_body.ex
lib/client/model/submit_self_service_registration_flow_body.ex
lib/client/model/submit_self_service_registration_flow_with_oidc_method_body.ex
lib/client/model/submit_self_service_registration_flow_with_password_method_body.ex
lib/client/model/submit_self_service_settings_flow_body.ex
lib/client/model/submit_self_service_settings_flow_with_lookup_method_body.ex
lib/client/model/submit_self_service_settings_flow_with_oidc_method_body.ex
lib/client/model/submit_self_service_settings_flow_with_password_method_body.ex
lib/client/model/submit_self_service_settings_flow_with_profile_method_body.ex
lib/client/model/submit_self_service_settings_flow_with_totp_method_body.ex
lib/client/model/submit_self_service_settings_flow_with_web_authn_method_body.ex
lib/client/model/submit_self_service_verification_flow_body.ex
lib/client/model/submit_self_service_verification_flow_with_link_method_body.ex
lib/client/model/subscription.ex
lib/client/model/successful_project_config_update.ex
lib/client/model/successful_self_service_login_without_browser.ex
lib/client/model/successful_self_service_registration_without_browser.ex
lib/client/model/ui_container.ex
lib/client/model/ui_node.ex
lib/client/model/ui_node_anchor_attributes.ex
lib/client/model/ui_node_attributes.ex
lib/client/model/ui_node_image_attributes.ex
lib/client/model/ui_node_input_attributes.ex
lib/client/model/ui_node_meta.ex
lib/client/model/ui_node_script_attributes.ex
lib/client/model/ui_node_text_attributes.ex
lib/client/model/ui_text.ex
lib/client/model/update_custom_hostname_body.ex
lib/client/model/update_project_config_config.ex
lib/client/model/update_subscription_payload.ex
lib/client/model/verifiable_identity_address.ex
lib/client/model/version.ex
lib/client/model/warning.ex
lib/client/request_builder.ex
mix.exs
test/test_helper.exs
1 change: 1 addition & 0 deletions clients/client/elixir/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.2.1
26 changes: 26 additions & 0 deletions clients/client/elixir/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Client

Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.

### Building

To install the required dependencies and to build the elixir project, run:
```
mix local.hex --force
mix do deps.get, compile
```

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `ory_client` to your list of dependencies in `mix.exs`:

```elixir
def deps do
[{:ory_client, "~> 0.1.0"}]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/ory_client](https://hexdocs.pm/ory_client).
30 changes: 30 additions & 0 deletions clients/client/elixir/config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
use Mix.Config

# This configuration is loaded before any dependency and is restricted
# to this project. If another project depends on this project, this
# file won't be loaded nor affect the parent project. For this reason,
# if you want to provide default values for your application for
# 3rd-party users, it should be done in your "mix.exs" file.

# You can configure for your application as:
#
# config :ory_apis, key: :value
#
# And access this configuration in your application as:
#
# Application.get_env(:ory_apis, :key)
#
# Or configure a 3rd-party app:
#
# config :logger, level: :info
#

# It is also possible to import configuration files, relative to this
# directory. For example, you can emulate configuration per environment
# by uncommenting the line below and defining dev.exs, test.exs and such.
# Configuration from the imported file will override the ones defined
# here (which is why it is important to import them last).
#
# import_config "#{Mix.env}.exs"
90 changes: 90 additions & 0 deletions clients/client/elixir/lib/client/api/metadata.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.

defmodule Client.Api.Metadata do
@moduledoc """
API calls for all endpoints tagged `Metadata`.
"""

alias Client.Connection
import Client.RequestBuilder


@doc """
Return Running Software Version.
This endpoint returns the version of Ory Kratos. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the version will never refer to the cluster state, only to a single instance.

## Parameters

- connection (Client.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
## Returns

{:ok, Client.Model.InlineResponse2001.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec get_version(Tesla.Env.client, keyword()) :: {:ok, Client.Model.InlineResponse2001.t} | {:error, Tesla.Env.t}
def get_version(connection, _opts \\ []) do
%{}
|> method(:get)
|> url("/api/kratos/public/version")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Client.Model.InlineResponse2001{}}
])
end

@doc """
Check HTTP Server Status
This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming HTTP requests. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.

## Parameters

- connection (Client.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
## Returns

{:ok, Client.Model.InlineResponse200.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec is_alive(Tesla.Env.client, keyword()) :: {:ok, Client.Model.GenericError.t} | {:ok, Client.Model.InlineResponse200.t} | {:error, Tesla.Env.t}
def is_alive(connection, _opts \\ []) do
%{}
|> method(:get)
|> url("/api/kratos/public/health/alive")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Client.Model.InlineResponse200{}},
{ 500, %Client.Model.GenericError{}}
])
end

@doc """
Check HTTP Server and Database Status
This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of Ory Kratos, the health status will never refer to the cluster state, only to a single instance.

## Parameters

- connection (Client.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
## Returns

{:ok, Client.Model.InlineResponse200.t} on success
{:error, Tesla.Env.t} on failure
"""
@spec is_ready(Tesla.Env.client, keyword()) :: {:ok, Client.Model.InlineResponse503.t} | {:ok, Client.Model.InlineResponse200.t} | {:error, Tesla.Env.t}
def is_ready(connection, _opts \\ []) do
%{}
|> method(:get)
|> url("/api/kratos/public/health/ready")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> evaluate_response([
{ 200, %Client.Model.InlineResponse200{}},
{ 503, %Client.Model.InlineResponse503{}}
])
end
end
Loading