raml-org/raml-java-parser

Issue with union types and JSON-formatted examples

JuanAller opened this issue · 0 comments

The following RAML fails:

#%RAML 1.0
title: Test API
types:
  Foo:
    items:
      properties:
        foo:
  Bar:
    properties:
      bar:
/Test:   
   get:                       
    responses:
      200:
        body:
          application/json:
            type: Foo | Bar
            examples: 
              FooExampleExpressedInJSON: |
                [
                  {
                    "foo": "..."
                  }
                ]
              SameFooExampleExpressedInYAML:
                - foo: "..."
              BarExampleExpressedInJSON: |
                {
                  "bar": "..."
                }
              SameBarExampleExpressedInYAML:
                bar: "..."

this only happens with JSON examples