DemocracyOS / core

1 stars 1 forks source link

Expected response for a documentType version that doesn't exists #31

Closed guillecro closed 6 years ago

guillecro commented 6 years ago
/api/v1/document-types/5b55d268763e382f8a707536/versions/1

Imagine I have a documentType id: 5b55d268763e382f8a707536 and 2 versions, 1 and 2. If i try to retrieve a version 3, what should be the desire response?

/api/v1/document-types/5b55d268763e382f8a707536/versions/3

HTTP 404 not found
{
    "message": "DocumentType version not found",
    "error": {
        "status": 404,
        "translationKey": "NOT_FOUND",
        "metadata": {}
    }
}

or maybe

/api/v1/document-types/5b55d268763e382f8a707536/versions/3

HTTP 200
null
guillecro commented 6 years ago

DocumentType has been replaced for customForms and there is no versioning