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

[Regression from v3.0.1][OpenAPI doc generation] In the latest build of the main branch, v3.0.1+26-dc1f3f41-SNAPSHOT, the generated OpenAPI doc doesn't include the endpoint documentation anymore #3198

Open
jivanic-demystdata opened this issue Nov 6, 2024 · 2 comments
Labels
💎 Bounty bug Something isn't working

Comments

@jivanic-demystdata
Copy link

jivanic-demystdata commented Nov 6, 2024

I tried to update to the latest build to see if it'd fix an issue we have.
When I regenerated my TypeScript SDK from the generated OpenAPI documentation, all the documentation in the TS SDK is disappearing.

For the following endpoint:

  val `POST /source-templates`
    : Endpoint[Unit, SourceTemplateInput, CreateSourceTemplateError, SourceTemplateEntityOutput, AuthType.Bearer] =
    (Endpoint(RoutePattern.POST / "source-templates") ?? Doc.p("Create a Source Template"))
      .outErrors[CreateSourceTemplateError](
        HttpCodec.error[CreateSourceTemplateError.InternalServerError](zio.http.Status.InternalServerError) ?? Doc.p("Not Found"),
        HttpCodec.error[CreateSourceTemplateError.OtherError](zio.http.Status.InternalServerError) ?? Doc.p("Other error"),
      )
      .in[SourceTemplateInput](mediaType = MediaType.application.json, doc = Doc.p("The Source Template to create"))
      .out[SourceTemplateEntityOutput](mediaType = MediaType.application.json, doc = Doc.p("The created Source Template"))
      .auth(AuthType.Bearer)

With v3.0.1, the OpenAPI doc does correctly include the "Create a Source Template" documentation:
image

While with the latest build from the main, v3.0.1+26-dc1f3f41-SNAPSHOT, it disappears:
image

This result in the following change in my generated TS SDK:
image

The regression might come from these changes: #3147

@jivanic-demystdata jivanic-demystdata added the bug Something isn't working label Nov 6, 2024
@jdegoes
Copy link
Member

jdegoes commented Nov 9, 2024

/bounty $75 for fix and regression test

Copy link

algora-pbc bot commented Nov 9, 2024

💎 $75 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #3198 with your implementation plan
  2. Submit work: Create a pull request including /claim #3198 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-http!

Add a bountyShare on socials

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💎 Bounty bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants