Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

ITypeDefinition.subTypes() always returns empty list #26

Closed
KonstantinSviridov opened this issue Apr 5, 2016 · 1 comment
Closed

ITypeDefinition.subTypes() always returns empty list #26

KonstantinSviridov opened this issue Apr 5, 2016 · 1 comment
Assignees

Comments

@KonstantinSviridov
Copy link
Contributor

Consider RAML

#%RAML 1.0
title: Pet shop
version: 1
baseUri: /shop

types:

  Pet:
    properties:
      name: string

  Mammal:
    type: Pet

  Bird:
    type: Pet
    properties:
      wingLength: number

then execute following code for it:

api.types().filter(function(type){
    return type.name()=="Pet"
}).forEach(function(type){
    console.log("Subtypes of", type.name(), ":");
    type.runtimeDefinition().subTypes().forEach(function(st){
        console.log(st.nameId());
    });
});

The resulting list in the console is empty.

@petrochenko-pavel-a
Copy link
Contributor

FIxed in RC2.

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

No branches or pull requests

2 participants