[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [tosca] Inspiration: OpenAPI schema
Yes, while TOSCA allows you to define constraints on individual property and attribute values, it is not possible to define constraints that include multiple properties within a node (let alone properties across different nodes). I ran
into this problem when building a YANG-to-TOSCA translator: YANG has fairly sophisticated support (using MUST and WHEN clauses) for defining constraints across different elements of a schema. TOSCA could benefit from having something similar. Chris From: tosca@lists.oasis-open.org <tosca@lists.oasis-open.org>
On Behalf Of Tal Liron As some of you may know, Kubernetes, like TOSCA,
supports custom data validation. You cannot create custom data types, but there is a fairly rich grammar for specifying constraints. This grammar is based on
the schema specification for OpenAPI 3.0. Generally speaking, TOSCA is more powerful. However, where OpenAPI is better is in allowing constraints beyond individual parameters. For example, you can express something like "one and exactly one of these is required". I haven't delved into it very deeply, but thought it might interest us as a source of inspiration for improving TOSCA. |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]