Skip to content
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

[Kratos dotnet SDK] VerifiableAddress.VerifiedAt is null #46

Closed
sergeyshaykhullin opened this issue Jan 18, 2021 · 10 comments
Closed

[Kratos dotnet SDK] VerifiableAddress.VerifiedAt is null #46

sergeyshaykhullin opened this issue Jan 18, 2021 · 10 comments

Comments

@sergeyshaykhullin
Copy link

I tried to call /whoami with dotnet SDK client. In client definition VerifiedAt is non nullable, but api returted null

  1. Model
    Screenshot_3
  2. Response
    Screenshot_1
  3. Exception
    Screenshot_2

I think it is can be a swagger misconfiguration?

@sergeyshaykhullin
Copy link
Author

Same not-null in java client https://github.com/ory/sdk/blob/master/clients/kratos/java/src/main/java/sh/ory/kratos/model/VerifiableAddress.java. But kratos api can return null

@sergeyshaykhullin
Copy link
Author

I checked swagger schema, verified_at is NullTime. I think it is ok and need some generator hacks

@sergeyshaykhullin
Copy link
Author

sergeyshaykhullin commented Jan 21, 2021

@sergeyshaykhullin
Copy link
Author

sergeyshaykhullin commented Jan 21, 2021

@sergeyshaykhullin
Copy link
Author

Interesting...
Ts client has nullable verified_at

verified_at?: string;

@aeneasr
Copy link
Member

aeneasr commented Jan 25, 2021

We are moving to OpenAPI 3.0 which hopefully improves this situation. However, it is also possible that the generator is buggy for the language.

aeneasr added a commit to ory/kratos that referenced this issue May 20, 2021
aeneasr added a commit to ory/kratos that referenced this issue Jun 9, 2021
aeneasr added a commit to ory/kratos that referenced this issue Jun 15, 2021
@afreakk
Copy link

afreakk commented Oct 27, 2021

I am still having this issue, with

<PackageReference Include="Ory.Kratos.Client" Version="0.7.6-alpha.7" />
Error converting value {null} to type 'System.DateTime'. Path 'identity.verifiable_addresses[0].verified_at', line 1, position 615.

(also the exceptionfactory here seems to produce null exception, so the function doesnt throw like it probably should, I just get null response from toSession, had to step into the function to spot the actual exception

        Exception exception = this.ExceptionFactory("ToSession", (IApiResponse) apiResponse);
        if (exception != null)
          throw exception;

)

(From KratosVerifiableIdentityAddress.cs

    /// <summary>Gets or Sets VerifiedAt</summary>
    /// <footer><a href="https://www.google.com/search?q=Ory.Kratos.Client.Model.KratosVerifiableIdentityAddress.VerifiedAt">`KratosVerifiableIdentityAddress.VerifiedAt` on google.com</a></footer>
    [DataMember(EmitDefaultValue = false, Name = "verified_at")]
    public DateTime VerifiedAt { get; set; }

)

Seems this will be fixed in kratos v0.8? ory/kratos#1736

@aeneasr
Copy link
Member

aeneasr commented Oct 28, 2021

Kratos 0.8 is being released today (pipeline is running). Hopefully it gets fixed then. Maybe you can comment and keep us updated? :)

@afreakk
Copy link

afreakk commented Oct 28, 2021

Yes it worked without issues in 0.8 👍

@aeneasr
Copy link
Member

aeneasr commented Oct 28, 2021

wohooo!

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

No branches or pull requests

3 participants