endpoints.documented.openapi.JsonEntities.scala Maven / Gradle / Ivy
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