Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions interfaces/kubeflow_dashboard_links/interface/v0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ The requirer specifies zero or more sidebar items in the required format.

#### Example

The `dashboard_links` key might contain the following as a JSON-encoded string:

```json
[
{
Expand Down
20 changes: 13 additions & 7 deletions interfaces/kubeflow_dashboard_links/interface/v0/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"""This file defines the schemas for the provider and requirer sides of the kubeflow-dashboard-links interface.

Examples:
RequirerSchema:
Requirer:
unit: <empty>
app: [
app: {
"dashboard_links": '[
{
"text": "Some link text",
"link": "/some-relative-link",
Expand All @@ -14,10 +15,10 @@
"icon": "assessment",
"desc": "link description"
}
]
]'
}
"""

from interface_tester.schema_base import DataBagSchema
from pydantic import BaseModel


Expand Down Expand Up @@ -45,7 +46,12 @@ class DashboardItem(BaseModel):
desc: str = ""


class RequirerSchema(DataBagSchema):
"""Requirer schema for Ingress."""
class RequirerAppData(BaseModel):
"""The requirer's application databag."""

app: list[DashboardItem]
dashboard_links: list[DashboardItem]


ProviderAppData = None
ProviderUnitData = None
RequirerUnitData = None
Loading