Skip to content
This repository has been archived by the owner on Nov 8, 2024. It is now read-only.

Warning "Mixin base type should be the same as parent base type" on parent which is implicit object #243

Closed
honzajavorek opened this issue Feb 25, 2016 · 4 comments
Labels

Comments

@honzajavorek
Copy link
Contributor

I get warning from Atom's API Blueprint Linter

Mixin base type should be the same as parent base type, objects should contain object mixins, arrays should contain array mixins

when specifying mixin on object without explicit type:

screen shot 2016-02-25 at 10 40 29

FORMAT: 1A

# Building Supply Store API

## Brick Type [/bricks/{id}]

+ Parameters
    + id: XYZ42 - ID of a brick type.
+ Attributes
    + id
    + name (string, required)
    + colors: red, brown (array)
    + Include DimensionsMixin

## Data Structures

### DimensionsMixin (object)

+ dimensions (array)
    + 20, 30, 40 (array[number])

Compare with:

screen shot 2016-02-25 at 10 40 42

FORMAT: 1A

# Building Supply Store API

## Brick Type [/bricks/{id}]

+ Parameters
    + id: XYZ42 - ID of a brick type.
+ Attributes (object)
    + id
    + name (string, required)
    + colors: red, brown (array)
    + Include DimensionsMixin

## Data Structures

### DimensionsMixin (object)

+ dimensions (array)
    + 20, 30, 40 (array[number])
@honzajavorek
Copy link
Contributor Author

As tested in https://github.com/apiaryio/protagonist-include-issue, this issue occurs also when doing following:

+ Attributes
    + id
    + name (string, required)
    + colors: red, brown (array)
    + Include DimensionsMixin

...

## Data Structures

### DimensionsMixin (object)

+ dimensions
    + height: 20 (number)
    + width: 30 (number)
    + length: 40 (number)

I get the same warning, although there are no arrays in my mixin!

@pksunkara
Copy link
Contributor

This might be because of another bug. apiaryio/snowcrash#362.

Also related to #255 #254

@honzajavorek
Copy link
Contributor Author

@pksunkara Yes, I think @kylef did some research about this last Thursday and came to conclusion that it's still the same problem and resolving it would probably close many issues on Drafter/Snowcrash. It seemed to me that the apiaryio/snowcrash#362 is probably the oldest record for the issue, the rest are sort of duplicates or very close issues.

@pksunkara
Copy link
Contributor

Fixed by #280

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

No branches or pull requests

3 participants