anil614sagar / openapi2apigee

OpenAPI to Apigee API Proxy using Node.js Utility
MIT License
33 stars 45 forks source link

Cors support #14

Closed orangewise closed 8 years ago

orangewise commented 8 years ago

Hi Anil,

we need to add a Cors policy to our api. I've created a fork with a basic implemention. Could you take a look and let me know what you think?

https://github.com/orangewise/swagger-apigee-node-utility/tree/cors

Thanks!

anil614sagar commented 8 years ago

@orangewise ,

Thank you very much for valuable contribution to the tool. I am sure, it's going to be really helpful. Please find quick feedback on same.

package.json - revert name to "swagger2api" , currently it says "swagger2api-cors".

Did you get a chance to test new functionality by creating an API Proxy in Apigee edge with cors support ?

Give me couple of days, I will get back to you with more feedback next week. Thank you once again for the contribution.

orangewise commented 8 years ago

Thanks Anil,

the package is renamed to swagger2api in my local fork :) I created an api on Apigee edge with my changes. The cors stuff was added to -a127-services, maybe you have a better spot?

Thanks for your help!

anil614sagar commented 8 years ago

Thank you for the update @orangewise ,

Did you get a chance to attach policy to one of the path in Open API (Swagger) & test same in Apigee ? Also , Please submit a PR once you verify same so that i can merge into the source repo & release a new version in npm repo.

Thank you again.

orangewise commented 8 years ago

Hi Anil,

I have added some mocha tests and tested the api with Apigee, this worked great. Appears that the entry of the cors policy to the proxy was not needed so that has been removed.

anil614sagar commented 8 years ago

Great, Can you please submit a pull request ? So that i can merge changes & release a new version in npm ?

orangewise commented 8 years ago

Thanks Anil, created the PR a second ago.

anil614sagar commented 8 years ago

Awesome, Thank you @orangewise , Merged & released a new version with CORS support.