Skip to content
Merged
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 src/gete/schema/connection.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,12 @@
"minLength": 1
},
"verified": {
"description": "Where an authorization through this connection has been taken end to end and seen to work. Nothing follows from it: gete checks nothing against it and behaves no differently, but `gete connections` prints it, so a reader can tell what was observed from what a provider's metadata merely promises.",
"type": "object",
"additionalProperties": false,
"properties": {
"gemini_enterprise": {
"description": "The date an authorization was taken through Gemini Enterprise: consent screen, code exchange, and the token used against the service. Absent until one has been.",
"type": "string",
"format": "date"
}
Expand Down
11 changes: 10 additions & 1 deletion tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from gete.declaration import read_yaml
from gete.errors import DeclarationError
from gete.schema import validate_document
from gete.schema import load_schema, validate_document

GETE: dict[str, Any] = {
"version": 1,
Expand Down Expand Up @@ -423,6 +423,15 @@ def test_connection_rejects_wildcards_plain_http_and_empty_scope_text(
validate_document("connection", {**CONNECTION, **patch}, source="c.yaml")


def test_the_schema_says_what_a_verified_date_records_and_what_follows() -> None:
"""No behaviour follows from the field, so a reader who meets it has only
the schema to learn from: what the date stands for, and that gete does
nothing with it."""
verified = load_schema("connection")["properties"]["verified"]
assert "description" in verified
assert "description" in verified["properties"]["gemini_enterprise"]


def test_connection_messages_declare_the_reauthorization_text() -> None:
"""The prompt is for end users; empty text would show them nothing."""
validate_document(
Expand Down