11package no.nav.klage.document.api
22
3- import io.swagger.annotations.Api
4- import io.swagger.annotations.ApiOperation
3+ import io.swagger.v3.oas. annotations.Operation
4+ import io.swagger.v3.oas. annotations.tags.Tag
55import no.nav.klage.document.api.views.CommentInput
66import no.nav.klage.document.api.views.CommentView
77import no.nav.klage.document.api.views.DocumentView
@@ -23,7 +23,7 @@ import java.util.*
2323
2424@RestController
2525@ProtectedWithClaims(issuer = ISSUER_AAD )
26- @Api(tags = [ " kabal-smart-editor-api" ] )
26+ @Tag(name = " kabal-smart-editor-api" )
2727@RequestMapping(" /documents" )
2828class DocumentController (
2929 private val documentService : DocumentService ,
@@ -37,9 +37,9 @@ class DocumentController(
3737 private val secureLogger = getSecureLogger()
3838 }
3939
40- @ApiOperation (
41- value = " Create document" ,
42- notes = " Create document"
40+ @Operation (
41+ summary = " Create document" ,
42+ description = " Create document"
4343 )
4444 @PostMapping(" " )
4545 fun createDocument (
@@ -50,9 +50,9 @@ class DocumentController(
5050 return mapToDocumentView(documentService.createDocument(json))
5151 }
5252
53- @ApiOperation (
54- value = " Update document" ,
55- notes = " Update document"
53+ @Operation (
54+ summary = " Update document" ,
55+ description = " Update document"
5656 )
5757 @PutMapping(" /{documentId}" )
5858 fun updateDocument (
@@ -64,29 +64,29 @@ class DocumentController(
6464 return mapToDocumentView(documentService.updateDocument(documentId, json))
6565 }
6666
67- @ApiOperation (
68- value = " Get document" ,
69- notes = " Get document"
67+ @Operation (
68+ summary = " Get document" ,
69+ description = " Get document"
7070 )
7171 @GetMapping(" /{documentId}" )
7272 fun getDocument (@PathVariable(" documentId" ) documentId : UUID ): DocumentView {
7373 log(" getDocument called with id $documentId " )
7474 return mapToDocumentView(documentService.getDocument(documentId))
7575 }
7676
77- @ApiOperation (
78- value = " Delete document" ,
79- notes = " Delete document"
77+ @Operation (
78+ summary = " Delete document" ,
79+ description = " Delete document"
8080 )
8181 @DeleteMapping(" /{documentId}" )
8282 fun deleteDocument (@PathVariable(" documentId" ) documentId : UUID ) {
8383 log(" deleteDocument called with id $documentId " )
8484 documentService.deleteDocument(documentId)
8585 }
8686
87- @ApiOperation (
88- value = " Create comment for a given document" ,
89- notes = " Create comment for a given document"
87+ @Operation (
88+ summary = " Create comment for a given document" ,
89+ description = " Create comment for a given document"
9090 )
9191 @PostMapping(" /{documentId}/comments" )
9292 fun createComment (
@@ -104,9 +104,9 @@ class DocumentController(
104104 )
105105 }
106106
107- @ApiOperation (
108- value = " Get all comments for a given document" ,
109- notes = " Get all comments for a given document"
107+ @Operation (
108+ summary = " Get all comments for a given document" ,
109+ description = " Get all comments for a given document"
110110 )
111111 @GetMapping(" /{documentId}/comments" )
112112 fun getAllCommentsWithPossibleThreads (
@@ -116,9 +116,9 @@ class DocumentController(
116116 return commentService.getComments(documentId).map { mapCommentToView(it) }
117117 }
118118
119- @ApiOperation (
120- value = " Reply to a given comment" ,
121- notes = " Reply to a given comment"
119+ @Operation (
120+ summary = " Reply to a given comment" ,
121+ description = " Reply to a given comment"
122122 )
123123 @PostMapping(" /{documentId}/comments/{commentId}/replies" )
124124 fun replyToComment (
@@ -138,9 +138,9 @@ class DocumentController(
138138 )
139139 }
140140
141- @ApiOperation (
142- value = " Get a given comment" ,
143- notes = " Get a given comment"
141+ @Operation (
142+ summary = " Get a given comment" ,
143+ description = " Get a given comment"
144144 )
145145 @GetMapping(" /{documentId}/comments/{commentId}" )
146146 fun getCommentWithPossibleThread (
@@ -151,9 +151,9 @@ class DocumentController(
151151 return mapCommentToView(commentService.getComment(commentId = commentId))
152152 }
153153
154- @ApiOperation (
155- value = " Generer PDF" ,
156- notes = " Generer PDF"
154+ @Operation (
155+ summary = " Generer PDF" ,
156+ description = " Generer PDF"
157157 )
158158 @ResponseBody
159159 @GetMapping(" /{documentId}/pdf" )
0 commit comments