open-api icon indicating copy to clipboard operation
open-api copied to clipboard

Generated open api spec nullable fields marked as required causing null exception failures.

Open lw-andrewsmith opened this issue 4 years ago • 0 comments

Describe the bug Swagger spec is invalid as lots of nullable fields are marked as required this invalidates generation using swagger code gen.

To Reproduce Use https://www.etsy.com/openapi/generated/oas/3.0.0.json at https://editor.swagger.io/ to generate the c# client. Call getUser Endpoint. See Exception when Getting Users

Expected behavior I'm assuming if a field is nullable it can't be required so shouldn't be marked as such. See the User example below, this appears all over the open api spec file.

Screenshots image image image

Additional context Add any other context about the problem here.

lw-andrewsmith avatar Dec 20 '21 14:12 lw-andrewsmith