Skip to content

Generated code has duplicate constructor for differently constrained same-type property #128

Description

@robinp

For example

110246           "image_url": {                                                        
110247             "description": "Image for this product. Included in the checkout and on some customer documents.",
110248             "oneOf": [                                                          
110249               {                                                                 
110250                 "type": "string",                                               
110251                 "minLength": 0,                                                 
110252                 "maxLength": 0                                                  
110253               },                                                                
110254               {                                                                 
110255                 "type": "string",                                               
110256                 "format": "uri",                                                
110257                 "minLength": 1                                                  
110258               }                                                                 
110259             ],                                                                  
110260             "nullable": true                                                    
110261           },                       

there are two string types allowed, with different restrictions - which, unless validation is performed, which I think is not, should not make a difference. So maybe collapsing the two (identical) generated constructors into a single would suffice to fix this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions