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 for Routes.JSON #108

Open
YashKumarVerma opened this issue May 24, 2021 · 0 comments
Open

Schema Validation for Routes.JSON #108

YashKumarVerma opened this issue May 24, 2021 · 0 comments

Comments

@YashKumarVerma
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Since the routes are attached to the application during runtime, the data in routes.json must be always in a valid format. Currently, the application checks the same immediately before injecting the routes.

Now the RBAC configs are dependent on portions of routes.json (access identifiers), the application needs robust and reliable method to ensure the integrity of the contents of routes.json

Describe the solution you'd like
The idea is to use a JSON-schema-validation library, (particularly AJV) to ensure that routes.json is in the correct format. AJV is chosen as of the commonly available libraries, it is the fastest.

https://i.imgur.com/8ZqZFBB.png

Describe alternatives you've considered
We can use any of the libraries mentioned in the above screenshot.

Additional context
This forms the base for the RBAC mechanism that allows the application to map roles to rights during runtime.

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