-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
search-api: Rename
Title
to HtmlTitle
to avoid conflict
A little bit more descriptive to avoid conflict with a regular title object.
- Loading branch information
Showing
12 changed files
with
48 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
search-api/src/main/scala/no/ndla/searchapi/model/api/TitleWithHtml.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Part of NDLA search-api | ||
* Copyright (C) 2018 NDLA | ||
* | ||
* See LICENSE | ||
*/ | ||
|
||
package no.ndla.searchapi.model.api | ||
|
||
import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} | ||
import io.circe.{Decoder, Encoder} | ||
import no.ndla.language.model.LanguageField | ||
import sttp.tapir.Schema.annotations.description | ||
|
||
@description("Title of resource") | ||
case class TitleWithHtml( | ||
@description("The freetext title of the resource") title: String, | ||
@description("The freetext html-version title of the article") htmlTitle: String, | ||
@description("ISO 639-1 code that represents the language used in title") language: String | ||
) extends LanguageField[String] { | ||
override def value: String = title | ||
override def isEmpty: Boolean = title.isEmpty | ||
} | ||
|
||
object TitleWithHtml { | ||
implicit val encoder: Encoder[TitleWithHtml] = deriveEncoder | ||
implicit val decoder: Decoder[TitleWithHtml] = deriveDecoder | ||
} |
25 changes: 0 additions & 25 deletions
25
search-api/src/main/scala/no/ndla/searchapi/model/api/article/ArticleSummary.scala
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
search-api/src/main/scala/no/ndla/searchapi/model/api/draft/DraftSummary.scala
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
search-api/src/main/scala/no/ndla/searchapi/model/api/learningpath/LearningPathSummary.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters