Orange-OpenSource / angular-swagger-ui

An angularJS implementation of Swagger UI
http://orange-opensource.github.io/angular-swagger-ui/
MIT License
135 stars 74 forks source link

dynamic path building with case sensitive parameters #62

Closed anil-kk closed 7 years ago

anil-kk commented 7 years ago

dynamic path building with parameters is not working properly due to case sensitive names, it would be more general to ignore characters case in replacing parameters for building a path.

mathieuales commented 7 years ago

As described in Swagger spec :

Parameter names are case sensitive

https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#fixed-fields-7

anil-kk commented 7 years ago

May be I used a wrong title, when i was debugging, the parameters that are part of url were camel cased, but camel case is not preserved in parameters object image

anil-kk commented 7 years ago

/api/{projectId}/AsyncTasks

example path from swagger.json is in above format, there is no consistency in between data, so i felt there should be case insensitive replacement of paths

anil-kk commented 7 years ago

may be parsing of parameters should be changed i guess, I will look at it :)

mathieuales commented 7 years ago

angular-swagger-ui does not transform parameter names, therefore i suppose the issue is in your JSON API descriptor, please have a look at it and compare path parameter names. Moreover, i can see parameter property in with the value modelbinding which is not a valid Swagger property value

anil-kk commented 7 years ago

I noticed it i can see parameter property in with the value modelbindingwhich is not a valid Swagger property value

I checked my JSON API have the camel case, i am debugging right now, I will update as soon as I know something

anil-kk commented 7 years ago

@mathieuales You are right 👍 the issue was with my JSON , can you please delete the branch