open-traffic-generator / openapiart

OpenAPI artifact generator
MIT License
6 stars 4 forks source link

schema which has required choices are throwing required validation error at time of initialization #407

Closed Vibaswan closed 1 year ago

Vibaswan commented 1 year ago

Version information openapiart 0.2.13

Describe the bug throws exception at time of creating schema object with required validation error for choices

To Reproduce I am getting this error when try to initiate control_state (snap_api.control_state()) in python (OTG branch https://github.com/open-traffic-generator/models/tree/control-api-refactor )

TypeError: Cannot set required property choice as None

Expected behavior The exception should only be thrown at the user is setting with no value or at the time of validation. Not while user is trying to create the schema object