danielgtaylor / danielgtaylor/aglio

Default values for string extensions break inheritance

Open
#261 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CoffeeScript
Stars
4.7k
Forks
471
PR merge metrics
No merged PRs in 30d

Description

Hi,
I use a structure like this:

``` apiblueprint
# 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.