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

Schema validation and error detail settings by get params #150

Conversation

Martin-Beranek
Copy link

No description provided.

@lulco
Copy link
Collaborator

lulco commented Jul 30, 2024

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.

@Martin-Beranek
Copy link
Author

@lulco Pozeram ze treba asi config zmenit na unit test. Kde sa to meni ?

@lulco
Copy link
Collaborator

lulco commented Aug 1, 2024

@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

Copy link
Collaborator

@lulco lulco left a 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 🤦‍♂️

src/Presenters/ApiPresenter.php Outdated Show resolved Hide resolved
src/Output/Configurator/EnvConfigurator.php Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
src/Output/Configurator/QueryConfigurator.php Outdated Show resolved Hide resolved
src/Output/Configurator/QueryConfigurator.php Outdated Show resolved Hide resolved
return false;
}
$getParams = $request->getParameters();
return !isset($getParams[$this->noSchemaValidateParam]);
Copy link
Collaborator

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?

Copy link
Author

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.

Copy link
Collaborator

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 :)

Copy link
Collaborator

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

src/Output/Configurator/QueryConfigurator.php Outdated Show resolved Hide resolved
src/Output/Configurator/EnvConfigurator.php Outdated Show resolved Hide resolved
@lulco lulco merged commit 90dea23 into tomaj:4.0 Aug 13, 2024
15 checks passed
Copy link
Collaborator

@lulco lulco left a 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]);
Copy link
Collaborator

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;
Copy link
Collaborator

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?

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

Successfully merging this pull request may close these issues.

2 participants