Skip to content

optionalProperties aren't optional in Python constructors #94

@v-p-b

Description

@v-p-b

The generated Python code constructors always require all properties (both optional and not) to be present as arguments, otherwise a TypeError is raised. This makes classes are hard to use because you have to always specify properties that are usually not relevant (this is a likely reason why they are optional).

AFAICT generated Java classes offer zero-argument constructors for the same type definitions.

I expect to have constructors that don't require optional arguments to be provided for object instantiation in all languages.

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