Coder Social home page Coder Social logo

Comments (10)

sergeyshaykhullin avatar sergeyshaykhullin commented on August 17, 2024

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

from sdk.

sergeyshaykhullin avatar sergeyshaykhullin commented on August 17, 2024

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

from sdk.

sergeyshaykhullin avatar sergeyshaykhullin commented on August 17, 2024

Seems like OpenAPITools/openapi-generator#4816 OpenAPITools/openapi-generator#3725

from sdk.

sergeyshaykhullin avatar sergeyshaykhullin commented on August 17, 2024

@aeneasr I think that NullTime might be marked as nullable: true or x-nullable: true (it might not work)

image

Some conditions for property nullability:
https://github.com/OpenAPITools/openapi-generator/pull/3537/files
https://github.com/OpenAPITools/openapi-generator/blob/2331432cc0f062ceff44c3d09e1a16c31abf6f57/modules/openapi-generator/src/main/java/org/openapitools/codegen/utils/ModelUtils.java#L1419

from sdk.

sergeyshaykhullin avatar sergeyshaykhullin commented on August 17, 2024

Interesting...
Ts client has nullable verified_at

verified_at?: string;

from sdk.

aeneasr avatar aeneasr commented on August 17, 2024

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.

from sdk.

afreakk avatar afreakk commented on August 17, 2024

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

from sdk.

aeneasr avatar aeneasr commented on August 17, 2024

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

from sdk.

afreakk avatar afreakk commented on August 17, 2024

Yes it worked without issues in 0.8 👍

from sdk.

aeneasr avatar aeneasr commented on August 17, 2024

wohooo!

from sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.