HiltApi

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class HiltApi

声明该api将提供注入实体

@HiltApi
internal interface SingerApi {
@GET("/singer/{id}")
suspend fun getById(@Path("id") id: Long): Singer?

@GET("/singer/search")
suspend fun searchByName(@Query("name") name: String): List<Singer>
}

注:使用该注解需要提供可注入的hilt.plus.ApiCreator