Skip to content

Commit

Permalink
Merge pull request #5 from chessman/network-policy-list
Browse files Browse the repository at this point in the history
add NetworkPolicyList json format
  • Loading branch information
hagay3 authored Apr 22, 2021
2 parents ea78877 + 2d0be9e commit 9cf1703
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/main/scala/skuber/networking/NetworkPolicy.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import skuber.ResourceSpecification.{Names, Scope}
import skuber.{LabelSelector, NameablePort, NonCoreResourceSpecification, ObjectMeta, ObjectResource, Pod, Protocol, ResourceDefinition}
import play.api.libs.functional.syntax._
import play.api.libs.json.{Format, JsPath}
import skuber.json.format.{objFormat,enumFormatMethods, intOrStringFormat, jsPath2LabelSelFormat, maybeEmptyFormatMethods}
import skuber.json.format.{objFormat,enumFormatMethods, intOrStringFormat, jsPath2LabelSelFormat, maybeEmptyFormatMethods, ListResourceFormat}

/**
* @author David O'Riordan
Expand Down Expand Up @@ -170,5 +170,7 @@ object NetworkPolicy {
objFormat and
(JsPath \ "spec").formatNullable[Spec]
)(NetworkPolicy.apply _, unlift(NetworkPolicy.unapply))

implicit val networkPolicyListFmt: Format[NetworkPolicyList] = ListResourceFormat[NetworkPolicy]
}

0 comments on commit 9cf1703

Please sign in to comment.