Add logo & icon support to Manifest (#31131)
* Add logo & icon support to Manifest * Add URL validationpull/31296/head
parent
9795449d22
commit
c0bc4bb550
|
@ -244,6 +244,16 @@ class Integration:
|
||||||
"""Return Integration Quality Scale."""
|
"""Return Integration Quality Scale."""
|
||||||
return cast(str, self.manifest.get("quality_scale"))
|
return cast(str, self.manifest.get("quality_scale"))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def logo(self) -> Optional[str]:
|
||||||
|
"""Return Integration Logo."""
|
||||||
|
return cast(str, self.manifest.get("logo"))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def icon(self) -> Optional[str]:
|
||||||
|
"""Return Integration Icon."""
|
||||||
|
return cast(str, self.manifest.get("icon"))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_built_in(self) -> bool:
|
def is_built_in(self) -> bool:
|
||||||
"""Test if package is a built-in integration."""
|
"""Test if package is a built-in integration."""
|
||||||
|
|
|
@ -29,6 +29,8 @@ MANIFEST_SCHEMA = vol.Schema(
|
||||||
vol.Required("dependencies"): [str],
|
vol.Required("dependencies"): [str],
|
||||||
vol.Optional("after_dependencies"): [str],
|
vol.Optional("after_dependencies"): [str],
|
||||||
vol.Required("codeowners"): [str],
|
vol.Required("codeowners"): [str],
|
||||||
|
vol.Optional("logo"): vol.Url(), # pylint: disable=no-value-for-parameter
|
||||||
|
vol.Optional("icon"): vol.Url(), # pylint: disable=no-value-for-parameter
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue