apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
301 stars 54 forks source link

Default/Sample with properties indented by 4 spaces #669

Open opichals opened 5 years ago

opichals commented 5 years ago

Default object with properties indented by 4 spaced from the Default denotation parse as the 'default' 'object' element (from https://raw.githubusercontent.com/apiaryio/mson-zoo/master/samples/0060-array-of-object-with-default.md)

FORMAT: 1A

# XYZ

# Data Structures

## 0060-array-of-object-with-default (array)

- (object)
  - firstName: Jan (string)
  - lastName: Novák (string)
  - Default
      - firstName: Foo (string)
      - lastName: Bar (string)

Whereas the following explicit - (object) default declaration doesn't parse as the default:

FORMAT: 1A

# XYZ

# Data Structures

## 0060-array-of-object-with-default (array)

- (object)
  - firstName: Jan (string)
  - lastName: Novák (string)
  - Default
    - (object)
      - firstName: Foo (string)
      - lastName: Bar (string)
opichals commented 5 years ago

Also the same indentation problem applies to https://raw.githubusercontent.com/apiaryio/mson-zoo/master/samples/0059-array-of-object-with-samples.md and https://raw.githubusercontent.com/apiaryio/mson-zoo/master/samples/0058-array-of-object-with-sample.md where the Sample properties not having 4 spaces indentation from the denotation would disappear without any warning or anything reported.