https://pact.io logo
Join Slack
Powered by
# pact-jvm
  • s

    Sergii Lisnychyi

    09/07/2022, 2:34 PM
    Hi guys, maybe you can help me. i am trying to understand what should i change in my
    provider
    test.
    Copy code
    @Provider("provider-adapter")
    @PactFolder("pacts")
    class ProviderContractTest {
    
      @TestTemplate
      @ExtendWith(PactVerificationInvocationContextProvider::class)
      fun testTemplate(pact: Pact?, interaction: Interaction?, context: PactVerificationContext?) {
        context?.verifyInteraction()
      }
    
      @BeforeEach
      fun before(context: PactVerificationContext?) {
        context?.target = MessageTestTarget()
      }
    
      @State("ProviderState")
      fun providerState() {
    
      }
    
      @Suppress("unused")
      @PactVerifyProvider("some test")
      private fun verifyProvider(): String {
        return "{ \"name\" : \"test\"}"
      }
      
    }
    After test run i am getting the following message:
    Copy code
    Only message interactions can be used with an AMPQ test target
    java.lang.UnsupportedOperationException: Only message interactions can be used with an AMPQ test target
    	at au.com.dius.pact.provider.junit5.MessageTestTarget.prepareRequest(TestTarget.kt:184)
    	at au.com.dius.pact.provider.junit5.PactVerificationExtension.beforeTestExecution(PactVerificationExtension.kt:117)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeTestExecutionCallbacks$5(TestMethodTestDescriptor.java:188)
    	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:199)
    u
    • 2
    • 6
  • z

    Zakir Hossain

    09/08/2022, 1:00 PM
    Hello, I'm having provider authorization problem with pact 4.3.14 I've added the authorization in the following method. However, it fails with the following message:
    expected status of 200 but was 401
    Copy code
    @TestTemplate
      @ExtendWith(PactVerificationInvocationContextProvider.class)
      void pactVerificationTestTemplate(PactVerificationContext context, HttpRequest request){
        request.addHeader("Authorization", "Bearer a_valid_jwt_token");
    
        context.verifyInteraction();
      }
    Thanks in advance.
    m
    • 2
    • 3
  • a

    Ashish Merani

    09/08/2022, 10:11 PM
    Hey all, I am writing a simple provider test with
    Copy code
    "au.com.dius.pact.provider:junit5:4.1.39"
    I have specified
    @PactFolder("src/contractTest/")
    but the test fails with the following error
    Copy code
    1.1) Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused (Connection refused)
    It fails on
    context.verifyInteraction();
    under
    Copy code
    @TestTemplate
        @ExtendWith(PactVerificationInvocationContextProvider.class)
        void testTemplate(PactVerificationContext context) {
            context.verifyInteraction();
        }
    I am trying to understand why it is making the call to localhost when I have specified a local path under @PactFolder annotation. Can anyone help?
    m
    s
    • 3
    • 14
  • u

    Uzma Khan

    09/12/2022, 6:31 PM
    Has anyone here used maven to publish pacts to pactflow?
    r
    • 2
    • 3
  • u

    Uzma Khan

    09/12/2022, 6:51 PM
    Specifically looking for advice on using api tokens along with pact:publish target
  • z

    Zakir Hossain

    09/13/2022, 7:15 AM
    Hello, I'm trying to run 2 pact tests. However, they failed with the following exception.
    Copy code
    2022-09-13 13:09:20.063 ERROR 43371 --- [           main] o.s.test.context.TestContextManager      : Caught exception while allowing TestExecutionListener [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@63ce874f] to prepare test instance [no.mentordigital.campaigndb.contracts.ITCampaignApiContractCampaignMasterAdmin@41ac1ebf]
    
    java.lang.IllegalStateException: Failed to load ApplicationContext
    
    Caused by: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use
    If I remove one test, the other executes successfully. Below are given my tests
    Copy code
    @Slf4j
    @Provider("campaign-manager")
    @Consumer("subscription")
    @PactBroker(
        url = "<http://0.0.0.0:9292/>",
        authentication = @PactBrokerAuth(token = "a-valid-token"))
    @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
    public class ITCampaignApiContractSubscription {
    
      @Autowired ObjectMapper objectMapper;
      @Autowired CampaignRepository campaignRepository;
      @Autowired ProductRepository productRepository;
      @MockBean ClientRegistrationRepository clientRegistrationRepository;
    
      @BeforeEach
      void before(PactVerificationContext context) {
        context.setTarget(new HttpTestTarget("localhost", 8080));
      }
    
      @TestTemplate
      @ExtendWith(PactVerificationInvocationContextProvider.class)
      void pactVerificationTestTemplate(PactVerificationContext context) {
        context.verifyInteraction();
      }
    
      @State("It has a request to get a campaign by slug name")
      public void toStateWithData() {    
        saveCampaignForContractTest();
      }
    Copy code
    @Slf4j
    @Provider("campaign-manager")
    @Consumer("campaign-master-admin")
    @PactBroker(
        url = "<http://0.0.0.0:9292/>",
        authentication = @PactBrokerAuth(token = "a-valid-token"))
    @SpringBootTest(
        classes = TestWebSecurityConfig.class,
        webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
    class ITCampaignApiContractCampaignMasterAdmin {
    
      @Autowired ObjectMapper objectMapper;
      @Autowired CampaignRepository campaignRepository;
      @Autowired ProductRepository productRepository;
      @MockBean ClientRegistrationRepository clientRegistrationRepository;
    
      @BeforeEach
      void before(PactVerificationContext context) {
        context.setTarget(new HttpTestTarget("localhost", 8080));
      }
    
      @TestTemplate
      @ExtendWith(PactVerificationInvocationContextProvider.class)
      void pactVerificationTestTemplate(PactVerificationContext context) {
        context.verifyInteraction();
      }
    
      @State("It has a request to get a campaign by id")
      public void toStateWithData() {
        saveCampaignForContractTest();
      }
    I tried with different ports, but no luck.
    u
    t
    • 3
    • 15
  • d

    Dwiparna Pal

    09/13/2022, 10:47 AM
    Hello, Hello, the import for the below is not happening for me.
  • d

    Dwiparna Pal

    09/13/2022, 10:47 AM
    Copy code
    import au.com.dius.pact.provider.junit5.AmpqTestTarget
  • d

    Dwiparna Pal

    09/13/2022, 10:48 AM
    using the below dependency for it
    Copy code
    <dependency>
        <groupId>au.com.dius.pact.provider</groupId>
        <artifactId>junit5</artifactId>
        <version>4.3.14</version>
    any help will be appreciated. Thanks
    t
    • 2
    • 2
  • é

    Édouard Lopez

    09/14/2022, 8:48 AM
    One project in my company added the ``@Consumer(…)`` annotation on the provider verification class, am I correct assuming this will only verify the provider contract between given provider and consumer, excluding others?
    Copy code
    @Provider("ms.seller-opt-out")
    @Consumer("ms.channel-management-rule-applier")
    …
    public class SellerOptOutRuleRuleApplierPublisherPactTest {
    I see you can use system property pact.filter.consumers Consumer Version Selectors to do this. Is there still some use-cases for the annotation approach?
  • a

    Ashish Merani

    09/14/2022, 11:01 PM
    Is there a way to make sure that if provider changes the name from
    id
    to
    ids
    the contract test would fail?
    Copy code
    {
      "id": "5",
      "type": "something"
    }
    I looked at .stringValue which only compares "5" and not
    id
    itself.
    t
    b
    • 3
    • 39
  • m

    Matt (pactflow.io / pact-js / pact-go)

    09/15/2022, 10:38 AM
    Any takers for https://stackoverflow.com/questions/73718105/pact-framework-running-one-test-only ?
    j
    • 2
    • 1
  • s

    Saurabh Goel

    09/15/2022, 12:59 PM
    Hello, i am able to trigger my provider build successfully through "contract_requiring_verification_published" event. but the provider verification takes contract with commit id from consumer's master branch, rather then the feature branch which triggered this verification. How can I force provider verification to use this commit id? I am triggering the drone build like this
    Copy code
    <https://ci-server/api/repos/comp/proj/builds?branch=ct_update_consumer_ver&pact_url=${pactbroker.pactUrl}&pact_consumer=${pactbroker.consumerName}&pact_consumer_branch=${pactbroker.consumerVersionBranch}&pact_consumer_version=${pactbroker.consumerVersionNumber}>
    and pact tests are getting executed with simple gradle run test which runs everything else too
    Copy code
    - ./gradlew clean build -PisDroneCI=true -Prevision=${DRONE_COMMIT} -Ptag=${DRONE_TAG} -PbuildNumber=${DRONE_BUILD_NUMBER} -PbuildVersion=$(cat .tags) --stacktrace
  • r

    Rubén Pérez

    09/16/2022, 10:37 AM
    HI 🙂 In our scenario, we have our Pact Broker with the Webhook created (with the new
    contract_requiring_verification_published
    event), that triggers the needed provider builds once a contract change is detected. As a parameter, it sends the URL of the pact version to verify. Also, in our JVM provider applications so far we have set the consumer version selectors in Gradle, so that the versions to verify are the latests from the main branch and the latests deployed/released. In our case using the workaround
    rawjson
    , given that the
    @ConsumerVersionSelector
    annotation didn't support branches or deployments. So my question is how do I let Pact know in my provider code that when the build has been triggered by the Broker, what I need to check is the pact version that the webhook has sent instead of the one defined in the
    rawjson
    property?
    u
    • 2
    • 7
  • p

    pocomon

    09/18/2022, 7:10 PM
    Hi There, I am writing the pact provider test on the application running with Spring and Junit 4. I am using the au.com.dius.pact.provider dependenc and came across 2 questions and it will be really appreciated anyone can guide on this 1. What I understand from the documentation is while doing provider testing we need to test against the actual server in test. And I am using a docker container hosted with application and hitting the pact provider test against the application in testing container. The situation I came across is the base url("127.0.0.1"), port (443) and protocol (https) can vary and I need this values to be passed from some environment variables in the CI pipeline. Can anyone guide on this
    Copy code
    @TestTarget
    public final Target target = new HttpTarget("https", "127.0.0.1", 443, "api", true);
    2. I have a job in the pipeline which build the application by running the "mvn clean install" command . The provider test also runs in this scenario and as the environment is not ready it will fail the test and build will not succeed. I want to control the running of pact provider test only when invoked individually in a job for pact provider testing. In all the other cases if anyone invoke the command "mvn clean install" pact provider test cases should not run. How to handle this situation. Thanks in advance for the help and guidance
  • a

    Anh Vuong

    09/21/2022, 1:54 AM
    👋 Hello, team!
    👋 1
  • a

    Anh Vuong

    09/21/2022, 4:12 PM
    I'm looking for consumer and producer examples that are not using Springboot, Gradle, and Makefile but only with Maven. Thanks.
    m
    • 2
    • 3
  • m

    Max Forsman

    09/22/2022, 9:18 AM
    Hey! I’m trying out Pact for Java. Naturally I wanted to start out with the consumer, but it looks like all the Java documentation is written for the previous API (3.x.x), and they don’t seem to work for v4. The example docs use the following api/format:
    Copy code
    @Pact(provider="test_provider", consumer="test_consumer")
        public RequestResponsePact createPact(PactDslWithProvider builder) {
    However, this isn’t compatible with the latest version:
    Copy code
    <dependency>
                <groupId>au.com.dius.pact.consumer</groupId>
                <artifactId>junit5</artifactId>
                <version>4.3.14</version>
                <scope>test</scope>
            </dependency>
    java.lang.UnsupportedOperationException: Method testPact does not conform required method signature 'public <http://au.com|au.com>.dius.pact.core.model.V4Pact xxx(PactBuilder builder)'
    Could someone point me in the direction of an updated example using the new DSL?
    u
    • 2
    • 2
  • a

    Anh Vuong

    09/22/2022, 6:22 PM
    I have almost same contract tests - same class name, imports, provider, consumer names etc - and "mvn test" works in one simpler repo and fails on a bigger repo with errors below. I have compared pom.xml for libraries's versions, jdk 17 etc. I run out of clues. Hope some one ahs seen the errors. java.lang.IncompatibleClassChangeError: Expected static method 'java.lang.Object au.com.dius.pact.core.support.expressions.ExpressionParser.parseExpression(java.lang.String, au.com.dius.pact.core.support.expressions.DataType)' at au.com.dius.pact.consumer.junit.MessagePactProviderRule.parsePacts(MessagePactProviderRule.java:192) at au.com.dius.pact.consumer.junit.MessagePactProviderRule$1.evaluate(MessagePactProviderRule.java:96) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54) Process finished with exit code 255 import au.com.dius.pact.consumer.MessagePactBuilder; import au.com.dius.pact.consumer.dsl.DslPart; import au.com.dius.pact.consumer.dsl.PactDslJsonBody; import au.com.dius.pact.consumer.junit.MessagePactProviderRule; import au.com.dius.pact.consumer.junit.PactVerification; import au.com.dius.pact.core.model.annotations.Pact; import au.com.dius.pact.core.model.messaging.MessagePact; import com.google.protobuf.TextFormat; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.Base64; import java.util.Map; public class ApStateConsumerMessagePactTest { @Rule public MessagePactProviderRule mockProvider = new MessagePactProviderRule("producer-message", this); ... }
    u
    • 2
    • 1
  • v

    Vorashil Farzaliyev

    09/26/2022, 10:38 AM
    Hey everyone. I have been following the docs to implement BDCT with Rest Assured on provider side. Is it possible to have a look at the source code of the project you’re using in the

    YouTube video ▾

    so we can see how you’re using Rest Assured along with other dependencies with Atlasssian
    👋 1
    y
    • 2
    • 4
  • v

    Vorashil Farzaliyev

    09/26/2022, 10:38 AM
    Atlassian dependencies don’t have the best docs in the world unfortunately, so would be useful to see them in a working application
  • v

    Vorashil Farzaliyev

    09/26/2022, 10:38 AM
    @Mahdi Ali FYI ☝️
    👍 1
  • t

    Thai Le

    09/30/2022, 9:29 PM
    Hello, does anyone know how to attach debugger to a pact provider test?
    m
    • 2
    • 4
  • o

    Oleksandr Yanov

    10/06/2022, 8:42 AM
    Hello, #C9UN99H24 . I am trying to write a consumer tests using MessagePactBuilder and ran into a problem that I can’t pass a string to the withContent method, since our provider sends an event with a string represantation, not the Json or Xml. The content type being passed is application/x-www-form-urlencoded. Are there any options for sent the string and not json or xml?
    u
    • 2
    • 1
  • s

    Shan

    10/07/2022, 3:15 AM
    I see these two system variables
    Copy code
    Dpact.provider.branch=${GIT_BRANCH}
    Dpactbroker.providerBranch=${GIT_BRANCH}
    Are they the same?
    u
    • 2
    • 5
  • t

    Thai Le

    10/07/2022, 6:01 PM
    Hello guys, i am getting this error when i try to run pact provider verification with @WebMvcTest
    Copy code
    12:44:25.963 [main] WARN au.com.dius.pact.provider.junitsupport.loader.PactBrokerLoader - Failed to instantiate the value resolver, using the default
    java.lang.IllegalAccessException: class au.com.dius.pact.provider.junitsupport.loader.PactBrokerLoader cannot access a member of class au.com.dius.pact.core.support.expressions.SystemPropertyResolver with modifiers "private"
       at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
       at java.base/jdk.internal.reflect.Reflection.ensureMemberAccess(Reflection.java:99)
       at java.base/java.lang.Class.newInstance(Class.java:579)
       at au.com.dius.pact.provider.junitsupport.loader.PactBrokerLoader.setupValueResolver(PactBrokerLoader.kt:168)
       at au.com.dius.pact.provider.junitsupport.loader.PactBrokerLoader.load(PactBrokerLoader.kt:99)
       at au.com.dius.pact.provider.junit5.PactVerificationInvocationContextProvider$resolvePactSources$$inlined$flatMap$lambda$1.invoke(PactJUnit5VerificationProvider.kt:80)
       at au.com.dius.pact.provider.junit5.PactVerificationInvocationContextProvider$resolvePactSources$$inlined$flatMap$lambda$1.invoke(PactJUnit5VerificationProvider.kt:37)
       at au.com.dius.pact.core.support.KotlinLanguageSupportKt.handleWith(KotlinLanguageSupport.kt:38)
       at au.com.dius.pact.provider.junit5.PactVerificationInvocationContextProvider.resolvePactSources(PactJUnit5VerificationProvider.kt:80)
       at au.com.dius.pact.provider.junit5.PactVerificationInvocationContextProvider.provideTestTemplateInvocationContexts(PactJUnit5VerificationProvider.kt:41)
       at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.lambda$execute$0(TestTemplateTestDescriptor.java:102)
    i am not sure what cause this but if i replace @WebMvcTest with @SpringBootTest then i dont get this error, however it requires other external components running (mysql, message broker,...) since the whole spring context is loaded
    u
    • 2
    • 1
  • m

    MHNOT

    10/10/2022, 6:24 AM
    Hi all, we tried to cover a file download endpoint via consumer driven contract test. The endpoint serves XML and we don't care about the downloaded content or tag structure. We just want to verify that the body is not empty. Here are the things that we tried and the results: Consumer class:
    Copy code
    public class DownloadEndpointsCDCTest extends ConsumerPactTest
    {
      @Override
      protected RequestResponsePact createPact(final PactDslWithProvider aBuilder)
      {
          final DslPart expectedBodyResponse1 = PactDslRootValue.stringMatcher("^.+$", "whatever");
          final DslPart expectedBodyResponse2 = PactDslRootValue.stringMatcher("^.+$",
            "<?xml version=\"1.0\" encoding=\"utf-8\"?><example>foo</example>");
      
        return aBuilder//
            .given("A XML generation job finished successfully")
            .uponReceiving("A request to download XML")
            .pathFromProviderState("/xmlresult/${jobId}", "/xmlresult/" + "dummyJobId")
            .method("GET")
            .willRespondWith()
            .status(200)
            .headers(Map.of("Content-Type", "application/xml"))
           // .body(expectedBodyResponse1)
            .body(expectedBodyResponse2)
            .toPact();
      }
    }
    Generated contract:
    Copy code
    {
      "consumer": {
        "name": "XXX_Client"
      },
      "interactions": [
        {
          "description": "A request to download a XML",
          "providerStates": [
            {
              "name": "A XML generation finished successfully"
            }
          ],
          "request": {
            "generators": {
              "path": {
                "dataType": "STRING",
                "expression": "/nativeresult/${jobId}",
                "type": "ProviderState"
              }
            },
            "headers": {
              "RM-MDC-TOKEN": "dummyTraceId"
            },
            "method": "GET",
            "path": "/xmlresult/dummyJobId"
          },
          "response": {
            "body": "<?xml version=\"1.0\" encoding=\"utf-8\"?><example>foo</example>",
            "headers": {
              "Content-Type": "application/xml"
            },
            "matchingRules": {
              "body": {
                "$": {
                  "combine": "AND",
                  "matchers": [
                    {
                      "match": "regex",
                      "regex": "^.+$"
                    }
                  ]
                }
              },
              "header": {}
            },
            "status": 200
          }
        }
      ],
      "metadata": {
        "pact-jvm": {
          "version": "4.3.14"
        },
        "pactSpecification": {
          "version": "3.0.0"
        }
      },
      "provider": {
        "name": "XXX_Service"
      }
    }
    The verification fails on provider side. In case we use "*expectedBodyResponse1*" from the above example following exception is thrown (which is comprehensible because the content is not XML): Content is not allowed in prolog. at au.com.dius.pact.provider.junit5.PactVerificationContext.verifyInteraction(PactVerificationContext.kt:66) In case we use "*expectedBodyResponse2*" from the above example following exception is thrown: _Verifying a pact between XXX_Client and XXX_Service - A request to download a XML has a matching body_ body: $.example.#text Expected '' to match '^.+$' at au.com.dius.pact.provider.junit5.PactVerificationContext.verifyInteraction(PactVerificationContext.kt:66) How can we verify that a response of content type "application/xml" is not empty? Used versions: Consumer: au.com.dius.pact.consumerjunit4.3.14 Provider: au.com.dius.pact.providerjunit54.3.13
    • 1
    • 2
  • t

    Thai Le

    10/12/2022, 4:00 PM
    Hello guys, is the pending pact the feature of the broker ? Is there a way to disable pending pact from provider test (as an argument to mvn verify command)? Since I have a mono repo and pact consumer/provider tests only run on merge CI/CD pipeline, at that time all providers and consumers must have valid contracts
    y
    u
    • 3
    • 6
  • t

    Thai Le

    10/12/2022, 9:36 PM
    Hi again, when running provider verification, i supply the pact.provider.version as
    mvn -DpipelineBuild=true --activate-profiles maven-profile,provider-pact-test -Dpackbroker.scheme=http -Dpactbroker.host=localhost -Dpactbroker.port=9292 -Dpactbroker.auth.username=pact_workshop -Dpactbroker.auth.password=pact_workshop -Dpact.provider.version="7.0.36-$(git rev-parse --short HEAD)" -Dpactbroker.enablePending=false -Dpact.verifier.publishResults=true --projects 60000-demo-service/demo-service --also-make -f all-modules-pom.xml clean verify
    and i see pact tries to verify this version of provider against all versions of consumer. Is there a way to tell pact to verify a particular version of the provider against one version of the consumer? I saw the Consumer Version Selector page (https://docs.pact.io/pact_broker/advanced_topics/consumer_version_selectors) but it does not take the version (tag, branch, environment are supported) and I don't see it accept consumerVersionSelectors params (i checked with mvn help:describe -DgroupId=au.com.dius.pact.provider -DartifactId=maven -Dversion=4.1.17 -Ddetail=true)
    u
    • 2
    • 7
  • a

    Anh Vuong

    10/13/2022, 5:56 PM
    How can I express the following pact semantics in async messaging? There is either mandatory key, mandatory_cpu or mandatory_memory for a contract to be valid? So, it seems there can be two separate pacts, one with mandatory_cpu and the other with mandatory_memory key. For cpu pact, I need help on how to express multiple level_2 list which can be empty, can have optional keys, and must have mandatory_cpu. Second wishful thinking is if I can combine both cpu and memory in same pact? Thanks. Case 1: “level_1” { “level_2” { “*mandatory_cpu*”: "value_1” } “level_2” { } “level_2” { “optional_key_1”: “optional_value_1” } } Case 2: “level_1” { “level_2” { “optional_key_1”: “optional_value_1” } “level_2” { } “level_2” { “*mandatory_memory*”: "value_2” } }
    u
    • 2
    • 2
1...789...14Latest