teamcarma / swagger-jaxrs-doclet

This fork is no longer actively maintained, please switch to https://github.com/conorroche/swagger-doclet
Apache License 2.0
81 stars 38 forks source link

Incorrect types are documented where nested objects use inner classes of the same name. #55

Closed Lattyware closed 9 years ago

Lattyware commented 9 years ago

I have a Foo object that has a member Bar object. They both have Baz inner classes, and instances of those inner classes within themselves. E.g:

class Foo {
    class Baz {
        public int a;
    }
    public Baz baz;
    public Bar bar;
}
class Bar {
    class Baz {
        public int b;
    }
    public Baz baz;
}

When the doclet runs, it produces incorrect output, conflating the two Baz classes and keeping only Foo.Baz, without Bar.Baz showing up at all:

{
  "baz": {
    "a": 0
  },
  "bar": {
    "baz": {
      "a": 0
    }
  }
}
conorroche commented 9 years ago

@Lattyware I have now committed support for nested model classes, if you have time let me know if it works for you

conorroche commented 9 years ago

closing as I believe this has been resolved