Fix Contract on Project property, extra.

The current contract for this property (in Project.yaml) is:

      extra:
        Contract:
          $.string().notNull(): $.string()

Deploying my Murano application, the code attempts to populate this
property with:

     u'tags': []

and gets this error:

    ContractViolationException: [io.murano.Project.extra['tags']] Value [] violates string() contract

My fix is:

        extra:
        Contract:
          $.string().notNull(): $

This allows the 2nd value of the pair to be any scalar or data structure.  A string
or a list of strings is acceptable now.

Change-Id: I1b0438ad451db2b7a89a9fb65dc948b52ceb2f3f
Co-Authored-By: Devjani Ray <devjani.ray@oracle.com>
Closes-Bug: 1762821
This commit is contained in:
Ellen Batbouta 2018-04-10 17:09:43 -04:00
parent 2670b434a7
commit 475545a621
1 changed files with 1 additions and 1 deletions

View File

@ -11,4 +11,4 @@ Properties:
Contract: $.string()
extra:
Contract:
$.string().notNull(): $.string()
$.string().notNull(): $