APIs-guru / google-discovery-to-swagger

Script for converting Google Discovery format into OpenAPI (swagger) 3.0
MIT License
57 stars 16 forks source link

Pass parameterOrder to Swagger extension #1

Closed rbren closed 9 years ago

rbren commented 9 years ago

This helps organize parameters in an API console. We should create an x-parameterOrder field in Swagger

IvanGoncharov commented 9 years ago

Google use parameter order because the put parameters in object and so JSON doesn't preserve they order. That's why they add additional parameterOrder field. Contrary to this Swagger put parameters into array which preserve order. In my converter I sort parameters based on Google's parameterOrder.

IvanGoncharov commented 9 years ago

@bobby-brennan, I checked code and you right. I made typo and right now sorting based on parameterOrder is broken.

rbren commented 9 years ago

That makes sense, thanks

Bobby Brennan bobby.brennan@gmail.com

On Wed, Jun 3, 2015 at 9:46 AM, Ivan Goncharov notifications@github.com wrote:

@bobby-brennan https://github.com/bobby-brennan, I checked code and you right. I made typo and right now sorting based on parameterOrder is broken.

— Reply to this email directly or view it on GitHub https://github.com/APIs-guru/google-discovery-to-swagger/issues/1#issuecomment-108424365 .

IvanGoncharov commented 9 years ago

I already updated APIs-guru/api-models.