Project

Profile

Help

Issue #3966

closed

Repository Version OpenAPI response schema is wrong

Added by dkliban@redhat.com about 6 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:

Description

The OpenAPI schema for the response of Repository Version contains 2 required fields: 'add_content_units' and 'remove_content_units'. The live docs are wrong and the generated bindings produce the following traceback:

repo_version = api.repositories_versions_read(repository.latest_version_href)

Traceback (most recent call last):
  File "devel/pulp3_python_client_example/test_bindings.py", line 46, in <module>
    repo_version = api.repositories_versions_read(repository.latest_version_href)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api/pulp_api.py", line 6760, in repositories_versions_read
    (data) = self.repositories_versions_read_with_http_info(repository_version_href, **kwargs)  # noqa: E501
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api/pulp_api.py", line 6838, in repositories_versions_read_with_http_info
    collection_formats=collection_formats)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api_client.py", line 322, in call_api
    _preload_content, _request_timeout)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api_client.py", line 161, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api_client.py", line 233, in deserialize
    return self.__deserialize(data, response_type)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api_client.py", line 272, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/api_client.py", line 615, in __deserialize_model
    instance = klass(**kwargs)
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/models/repository_version.py", line 93, in __init__
    self.add_content_units = add_content_units
  File "/home/vagrant/.virtualenvs/pulp/lib64/python3.6/site-packages/my_pulp3_client/models/repository_version.py", line 291, in add_content_units
    raise ValueError("Invalid value for `add_content_units`, must not be `None`")  # noqa: E501
ValueError: Invalid value for `add_content_units`, must not be `None`

Also available in: Atom PDF