Open DavidGarciaCat opened 1 year ago
This case might be related to https://github.com/nelmio/NelmioApiDocBundle/issues/1811 but, as I was saying, I believe the problem is caused by the usage of the Nelmio\Model
class and how it is processed when rendering the documentation.
Maybe a __toString()
magic method is missing?
Good day,
I am trying to generate an auto-mapping between the "oneOf" of the Schema and the "examples".
Although, initially, it might seem like a bug/issue to report to the Swagger PHP library, I have the feeling this case needs to be reported here because I get the issue when trying to use the
Nelmio\Model
class:The
ref
parameter seems to expect a string (targeting the Model), but it seems to generate an error using the same approach, using the Nelmio Model.I have tried to use the example property as part of the
oneOf
Schema/Model definition, but it didn't work either:Any suggestions or ideas to keep using the Nelmio Model?
I have been able to create examples by setting the
value
key as an array or a string. Still, it means any change in my Type objects is not automatically updated and rendered in the documentation page, doubling the number of updates and leading to potentially broken documentation in case I missed updating the controller.