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

Use existing type definition in a One Of definition #86

@njlittle

Description

@njlittle

Hi, and sorry for the API blueprint minimum example, I'd like to use a predefined type definition in a One Of definition, e.g.

FORMAT: 1A

# Data Structures

## Foo

+ foo
+ bar

# Group Foo

## GET /api/foo

+ Response 200 (application/json)

    + Attributes
        + One Of
            + baz
            + Properties
                + Include Foo

However, when I do so and run the result through aglio I get this error:

12:40 $ aglio -i foo.apib -o foo.html
>> { code: 4,
  message: 'Error parsing input: mixin base type should be the same as parent base type. objects should contain object mixins. arrays should contain array mixins',
  location: [],
  input: 'FORMAT: 1A\n\n# Data Structures\n\n## Foo\n\n+ foo\n+ bar\n\n# Group Foo\n\n## GET /api/foo\n\n+ Response 200 (application/json)\n\n    + Attributes\n\n        + One Of\n            + baz\n            + Properties\n                + Include Foo\n' }

Is there any way around this so I can re-use existing type definitions like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions