-
Notifications
You must be signed in to change notification settings - Fork 630
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
OpenAPI and GraphQL ValidatorHandlers conflict on config file names #252
Comments
Yes. It is great that you bring it up. We never thought we are going to use two or more different frameworks in the same service instance before. At this moment, there are more uses for the light-rest-4j than light-graphql-4j. For this release, maybe we should change the validator.yml for graphql to graphql-validator.yml and change the hybrid framework validator config to hybrid-validator.yml. When we move to 1.6.x release I think we should change the light-rest-4j to rest-validator.yml @ddobrin @logi @NicholasAzar What do you think? |
Sounds reasonable. Perhaps even renaming the REST config as well but with a fallback to the current name and log a deprecation warning? |
That is a good idea. Thanks. I will open issues to address them all together. |
@logi This has been implemented in light-rest-4j, light-graphql-4j and light-hybrid-4j. Please take a look see if the implementation is expected. Thanks. |
About this comment:
If multiple frameworks are used in the same server instance, even if the files are identical then there will be a This means that if two frameworks are used in the same server, since the compiled-in config files are still all called |
Cool. I am not aware of this until now. Thanks for the clarification. I will update the comments accordingly. |
Both
com.networknt.openapi.ValidatorHandler
andcom.networknt.graphql.validator.ValidatorHandler
haveCONFIG_NAME = "validator"
so if both are loaded in the same JVM they'll both runbut with different
ValidatorConfig
classes imported, so the second one to be loaded fails withCurrently the content of the two files seems to be compatible, but it would not be surprising if that would also diverge.
The text was updated successfully, but these errors were encountered: