robertmassaioli / openapi-merge

Merge multiple OpenAPI 3.0 (Swagger) files together via a library or CLI tool.
MIT License
131 stars 26 forks source link

compare null value(s) before calling isReference #77

Open tanmaster opened 2 years ago

tanmaster commented 2 years ago

If x or y are null, an error will be thrown in the isReference function. This PR checks these conditions beforehand.

robertmassaioli commented 2 years ago

What situation did you find in which one of these were null? I would have expected the type checking to catch it. Maybe the input swagger file was invalid?

tanmaster commented 2 years ago

The endpoints had examples where some properties were explicitly set to null.