Skip to content

Commit

Permalink
[sc-29929] invalid multi oas config (#1046)
Browse files Browse the repository at this point in the history
* fix openapi crawler config

* Bump version
  • Loading branch information
elic-eon authored Nov 20, 2024
1 parent 81572b4 commit a42a0d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions metaphor/openapi/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ class OpenAPIRunConfig(BaseConfig):
def must_have_at_least_one_spec_config(self) -> "OpenAPIRunConfig":
must_set_at_least_one(self.__dict__, ["specs", "base_url"])

if "base_url" not in self.__dict__ and "specs" in self.__dict__:
if self.__dict__.get("base_url") is None and self.__dict__.get("specs"):
if not self.specs:
raise ValueError("Must have at least one spec")

if "base_url" in self.__dict__:
if self.__dict__.get("base_url"):
must_set_exactly_one(
self.__dict__, ["openapi_json_path", "openapi_json_url"]
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metaphor-connectors"
version = "0.14.158"
version = "0.14.159"
license = "Apache-2.0"
description = "A collection of Python-based 'connectors' that extract metadata from various sources to ingest into the Metaphor app."
authors = ["Metaphor <[email protected]>"]
Expand Down

0 comments on commit a42a0d6

Please sign in to comment.