New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API generation is confused by interfaces extending multiple interfaces #9381

Open
gnikolaidis opened this Issue Aug 24, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@gnikolaidis

gnikolaidis commented Aug 24, 2017

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

This comment has been minimized.

Show comment
Hide comment
@level420

level420 Oct 2, 2017

Member

@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.

Member

level420 commented Oct 2, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@gnikolaidis

gnikolaidis Oct 2, 2017

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.

gnikolaidis commented Oct 2, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment