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

endpoints.documented.openapi.JsonEntities.scala Maven / Gradle / Ivy

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

/**
  * Partial interpreter for [[algebra.JsonEntities]].
  */
trait JsonEntities
  extends algebra.JsonEntities
    with Endpoints {

  def jsonRequest[A : JsonRequest](documentation: Option[String]): RequestEntity[A] =
    Some(DocumentedRequestEntity(documentation, Map("application/json" -> MediaType(None))))

  def jsonResponse[A : JsonResponse](documentation: String): Response[A] =
    DocumentedResponse(200, documentation, Map("application/json" -> MediaType(None))) :: Nil

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy