Project

Profile

Help

Issue #3843

Server translates null to "" for repo description, breaking api bindings

Added by jsherril@redhat.com over 1 year ago. Updated 6 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
API Bindings, Katello-P1
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:
Sprint 40

Description

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.

History

#1 Updated by jsherril@redhat.com over 1 year ago

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.'
      end

#2 Updated by CodeHeeler over 1 year ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 39

#3 Updated by dkliban@redhat.com over 1 year ago

  • Sprint changed from Sprint 39 to Sprint 40

#4 Updated by daviddavis over 1 year ago

  • Tags API Bindings added

#5 Updated by daviddavis over 1 year ago

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?

#6 Updated by jsherril@redhat.com over 1 year ago

  • Tags Katello-P1 added

#7 Updated by daviddavis about 1 year ago

  • 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.

#8 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#9 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF