-
Notifications
You must be signed in to change notification settings - Fork 20
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
Schema validation and error detail settings by get params #150
Schema validation and error detail settings by get params #150
Conversation
Tuto som to myslel trošku inak - spraviť servis (interface) ktorý bude určovať ci sa ma alebo nemá zobrazovať ten detail. Jedna implementácia bude cez ten debugger production mode a ďalšie implementácie by boli napr getovy / postovy parameter. Na cms si potom zapneme niektorý z nich. |
@lulco Pozeram ze treba asi config zmenit na unit test. Kde sa to meni ? |
Nema to podla mna config. V testoch kde sa tie servisy volaju sa aj vytvaraju rucne cez new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zabudol som submitnut review 🤦♂️
return false; | ||
} | ||
$getParams = $request->getParameters(); | ||
return !isset($getParams[$this->noSchemaValidateParam]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
takze ?no_schema_validate=1 bude to iste ako ? no_schema_validate=0 hej? je to tak chcene?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Skor som to chcel tak ze ?no_schema_validate&.... tiez vypne. Ale hej tympadom aj 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sak ked si to tak chcel tak bude :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
az teraz som si uvedomil ze to chceme asi naopak skor - defaultne vypnute a s debugom zapnut - rovnako ako je to pri tom DebuggerConfiguratore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Martin-Beranek mrknes este nove commenty a spravis novy MR pls?
return false; | ||
} | ||
$getParams = $request->getParameters(); | ||
return !isset($getParams[$this->noSchemaValidateParam]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
az teraz som si uvedomil ze to chceme asi naopak skor - defaultne vypnute a s debugom zapnut - rovnako ako je to pri tom DebuggerConfiguratore
|
||
interface ConfiguratorInterface | ||
{ | ||
public function validateSchema(?Request $request = null): bool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ten request je v interface-y len kvoli tomu QueryConfiguratoru? nebolo by lepsie dat Http\Request do konstruktoru QueryConfiguratoru a ostatne implementacie nechat bez parametrov?
No description provided.