lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.42k stars 489 forks source link

Fix koa ValidateError #1521

Closed hpx7 closed 8 months ago

hpx7 commented 8 months ago

Closes https://github.com/lukeautry/tsoa/issues/1333

All Submissions:

Closing issues

Put closes #XXXX (where XXXX is the issue number) in your comment to auto-close the issue that your PR fixes.

If this is a new feature submission:

Potential Problems With The Approach

Test plan

I have verified this patch in my local tsoa + koa project

hpx7 commented 8 months ago

@WoH would you be able to provide any guidance on the testing strategy for this?

hpx7 commented 8 months ago

The Koa Server (with noImplicitAdditionalProperties turned on) tests are failing on master for me, it doesn't seem related to this PR

WoH commented 8 months ago

The Koa Server (with noImplicitAdditionalProperties turned on) tests are failing on master for me, it doesn't seem related to this PR

I think most of the invalid JSON errors are a consequence tbh.

hpx7 commented 8 months ago

@WoH I managed to track down and fix the tests

hpx7 commented 8 months ago

The current test failures seem related to some dependency upgrade. yarn install && yarn test works but yarn install --no-lockfile && yarn test fails. Curiously, yarn list seems to give back the same output either way.

Any ideas @WoH?

EDIT: The failure is that the test expects GenericRequest_Array_ but is getting GenericRequest_global.Array_ for genericNestedArrayKeyword1 and genericNestedArrayKeyword2

WoH commented 8 months ago

Yup, seems unrelated. I'll check what went wrong.

hpx7 commented 8 months ago

Any luck so far @WoH ? Let me know if I can help