Rebrand the Rust client crate (coven/ → hh/, package+binary "hack-house"), README, CLI strings, and branch (coven → hack-house). Gitea repo renamed cmd-chat → hack-house to match. Crypto/server logic unchanged; selftest + golden-vector test still green, binary is now `hack-house`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
57 lines
899 B
Python
57 lines
899 B
Python
from sanic_ext.extensions.openapi.autodoc import YamlStyleParametersParser
|
|
|
|
|
|
tests = []
|
|
|
|
_ = ""
|
|
|
|
tests.append({"doc": _, "expects": {}})
|
|
|
|
_ = "one line docstring"
|
|
|
|
tests.append({"doc": _, "expects": {"summary": "one line docstring"}})
|
|
|
|
_ = """
|
|
first line
|
|
|
|
more lines
|
|
"""
|
|
|
|
tests.append(
|
|
{
|
|
"doc": _,
|
|
"expects": {"summary": "first line", "description": "more lines"},
|
|
}
|
|
)
|
|
|
|
|
|
_ = """
|
|
first line
|
|
|
|
more lines
|
|
|
|
openapi:
|
|
---
|
|
responses:
|
|
'200':
|
|
description: OK
|
|
"""
|
|
|
|
tests.append(
|
|
{
|
|
"doc": _,
|
|
"expects": {
|
|
"summary": "first line",
|
|
"description": "more lines",
|
|
"responses": {"200": {"description": "OK"}},
|
|
},
|
|
}
|
|
)
|
|
|
|
|
|
def test_autodoc():
|
|
for t in tests:
|
|
parser = YamlStyleParametersParser(t["doc"])
|
|
assert parser.to_openAPI_2() == t["expects"]
|
|
assert parser.to_openAPI_3() == t["expects"]
|