Closed aautio closed 3 years ago
Hi Ari! Thanks for your PR.
To me this looks good. I wouldn't touch ValidationError
for this feature. It's only meant for errors thrown when validating the incoming requests. You could replace it with just plain Error
or create a new MatchError
if you feel like it.
Ok super 👌
I've switched the ValidationError
to Error
and updated docs & tests appropriately. Changes were pushed a couple of minutes ago.
@Hilzu Can we help in any way to get this merged? Checks have failed due to:
Bad response: 422 {"message":"service_job_id (723838053) must be unique for Travis Jobs not supplying a Coveralls Repo Token","error":true}
Either COVERALLS_REPO_TOKEN
has become a requirement, or this is an issue in Travis. Some confusing discussion in https://github.com/lemurheavy/coveralls-public/issues/1264.
Sorry this got stuck due to me looking into the Travis issue. I'm merging this in and replacing Travis with GitHub actions which should work nicer for open-source projects.
Hello 👋
Here is a breaking change to
match()
. I've implemented it as discussed in #64 and #63. Nowmatch()
will throw an error when no matching routes are found from OpenAPI schema. The error is an instance ofValidationError
without the.data
array.To skip the error you can invoke
match({ allowNoMatch: true })
.There was also a bug in the original tests for
match
. There was no matching path for/match/works-with-url-param
in the OpenAPI schema. Thusmatch()
did not invoke any validators and the test yielded a false negative. This was fixed by the first commit in this pull request.Would this be ok to be published as
0.6.0
? Feel free to edit anything as you wish. I'll be happy to help with this one further. Let me know if e.g. changes toValidationError
are not welcome.