wcandillon/swagger-js-codegen

split class into models

jmls opened this issue · 0 comments

jmls commented

is it possible to move the models into their own module ? for example, if I have users and customers,

instead of

myclass.prototype.User_create = function(parameters) {

I could have

User.prototype.create = function()

which looks a lot better in code - User.create()

I also would like to know what's happened here :

myclass.prototype.User_prototype___findById__accessTokens 
myclass.prototype.User_prototype___get__accessTokens

are these methods than can be overridden by the x- stuff ?

the reason why I ask is that in the documentation, there is this example:

// A PUT to this path in a swagger schema:  /records/{id}/meta
// is intended to update a "meta" property on a specific "Record" entity.
// ...swagger-js-codegen generates a method named:
MyApi.prototype.putEntitiesByIdMeta = function(parameters) {

which looks nothing like my generated code ;)