anancarv/python-artifactory

Creating a local repository using LocalRepository object throws Pydantic validation errors

Closed this issue · 1 comments

Previously when creating a local repository using ArtifactoryRepository.create_repo(), a Local Respository object was expected as input. Creating a local repository in the latest version expects a LocalRepositoryResponse object rather than a LocalRepository object. Why is the response object expected as input here? Using a LocalRepository throws a Pydantic validation error. This was working in pyartifactory version 1.13.0

To Reproduce
Steps to reproduce the behavior:

  1. Get your artifactory instance
  2. Create a LocalRepository object
  3. Use create_repo using the LocalRepository object as input

Expected behavior
I would expect that a LocalRepository object would be expected as input here rather than a LocalRepositoryResponse object

Environment:

  • OS: Linux (Debian 11)
  • pyartifactory version: 2:1.0
  • Python version: 3.8

You're totally right. Thanks for pointing it out. The issue is being fixed in #149