Server translates null to "" for repo description, breaking api bindings
CLOSED - WORKSFORME
API Bindings, Katello-P1
On pulp 3, Using the generated swagger bindings, i was unable to fetch my repositories, throwing:
ArgumentError: invalid value for "description", the character length must be great than or equal to 1.
The problem was that my repositories had a 'null' description, but the api is not returning null, its returning empty string (""). There seems to be some validation on the model side of the apipie bindings that is getting tripped up on this.
The client side check that its doing is:
if !description.nil? && description.to_s.length < 1
fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
- Triaged changed from No to Yes
- Sprint set to Sprint 39
- Sprint changed from Sprint 39 to Sprint 40
I was unable to reproduce. Looking at the code, I think this might've been fixed in #3755. Can you regenerate the bindings and test again?
- Status changed from NEW to CLOSED - WORKSFORME
Closing this as WORKSFORME to get it off the sprint. @jsherrill please let me know if you can reproduce this and I'll reopen it. Thanks.
- Sprint/Milestone set to 3.0
Please register to edit this issue
Also available in: Atom