api_generator: add sample