You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In tapir's Open API object model there's support to add callbacks to Operations and Components. Both models have an addComponents helper that accepts a Callback. When I define a Callback and render the docs as YAML I'll get something like the following:
But based on the OpenAPI spec for callbacks the pathItems level isn't valid. If I omit this I get the expected result and I can render callbacks correctly with the tapir redoc library.
I have some hacky code that uses a "callback" endpoint that I defined with the endpoint DSL in the Callback added to an existing endpoint operation my_endpoint:
I think the issue might be with the context of where a Callback is added. Callback accepts a list of map of PathItem, but the pathItem stanza is rendered into the API docs when it shouldn't.
I could probably PR a fix, but I'm hesitant because I don't know why Callback is the way it is and I don't want to introduce a regression for anyone.
The text was updated successfully, but these errors were encountered:
Tapir version:
1.0.0-M5
Scala version:
2.12.12
Describe the bug
In tapir's Open API object model there's support to add callbacks to
Operations
andComponents
. Both models have anaddComponents
helper that accepts aCallback
. When I define aCallback
and render the docs as YAML I'll get something like the following:But based on the OpenAPI spec for callbacks the
pathItems
level isn't valid. If I omit this I get the expected result and I can render callbacks correctly with the tapir redoc library.How to reproduce?
I have some hacky code that uses a "callback" endpoint that I defined with the endpoint DSL in the
Callback
added to an existing endpoint operationmy_endpoint
:I think the issue might be with the context of where a
Callback
is added.Callback
accepts a list of map ofPathItem
, but thepathItem
stanza is rendered into the API docs when it shouldn't.I could probably PR a fix, but I'm hesitant because I don't know why
Callback
is the way it is and I don't want to introduce a regression for anyone.The text was updated successfully, but these errors were encountered: