Automated API documentation for Ktor/JVM servers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

22 lines
548 B

  1. package me.jfenn.ktordocs.model
  2. data class ParameterInfo(
  3. val name: String,
  4. var desc: String = "No description provided.",
  5. var type: String = TYPE_STRING,
  6. var isRequired: Boolean = false,
  7. var location: In = In.Query,
  8. var example: String = "{${name}}"
  9. ) {
  10. sealed class In(val value: String) {
  11. object Header : In("header")
  12. object Path : In("path")
  13. object Query : In("query")
  14. }
  15. companion object {
  16. const val TYPE_STRING = "string"
  17. const val TYPE_INTEGER = "integer"
  18. }
  19. }