Giter Club home page Giter Club logo

Comments (11)

llfbandit avatar llfbandit commented on June 19, 2024

Welcome and thank you for the report.
The issue is about the format validator which did not detect the null value.

Can you confirm the fix in the latest snapshot? It should be already available.

from openapi4j.

Dimitris-Christodoulou avatar Dimitris-Christodoulou commented on June 19, 2024

@llfbandit Thank you for the quick response.
Where is 0.6-SNAPSHOT being published? I can't seem to find it in the maven repo.

Also, is there an estimate on when 0.6 will be released?

from openapi4j.

llfbandit avatar llfbandit commented on June 19, 2024

You have to add https://oss.sonatype.org/content/repositories/snapshots before accessing snapshot versions.

I'm waiting for #28 confirmation before bumping to 0.7 so a couple of days I would say.

from openapi4j.

Dimitris-Christodoulou avatar Dimitris-Christodoulou commented on June 19, 2024

You have to add https://oss.sonatype.org/content/repositories/snapshots before accessing snapshot versions.

I'm waiting for #28 confirmation before bumping to 0.7 so a couple of days I would say.

The above test throws a NullPointerException with 0.6-SNAPSHOT. It seems to be coming from ReferenceValidator. More specifically, schemaParentNode.get(ABS_REF_FIELD) is null. The schema parent node contains a normal $ref instead of an absolute ref. Aren't both valid in that context?

from openapi4j.

llfbandit avatar llfbandit commented on June 19, 2024

This is due to the usage of toNode which serialize the content with constraints to reflect the definition of OAI. The field ABS_REF_FIELD is not exported in this case. This why you get the RuntimeException.

If you really use the toolset like with the reproducer you'll need to use TreeUtil.toJsonNode to keep the info.

To let me know, what kind of usage do you have? For this kind of validation process, the operation validator is dedicated to make the glue code between parser and schema validation modules.

from openapi4j.

Dimitris-Christodoulou avatar Dimitris-Christodoulou commented on June 19, 2024

I updated the code to JsonNode jsonNode = TreeUtil.toJsonNode(schema); but I am still getting the same NullPointerException. I updated the test case in the original post accordingly so it can be reproduced.

from openapi4j.

Dimitris-Christodoulou avatar Dimitris-Christodoulou commented on June 19, 2024

To let me know, what kind of usage do you have? For this kind of validation process, the operation validator is dedicated to make the glue code between parser and schema validation modules.

We are using the schema validator to validate input and output payloads against the schemas defined in the OpenAPI definition of the REST API.

from openapi4j.

llfbandit avatar llfbandit commented on June 19, 2024

0.6 introduced this bug. Sorry for that.
This invalidates 0.6 as a release for now. You can follow up this subsequent fix to the dedicated issue #28.

from openapi4j.

Dimitris-Christodoulou avatar Dimitris-Christodoulou commented on June 19, 2024

0.6 introduced this bug. Sorry for that.
This invalidates 0.6 as a release for now. You can follow up this subsequent fix to the dedicated issue #28.

Ok thank you I will keep an eye on #28

from openapi4j.

llfbandit avatar llfbandit commented on June 19, 2024

Can you validate this issue ? We're pretty close to conclude on the other side. Thank you.

from openapi4j.

Dimitris-Christodoulou avatar Dimitris-Christodoulou commented on June 19, 2024

Validated. Seems to be fixed. Thank you very much for the quick turnaround.

from openapi4j.

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.