Ask a Question
Back to All

Rendered code is not working well for a nullable object


I'm using OpenAPI 3.0

I have a nullable object reminder_settings wich is composed of 2 fields that are required if reminder_setting is set

So you can call the endpoint without having to set reminder_settings. But if you do so, you have to fill the 2 fields (interval_in_days and max_occurrences)

  • interval_in_days is an enum
  • max_occurrencesis integer

When i load my documentation page, generated code is not working well since it already fills interval_in_days whereas it shouldn't because the reminder_settings is nullable.

And since both fields must be filled when reminder_settingsis created it throws an error

Expected behavior: the reminder_settingsjson should not be present by default on generated code since it's nullable

How can i fix my problem ?

Thank you