Giter Site home page Giter Site logo

Comments (5)

dpopp07 avatar dpopp07 commented on June 24, 2024

Glad you are enjoying this tool! Looking at the spec, you are indeed correct and we should support that use case. I will look into it soon. Thanks for reporting!

from openapi-validator.

mkistler avatar mkistler commented on June 24, 2024

I think simply omitting default is equivalent to default: null. Is there some reason this isn't sufficient?

from openapi-validator.

gamezfreak avatar gamezfreak commented on June 24, 2024

@mkistler I tried removing the default: null parameter but that also causes "default: null" to be removed from the documentation I am generating with redoc. I'd prefer that to be explicit in my documentation that it will be null and not an empty string when unspecified. Maybe that is an issue there as well in their project, but I think the OAS 3.0.3 clarification on nullable would still allow default: null. I'm trying to use null vs "" to be forward-thinking around data migrations; did the user set an empty value vs never set any value.

from openapi-validator.

sirosen avatar sirosen commented on June 24, 2024

To offer another motivating use-case for this: I'm generating an openapi spec from my schemas, and default: null is the output from my spec generation tool. So even if I wanted to remove default: null, it's difficult to do so in this case.

It would be nice to be able to disable this check altogether as a workaround, but I don't think that's supported by the config options.

from openapi-validator.

dpopp07 avatar dpopp07 commented on June 24, 2024

🎉 This issue has been resolved in version 0.33.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

from openapi-validator.

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.