{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Edge/API Management /
avatar image
2
Question by Siddharth Barahalikar · Aug 31, 2015 at 04:10 AM · 3k Views proxyOpenAPI - Swagger Specapiidea

Api proxy to Swagger code

Hi guys, I have few proxies in edge. As of now I'm working on RAML.

So is there any way where I can auto generate Swagger 1.2 code for the Api proxies in edge?

Quick answer is appreciated.

Thanks,

Sid

Comment
Add comment Show 4
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Aug 31, 2015 at 04:56 AM 1
Link

@Mukundha Madhavan , Heard that you have used a tool which does same. Is it available for public ? Does it support swagger 1.2 or 2.0 ?

avatar image Anil Sagar @ Google ♦♦   · Aug 31, 2015 at 05:03 AM 0
Link

@Barahalikar Siddharth , Just FYI, Swagger to API Proxy is available now and uses swagger 2.0 spec. Find more details regarding swagger2api here.

avatar image Siddharth Barahalikar Anil Sagar @ Google ♦♦   · Aug 31, 2015 at 05:32 AM 0
Link
@Anil Sagar

Thanks for adding Mukundha and yes I know about Swagger to API Poxy. As said I'm working on RAML for APIs. So there a tool for Swagger to RAML. So if I can get Swagger code for API Proxy then it would make my work a bit easy.

avatar image birute@google.com ♦♦   · Aug 31, 2015 at 02:43 PM 0
Link

Looks like a great idea for suggestions here: https://community.apigee.com/content/idea/post.html

Close

5 Answers

  • Sort: 
avatar image
5
Best Answer

Answer by Anil Sagar @ Google   · Sep 13, 2015 at 10:27 AM

Dear @Barahalikar Siddharth ,

We now have a tool which will convert Apigee API proxy to swagger 2.0 specification. It's called Apigee2Swagger. It's Node.JS based command line tool. You can find the npm module here.

Please let us know any feedback / suggestions regarding tool.

Cheers,

Anil Sagar

Comment
Add comment Show 7 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Siddharth Barahalikar   · Sep 16, 2015 at 10:15 AM 0
Link

Thank you @Anil Sagar ,I haven't tried it yet, but I will be doing it for my next project.

avatar image Anil Sagar @ Google ♦♦ Siddharth Barahalikar   · Sep 16, 2015 at 10:16 AM 0
Link

@Barahalikar Siddharth , Keep us posted with your feedback & findings :)

avatar image vijay.muralitharan · Sep 24, 2015 at 09:08 AM 0
Link

This tool doesnot create paths in swagger even though the proxy on APIGEE and the downloaded proxy contains mulitple paths

avatar image Anil Sagar @ Google ♦♦ vijay.muralitharan   · Sep 24, 2015 at 09:10 AM 0
Link

@Vijay Muralitharan , Thank you for feedback. Can you provide more details regarding same. As far as i know, it does create paths. See an article here that explains same. Can you post the proxy details & generated swagger to investigate same ?

avatar image vijay.muralitharan · Sep 24, 2015 at 09:22 AM 0
Link

Anil,

the XML downloaded from the proxy is having Resources as empty element.I am not sure if that is the problem? Though i can see 2 resources in the UI..

avatar image Anil Sagar @ Google ♦♦ vijay.muralitharan   · Sep 24, 2015 at 09:29 AM 0
Link

Are you saying in XML bundle resources are missing ? Can you share your proxy bundle to investigate same ? What do you mean by resources ? Are they conditional flows with verbs & path matching condition ?

avatar image Anil Sagar @ Google ♦♦ vijay.muralitharan   · Sep 24, 2015 at 09:30 AM 0
Link

Can you share your proxy if possible to investigate same ?

avatar image
0

Answer by Anil Sagar @ Google   · Aug 31, 2015 at 01:51 PM

Dear @Barahalikar Siddharth ,

Heard back from Mukundha,

As of today, No tool is available to convert Apigee Proxies to Swagger. We would love to build one since we see a requirement. Unfortunately, We cannot commit timelines. We will keep you updated if any.

Cheers,

Anil Sagar

Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by gnanasekaran · Aug 31, 2015 at 02:44 PM

Hi @Barahalikar Siddharth,

Typically in the lifecycle, you would start with a API description/definition [wadl/swagger/raml] and then start building your APIs [apiproxy or nodejs], the description is also used to render user documentation [smartdocs]

or on the other hand, you would have the implementation [apiproxies], you could use tools like this to generate the documentation.

Generating swagger wouldn't be too hard, most of the tools/scripts mentioned in this ticket, already parses the api proxy in some way, so its just a matter of mapping to swagger.

Given the swagger support, would like to understand why RAML? and the larger usecase - is this for documentation? or something else? can you pls share your usecase?

Thanks,

Comment
Add comment · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by vijay.muralitharan · Sep 24, 2015 at 09:58 AM

I am uploading the sample proxy i am using for testing this tool


payment-processing-api.zip (6.6 kB)
Comment
Add comment Show 2 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Sep 24, 2015 at 10:06 AM 0
Link

@vijay.muralitharan , Resources you have mentioned doesn't have http verb defined with them in apigee proxy flow. That's the reason you don't see any paths. Swagger 2.0 spec expects you to define http verbs under a path. Once you add a request.verb condition to your proxy conditional flow along with proxy.pathsuffix MatchesPath , you will see same in swagger 2.0 spec.

If verb is missing, ideally tool should query user which http verbs to add to swagger spec or by default add GET verb to same. Thank you for highlighting same. I will create an issue in github for same.

avatar image Anil Sagar @ Google ♦♦ Anil Sagar @ Google ♦♦   · Sep 24, 2015 at 10:16 AM 0
Link

created a github issue here , will be fixed in next release of tool.. Please feel free to share feedback or create an issue in github. Than you @Vijay Muralitharan for highlighting same.

avatar image
0

Answer by vijay.muralitharan · Sep 24, 2015 at 10:29 AM

Thanks Anil..One more question

1) Is there any way of including security schemas based on the policies attached in API Proxy

2) Also what about some required headers

3) I guess schema for payload should be added aftermath in the swagger editor correct?

Comment
Add comment Show 1 · Link
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Anil Sagar @ Google ♦♦   · Sep 24, 2015 at 11:21 AM 0
Link

@vijay.muralitharan ,

1) Is there any way of including security schemas based on the policies attached in API Proxy

We don't have capability as of today. But, We definitely love to add same.

2) Also what about some required headers

We already have a feature request for same. We will add them in future releases.

3) I guess schema for payload should be added aftermath in the swagger editor correct?

Yes, you are right. It needs to be added using swagger editor. Find more about Apigee2Swagger in Article & FAQ sections.

Follow this Question

Answers Answers and Comments

26 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Swagger 2.0 Spec for Apigee Edge Management API 1 Answer

Not able to create proxy with openAPI spec. 1 Answer

How to change json objects / elements out of apigee 5 Answers

OpenAPI Placeholders lost when creating proxy 0 Answers

Anyone Integrated HAWK Authentication with Apigee Edge API Proxy ? 1 Answer

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Badges