Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

RAML Extension Chain doesn't go far enough #28

Open
Garethp opened this issue Nov 2, 2017 · 0 comments
Open

RAML Extension Chain doesn't go far enough #28

Garethp opened this issue Nov 2, 2017 · 0 comments

Comments

@Garethp
Copy link

Garethp commented Nov 2, 2017

So I have these files:

user_short.raml

#% RAML 1.0 DataType

properties:
  user_id: string

user_standard.raml

#% RAML 1.0 DataType

type: !include user_short.raml
properties:
  birthday: string
  gender:
    type: string
    enum: ['Male', 'Female', 'Non-Binary']

user_full.raml

#% RAML 1.0 DataType

type: !include user_standard.raml
properties:
  country_code: string

When I convert to HTML with raml2html, it shows the user_full object as having the user_id property, but when I use this tool to convert to swagger, the definitions are:

  "definitions": {
    "user_short": {
      "properties": {
        "user_id": {
          "type": "string"
        }
      },
      "required": [
        "user_id"
      ],
      "type": "object"
    },
    "user_standard": {
      "properties": {
        "birthday": {
          "type": "string"
        },
        "gender": {
          "enum": [
            "Male",
            "Female",
            "Non-Binary"
          ],
          "type": "string"
        },
        "user_id": {
          "type": "string"
        }
      },
      "required": [
        "birthday",
        "gender",
        "user_id"
      ],
      "type": "object"
    },
    "user_full": {
      "properties": {
        "country_code": {
          "type": "string"
        },
        "birthday": {
          "type": "string"
        },
        "gender": {
          "enum": [
            "Male",
            "Female",
            "Non-Binary"
          ],
          "type": "string"
        }
      },
      "required": [
        "country_code",
        "birthday",
        "gender"
      ],
      "type": "object"
    }

You can see that user_standard has user_id, and user_full has items from user_standard, but doesn't have user_id from user_short

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