Skip to content

Ory Hydra Client for Elixir has a typo which breaks the client #285

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

Open
5 of 6 tasks
ah0y opened this issue Jul 17, 2023 · 1 comment
Open
5 of 6 tasks

Ory Hydra Client for Elixir has a typo which breaks the client #285

ah0y opened this issue Jul 17, 2023 · 1 comment
Labels
bug Something is not working.

Comments

@ah0y
Copy link

ah0y commented Jul 17, 2023

Preflight checklist

Describe the bug

 def authorization(token, _scopes) when is_binary(token) do
   {Tesla.Middleware.Headers, ["authorization", token]}
 end

should be

def authorization(token, _scopes) when is_binary(token) do
   {Tesla.Middleware.Headers, [{"authorization", token}]}
end

Reproducing the bug

Try running any requests

Relevant log output

** (FunctionClauseError) no function clause matching in anonymous fn/1 in Tesla.Adapter.Httpc.request/2    
    
    The following arguments were given to anonymous fn/1 in Tesla.Adapter.Httpc.request/2:
    
        # 1
        "authorization"
    
    (tesla 1.7.0) lib/tesla/adapter/httpc.ex:55: anonymous fn/1 in Tesla.Adapter.Httpc.request/2
    (elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (elixir 1.14.4) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
    (tesla 1.7.0) lib/tesla/adapter/httpc.ex:55: Tesla.Adapter.Httpc.request/2
    (tesla 1.7.0) lib/tesla/adapter/httpc.ex:22: Tesla.Adapter.Httpc.call/2
    (ory_hydra 2.2.0-pre.0) lib/ory/api/o_auth2.ex:644: Ory.Api.OAuth2.o_auth2_authorize/2
    iex:5: (file)


### Relevant configuration

_No response_

### Version

e471477af9c733ee7b84a6c869a35d4a5f17b67e

### On which operating system are you observing this issue?

macOS

### In which environment are you deploying?

Ory Network

### Additional Context

_No response_
@tobbbles
Copy link
Contributor

I've proposed a fix to the upstream generator.

This will need to be fixed upstream and we'll look to upgrade the elixir generation to 7.0.1 of the openapi-generator once it's released.

However there is currently a breaking change in 7.0.0 preventing us to upgrade, so we will need to wait until OpenAPITools/openapi-generator#16412 is resolved before moving forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants