-
Notifications
You must be signed in to change notification settings - Fork 280
Description
Describe the bug
Trying to use 2.0 preview 17, I see the following change in the output document, compared to 1.x:
It seems that whenever OpenApiSchema.Type is set to JsonSchemaType.Null from code, this results in also emitting "type": "object". This is redundant in many cases, for example when allOf is used.
While probably technically still correct, this difference makes it a pain to assess whether the new version produces a similar output document in our test suite. We have about 12,000 tests, many of which compare fragments of the OAS file, failing on changes like this. The fact that "nullable": true moved to the top doesn't help either, but I suspect that will be addressed in a future preview, tracked at #1314.
So I wonder if this change was intentional. And if not, how hard it would be to not emit "type": "object" when the schema contains allOf, oneOf, etc.
