danielgtaylor / danielgtaylor/aglio
Aglio fails silently on Model abuse
- Dominant language
- CoffeeScript
- Stars
- 4.7k
- Forks
- 471
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Aglio fails silently if model references get abused (that is: referenced outside the resource it is specified in). This said abuse seems to have worked in the past, as it is currently happily building on our old setup (aglio 1.17.1 running on node 0.10.31). A minimal sample code can be found [in this gist](https://gist.githubusercontent.com/FrankyBoy/23b0b427e10422f43f7480c7d79e5fd1/raw/c414759e02e9da3b39de1a134b0e81ba6b0b3fd7/minimalFail.md).
Both in regular mode as well as verbose, no output is created that would indicate a failure, the output document is simply not created.
System info:
- Win 7 x64
- aglio 2.2.0
- olio 1.6.2
- node 5.2.0
EDIT: actually, the provided code fails three ways (always silently)
- first because it wants an `(application/json)` in line 17 - funny enough if you add it, you get a warning that you have duplicate headers afterwards
- secondly because the Model is used outside of it's context.
- and thirdly, because the model expects the body to be inside a +Body (even if that seems to be optional in other resource descriptions like Response)
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the three silent failures using the minimal sample in the linked gist with the reported Aglio 2.2.0, Olio 1.6.2, and Node 5.2.0 setup. Trace how invalid media-type headers, out-of-context Model references, and missing +Body sections are handled. Done means each invalid case reports a clear failure instead of silently producing no output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- coffeescript, node.js
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100