swagger1st
swagger1st copied to clipboard
Support application/problem+json
Currently api/throw-error
yields the following json:
{
"message": "Error",
"details": {...}
}
It would be cool if this could be changed to the application/problem+json RFC. The function signature can easily be the same.
@sebastianpoeplau and @harti2006, WDYT about @prayerslayer's suggestion?
Sounds like a good idea to me.
My impression is that the parser component shouldn't be responsible for generating HTTP responses. The parser should return the result of parsing which can be handled by an error handler down the chain. This way a user of s1st can optionally add a middleware down the chain to handle errors according to their specification.