Peder Hovdan Andresen

Results 29 issues of Peder Hovdan Andresen

## Rationale It is currently possible to pass dicts to methods that create or update resources. This is not explained anywhere, and is basically an implementation detail. Being able to...

In auto-generated model: https://github.com/pederhan/harborapi/blob/1b1a25089b6040dca1057fa1fcd57f02bfc4e8dd/harborapi/models/_models.py#L954-L962 Our overrides: https://github.com/pederhan/harborapi/blob/1b1a25089b6040dca1057fa1fcd57f02bfc4e8dd/harborapi/models/models.py#L555-L559 This should be fixed in the upstream spec, so we can remove this override.

API Spec

The name of this field is misspelled in the official Harbor [swagger schema](https://github.com/goharbor/harbor/blob/a9a67462dc1900901d874b5551db981a0e4ad711/api/v2.0/swagger.yaml#L7715-L7717). This misspelling is also reflected in our auto generated models: https://github.com/pederhan/harborapi/blob/d4e07cec652f39205a707a7bd876bd70e434df9d/harborapi/models/models.py#L748-L751 ## Proposed solution The field name...

bug
API Spec

This parameter will emit a deprecation warning for now, but in version 1.0.0 it should be disabled. It will be removed altogether in a future major release.

Concatenating URLs manually is pretty silly, when there are utility functions for this in the standard library. https://github.com/pederhan/harborapi/blob/5ce05adc3531f203725222c4e3ffacd03a505582/harborapi/client.py#L3607-L3612 We should replace this with a utility function that all HTTP methods...

enhancement
good first issue

Currently, the `bool_converter` validator is configured as a `@root_validator`, meaning it does not trigger on field assignments, only on model instantiation. https://github.com/pederhan/harborapi/blob/27900ab5e98c6dc2b7dbb04212414f4edc8d988e/harborapi/models/base.py#L69-L78 Even if we add `validate_assignments = True` to...

`harborapi` is first and foremost and async package, and as such the main client implementation shouldn't need "Async" tacked onto its name. Having the names `HarborAsyncClient` and `HarborSyncClient` is a...

enhancement

As of now, Hypothesis does not seem to guarantee that it actually tests the type for Pydantic model fields with type `Optional[T]` with default value `None`. It seems to test...

bug
enhancement
tests

The unit tests for the endpoints currently don't test whether or not the URL's query parameters contain the correct/expected values. This should be implemented in a way that is reusable...

enhancement
tests

The two functions `ext.api.get_artifacts` and `ext.api.get_artifact_vulnerabilities` do more or less the same thing, except the latter also fetches the Harbor vulnerability report for the artifacts and populates the `report` field...