mulesoft-labs / api-console-cli

A CLI tools for the API console.
Other
14 stars 15 forks source link

Duplicated elements in types list #30

Closed Cerber-Ursi closed 4 years ago

Cerber-Ursi commented 6 years ago

Greetings!

I've just run into some strange behaviour with api-console-cli. Here's my RAML (simplified as much as possible):

api.raml

#%RAML 1.0
title: Test
mediaType: application/json
uses:
    lib: lib.raml
/endpoint:
    post:
        body: lib.Type1

lib.raml

#%RAML 1.0 Library
types:
    Type1:
        properties:
            field1: string
    Type2:
        type: Type1
        properties:
            field2: number

When console is built, there are three types in "Types" part of the sidebar: two instances of Type1 and one - of Type2. Seems that this example is minimal possible: removing endpoint or mediaType or moving type definitions into api.raml disables the anomaly.

jarrodek commented 6 years ago

Hi, Thank you for issue report. Are you using latest CLI tool to build the console? If yes, it's (unfortunately) creates a build of preview version of the console. Please, for now downgrade to 0.2.12 to build current version of the console.

I'm sorry for the confusion.

I am also going to fix this behavior in next console.

jarrodek commented 4 years ago

This is now fixed with API Console 6.0.0 and CLI tool 2.0.0