All Downloads are FREE. Search and download functionalities are using the official Maven repository.

endpoints.documented.algebra.OptionalResponses.scala Maven / Gradle / Ivy

There is a newer version: 0.10.1
Show newest version
package endpoints
package documented
package algebra

/**
  * Algebra interface for describing optional responses including documentation.
  *
  * This interface is modeled after [[endpoints.algebra.OptionalResponses]] but the `option`
  * method takes an additional parameter carrying a description.
  */
trait OptionalResponses
  extends Endpoints {

  /**
    * @return A description of an HTTP response that can be either 404 (Not found)
    *         or the underlying `response`.
    * @param response Underlying response
    * @param notFoundDocumentation Description in case there is no result
    */
  def option[A](response: Response[A], notFoundDocumentation: String): Response[Option[A]]

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy