{"openapi":"3.1.0","info":{"title":"rankdespair","version":"0.1.0"},"paths":{"/healthz":{"get":{"summary":"Healthz","operationId":"healthz_healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/choice-sets":{"get":{"tags":["choice-sets"],"summary":"List All","operationId":"list_all_api_choice_sets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List All Api Choice Sets Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["choice-sets"],"summary":"Create","operationId":"create_api_choice_sets_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceSetIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/choice-sets/{slug}":{"get":{"tags":["choice-sets"],"summary":"Get","operationId":"get_api_choice_sets__slug__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["choice-sets"],"summary":"Update","operationId":"update_api_choice_sets__slug__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceSetPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceSetOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["choice-sets"],"summary":"Delete","operationId":"delete_api_choice_sets__slug__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Api Choice Sets  Slug  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/choice-sets/{cs_slug}/raters":{"post":{"tags":["raters"],"summary":"Create Rater","operationId":"create_rater_api_choice_sets__cs_slug__raters_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cs_slug","in":"path","required":true,"schema":{"type":"string","title":"Cs Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaterIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RaterOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["raters"],"summary":"List Raters","operationId":"list_raters_api_choice_sets__cs_slug__raters_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cs_slug","in":"path","required":true,"schema":{"type":"string","title":"Cs Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Raters Api Choice Sets  Cs Slug  Raters Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/choice-sets/{slug}/cards":{"post":{"tags":["cards"],"summary":"Create Or Upsert","operationId":"create_or_upsert_api_choice_sets__slug__cards_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["cards"],"summary":"List Cards","operationId":"list_cards_api_choice_sets__slug__cards_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"active","in":"query","required":false,"schema":{"type":"string","default":"true","title":"Active"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Cards Api Choice Sets  Slug  Cards Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/choice-sets/{slug}/cards/bulk":{"post":{"tags":["cards"],"summary":"Bulk","operationId":"bulk_api_choice_sets__slug__cards_bulk_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Bulk Api Choice Sets  Slug  Cards Bulk Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/cards/{card_id}":{"get":{"tags":["cards"],"summary":"Get Card","operationId":"get_card_api_cards__card_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["cards"],"summary":"Patch Card","operationId":"patch_card_api_cards__card_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"card_id","in":"path","required":true,"schema":{"type":"integer","title":"Card Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/choice-sets/{slug}/next-pair":{"get":{"tags":["votes"],"summary":"Next Pair","operationId":"next_pair_api_choice_sets__slug__next_pair_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"rater","in":"query","required":true,"schema":{"type":"string","title":"Rater"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Next Pair Api Choice Sets  Slug  Next Pair Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/choice-sets/{slug}/votes":{"post":{"tags":["votes"],"summary":"Post Vote","operationId":"post_vote_api_choice_sets__slug__votes_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Post Vote Api Choice Sets  Slug  Votes Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["rankings"],"summary":"Get Votes","operationId":"get_votes_api_choice_sets__slug__votes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"rater","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rater"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Votes Api Choice Sets  Slug  Votes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/choice-sets/{slug}/rankings":{"get":{"tags":["rankings"],"summary":"Get Rankings","operationId":"get_rankings_api_choice_sets__slug__rankings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"rater","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rater"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Rankings Api Choice Sets  Slug  Rankings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/images":{"post":{"tags":["images"],"summary":"Upload","operationId":"upload_api_images_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_images_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Upload Api Images Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"tags":["web"],"summary":"Landing","description":"Public landing page. If a valid admin cookie/header is present, also\nrender the choice-set list inline as a convenience.","operationId":"landing__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/admin":{"get":{"tags":["web"],"summary":"Admin Index","operationId":"admin_index_admin_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}]}},"/login":{"get":{"tags":["web"],"summary":"Login Form","operationId":"login_form_login_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}},"post":{"tags":["web"],"summary":"Login Submit","operationId":"login_submit_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_submit_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/logout":{"post":{"tags":["web"],"summary":"Logout","operationId":"logout_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{slug}/vote":{"get":{"tags":["web"],"summary":"Vote Page","operationId":"vote_page__slug__vote_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"rater","in":"query","required":true,"schema":{"type":"string","title":"Rater"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["web"],"summary":"Vote Submit","operationId":"vote_submit__slug__vote_post","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_vote_submit__slug__vote_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{slug}/rankings":{"get":{"tags":["web"],"summary":"Rankings Page","operationId":"rankings_page__slug__rankings_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_login_submit_login_post":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"Body_login_submit_login_post"},"Body_upload_api_images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_api_images_post"},"Body_vote_submit__slug__vote_post":{"properties":{"a_id":{"type":"integer","title":"A Id"},"b_id":{"type":"integer","title":"B Id"},"winner":{"type":"string","title":"Winner"},"rater":{"type":"string","title":"Rater"}},"type":"object","required":["a_id","b_id","winner","rater"],"title":"Body_vote_submit__slug__vote_post"},"BulkIn":{"properties":{"cards":{"items":{"$ref":"#/components/schemas/CardIn"},"type":"array","title":"Cards"}},"type":"object","required":["cards"],"title":"BulkIn"},"CardIn":{"properties":{"external_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Id"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"blurb":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Blurb"},"external_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Link"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["title"],"title":"CardIn"},"CardOut":{"properties":{"id":{"type":"integer","title":"Id"},"choice_set_id":{"type":"integer","title":"Choice Set Id"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"title":{"type":"string","title":"Title"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"blurb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blurb"},"external_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Link"},"active":{"type":"boolean","title":"Active"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","choice_set_id","external_id","title","image_url","blurb","external_link","active","created_at","updated_at"],"title":"CardOut"},"CardPatch":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"blurb":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Blurb"},"external_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Link"},"active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active"}},"type":"object","title":"CardPatch"},"ChoiceSetIn":{"properties":{"slug":{"type":"string","maxLength":120,"minLength":1,"pattern":"^[a-z0-9][a-z0-9-]*$","title":"Slug"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["slug","title"],"title":"ChoiceSetIn"},"ChoiceSetOut":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","slug","title","description","created_at"],"title":"ChoiceSetOut"},"ChoiceSetPatch":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ChoiceSetPatch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RaterIn":{"properties":{"slug":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-z0-9][a-z0-9-]*$","title":"Slug"},"display_name":{"type":"string","maxLength":120,"minLength":1,"title":"Display Name"}},"type":"object","required":["slug","display_name"],"title":"RaterIn"},"RaterOut":{"properties":{"id":{"type":"integer","title":"Id"},"choice_set_id":{"type":"integer","title":"Choice Set Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","choice_set_id","slug","display_name","created_at"],"title":"RaterOut"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VoteIn":{"properties":{"rater":{"type":"string","title":"Rater"},"a_id":{"type":"integer","title":"A Id"},"b_id":{"type":"integer","title":"B Id"},"winner_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Winner Id"}},"type":"object","required":["rater","a_id","b_id"],"title":"VoteIn"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}