-
-
Notifications
You must be signed in to change notification settings - Fork 479
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Given the following endpoint:
sealed trait Example
final case class A(a: Int) extends Example
case object B extends Example
final case class Input(example: Option[Example])
val testEndpoint =
(Endpoint(RoutePattern.POST / "test") ?? Doc.p("This is my 'POST /test' endpoint doc"))
.in[Input]
.out[String](mediaType = MediaType.application.json, doc = Doc.p("this is the output doc"))
val spec: String =
OpenAPIGen.fromEndpoints(
title = "This is my OpenAPI doc title",
version = "0.0.0",
endpoints = List(testEndpoint)
).toJsonWhat is the correct thing to generate for case object B in the OpenAPI doc?
Right now, we generate something like this:
"B": {
"type": "object",
"properties": {
}
},
Is this correct? 🤔
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working