Skip to content

Instantly share code, notes, and snippets.

@marrek13
Created October 14, 2022 12:26
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/aac7dc877c83dd6840b969d4ab1a4788 to your computer and use it in GitHub Desktop.
Save marrek13/aac7dc877c83dd6840b969d4ab1a4788 to your computer and use it in GitHub Desktop.
@RestController
@ApiVersion(ApiVersionValue.V2_0_0)
class ColorsApiController : ColorsApi {
override suspend fun getColors(): ResponseEntity<ColorListResponse> =
ResponseEntity.ok(ColorListResponse(listOf(Color("V2.0.0 list color", "#f0f0f0"))))
@ApiVersion(ApiVersionValue.V2_1_0)
override suspend fun getColor(): ResponseEntity<Color> =
ResponseEntity.ok(Color("V2.1.0 single color", "#f0f0f0"))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment