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

Validate that Action inputs do not use reserved params #1521

Merged
merged 4 commits into from
Jul 8, 2020

Conversation

evantahler
Copy link
Member

@evantahler evantahler commented Jul 8, 2020

An expansion on #1520

This PR also moves calling api.params.buildPostVariables() to the action initializer so can load api.params.globalSafeParams earlier in the boot process.


Original Description:

issue:
My colleague meets the issue, he adds an "action" key in an action input...
but "action" is a keyword, apiVersion also.
can we have a checker to avoid it? even in build time or runtime.
Example

problem:
I was tried to add class/action.ts validate using api.params.globalSafeParams of initializers/params.ts

But action.validate called by initializers/action.ts and its load priority is 410 and params.ts is 420.
So api.parmas is undefined when action.validate is call.
I was tried to change load priority, but I found params.ts need api.actions two... It's a deadlock, have any idea?

@evantahler evantahler added the enhancement New feature or request label Jul 8, 2020
@evantahler evantahler merged commit 2f96008 into master Jul 8, 2020
@evantahler evantahler deleted the allyusd/master branch July 8, 2020 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants