Git Product home page Git Product logo

Comments (5)

dpopp07 avatar dpopp07 commented on September 26, 2024 2

🎉 This issue has been resolved in version 0.33.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

from openapi-validator.

dpopp07 avatar dpopp07 commented on September 26, 2024 1

At IBM, we use OpenAPI definitions to generate SDKs. One of our primary use-cases for this tool is to ensure that an API definition is fit for SDK Generation (the higher quality the API definition, the higher quality the generated SDK).

This warning you've run into is one that we've added specifically for that purpose. Using a $ref for a response provides us with a meaningful name we can use for a response model in the generated SDK. Without it, the name is automatically generated and is less-than-ideal for the UX of the SDK.

Since you are not likely generating SDKs, then I agree - in this scenario you don't really need to use a named reference. To remove the warning, you can turn off this rule in your configuration file.

Let me know if you have any other questions!

from openapi-validator.

martinsirbe avatar martinsirbe commented on September 26, 2024 1

Thanks @dpopp07 for detailed clarification, this totally makes sense to me. It would be great if this could be documented, to mention that the usage of $ref is to achieve a better data model naming when generating SDKs instead of definition reusability.

from openapi-validator.

dpopp07 avatar dpopp07 commented on September 26, 2024 1

That's a fair request, I will update the README to reflect this.

from openapi-validator.

jorge-ibm avatar jorge-ibm commented on September 26, 2024

@dpopp07 ^^

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.