elysiajs / elysia-swagger

A plugin for Elysia to auto-generate Swagger page
MIT License
84 stars 45 forks source link

Adding schema validity test #24

Closed sinasab closed 11 months ago

sinasab commented 1 year ago

I noticed the example in the README didn't work, and I was having some issue with validators not generating a proper validating schema.

This PR's commits do the following:

  1. Adding a simple passing schema validity test, using @apidevtools/swagger-parser.
  2. Adds a more complicated schema validity test similar to the example in the README, which fails.
  3. Fixes a few bugs in the schema mapping logic, fixing the failing test.
  4. Updating the README to include more updated and required params.
sinasab commented 1 year ago

Rebased & updated so new tests are still passing!