effect icon indicating copy to clipboard operation
effect copied to clipboard

From Discord: `Schema.Class` and `urlParams` in Swagger Docs for `HttpApi`

Open effect-bot opened this issue 8 months ago • 0 comments

Summary

In the discussion, a user (adrian_g) inquired about the behavior of the HttpApi in the Effect Typescript library, specifically regarding the use of Schema.Class with urlParams and its rendering in the Swagger documentation. They asked whether the absence of URL parameters in the Swagger docs is expected behavior when using Schema.Class, or if urlParams are intended only for Schema.Struct.

Another user (khraks_mamtsov) responded by indicating that this might be a bug. They suggested that if the schema has an identifier, the specification might be generated incorrectly, and they provided a link to an online playground for further exploration.

Key takeaways:

  • There seems to be an issue with Schema.Class and urlParams not rendering in the Swagger docs.
  • The problem might occur when the schema has an identifier, suggesting a possible bug in the library.
  • The discussion implies that Schema.Struct might be the intended schema type for use with urlParams to ensure correct rendering in Swagger.

Discord thread

https://discord.com/channels/795981131316985866/1356959593351352391

effect-bot avatar Apr 02 '25 12:04 effect-bot