Framework for creating self-describing APIs