Skip to content
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

Multiple inheritance types render incomplete in method response #363

Closed
tiguchi opened this issue Nov 16, 2016 · 6 comments
Closed

Multiple inheritance types render incomplete in method response #363

tiguchi opened this issue Nov 16, 2016 · 6 comments

Comments

@tiguchi
Copy link

tiguchi commented Nov 16, 2016

Problem

Given the following minimal example api.raml file:

#%RAML 1.0
title: Test API
types:
  BaseA:
    properties:
      a:
        type: string
  BaseB:
    properties:
      b:
        type: string
  Complete:
    type: [ BaseA, BaseB ]
    properties:
      c:
        type: string

/complete:
  get:
    responses:
      200:
        body:
          application/json:
            type: Complete

Custom object types that inherit from multiple base types appear incomplete in any resource method response section. Above example only shows properties inherited from BaseAand the properties directly defined in the type Complete:

image

The order of the type array in Complete matters. When BaseB comes first, then only B's properties appear in the output, on top of the properties defined in Complete.

The output in the documentation's Types section is complete though:

image

System & Version Info

API Console Version: 3.0.10
Browser: Google Chrome Version 54.0.2840.98 (64-bit)
OS: Mac OS X Sierra 10.12.1

@sichvoge
Copy link
Contributor

sichvoge commented Nov 24, 2016

Can you try with the latest version? It works for me again using 3.0.11

image

@tiguchi
Copy link
Author

tiguchi commented Nov 24, 2016

Yes, I can confirm that the output appears complete. However, resource type popups (clicking one of the blue links) still contain incomplete information (description and id properties are missing):

image

@sichvoge
Copy link
Contributor

Seems you have a different RAML in your image. Using your RAML you posted here I can see all necessary information. Can you share exactly what you have or a small example on that with step by step explanation to reproduce it?

@tiguchi
Copy link
Author

tiguchi commented Nov 24, 2016

Sorry, that was a "real life" example screen shot. I modified the original example from above to reproduce the problem:

#%RAML 1.0
title: Test API
types:
  BaseA:
    properties:
      a:
        type: string
  BaseB:
    properties:
      b:
        type: string
  ReferencedComposite:
    type: [ BaseA, BaseB ]
    properties:
      r:
        type: string

  Complete:
    type: [ BaseA, BaseB ]
    properties:
      c:
        type: ReferencedComposite

/complete:
  get:
    responses:
      200:
        body:
          application/json:
            type: Complete

"ReferencedComposite" is missing b:

image

@nmarinel01
Copy link

Reproducible using 3.0.11. Thank you !

@nmarinel01
Copy link

Fixed at 3.0.16 release

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

No branches or pull requests

3 participants