Closed wspeirs closed 1 week ago
Hi @wspeirs , thanks for reporting this!
I tried updating @trojs/openapi-dereference
to 0.2.4
but it didn't resolve the issue. So far, I believe there might be an issue with your OpenAPI specification, specifically in your 200 responses, as it doesn't work on Scalar (https://sandbox.scalar.com/e/asdeL) either. It doesn't throw an error, but it also doesn't display the content of the 200 responses.
I'll review this to ensure that exceptions are handled gracefully. However, we might not be able to determine which schema to display, considering that Scalar shows null
and the Official Swagger Editor shows string
.
Adding a response schema (just changed to text/plain for now) seems to make everything render correctly.
Do you know of a good tool that will complain loudly about these types of issues? I tried another openapi.json file with your library, and it crashed in a similar way because it was lacking security schema. Thanks!
mm I don't really know a good tool, as I see that even the Official Swager Editor fails on OpenAPI v3.1.0
.
from this library, I need to find a library that could validate the Specification as discussed in #9 , and handle exceptions gracefully.
Current behavior
When calling the
getParsedSpec()
method of anuseOpenapi
instance, I get the following error:Desired behavior
No response
Reproduction
No response
Steps to reproduce
The open api json can be found here: https://api-docs.tacticaldefense.software/openapi.json
Minimal code to reproduce:
Logs and Error Messages
No response
Other Information
I noticed that
@trojs/openapi-dereference
is currently on v0.2.4, but your packages.json file includes 0.2.3... maybe as easy as upgrading the version?