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

Invalid Inheritance issue in datatype_expansion #129

Closed
jenschude opened this issue Feb 22, 2017 · 1 comment
Closed

Invalid Inheritance issue in datatype_expansion #129

jenschude opened this issue Feb 22, 2017 · 1 comment

Comments

@jenschude
Copy link

jenschude commented Feb 22, 2017

When using the RAML below in Osprey and with the workaround from raml-org/datatype-expansion#50 I get following error:

Error: Invalid inheriance array -> [{:type "array", :items {:type "any"}}]
    at /workspace/osprey-raml1.0/node_modules/datatype-expansion/node/datatype_expansion/canonical_form.js:582:12
    at cljs.core.MultiFn.call.G__10851__3 (/workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:33372:108)
    at cljs.core.MultiFn.call.G__10851 [as call] (/workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:33628:20)
    at /workspace/osprey-raml1.0/node_modules/datatype-expansion/node/datatype_expansion/canonical_form.js:530:138
    at /workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:17998:135
    at /workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:7639:96
    at Function.cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3 (/workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:7640:3)
    at Function.cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 (/workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:7744:29)
    at Function.cljs.core.mapv.cljs$core$IFn$_invoke$arity$2 (/workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:17997:52)
    at cljs$core$mapv (/workspace/osprey-raml1.0/node_modules/datatype-expansion/node/cljs/core.js:17978:23)

Btw the error message should state Invalid inheritance ;)

#%RAML 1.0
title: Example API
types:
    PagedQueryResponse:
        type: object
        properties:
            count:
                type: integer
            total:
                type: integer
            offset:
                type: integer
            results:
                type: Resource[]
    ProductPagedQueryResponse:
        type: PagedQueryResponse
        properties:
            results:
                type: Product[]
    Resource:
        type: object
        properties:
            id:
                type: string
            version:
                type: integer
            createdAt:
                type: datetime
            lastModifiedAt:
                type: datetime
    Product:
        type: Resource
        properties:
            key?:
                type: string
/products:
  get:
    queryParameters:
      sort:
        enum: [username, name]
    responses:
      200:
        body:
          application/json:
            type: ProductPagedQueryResponse

When removing the results property from PagedQueryResponse the RAML works.

@jenschude jenschude changed the title Expansion Issues in datatype_expansion Invalid Inheritance issue in datatype_expansion Feb 22, 2017
@jenschude
Copy link
Author

I'm opened this one most likely at the wrong repository. See raml-org/datatype-expansion#52

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

No branches or pull requests

1 participant