Skip to content

[qt] Improve validation #7833

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.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions