Yes, that branch validates it without error.

On Tue, Nov 28, 2017 at 9:20 AM, Tal Liron <[email protected]> wrote:

> This is a big that is fixed in the ARIA-1 commit, which is waiting to be
> merged.
>
> If you don't mind helping to test, could you try with this branch?
> https://github.com/apache/incubator-ariatosca/tree/ARIA-
> 1-parser-test-suite
>
> On Tue, Nov 28, 2017 at 11:13 AM, DeWayne Filppi <[email protected]>
> wrote:
>
> > I made a simple example that fails.  Maybe my example is a
> > misinterpretation of what you said:
> >
> > tosca_definitions_version: tosca_simple_yaml_1_0
> >
> > imports:
> >
> >   - aria-1.0
> >
> > data_types:
> >
> >   d1:
> >     properties:
> >       p1:
> >         type: string
> >
> >   d2:
> >     derived_from: d1
> >     properties:
> >       p2:
> >         type: string
> >
> > node_types:
> >
> >   T1:
> >     derived_from: tosca.nodes.Root
> >     properties:
> >       n1:
> >         type: d1
> >
> >
> >   T2:
> >     derived_from: T1
> >     properties:
> >       n1:
> >         type: d2
> >
> >
> > This produces the error:
> >
> >   4: override changes type from "d1" to "d2" for property "n1" in "T2
> >
> > On Tue, Nov 28, 2017 at 9:00 AM, Tal Liron <[email protected]> wrote:
> >
> > > You are correct that it's not entirely clear from the spec. However, I
> > > always interpret the spirit of the spec to be object-oriented. That
> means
> > > that in ARIA: yes, you can override a property, AS LONG AS the property
> > > type is of compatible with (equal or derived from) the one in the
> parent.
> > > ARIA will check for this and issue a validation error if you break the
> > > parent's contract.
> > >
> > > On Tue, Nov 28, 2017 at 10:56 AM, DeWayne Filppi <[email protected]>
> > > wrote:
> > >
> > > > If there is a node type that inherits from another node type, can a
> > > > property in the parent be overridden by the subtype?  I'm having
> > trouble
> > > > getting a straight answer to that basic question from the spec.
> > > >
> > > > DeWayne
> > > >
> > >
> >
>

Reply via email to