Project

Profile

Help

Issue #3843

closed

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

Added by jsherril@redhat.com over 6 years ago. Updated over 4 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
API Bindings, Katello
Sprint:
Sprint 40
Quarter:

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.

Actions #1

Updated by jsherril@redhat.com over 6 years 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
Actions #2

Updated by CodeHeeler over 6 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 39
Actions #3

Updated by dkliban@redhat.com over 6 years ago

  • Sprint changed from Sprint 39 to Sprint 40
Actions #4

Updated by daviddavis over 6 years ago

  • Tags API Bindings added
Actions #5

Updated by daviddavis over 6 years 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?

Actions #6

Updated by jsherril@redhat.com over 6 years ago

  • Tags Katello-P1 added
Actions #7

Updated by daviddavis over 6 years 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.

Actions #8

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #9

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)
Actions #10

Updated by ggainey over 4 years ago

  • Tags Katello added
  • Tags deleted (Katello-P1)

Also available in: Atom PDF