You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although my use case might be different than yous I still think it could be useful to share my results. I recently started to use swaggerhub (openapi3) for api definition. I was impressed of how useful this tool can be, but when it comes to data validation in python things become tricky. According to https://openapi.tools/ there is no data validation support in python so I started to look for alternatives and this is how I ended up using openapi2jsonschema but ran into the same "nullable not being converted" issue.
After several hours spent on looking for different projects I found https://github.com/p1c2u/openapi-core and an issue regarding data validation in python: python-openapi/openapi-core#154 . Using the example from this issue I managed to write a simple python3 script to validate data against an openapi3 schema.
I'm not familiar with the libraries that are imported but you can see that jsonschema is still used so you might be able to extract your jsonschema data from there.
in a swagger 2.0 yaml file:
when converted to schema:
Actual output
Expected output
The text was updated successfully, but these errors were encountered: