{"openapi":"3.1.0","info":{"title":"deepwire API","description":"REST API for the deepwire Spring Boot 4 sample application","contact":{"name":"deepwire","url":"https://deepwire.pl"},"license":{"name":"Apache 2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"version":"v1"},"servers":[{"url":"http://deepwire.pl","description":"Generated server url"}],"tags":[{"name":"Authentication","description":"User authentication endpoints"},{"name":"Articles","description":"Versioned Markdown articles; only the author can edit or delete"}],"paths":{"/api/articles/{articleId}":{"get":{"tags":["Articles"],"summary":"Get the current version of an article","operationId":"get","parameters":[{"name":"articleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ArticleResponse"}}}}}},"put":{"tags":["Articles"],"summary":"Edit own article; stores the change as a new version","operationId":"update","parameters":[{"name":"articleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ArticleResponse"}}}}}},"delete":{"tags":["Articles"],"summary":"Delete own article (soft delete)","operationId":"delete","parameters":[{"name":"articleId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"204":{"description":"No Content"}}}},"/api/auth/verify-email":{"post":{"tags":["Authentication"],"summary":"Verify email address","operationId":"verifyEmail","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyEmailRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/auth/reset-password":{"post":{"tags":["Authentication"],"summary":"Reset password with token","operationId":"resetPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/auth/register":{"post":{"tags":["Authentication"],"summary":"Register a new user","operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/auth/refresh":{"post":{"tags":["Authentication"],"summary":"Refresh access token","operationId":"refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/RefreshResponseDto"}}}}}}},"/api/auth/logout":{"post":{"tags":["Authentication"],"summary":"Revoke a refresh token","operationId":"logout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/auth/login":{"post":{"tags":["Authentication"],"summary":"Login and get JWT tokens","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}}}},"/api/auth/forgot-password":{"post":{"tags":["Authentication"],"summary":"Request password reset","operationId":"forgotPassword","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}},"/api/articles":{"get":{"tags":["Articles"],"summary":"List current versions of visible articles (plus the caller's hidden ones)","operationId":"list","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ArticleResponse"}}}}}}},"post":{"tags":["Articles"],"summary":"Create a new article (version 1)","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArticleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ArticleResponse"}}}}}}}},"components":{"schemas":{"ArticleRequest":{"type":"object","properties":{"menu":{"type":"string","maxLength":1023,"minLength":0},"title":{"type":"string","maxLength":255,"minLength":0},"lead":{"type":"string","maxLength":10000,"minLength":0},"content":{"type":"string","maxLength":200000,"minLength":0},"visible":{"type":"boolean"}},"required":["content","lead","menu","title"]},"ArticleResponse":{"type":"object","properties":{"articleId":{"type":"string","format":"uuid"},"version":{"type":"integer","format":"int32"},"menu":{"type":"string"},"menuPath":{"type":"array","items":{"type":"string"}},"title":{"type":"string"},"lead":{"type":"string"},"content":{"type":"string"},"visible":{"type":"boolean"},"author":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"VerifyEmailRequest":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"]},"ResetPasswordRequest":{"type":"object","properties":{"token":{"type":"string","minLength":1},"newPassword":{"type":"string","minLength":1}},"required":["newPassword","token"]},"RegisterRequest":{"type":"object","properties":{"login":{"type":"string","minLength":1},"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","minLength":1}},"required":["email","login","password"]},"RefreshRequest":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"]},"RefreshResponseDto":{"type":"object","properties":{"accessToken":{"type":"string"}}},"LoginRequest":{"type":"object","properties":{"login":{"type":"string","minLength":1},"password":{"type":"string","minLength":1}},"required":["login","password"]},"LoginResponseDto":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"expiresIn":{"type":"integer","format":"int64"},"user":{"$ref":"#/components/schemas/UserInfoDto"}}},"UserInfoDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"login":{"type":"string"},"email":{"type":"string"},"groups":{"type":"array","items":{"type":"string"},"uniqueItems":true},"permissions":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"ForgotPasswordRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1}},"required":["email"]}}}}