com.worxbend.codeberg4s.repositories.gitdata.wire

Members list

Type members

Classlikes

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class AnnotatedTagDto(tag: Option[String], sha: Option[String], obj: Option[GitObjectDto], message: Option[String], tagger: Option[GitIdentityDto], verification: Option[VerificationDto], archiveDownloadCount: Option[ArchiveDownloadCountDto], url: Option[String])

Forgejo's AnnotatedTag model, field for field.

Forgejo's AnnotatedTag model, field for field.

'''Derived from spec/swagger.v1.json, not from a capture.''' No golden fixture covers GET /git/tags/{sha}, so these eight keys are the spec's. Three of the nested objects are the repository wave's DTOs, reused rather than re-declared: tagger is a CommitUser and therefore a com.worxbend.codeberg4s.repositories.wire.GitIdentityDto, verification is the same PayloadCommitVerification a commit carries, and archive_download_count is the same object a tag carries.

Value parameters

archiveDownloadCount

the archive_download_count key

message

the message key: the annotation

obj

the object key, renamed because object is a Scala keyword

sha

the sha key: the id of the tag object itself, not of the commit

tag

the tag key: the short tag name

tagger

the tagger key

url

the url key

verification

the verification key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class CombinedStatusDto(sha: Option[String], state: Option[String], totalCount: Option[Long], statuses: Vector[CommitStatusDto], repository: Option[RepositoryDto], commitUrl: Option[String], url: Option[String])

Forgejo's CombinedStatus model, field for field.

Forgejo's CombinedStatus model, field for field.

'''Derived from spec/swagger.v1.json, not from a capture.''' repository is the same Repository object the repository endpoints return, so com.worxbend.codeberg4s.repositories.wire.RepositoryDto is reused.

Value parameters

commitUrl

the commit_url key

repository

the repository key

sha

the sha key: the commit the request's ref resolved to

state

the state key: the instance's reduction of the individual verdicts

statuses

the statuses key

totalCount

the total_count key

url

the url key

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class CommitStatusDto(id: Option[Long], status: Option[String], context: Option[String], description: Option[String], targetUrl: Option[String], creator: Option[UserDto], createdAt: Option[String], updatedAt: Option[String], url: Option[String])

Forgejo's CommitStatus model, field for field.

Forgejo's CommitStatus model, field for field.

'''Derived from spec/swagger.v1.json, not from a capture.''' Note that the wire spells the verdict status while the combined-status envelope spells the same thing state; both are read here and by CombinedStatusDto respectively, and the domain calls both state.

Value parameters

context

the context key: the check's name for itself

createdAt

the created_at key as a raw string

creator

the creator key

description

the description key

id

the id key

status

the status key: the verdict

targetUrl

the target_url key

updatedAt

the updated_at key as a raw string

url

the url key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object CompareDto

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
CompareDto.type
final case class CompareDto(totalCommits: Option[Long], commits: Vector[CommitDto], files: Vector[CommitAffectedFileDto])

Forgejo's Compare model — three keys, all of them arrays or counts.

Forgejo's Compare model — three keys, all of them arrays or counts.

'''Derived from spec/swagger.v1.json, not from a capture.''' Both nested arrays are the repository wave's models: commits holds the same Commit objects the commit listing returns and files the same CommitAffectedFiles.

Value parameters

commits

the commits key

files

the files key

totalCommits

the total_commits key: the instance's count of the whole difference, which is not commits.size when the comparison was truncated

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class EditorConfigDto(values: Map[String, String])

The body of GET /repos/{owner}/{repo}/editorconfig/{filepath} — a bare object of property names to values.

The body of GET /repos/{owner}/{repo}/editorconfig/{filepath} — a bare object of property names to values.

'''Derived from spec/swagger.v1.json, not from a capture.''' The spec declares the response as an object with additionalProperties: {type: string} and no named property at all, so there is nothing here to enumerate and the DTO is a map.

==Why the values are rendered rather than required to be strings==

EditorConfig is a text format and the spec types every value as a string, but a JSON encoder that knows indent_size is a number has every reason to send 4 rather than "4". Refusing that would lose the property; so would silently dropping it. A JSON number or boolean is therefore rendered back to the text it stands for, and only a value that is a structure — an array, an object, or null — is dropped, because those have no text form an EditorConfig consumer could use.

A whole number renders without a fractional part. 4 arrives as a JsonValue.Int64 and needs no help, but an instance that sends 4.0 — legal JSON for the same quantity — arrives as a JsonValue.Decimal that would read as "4.0" if it were rendered naively, and indent_size = 4.0 is not a setting any EditorConfig consumer honours. Dropping the fractional part when there is nothing in it is the one piece of arithmetic in this file.

Value parameters

values

the properties, keyed as the instance named them

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object FileCommitDto

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class FileCommitDto(sha: Option[String], message: Option[String], author: Option[GitIdentityDto], committer: Option[GitIdentityDto], tree: Option[CommitMetaDto], parents: Vector[CommitMetaDto], created: Option[String], url: Option[String], htmlUrl: Option[String])

Forgejo's FileCommitResponse — the commit an editing endpoint reports it wrote.

Forgejo's FileCommitResponse — the commit an editing endpoint reports it wrote.

'''Derived from spec/swagger.v1.json, not from a capture.''' author and committer are CommitUser objects and therefore com.worxbend.codeberg4s.repositories.wire.GitIdentityDtos; tree and every element of parents are CommitMeta objects and therefore com.worxbend.codeberg4s.repositories.wire.CommitMetaDtos.

Value parameters

author

the author key

committer

the committer key

created

the created key as a raw string

htmlUrl

the html_url key

message

the message key

parents

the parents key

sha

the sha key

tree

the tree key

url

the url key

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FileResponseDto(commit: Option[FileCommitDto], content: Option[ContentEntryDto], verification: Option[VerificationDto])

Forgejo's FileResponse — what POST /repos/{owner}/{repo}/diffpatch answers with.

Forgejo's FileResponse — what POST /repos/{owner}/{repo}/diffpatch answers with.

'''Derived from spec/swagger.v1.json, not from a capture.''' content is the same ContentsResponse the contents endpoint returns and verification the same PayloadCommitVerification a commit carries, so both are the repository wave's DTOs rather than new ones.

Value parameters

commit

the commit key

content

the content key, absent when the operation touched no single file

verification

the verification key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class GitBlobDto(content: Option[String], encoding: Option[String], sha: Option[String], size: Option[Long], url: Option[String])

Forgejo's GitBlob model, field for field.

Forgejo's GitBlob model, field for field.

'''Derived from spec/swagger.v1.json, not from a capture.''' No golden fixture exists for the blob endpoints, so the five keys below are the five the pinned specification declares and nothing here asserts what a live instance actually sends. Every field is optional, as rule 2 of com.worxbend.codeberg4s.codec.WireConventions requires and as docs/HAZARDS.md §1 justifies.

Value parameters

content

the content key: the blob's bytes, encoded

encoding

the encoding key, which Forgejo populates alongside content

sha

the sha key: the blob's object id

size

the size key, in bytes

url

the url key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
GitBlobDto.type
final case class GitEntryDto(path: Option[String], mode: Option[String], entryType: Option[String], size: Option[Long], sha: Option[String], url: Option[String])

Forgejo's GitEntry — one element of a tree listing's tree array.

Forgejo's GitEntry — one element of a tree listing's tree array.

'''Derived from spec/swagger.v1.json, not from a capture.''' The tree endpoint has no golden fixture; these six keys are the spec's.

Value parameters

entryType

the type key, renamed because type is a Scala keyword

mode

the mode key: the octal file mode as text, leading zero included

path

the path key, relative to the tree that was requested

sha

the sha key: the id of the entry's own object

size

the size key, in bytes; 0 for a tree

url

the url key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class GitObjectDto(sha: Option[String], objectType: Option[String], url: Option[String])

Forgejo's GitObject, and its identical twin AnnotatedTagObject.

Forgejo's GitObject, and its identical twin AnnotatedTagObject.

'''Derived from spec/swagger.v1.json, not from a capture.''' The two definitions declare the same three keys with the same types and differ only in name, so one DTO reads both — inventing a second would be the duplication docs/LEDGER.md forbids, and the domain models them as one com.worxbend.codeberg4s.repositories.gitdata.GitObjectRef for the same reason.

Value parameters

objectType

the type key, renamed because type is a Scala keyword

sha

the sha key

url

the url key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class GitTreeDto(sha: Option[String], url: Option[String], entries: Vector[GitEntryDto], page: Option[Long], totalCount: Option[Long], truncated: Option[Boolean])

Forgejo's GitTreeResponse — the envelope GET /repos/{owner}/{repo}/git/trees/{sha} wraps its entries in.

Forgejo's GitTreeResponse — the envelope GET /repos/{owner}/{repo}/git/trees/{sha} wraps its entries in.

'''Derived from spec/swagger.v1.json, not from a capture.''' The six keys are the spec's.

==Why the envelope's own paging fields are not converted==

page, total_count and truncated describe the window, and this library assembles a window from the response's Link header and from nothing else — see com.worxbend.codeberg4s.core.Pages and docs/HAZARDS.md §5. Keeping them here, unconverted, records what the wire carries without letting a second end-of-collection test into the library: truncated is the body's version of exactly the claim items.size makes, and the reason that claim is refused is that Forgejo clamps a requested limit while echoing it back.

Value parameters

entries

the tree key

page

the page key, as the instance echoes it

sha

the sha key: the tree that was listed

totalCount

the total_count key

truncated

the truncated key

url

the url key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
GitTreeDto.type
object NoteDto

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
NoteDto.type
final case class NoteDto(message: Option[String], commit: Option[CommitDto])

Forgejo's Note model — two keys, a message and the commit it hangs off.

Forgejo's Note model — two keys, a message and the commit it hangs off.

'''Derived from spec/swagger.v1.json, not from a capture.''' commit is the same Commit object the commit endpoints return, so com.worxbend.codeberg4s.repositories.wire.CommitDto is reused rather than reduced.

Value parameters

commit

the commit key

message

the message key

Attributes

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

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class ReferenceDto(ref: Option[String], url: Option[String], obj: Option[GitObjectDto])

Forgejo's Reference model, field for field.

Forgejo's Reference model, field for field.

'''Derived from spec/swagger.v1.json, not from a capture.''' The ref listing has no golden fixture, so these three keys are the spec's and nothing here claims a live instance was measured.

Value parameters

obj

the object key, renamed because object is a Scala keyword

ref

the ref key: the fully qualified ref name, such as refs/heads/main

url

the url key

Attributes

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