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
I can add a type: object to the Property attribute to force the property to be added, but that includes the type field which should not be there:
"parent": {
"description": "The parent reservation, if any. Will be false to break loops.",
"type": "object",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/EquipmentReservation"
},
{
"type": "false"
}
]
},
I can also add a #[JMS\Type('object')] (or one with the class name) attribute to the property itself, but that ignores the oneOf specification I manually supplied:
"parent": {
"description": "The parent reservation, if any. Will be false to break loops.",
"nullable": true,
"oneOf": [
{
"$ref": "#/components/schemas/object"
}
]
},
Note that this is a serialization object only, so there is no need to deserialize: which means I do not necessarily want to define the JMS type, without it it should work just fine.
I tried adding an exclusion to the referenced implementation, but that would only throw further in the code due to the type being null.
Is there anything that can be done here, or do I want something that is too complex? 😄
Additional context
No response
The text was updated successfully, but these errors were encountered:
Note: I solved the issue for now by changing the models themselves (by excluding the parent and children properties with JMS groups instead of setting them to false). While this might no longer be relevant for me, it might still be worth looking into this.
Version
4.26.1
Description
Consider the following definition:
With this definition, the property is excluded from the OpenAPI documentation, which is due to the following branch:
NelmioApiDocBundle/src/ModelDescriber/JMSModelDescriber.php
Line 195 in 2d45e53
I can add a
type: object
to the Property attribute to force the property to be added, but that includes thetype
field which should not be there:I can also add a
#[JMS\Type('object')]
(or one with the class name) attribute to the property itself, but that ignores the oneOf specification I manually supplied:Note that this is a serialization object only, so there is no need to deserialize: which means I do not necessarily want to define the JMS type, without it it should work just fine.
I tried adding an exclusion to the referenced implementation, but that would only throw further in the code due to the type being null.
Is there anything that can be done here, or do I want something that is too complex? 😄
Additional context
No response
The text was updated successfully, but these errors were encountered: