Wiretap shows violations when response object has string as null when the open API specifies nullable: true
145 | /allOf/1/properties/results/items/allOf/1/properties/speakerId/type | expected string, but got null -- | -- | --
what was the version of the OAS spec ? because in recent version nullable : true is not supported , null beeing a definitive type
so sould be type : [string , null ]
more details here https://stackoverflow.com/questions/48111459/how-to-define-a-property-that-can-be-string-or-null-in-openapi-swagger#:~:text=OAS2%20does%20not%20support%20%27null%27%20as%20the%20data,are%20not%20part%20of%20the%20OpenAPI%202.0%20Specification.
the version is version: 3.0.0
any further updates on this issue?
The problem here is that this schema validation is performed by a dependency, not wiretap, it's being handled by github.com/santhosh-tekuri/jsonschema/v5
Code is here: https://github.com/pb33f/libopenapi-validator/blob/main/schema_validation/validate_schema.go#L126
should a ticket been raised ?
Any update on supporting this? This blocks me from being able to adopt this tool. It looks like the dependency that is to blame is on v6.
@daveshanley nullable is a mess introduced in 3.0 and removed in 3.1.0
the upgrade to the newest version https://github.com/santhosh-tekuri/jsonschema/releases/tag/v6.0.0
will not help as it is not related to json schema but to OAS directly
@mdiwakar i would advise you to upgrade to OAS 3.1 if you can, otherwise the fix is a oneOf only for version 3.0 here any contribution will be welcome