Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference between nullable and strict ? #1869

Open
TheKassaK opened this issue Feb 16, 2018 · 0 comments
Open

Difference between nullable and strict ? #1869

TheKassaK opened this issue Feb 16, 2018 · 0 comments

Comments

@TheKassaK
Copy link

TheKassaK commented Feb 16, 2018

I'm working on a Symfony project in API mode with FosRestBundle and NelmioApiDoc.

So, I have an annotation for a param in my route like :

  • @rest\QueryParam(name="code", requirements="[0-9]{4}[A−Za-z]{1}", strict=true, description="Naf Code")
    With this my param code is required both for the FosRest validation and for the Nelmio doc generated.

My question is, if you check the doc : https://symfony.com/doc/master/bundles/FOSRestBundle/annotations-reference.html you can see there is an option nullable but if I replace strict=true by nullable=false my param is not required anymore..

So, what's the strict option exactly ? And what's the nullable option exactly ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant