qooxdoo / qxl.apiviewer

qooxdoo apiviewer app
https://qooxdoo.org/qxl.apiviewer
MIT License
5 stars 5 forks source link

API generation is confused by interfaces extending multiple interfaces #24

Closed gnikolaidis closed 4 years ago

gnikolaidis commented 7 years ago

Suppose you have an interface definition with an array in extend key and one or more properties:

qx.Interface.define("qookery.IFormComponent", {
    extend: [ qookery.IContainerComponent, qookery.IVariableProvider ],
    properties: {
        /** Some documentation */
        icon: { check: "String", nullable: true },
...

Then the generator.py api-verify job cannot correctly create documentation for the interface properties. The error message, which appears multiple times for each property, is

Warning: qookery.IFormComponent: Unknown link target: '#icon'
level420 commented 6 years ago

@gnikolaidis I'm not really sure, but I think that the problem is that you defined some attributes ( check, nullable ) to the icon property.

All examples I've found (not have opened all interface definitions, but most) in the framework and in the documentation are defining the properties in an interface with an empty definition, like this:

    properties: {
        /** Some documentation */
        icon: { },

See http://www.qooxdoo.org/devel/pages/core/interfaces.html , where it is documented that the property definition may be empty.

Please try with the empty definition and report back. thank you.

gnikolaidis commented 6 years ago

a. With the attributes removed, the behavior is still the same. b. With or without the attributes, with a non-array extend I get the correct behavior.

I really like those attributes! They constraint what a class can or cannot do when it implements the interface. If I recall correctly, there are even some runtime checks for that.

hkollmann commented 4 years ago

Should be tested with the new apiviewer

hkollmann commented 4 years ago

python toolchain is dead. Website is new