Closed glennjones closed 9 years ago
this will be under swagger-js. Will report back on this shortly (and thanks for the hapi plugin, it's great!)
@glennjones - since inline schemas are now supported, is this still an issue?
please reopen if still an issue, @glennjones
Hi
I look after the https://github.com/glennjones/hapi-swagger plug-in. One of the most common issues hit by devs building APIs with hapi.js is that they use differing parameters/response model which they wish to give the same name.
So they use the same model name but dependant on the type of request. i.e. a PUT returns a full model with a lots of properties and DELETE returns just the id property. Basically they return subsets of a common model. This is also true for parameters models as POST and PUT may require subsets of a common model.
I would really like to be able to inline schemas or in some way alias model naming to achieve the above. There is an outstanding issue with inline schemas https://github.com/swagger-api/swagger-js/issues/189 - is there an alternative I could use?
This is a bit of a blocker to me updating the plug-in to v2.0 - is there a way to alias a model name so the alias name shows in the ui