stoplightio / api-spec-converter

This package helps to convert between different API specifications (Postman, Swagger, RAML, StopLight).
MIT License
137 stars 86 forks source link

Import from Swagger : wrong RAML mapping for allOf attributes #19

Closed nmarinel01 closed 8 years ago

nmarinel01 commented 8 years ago

Take the following Swagger example:

  Manager:
    allOf:
      - $ref: '#/definitions/User'
      - type: object
        properties:
          manager_attribute:
            type: string
          manager_attribute1:
            type: string

This should be mapped as the following RAML:

  Manager:
    type: User
    properties:
       manager_attribute:
         type: string
       manager_attribute1:
          type: string

Take this other Swagger example:

Manager:
    allOf:
      - $ref: '#/definitions/User'
      - $ref: '#/definitions/Category'

This should be mapped as the following RAML:

  Manager:
    type: [User,Category]
glodieu commented 8 years ago

Fixed in swagger-allOf branch.