Skip to content

Commit

Permalink
build: add automatic linking to external libraries in scaladoc
Browse files Browse the repository at this point in the history
  • Loading branch information
cake-lier committed Jul 28, 2023
1 parent e65f9db commit 44a6987
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 16 deletions.
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ThisBuild / developers := List(
url = url("https://github.com/cake-lier")
)
)
ThisBuild / description := ""
ThisBuild / description := "A client for accessing a remote tuple space server, part of a tuple space middleware."
ThisBuild / licenses := List(
"MIT" -> new URL("https://opensource.org/licenses/MIT")
)
Expand All @@ -42,6 +42,8 @@ ThisBuild / versionScheme := Some("semver-spec")
ThisBuild / publishTo := sonatypePublishToBundle.value
ThisBuild / sonatypeCredentialHost := "s01.oss.sonatype.org"

ThisBuild / autoAPIMappings := true

lazy val root = project
.in(file("."))
.enablePlugins(AutomateHeaderPlugin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ import tuples.space.*
* used for carrying metadata from the client to the server, for example for managing the [[UUID]] that the server has given to
* the client.
*/
sealed trait Request
private[client] sealed trait Request

/** Companion object to the [[Request]] trait, containing its implementations. */
object Request {
private[client] object Request {

/** A [[Request]] which content is a single [[JsonTuple]].
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import tuples.space.JsonSerializable.given
import AnyOps.*

/** This object contains all serializers for the [[Request]] sub-types. */
object RequestSerializer {
private[client] object RequestSerializer {

/* The Encoder given instance for the TupleRequest trait. */
private given Encoder[TupleRequest] = r =>
Expand All @@ -40,14 +40,14 @@ object RequestSerializer {
"type" -> "out".asJson
)

/* The Encoder given instance for the SeqTupleRequest trait. */
/* The Encoder given instance for the SeqTupleRequest trait. */
private given Encoder[SeqTupleRequest] = r =>
Json.obj(
"content" -> r.content.asJson,
"type" -> "outAll".asJson
)

/* The Encoder given instance for the TemplateRequest trait. */
/* The Encoder given instance for the TemplateRequest trait. */
private given Encoder[TemplateRequest] = r =>
Json.obj(
"content" -> r.content.asJson,
Expand All @@ -63,14 +63,14 @@ object RequestSerializer {
}).asJson
)

/* The Encoder given instance for the MergeRequest trait. */
/* The Encoder given instance for the MergeRequest trait. */
private given Encoder[MergeRequest] = r =>
Json.obj(
"clientId" -> r.clientId.asJson,
"oldClientId" -> r.oldClientId.asJson
)

/** The [[Encoder]] given instance for the general [[Request]] trait, working for all of its sub-types. */
/** The [[Encoder]] given instance for the general [[Request]] trait, working for all of its sub-types. */
given Encoder[Request] = {
case r: TupleRequest => r.asJson
case r: TemplateRequest => r.asJson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package io.github.cakelier
package tuples.space.request

/** The enum representing all the different types of operations that can be carried on using a [[TemplateRequest]]. */
enum TemplateRequestType {
private[client] enum TemplateRequestType {

/** The enum instance representing the "in" operation. */
case In extends TemplateRequestType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ import tuples.space.*
* client, for example for signalling that the connection has been established with success and a new id is provided to the
* client or that the client wants to use another id instead.
*/
sealed trait Response
private[response] sealed trait Response

/** Companion object to the [[Response]] trait, containing its implementations. */
object Response {
private[response] object Response {

/** A [[Response]] which associated request has as content a single [[JsonTuple]].
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import tuples.space.*
import tuples.space.JsonSerializable.given

/** This object contains all deserializers for the [[Response]] sub-types. */
object ResponseDeserializer {
private[space] object ResponseDeserializer {

/* The Decoder given instance for the TupleResponse trait. */
private given Decoder[TupleResponse] = c =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ package tuples.space.response

/** The enum representing all the different types of operations that can receive a result using a [[TemplateMaybeTupleResponse]].
*/
enum TemplateMaybeTupleResponseType {
private[response] enum TemplateMaybeTupleResponseType {

/** The enum instance representing the "inp" operation. */
case Inp extends TemplateMaybeTupleResponseType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package io.github.cakelier
package tuples.space.response

/** The enum representing all the different types of operations that can receive a result using a [[TemplateSeqTupleResponse]]. */
enum TemplateSeqTupleResponseType {
private[response] enum TemplateSeqTupleResponseType {

/** The enum instance representing the "inAll" operation. */
case InAll extends TemplateSeqTupleResponseType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package io.github.cakelier
package tuples.space.response

/** The enum representing all the different types of operations that can receive a result using a [[TemplateTupleResponse]]. */
enum TemplateTupleResponseType {
private[response] enum TemplateTupleResponseType {

/** The enum instance representing the "in" operation. */
case In extends TemplateTupleResponseType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ package tuples.space.response
import io.circe.Encoder
import io.circe.Json
import io.circe.syntax.EncoderOps

import tuples.space.JsonSerializable.given

import io.github.cakelier.tuples.space.client.response.{TemplateMaybeTupleResponseType, TemplateSeqTupleResponseType, TemplateTupleResponseType}

object ResponseSerializer {

given Encoder[TupleResponse] = r =>
Expand Down

0 comments on commit 44a6987

Please sign in to comment.