GithubHelp home page GithubHelp logo

Comments (15)

nhagen avatar nhagen commented on July 18, 2024

Any update on this?

from loopback-component-explorer.

bajtos avatar bajtos commented on July 18, 2024

@nhagen I am afraid upgrading to 2.0 is not a priority for us at the moment. Can you contribute the upgrade yourself?

from loopback-component-explorer.

OwenBrotherwood avatar OwenBrotherwood commented on July 18, 2024

Is there a use case for the need for Swagger v2.x?
It is possible for loopback to use a v2.x ie v2 spec to remoting metadata.
It is possible for loopback to present a v1.x so that other software can use the api.
Some common software still have not "upgraded" to use Swagger v2 eg postman so it looks like the priority for v2 is correct....

from loopback-component-explorer.

bajtos avatar bajtos commented on July 18, 2024

It is possible for loopback to use a v2.x ie v2 spec to remoting metadata.

LoopBack uses it's own format for describing remoting metadata. loopback-explorer converts from this custom format to Swagger spec.

I suppose we could support both 1.x and 2.x versions of Swagger spec, either expose each version on a different URL, or provide a configuration option so that the developer calling loopback-explorer can decide which version to use.

from loopback-component-explorer.

OwenBrotherwood avatar OwenBrotherwood commented on July 18, 2024

Unless someone has a good use case, there doesn't seem any reason to expose 2.x
I was just wondering if there was a good use case.
Until there comes some world dominating piece of software that will only use 2.x, 1.x looks ok.

from loopback-component-explorer.

nhagen avatar nhagen commented on July 18, 2024

I think this might have originally been an issue for me because I wanted to use swagger-js, which IIRC is 2.0 only right now. I don't remember off the top of my head, however.

My view: If loopback is offering Swagger support as a feature that attracts users, those users are going to expect that it will work with other swagger tools. If there is are no plans to support mainline/future Swagger, it should be forked into "Strongloop API Spec". This is especially true if there are no docs specifying how to use the swagger features with other tools. Otherwise I think there's a lot of confusion about what is and isn't compatible with Loopback.

I think all of the core swagger tooling is 2.0 now, so anyone who is coming into the ecosystem is going to be put off if they spend time writing out their spec thinking its useful for many libraries and find out only some of them will consume it.

from loopback-component-explorer.

raymondfeng avatar raymondfeng commented on July 18, 2024

LoopBack can enhance the endpoint to expose swagger 2.0 spec in addition to 1.2. The spec generator can potentially produce different versions per client request.

It should not be too hard to add the 2.0 support. Contributions are welcome!

from loopback-component-explorer.

fadeojo avatar fadeojo commented on July 18, 2024

I think loopback has set a great standard for Nodejs frameworks and swagger 2.0 should be supported. I have tried to convert the swagger 1.2 Api declaration to 2.0 with no success (swagger tools). Please add support for 2.0. I will try and put in my two cents but I'm still learning. Thanks.

from loopback-component-explorer.

STRML avatar STRML commented on July 18, 2024

FYI, the advert page at strongloop.com says Loopback generates Swagger 2.0 documentation, which is not true.

from loopback-component-explorer.

Kampfgnom avatar Kampfgnom commented on July 18, 2024

👍 Is someone working on this? I will try to find the time to look into it, but that won't be in the next few days or even weeks.

from loopback-component-explorer.

raymondfeng avatar raymondfeng commented on July 18, 2024

We're starting to look into it.

from loopback-component-explorer.

sachinhub avatar sachinhub commented on July 18, 2024

We are trying to publish API generated via loopback onto wso2 publisher. WSO2 publisher version 1.9 can import API from swagger URL. It expects it to be 2.0 specs.

Any update on when we can expect swagger 2.0 spec URL in loopback from timeline perspective?

from loopback-component-explorer.

bajtos avatar bajtos commented on July 18, 2024

FYI: I've just submitted a pull request implementing Swagger Spec 2.0 generator for code review, see #115

from loopback-component-explorer.

bajtos avatar bajtos commented on July 18, 2024

The patch has been landed. I'd like to make few more cleanups and improvements before making a new release. You can npm install strongloop/loopback-explorer to try the new version before it's released to npm.

from loopback-component-explorer.

OwenBrotherwood avatar OwenBrotherwood commented on July 18, 2024

👍

from loopback-component-explorer.

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.