GithubHelp home page GithubHelp logo

Swagger import support? about tyk HOT 13 CLOSED

 avatar commented on August 15, 2024
Swagger import support?

from tyk.

Comments (13)

lonelycode avatar lonelycode commented on August 15, 2024

There are plans to eventually support it, though it's not on the roadmap atm.

The importer is actually an interface, it's very easy to extend the functionality simply by implementing the importer interface and registering it as a name.

The way the importers work is quite simple really - you need to create a struct that resembles the swagger format (or can capture it), and the transform it into our own ApiDefinition format (That's what those private methods are for)

All the bits are there for generalising to a multi-format solution, they just haven't been tied together :-/

The trickier bit would be to generalise the command mode options - as they aren't as modular as they could be. Though you could jsut create a new specific flag handler and then invoke your converter - the longer term plan wa to generalise the whole thing and make it so that importers could jut be "registered".

Bottom line - the whole thing needs a little polish :-S

from tyk.

 avatar commented on August 15, 2024

Okay great, I've started working on the Swagger import. I'm assuming there won't be automation support for it until that's been worked on by you? I haven't found any references in the source code to API Blueprint import other than command mode, so I'm assuming that's all in the Dashboard somewhere.

from tyk.

lonelycode avatar lonelycode commented on August 15, 2024

Hi There,

Yes all of that lives in the dashboard, it's actually shared code - we just need to pull it in. Also, the command mode option will only dump the APi definition to file / memory, not into the DB.

But if you put the basics in, we'll roll it up :-)

Thanks,
Martin

from tyk.

lonelycode avatar lonelycode commented on August 15, 2024

Thought id add this here:

http://mholt.github.io/json-to-go/

Really handy for generating tha massive Swagger struct, if you can get hold of a fully qualified AST for Swagger this will make writing it less painful ;-)

from tyk.

 avatar commented on August 15, 2024

That'll be handy, thanks! We'll probably be taking this on properly in a couple of days time.

from tyk.

mingfang avatar mingfang commented on August 15, 2024

+1

from tyk.

grocky avatar grocky commented on August 15, 2024

👍

from tyk.

lonelycode avatar lonelycode commented on August 15, 2024

Fixed in master, can now be accessed using --import-swagger command line option (same as blueprint). dashboard interface TBC, on roadmap for 1.7.

from tyk.

mingfang avatar mingfang commented on August 15, 2024

Thank you very much!

from tyk.

lonelycode avatar lonelycode commented on August 15, 2024

Only basic supprot :-) Mocks not supported (Swagger doesn;t seem to let you define mock responses very well, just schemas)

from tyk.

smuniswamy avatar smuniswamy commented on August 15, 2024

@lonelycode, I noticed latest Tyk Dashboard docker image includes support for swagger import. Is there an ETA on v0.9.5.4 release?

from tyk.

lonelycode avatar lonelycode commented on August 15, 2024

Hi,

The current dashboard release that is in our GitHub releases section is the same as the one in the docker image, which includes swagger support on imports. So you should have that feature available now.

The next version of the dashboard will be out in the next few months - we have quite a bit to do - take a look at our roadmap:

https://trello.com/b/59d5kAZ5/tyk-api-gateway-roadmap

Cheers,
Martin

from tyk.

smuniswamy avatar smuniswamy commented on August 15, 2024

Thanks @lonelycode. I have upgraded from v0.9.3 to v0.9.5.3 but did not see Swagger option. Just found out it was due to browser cache.

from tyk.

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.