Skip to content

Commit

Permalink
fix: minor formating for pr
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasBousselin committed Jan 20, 2025
1 parent 898e425 commit 7ccc2f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ data class ContextSourceRegistration(
information = information.map { it.compact(contexts) }
)

fun serialize(contexts: List<String>, mediaType: MediaType = JSON_LD_MEDIA_TYPE, includeSysAttrs: Boolean = false):
String {
fun serialize(
contexts: List<String>,
mediaType: MediaType = JSON_LD_MEDIA_TYPE,
includeSysAttrs: Boolean = false
): String {
return DataTypes.mapper.writeValueAsString(
DataTypes.mapper.convertValue<Map<String, Any>>(
this.compact(contexts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ sealed class APIException(
override val message: String,
open val detail: String = DEFAULT_DETAIL
) : Exception(message) {

private val logger = LoggerFactory.getLogger(javaClass)

fun toProblemDetail(): ProblemDetail = ProblemDetail.forStatusAndDetail(status, this.detail).also {
Expand Down Expand Up @@ -173,9 +172,9 @@ enum class ErrorType(val type: URI) {
INVALID_REQUEST(URI("https://uri.etsi.org/ngsi-ld/errors/InvalidRequest")),
BAD_REQUEST_DATA(URI("https://uri.etsi.org/ngsi-ld/errors/BadRequestData")),
ALREADY_EXISTS(URI("https://uri.etsi.org/ngsi-ld/errors/AlreadyExists")),
CONFLICT(URI("https://uri.etsi.org/ngsi-ld/errors/Conflict")), // todo defined only in 6.3.17
BAD_GATEWAY(URI("https://uri.etsi.org/ngsi-ld/errors/BadGateway")), // todo defined only in 6.3.17
GATEWAY_TIMEOUT(URI("https://uri.etsi.org/ngsi-ld/errors/GatewayTimeout")), // todo defined only in 6.3.17
CONFLICT(URI("https://uri.etsi.org/ngsi-ld/errors/Conflict")), // defined only in 6.3.17
BAD_GATEWAY(URI("https://uri.etsi.org/ngsi-ld/errors/BadGateway")), // defined only in 6.3.17
GATEWAY_TIMEOUT(URI("https://uri.etsi.org/ngsi-ld/errors/GatewayTimeout")), // defined only in 6.3.17
OPERATION_NOT_SUPPORTED(URI("https://uri.etsi.org/ngsi-ld/errors/OperationNotSupported")),
RESOURCE_NOT_FOUND(URI("https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound")),
INTERNAL_ERROR(URI("https://uri.etsi.org/ngsi-ld/errors/InternalError")),
Expand Down

0 comments on commit 7ccc2f2

Please sign in to comment.