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
Hi. Currently, if I have a Controller based openapi, and in some entry point the request comes from a [FromForm] attr: public async Task<IActionResult> Preguntar([FromForm] PeticionPregunta request),
the spec generated has not a $ref pointing to a PeticionPregunta schema. If fact, it won't exist. So this is what is generated:
Raw fields instead to a $ref.
With this for example, Scalar prints the fields, but not desc, required, examples...., and some OpenAPI Generators won't create a typed response, because it won't exist.
I must say I fix that, modifying the resultant schema and adding a reference in that places, but I still think this is something that must be simpler than my solution.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Currently, if I have a Controller based openapi, and in some entry point the request comes from a [FromForm] attr:
public async Task<IActionResult> Preguntar([FromForm] PeticionPregunta request)
,the spec generated has not a $ref pointing to a
PeticionPregunta
schema. If fact, it won't exist. So this is what is generated:Raw fields instead to a $ref.
With this for example, Scalar prints the fields, but not desc, required, examples...., and some OpenAPI Generators won't create a typed response, because it won't exist.
I must say I fix that, modifying the resultant schema and adding a reference in that places, but I still think this is something that must be simpler than my solution.
Do you face the same problem?
Beta Was this translation helpful? Give feedback.
All reactions