danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

Default values for string extensions break inheritance #261

Open EyMaddis opened 8 years ago

EyMaddis commented 8 years ago

Hi, I use a structure like this:

# Data Structures

## Date (string)
### Default: `2016-12-24T22:00:00.000Z`

See MSON specification: https://apiblueprint.org/documentation/mson/specification.html#45-default

and this seems to work, but only partially. It works for some endpoints, but then breaks and always displays "Hello, world!".

You can reproduce this by loading and rendering the following git repo (with that exact commit): https://build.se.informatik.uni-kiel.de/iobserve-ui/iobserve-ui-api-docs/tree/1a99df93ae2cfb98b7541bc37190fae7fd015a71

In that repo it works until the Communications enpoints are reached, see property lastUpdate

Versions:

aglio 2.2.0
olio 1.6.2

EDIT:

I noticed that I wasn't using my Date type consistently, instead it actually overrides the default value for all strings! Therefore also overriding all other default values for types that extend string