Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated openAPI documentation doesn't use examples of response objects #3259

Open
jiramares opened this issue Dec 19, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@jiramares
Copy link

Describe the bug
In following endpoint specification I provide response object example:

val ep2 = Endpoint(RoutePattern.GET / "greeting" / string("name"))
    .outCodec(HttpCodec.content[Greeting].example("1", Greeting("Hi Jane")) ?? Doc.p("Response"))

but the generated openAPI show response as:

{
  "msg": "string"
}

Expected behaviour
The response example should be

{
  "msg": "Hi Jane"
}

Dependencies:

    "dev.zio" %% "zio" % "2.1.9",
    "dev.zio" %% "zio-http" % "3.0.1"
    "dev.zio" %% "zio-schema" % "1.4.1"
@jiramares jiramares added the bug Something isn't working label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant