{"openapi":"3.1.0","info":{"title":"SnipURL","version":"0.1.0"},"paths":{"/shorten":{"post":{"summary":"Create Short Url","operationId":"create_short_url_shorten_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/{code}":{"head":{"summary":"Redirect To Url","operationId":"redirect_to_url__code__head","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Redirect To Url","operationId":"redirect_to_url__code__head","parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/{code}":{"get":{"summary":"Get Stats","operationId":"get_stats_stats__code__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","title":"Code"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ShortenRequest":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url"}},"type":"object","required":["url"],"title":"ShortenRequest"},"ShortenResponse":{"properties":{"code":{"type":"string","title":"Code"},"short_url":{"type":"string","title":"Short Url"}},"type":"object","required":["code","short_url"],"title":"ShortenResponse"},"StatsResponse":{"properties":{"code":{"type":"string","title":"Code"},"long_url":{"type":"string","title":"Long Url"},"clicks":{"type":"integer","title":"Clicks"}},"type":"object","required":["code","long_url","clicks"],"title":"StatsResponse"},"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":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key"}}}}