Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[request] Import Swagger 2.0/OAS #334

Closed
sonicaghi opened this issue Jun 12, 2015 · 31 comments
Closed

[request] Import Swagger 2.0/OAS #334

sonicaghi opened this issue Jun 12, 2015 · 31 comments
Labels
idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports.

Comments

@sonicaghi
Copy link
Member

sonicaghi commented Jun 12, 2015

To prepopulate APIs, authentication and Endpoints inside Kong - perhaps connect with Gelato.

@sonicaghi sonicaghi changed the title Import Swagger 2 Import Swagger 2.0 Jun 12, 2015
@davegolland
Copy link

👍 for swagger 2.0 support

@mmwtsn
Copy link

mmwtsn commented Jun 22, 2015

+1

@sonicaghi sonicaghi added the idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports. label Jun 22, 2015
@t1tcrucible
Copy link

+1

@thibaultcha thibaultcha changed the title Import Swagger 2.0 [request] Import Swagger 2.0 Jun 26, 2015
@zeeshanejaz
Copy link

Is there any details on this feature request? Kong works like a proxy, so details of Endpoints shouldn't even be required. What am I missing?

@tlivings
Copy link

Going out on a limb and imagining that the request is to consume Swagger API documents and auto-configure the proxies to them, including consuming and wiring up the security definitions contained in them.

As far as endpoints I think it would simply be consuming host and basePath.

This is a great idea but should be relatively trivial to push these configurations to Kong's REST api directly rather than require Kong to do any work.

@thibaultcha
Copy link
Member

I totally agree with that thought. It is very trivial to do it without a plugin.

@sonicaghi
Copy link
Member Author

example of one way of doing it http://docs.aws.amazon.com/apigateway/latest/developerguide/create-api-using-import-export-api.html

@yograterol
Copy link

someone working in this feature?

@apur
Copy link

apur commented Apr 28, 2016

+1

@ahmadnassri ahmadnassri added the BC label May 13, 2016
@sonicaghi sonicaghi changed the title [request] Import Swagger 2.0 [request] Import Swagger 2.0/OpenAPISpec Jul 22, 2016
@mytototo
Copy link

Any news regarding an open-source Swagger/OpenAPISpec plugin for Kong?

@thibaultcha thibaultcha removed the BC label Sep 1, 2016
@tahaiqbalkhan9
Copy link

+1
Any updates regarding this feature?

@fontanaricardo
Copy link

Would be nice, if the kong, can also generate one swagger json, from the added APIs and microservices, adding information about kong's resources for this API (authentication by example).

@Marak
Copy link

Marak commented Nov 25, 2016

I've written a basic script in Node.js which can load the petstore Swagger 2.0 document and import it into the Kong Admin API.

Basic parsing / import script is simple. Using plain JavaScript and a separate simple REST client for Kong Admin API.

Unfortunately, it seems it's not possible to fully import petstore due to lack of regex routing of request_path in Kong #677

A possible workaround with the current version of Kong is to omit the named routes from petstore and use a proxy. Considering this defeats the purpose of setting up granular routes based on Swagger, we had to choose to drop the Swagger import feature ( for now ).

In addition, multiple Swagger imports per single Kong instance is blocked by #369 ( as conflicting request_path namespaces in separate Swagger files will currently prevent APIs from importing )

cc @thibaultcha

@paiuolo
Copy link

paiuolo commented Jan 3, 2017

+1

1 similar comment
@koolay
Copy link

koolay commented Jan 4, 2017

+1

@sonicaghi sonicaghi changed the title [request] Import Swagger 2.0/OpenAPISpec [request] Import Swagger 2.0/OAS Jan 4, 2017
@liu0013
Copy link

liu0013 commented Mar 1, 2017

+1

4 similar comments
@mward29
Copy link

mward29 commented Mar 28, 2017

+1

@psbateman
Copy link

+1

@chrisfelix82
Copy link

+1

@vintuwei
Copy link

+1

@mwaaas
Copy link

mwaaas commented Jun 4, 2017

+1

1 similar comment
@phamnamlong
Copy link

+1

@coopr
Copy link
Contributor

coopr commented Sep 27, 2017

Hi Everybody - I'm the Product Manager here at Mashape, and I'd love to hear some more details of what you'd like to see in a feature like this! Tell me about your use case, about the problems you are trying to solve, about how you'd like Kong to help you solve them with Swagger / OpenAPI Spec.

Reply herein, or email me [email protected] - thanks in advance!

@mwaaas
Copy link

mwaaas commented Oct 7, 2017

Onboarding api via swagger file and maybe a flag to turn on when to do request validation before forwarding request to upstream.

I have actually managed to do this by a node app parsing the swagger file and onboard the api. And a plugin to forward the request and its content to the node service before forwarding the request to upstream servers.

If I get time I might convert the node app to Lua app then contribute to Kong

@nhuray
Copy link

nhuray commented Dec 29, 2017

@mwaaas Do you have news about migrating your node app to Lua ?

@gfiehler
Copy link

gfiehler commented Feb 1, 2018

@coopr I am evaluating API gateways and we have a requirement to be able to upload our swagger api documents to create APIs in the gateway. We do contract first design with the swagger editor and would like to be able to just import them to create the base api in the gateway. Any word on tools or new features to support this?

@coopr
Copy link
Contributor

coopr commented Feb 2, 2018

@gfiehler it'd be great to move this discussion to Kong Nation https://discuss.konghq.com/c/feature-suggestions thanks.

@coopr coopr closed this as completed Feb 2, 2018
@Tieske
Copy link
Member

Tieske commented Jan 13, 2020

Just for reference; This feature has been added to Kong Enterprise (from 0.36-x versions). A commandline utility openapi2kong is included.

@rjshrjndrn
Copy link

will this feature available for kong open source? @Tieske

@mikaello
Copy link

will this feature available for kong open source? @Tieske

I think the utility that Tieske is talking about is this: https://www.npmjs.com/package/openapi-2-kong

Original source: https://github.com/Kong/insomnia/tree/develop/packages/openapi-2-kong
Rewrite in TypeScript: https://github.com/mikaello/openapi-2-kong

See also discussion in Kong nation.

@Tieske
Copy link
Member

Tieske commented Nov 26, 2020

@rjshrjndrn It is available in Insomnia Designer, and through the inso commandline utility

hutchic added a commit that referenced this issue Jun 10, 2022
chore(ci) add some naive retries to our CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea/new plugin [legacy] those issues belong to Kong Nation, since GitHub issues are reserved for bug reports.
Projects
None yet
Development

No branches or pull requests