SearchEnvelopeDto

com.worxbend.codeberg4s.wire.SearchEnvelopeDto
See theSearchEnvelopeDto companion object
final case class SearchEnvelopeDto[A](ok: Option[Boolean], data: Vector[A])

The wrapper Forgejo's search endpoints put around their results.

GET /repos/search and GET /users/search do not return the bare array every other list endpoint returns. They return {"data": [...], "ok": true} — verified live in docs/HAZARDS.md §3 and captured in golden/repository/search.json and golden/user/user-search.json. A client that decodes a search response as an array fails at runtime, on an endpoint that looks exactly like the ones that work.

ok has been true on every capture. It is carried rather than asserted on, because nothing documents what a false would mean and inventing a meaning for it here would be worse than passing it along.

Value parameters

data

the results; empty when data is absent, null, or not an array

ok

the ok flag, when present

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product