dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

index.json contains duplicate entries

Open chalin opened this issue 8 years ago • 1 comments

In applying dartdoc to Angular 2 code (beta.17), the generated index.json contains 124 duplicate entries. Here is one example of a repeated entry:

    {
        "name": "hashCode",
        "qualifiedName": "server.Html5LibDomAdapter.hashCode",
        "href": "server/Html5LibDomAdapter/hashCode.html",
        "type": "property",
        "enclosedBy": {
            "name": "Html5LibDomAdapter",
            "type": "class"
        }
    },

Given that the top-level JSON object is an array (and not a map), it would be nice if those entries were unique.

/cc @kwalrath

chalin avatar Jul 12 '16 13:07 chalin

Some of these duplicates are "working as intended", because if Dart's Object class is not one of the documented entities, then inherited identifiers from it, like hashCode, will be "owned" by the closest class to Object in the inheritance chain.

However, dartdoc doesn't currently compute this right.

jcollins-g avatar Apr 10 '17 15:04 jcollins-g