26 lines
984 B
Python
26 lines
984 B
Python
# retoor <retoor@molodetz.nl>
|
|||
|
|
from molodetz.docs_api.registry import endpoint, field
|
||
|
|
|
||
|
|
GROUP = {
|
||
|
|
"slug": "join",
|
||
|
|
"title": "Join",
|
||
|
|
"description": "Sign up to write along. Stored for administrators, never public.",
|
||
|
|
"endpoints": [
|
||
|
|
endpoint("GET", "/join", "Join form", sample={"submitted": False}),
|
||
|
|
endpoint(
|
||
|
|
"POST",
|
||
|
|
"/join",
|
||
|
|
"I'm in",
|
||
|
|
"Stores a join request: name, contact and an optional repo link.",
|
||
|
|
fields=[
|
||
|
|
field("name", required=True, example="Ada"),
|
||
|
|
field("contact", required=True, example="ada@example.com"),
|
||
|
|
field("repo_url", example="https://git.example.com/ada"),
|
||
|
|
field("message", example="I write about finishing things."),
|
||
|
|
],
|
||
|
|
sample={"ok": True, "redirect": "/join?ok=1", "data": {"uid": "0190..."}},
|
||
|
|
probe_body={"name": "Probe", "contact": "probe@example.com"},
|
||
|
|
),
|
||
|
|
],
|
||
|
|
}
|