{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["links"],"summary":"Generate Short Url","operationId":"generate_short_url__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateShortUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateShortUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/batch":{"post":{"tags":["links"],"summary":"Batch Generate Short Urls","description":"Generates batch of short urls in batches of size 20. (semi arbitrary)","operationId":"batch_generate_short_urls_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGenerateShortUrlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchGenerateShortUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/{short_url_code}":{"get":{"tags":["links"],"summary":"Redirect To Original","operationId":"redirect_to_original__short_url_code__get","parameters":[{"name":"short_url_code","in":"path","required":true,"schema":{"type":"string","title":"Short Url Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BatchGenerateShortUrlRequest":{"properties":{"urls":{"items":{"type":"string"},"type":"array","title":"Urls"},"user_id":{"type":"string","title":"User Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["urls","user_id"],"title":"BatchGenerateShortUrlRequest"},"BatchGenerateShortUrlResponse":{"properties":{"short_urls":{"items":{"type":"string"},"type":"array","title":"Short Urls"}},"type":"object","required":["short_urls"],"title":"BatchGenerateShortUrlResponse"},"GenerateShortUrlRequest":{"properties":{"url":{"type":"string","title":"Url"},"user_id":{"type":"string","title":"User Id"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["url","user_id"],"title":"GenerateShortUrlRequest"},"GenerateShortUrlResponse":{"properties":{"short_url":{"type":"string","title":"Short Url"}},"type":"object","required":["short_url"],"title":"GenerateShortUrlResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"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"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}