Skip to content

Commit

Permalink
add get method
Browse files Browse the repository at this point in the history
  • Loading branch information
seakayone committed Jul 5, 2024
1 parent 8eb4c76 commit ccb621d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ final case class ListsEndpointsV2(private val base: BaseEndpoints) {
.description("The iri to a list.")
.example(ListIri.unsafeFrom("http://rdfh.ch/lists/0001/" + UuidUtil.makeRandomBase64EncodedUuid))

val getV2Lists = base.withUserEndpoint
val getV2Lists = base.withUserEndpoint.get

Check warning on line 37 in webapi/src/main/scala/org/knora/webapi/slice/lists/api/ListsEndpointsV2.scala

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

webapi/src/main/scala/org/knora/webapi/slice/lists/api/ListsEndpointsV2.scala#L37

Usage of get on optional type.
.in("v2" / "lists" / listIri)
.in(ApiV2.Inputs.formatOptions)
.out(stringBody.example(Examples.listGetResponseV2.format(FormatOptions.default, Examples.appConfig)))
.description("Returns a list (a graph with all list nodes).")

val getV2Node = base.withUserEndpoint
val getV2Node = base.withUserEndpoint.get

Check warning on line 43 in webapi/src/main/scala/org/knora/webapi/slice/lists/api/ListsEndpointsV2.scala

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

webapi/src/main/scala/org/knora/webapi/slice/lists/api/ListsEndpointsV2.scala#L43

Usage of get on optional type.
.in("v2" / "node" / listIri)
.in(ApiV2.Inputs.formatOptions)
.out(stringBody.example(Examples.nodeGetResponseV2.format(FormatOptions.default, Examples.appConfig)))
Expand Down

0 comments on commit ccb621d

Please sign in to comment.