Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View cortinico's full-sized avatar
♦️
Reticulating splines...

Nicola Corti cortinico

♦️
Reticulating splines...
View GitHub Profile
@cortinico
cortinico / build.gradle
Created October 30, 2019 09:42
Implementation dependencies for swagger-gradle-codegen generated artifacts
implementation "com.yelp.android.apis:mobileapi:13.20191020212515.0"
implementation "com.yelp.android.apis:bizapp:13.20191020212515.0"
@cortinico
cortinico / IdToInfoForPhotoUploadSuggestionMapToBusinessReviewMap.kt
Created October 30, 2019 09:42
Example of a generated name for a data class
data class IdToInfoForPhotoUploadSuggestionMapToBusinessReviewMap(
// ...
)
@cortinico
cortinico / DefaultApi.kt
Created October 30, 2019 09:43
Example of a common parameter swapping scenario with swagger-gradle-codegen
interface DefaultApi {
/**
* Find a Business by its owner name and surname.
*/
@GET("/business/owner")
fun getBusinessByOwner(
@retrofit2.http.Query("surname") surname: String
@retrofit2.http.Query("name") name: String
): Single<List<Business>>
}
fun login(username: String, password: String)
inline class Username(val value: String)
inline class Password(val value: String)
fun login(username: Username, password: Password)
fun validate(password: String)
fun validate(password: Password)
public final void validate(@NotNull String password) {
...
}
public final void validate_3mN7H_Y/* $FF was: validate-3mN7H-Y*/(@NotNull String password) {
...
}
// inside the module named `library`
class UserDatabase {
internal fun deleteUsers()
}
public final class UserDatabase {
public final void deleteUsers$library() {
}
}
new UserInterface().deleteUsers$library();