
yakworks.api.problem.Violation.kt Maven / Gradle / Ivy
package yakworks.api.problem
import yakworks.api.AsMap
import yakworks.message.MsgKey
/**
* @author Joshua Burnett (@basejump)
* @since 7.0.8
*/
interface Violation : AsMap {
val msg: MsgKey?
val code: String?
get() = if (msg != null) msg!!.code else null
val field: String?
get() = null
val message: String?
get() = null
override fun asMap(): Map {
val hmap: MutableMap = HashMap()
hmap["code"] = this.code
hmap["field"] = field
hmap["message"] = message
return hmap
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy