Skip to content

[qt] Improve validation #7833

Open
Open
@MartinDelille

Description

@MartinDelille
Description

Validation is missing in Qt client.

Swagger-codegen version

HEAD

Swagger declaration file content or url

https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/test/resources/2_0/petstore.yaml

Command line used for generation
$ swagger-codegen generate -i ../api.yml -l qt5cpp
Steps to reproduce
  • Generate client
  • Instance Pet object without setting the name
  • See neither compilation nor execution error
Related issues/PRs

I discovered this issue after raising #7802

Suggest a fix/enhancement

A first step would be to add required parameter to the model constructor.

A second step would be to avoid property setter with pointer and add unsetter for optionnal field.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions