Skip to content

Commit

Permalink
fix SelfcareTenantSeed: subUnitType is now optional
Browse files Browse the repository at this point in the history
  • Loading branch information
beetlecrunch committed Nov 30, 2023
1 parent d14720e commit 957736b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/main/resources/interface-specification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,6 @@ components:
- selfcareId
- name
- onboardedAt
- subUnitType
TenantUnitType:
type: string
enum:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ object AdaptableSeed {
name = a.name,
kind = kind,
onboardedAt = Some(a.onboardedAt),
subUnitType = Some(a.subUnitType.toDependency)
subUnitType = a.subUnitType.map(_.toDependency)
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ package object impl extends SprayJsonSupport with DefaultJsonProtocol {
implicit def internalAttributeSeedFormat: RootJsonFormat[InternalAttributeSeed] = jsonFormat2(InternalAttributeSeed)
implicit def internalTenantSeedFormat: RootJsonFormat[InternalTenantSeed] = jsonFormat3(InternalTenantSeed)

implicit def m2mAttributeSeedFormat: RootJsonFormat[M2MAttributeSeed] = jsonFormat1(M2MAttributeSeed)
implicit def m2mTenantSeedFormat: RootJsonFormat[M2MTenantSeed] = jsonFormat3(M2MTenantSeed)
implicit def m2mAttributeSeedFormat: RootJsonFormat[M2MAttributeSeed] = jsonFormat1(M2MAttributeSeed)
implicit def m2mTenantSeedFormat: RootJsonFormat[M2MTenantSeed] = jsonFormat3(M2MTenantSeed)
implicit def selfcareTenantSeedFormat: RootJsonFormat[SelfcareTenantSeed] = jsonFormat6(SelfcareTenantSeed)

implicit def certifierFormat: RootJsonFormat[Certifier] = jsonFormat1(Certifier)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ trait SpecData {
"test_name",
None,
timestamp,
TenantUnitType.AOO
Some(TenantUnitType.AOO)
)
val selfcareTenantSeedNotIpa: SelfcareTenantSeed =
SelfcareTenantSeed(
Expand All @@ -73,7 +73,7 @@ trait SpecData {
"test_name",
None,
timestamp,
TenantUnitType.AOO
Some(TenantUnitType.AOO)
)

val dependencyTenant: Dependency.Tenant = Dependency.Tenant(
Expand Down

0 comments on commit 957736b

Please sign in to comment.