在以前版本的Nelmio API文档中,我使用的是:
/**
* @ApiDoc(
* description = "Registers a new user",
* section = "User",
* https = true,
* authentication = false,
* input = {
* "class" = RegistrationType::class,
* "name" = ""
* },
* statusCodes = {
* 200 = "Success.",
* 400 = "Validation failed."
* },
* responseMap = {
* 200 = {
* "class" = User::class,
* "parsers" = {
* JmsMetadataParser::class
* }
* },
* 400 = {
* "class" = RegistrationType::class,
* "form_errors" = true,
* "name" = ""
* },
* }
* )
*/
要生成表单错误文档,其结果是自动的:
但是在新版本中,我找不到"form_errors" = true
选项的等效项
* @SWG\Response(
* response=400,
* description="Form error",
*
* @SWG\Schema(
* type="array",
*
* @SWG\Items(ref=@Model(type=RegistrationType::class))
* )
* )
有人找到此选项吗?
谢谢