If I have to hazard a guess, 99% API calls are not server scripts, then
why check it first and pay the costs?
This PR first checks if method is a real method in python code and if
it's not found then only attempts to fetch it from server script map.
I'll revert this if I can bring the costs in acceptable limits with
client-side caching.
This has several breaking changes for v2:
1. No support for following methods which were implicitly present in
default namespace.
- run_doc_method
- ping
- web_logout
- logout
- uploadfile
- upload_file
- download_file
This lets us create three types of APIs:
- Document APIs that operate on documents
- DocType APIs that operate on collections - list, count, search
- Method APIs that are RPC calls
v1 and v2:
- Use path convertor to consume entire document which MIGHT contain `/`
- Drop string convertor, as it's the default
- Dont merge slashes - avoid consuming something that's part of name
v2:
- `SI/BLAH/BLAH/submit` is not simple to parse without ambiguitity
- `SI/BLAH/BLAH/method/submit` removes ambiguitity for 99.99% cases.