On Wednesday 05 July 2017 16:34:49 Guilherme Leal wrote:

> DRF already have (something like) that [1]. Like I said to George, I'm
> trying to avoid the "request the metadata from the api call" aproach,
> as it tends to bloat the client with metadata requests.

There are no psychic clients available yet. Somewhere the client needs to be 
taught 
what is considered valid. You always need at least one request (complex, but 
limits 
meta data requests) to expose your API's parameters. The other way is to 
implement 
some lightweight protocol per endpoint - this is preferable if your API is 
large and 
clients typically use a small subset. A structured machine readable error 
response is the 
common way. But one can also use HTTP's OPTION method to do this.

While OPTION methods shall not be cacheable, nothing prevents you from 
implementing a versioning scheme and sending an api version header with each 
response. If the version deviates, the client knows to request the OPTION 
header again 
for future use.

Either way, you require at least one request to start the learning process.
-- 
Melvyn Sopacua

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/15552213.qXX7tVdIPT%40devstation.
For more options, visit https://groups.google.com/d/optout.

Reply via email to