Nelmioapidocbundle: [3.0] Should we support forms?

Created on 1 Feb 2017  路  6Comments  路  Source: nelmio/NelmioApiDocBundle

The bundle currently supports forms as input, should we support it in 3.0?

Most helpful comment

It's sooooo convenient using Form as input, which avoid long doc and duplication.

All 6 comments

It's sooooo convenient using Form as input, which avoid long doc and duplication.

I'm not using forms very much. Porting https://github.com/nelmio/NelmioApiDocBundle/blob/master/Parser/FormTypeParser.php should be enough but I can't be sure of that, so if someone is willing to make a PR, please do it :)

I'm willing to make the PR but I'm unsure of how to implement: I should add a type in the ModelDescriber?

@magnetik yes, I think that's the way to go, probably with return Type::BUILTIN_TYPE_OBJECT === $model->getType()->getBuiltinType() && FormInterface::class === $model->getType()->getBuiltinType()->getClassName(); in the supports method.

Yeah that's what I started.

I started on https://github.com/magnetik/NelmioApiDocBundle/tree/form I'll do a pull request when something is working :)

Great, thanks :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

astronati picture astronati  路  3Comments

jhkchan picture jhkchan  路  4Comments

BraisGabin picture BraisGabin  路  7Comments

andydandy80 picture andydandy80  路  4Comments

kojidev picture kojidev  路  6Comments