[Question]: Is there a way to override the documentation for a specific class/type?
Opened this issue · 1 comments
mousetail commented
Version
4.26
Question
Some of my models involve UUIDs (Symfony/Component/UUID
).
Right now it generates the following documentation for it:
{
"schemas": {
"Uuid": {
"type": "object"
}
}
}
This is not helpful because it doesn't tell the user the actual expected format.
So I tried to fix by adding this to the config:
schemas:
Uuid:
type: string
format: uuid
But this created the following JSON:
{
"schemas": {
"Uuid": {
"type": "string",
"format": "uuid",
}
"Uuid2": {
"type": "object"
}
}
}
And all my models now refer to Uuid2
Is there a way I can override the UUID type to use my preferred schema? There are a number of other types from different libraries that are also generating unhelpful schemas that I'd like to override.
Additional context
No response
deluxetom commented
@mousetail in your doctrine entities, you can use the OA\Property
attribute and set those to string