Skip to content

Instantly share code, notes, and snippets.

@supermanue
Last active May 3, 2020 09:48
Show Gist options
  • Save supermanue/b0c5cd35e567fa917abf0ed252ebcd65 to your computer and use it in GitHub Desktop.
Save supermanue/b0c5cd35e567fa917abf0ed252ebcd65 to your computer and use it in GitHub Desktop.
refined_5
case class UserInput(name: String, namespace: String)
def updateVersion(input: UserInput): UserInput = {
val lastVersion: Int = getLatestVersion(name, namespace)
val schemaToStore: Schema = InputToSchemaIso.get((userInput, lastVersion + 1))
val result: Schema = store(schemaToStore)
return InputToSchemaIso.reverseGet(result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment