rest-example: Change handlers to have explicit type signatures. This helps prevent mistakes where you have unused dictionaries or return the wrong types.