Always type and name in JSON representation
Use standard promise API
Add required function to tests fixtures
Better test for `requires` annotation

Testing circular references and JSON representation.