WPAPI-SwaggerGenerator
WPAPI-SwaggerGenerator copied to clipboard
Empty enums
After Wordpress 4.7 upgrade empty enums appeared into template POST parameters in several enpoints (Page, Post):
e.g.:
{
"name":"template",
"type":"string",
"in":"formData",
"description":"Teematiedosto joka n\u00e4ytt\u00e4\u00e4 kohteen.",
"enum":[
""
]
}
Is that by design I wonder? I see plenty of other template variables that have an enum list...
I'm not sure what should be here though?
I have also come across this issue. Also I my swagger UI would not display this because of null values. I have written a small fix, maybe you want to add this. https://gist.github.com/RichiWIP/c096f6e7c26a0f5dbcd4e66c650b1f74 I haven't coded PHP for 15 years, so please ignore any rookie mistakes I might have made.