Adjust validation to allow empty values 08/188908/13
authorAlexander Mazuruk <a.mazuruk@samsung.com>
Mon, 10 Sep 2018 18:37:07 +0000 (20:37 +0200)
committerPawel Wieczorek <p.wieczorek2@samsung.com>
Mon, 1 Oct 2018 14:34:19 +0000 (16:34 +0200)
commitac0148f000301c83f4513df338aae103e6cd86c0
treeb1efc5a927cd76bab46a29232ba92d4bc269f1bd
parent764f5f37e7b45774673fd43c2fd18b95fa1fcca1
Adjust validation to allow empty values

After user input is marshalled, swagger server validates data. When
input data is enum, it was strictly validated against enum values.
There is no empty value thus user receives an error and is forced to
always set enum fields in e.g. JobFilter.Status.

Modifying generated code is a bad practice but it was not possible (to
the best of the authors knowledge) to achieve this by simply modyfing
swagger.yml and re-generating models.

Possible solutions:
- adding and using new type (which would satisfy swaggers interfaces)
- customizing code generation

Change-Id: Ifc381a12936277db9938032dadb31fe865e84ad1
Signed-off-by: Alexander Mazuruk <a.mazuruk@samsung.com>
artifact_sort_by.go
artifact_status.go
artifact_type.go
job_sort_by.go
job_status.go
sort_order.go