Closed Perni1984 closed 8 years ago
I use a manual table as a workaround for now, like that:
| Id | Error-Code | Status | Title | Detail |
|----|------------|----------------------------|------------------------|----------------------------------------------------------|
| 2 | 403 | ERR_USER_NOT_ALLOWED | User not allowed | You are not allowed to do this action. |
| 3 | 404 | ERR_USER_NOT_FOUND | User not found | A user with the given user_id was not found |
| 4 | 404 | ERR_COMPANY_NOT_FOUND | Company not found | A company with the given company_id was not found |
| 5 | 409 | ERR_USER_ALREADY_EXISTS | User already exists | A user with the given email address already exists |
| 6 | 409 | ERR_COMPANY_ALREADY_EXISTS | Company already exists | A company with the given name and address already exists |
but this is not very DRY.
Hey @Perni1984 the Data Structures rendering is planned and on its way.
Also I have started playing with JSON API error here https://github.com/apiaryio/datapool/blob/zdne/datapool-origin/jsonapi-error.apib
@zdne: nice.
I am closing this issue and waiting for rendering of data structures to be implemented in Apiary.
I am defining all possible errors of my API in the Data structures section as follows (corresponding to Json-api):
There are also other data structures defined besides the errors. As I would like to reference them via
links->about
, I am looking for a way to partially render those data structures in a table in a "errors" group inside the documentation, or to at least render all data structures somewhere in the documentation.How can this be achieved currently?