Skip to content

Instantly share code, notes, and snippets.

@marrek13
Last active October 31, 2022 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marrek13/23f5026f210e7dbdff8a318ce8f3beec to your computer and use it in GitHub Desktop.
Save marrek13/23f5026f210e7dbdff8a318ce8f3beec to your computer and use it in GitHub Desktop.
enum class ApiVersionValue(val version: String) {
V1_0_0("1.0.0"),
V2_0_0("2.0.0"),
V2_1_0("2.1.0"),
}
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.RUNTIME)
annotation class ApiVersion(val value: ApiVersionValue)
@zaaom
Copy link

zaaom commented Oct 31, 2022

is it meant to be a fallback to 1.0.0 or maybe a typo?

-V2_0_0("1.0.0"),
+V2_0_0("2.0.0"),

@marrek13
Copy link
Author

Yeah, it's a typo, thank you for spotting that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment