Hilzu / express-openapi-validate

Express middleware to validate requests based on an OpenAPI 3 document
Apache License 2.0
75 stars 12 forks source link

Teamwork #50

Open philsturgeon opened 5 years ago

philsturgeon commented 5 years ago

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.

dietergeerts commented 3 years ago

@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.

philsturgeon commented 3 years ago

@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?

kibertoad commented 3 years ago

@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?

philsturgeon commented 3 years ago

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

dietergeerts commented 3 years ago

@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.

philsturgeon commented 3 years ago

@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.