express-openapi-validate icon indicating copy to clipboard operation
express-openapi-validate copied to clipboard

Teamwork

Open philsturgeon opened this issue 5 years ago • 6 comments

Hey there! It looks like you and https://github.com/Zooz/express-ajv-swagger-validation are working on the same thing. Maybe you folks could join forces and share the load.

philsturgeon avatar Apr 09 '19 14:04 philsturgeon

@philsturgeon , thx for that link. I was looking for a way to add custom keywords (which can be done with AJV and is encouraged by JSON Schema), but it can't be done with this package without any major hacking. The linked package does have support to give all custom keywords needed.

dietergeerts avatar Sep 01 '20 06:09 dietergeerts

@dietergeerts great insight! I bet the folks over on that other package haven't ever needed to get custom keywords involved, so I bet they'd be very interested to hear your use case. If this is on the only blocker to letting these packages merge then that's excellent news.

Maybe you could start up an issue to see if they'd be open to a PR covering this?

philsturgeon avatar Sep 01 '20 13:09 philsturgeon

@philsturgeon https://github.com/PayU/openapi-validator-middleware/blob/22b02fa6bb549a69b9c55719bbdf748debd8fb81/test/express/test-server-keywords.js is this the kind of custom keywords support that you are talking about?

kibertoad avatar Sep 01 '20 13:09 kibertoad

@kibertoad I'm talking about whatever type of custom keywords @dietergeerts is talking about. :)

philsturgeon avatar Sep 01 '20 13:09 philsturgeon

@philsturgeon , I'm talking about keywords for custom validation. It's one of the options of the package: https://github.com/PayU/openapi-validator-middleware#options. And we need it in our project to add some custom validation to our models. We currently use this package, where this is not possible. So we'll have to use the other package now. I did not check out yet what other difference there are though, so don't know if we'll be missing other things.

dietergeerts avatar Sep 06 '20 13:09 dietergeerts

@dietergeerts yes I thought this is what you meant, I was confused about why @kibertoad toad was asking me.

I am also a bit confused about the rest of this conversation. I am suggesting the authors of these two packages collaborate, but you are a user of one package pointing out there is something stopping you from using the other package?

You could either send a PR to the package missing the thing you want if you'd like to use it, or you could... not and continue using the package you are using. Sorry but I don't understand what is being discussed.

philsturgeon avatar Sep 07 '20 09:09 philsturgeon