sapienstech / typescript-angular2-swagger-codegen

9 stars 3 forks source link

Getting a lot of model.any #5

Open JonnyBGod opened 8 years ago

JonnyBGod commented 8 years ago

I am getting a lot of model.any typing declarations like:

'use strict';
import * as model from "./model.d.ts"
export interface Entity {
    type?: string;
    properties?: model.any;
    id?: string;
}
JonnyBGod commented 8 years ago

Not sure but this might be caused my some malformation of the swagger file.

roni-frantchi commented 8 years ago

@JonnyBGod might be. can you share some of it? I'm guessing properties is supposed to be a Map<> ?

JonnyBGod commented 8 years ago

Well I am generating the swagger spec from loopback. It is probably some problem with how loopback is generating the swagger spec. You can see all of it from http://connect.wtf/explorer/swagger.json.

Let me know if you find any error in the spec so I can propose the fixes to loopback team.

JonnyBGod commented 8 years ago

Looks like it happens with property type object.

roni-frantchi commented 8 years ago

@JonnyBGod I guess Object wasn't set up as part of the known types list (String, Integer..), it should have just been Any. I'll have a look sometime this week, or feel free to do so yourself and put in a PR if you get the chance