Self descriptive API

I was thinking it would be good if the API was self-descriptive.

For example, something like:

OPTIONS /

{
    'description':'List all available url', 
    'urls': [
        {'method': 'POST', 'url': '/auth', 'description': 'authenticate the application and ask the user for permissions'},
        {'method': 'GET', 'url': '/auth', ...},
        {'method': 'DELETE', 'url': '/auth, ...'},
        {'method': 'POST', 'url': '/nfs/directory', ...},
        ...
    ]
}
2 Likes

Isn’t this related to the other discussion thread about using tools like Swagger?

1 Like