diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroCollectionShapeParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroCollectionShapeParser.scala index 1b088f19e4..74e6288723 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroCollectionShapeParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroCollectionShapeParser.scala @@ -4,6 +4,8 @@ import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext import amf.core.internal.parser.YMapOps import amf.shapes.client.scala.model.domain.AnyShape import org.yaml.model.{YMap, YMapEntry} +import amf.shapes.internal.annotations.AVROSchemaType +import org.yaml.model.YScalar abstract class AvroCollectionShapeParser[T <: AnyShape](map: YMap, membersKey: String)(implicit ctx: AvroSchemaContext) extends AvroComplexShapeParser(map) { @@ -20,5 +22,14 @@ abstract class AvroCollectionShapeParser[T <: AnyShape](map: YMap, membersKey: S shape } - protected def parseMembers(e: YMapEntry): AnyShape = AvroTextTypeParser(e.value.as[String], None).parse() + protected def parseMembers(e: YMapEntry): AnyShape = { + e.value.value match { + case scalar: YScalar => + val avroType = scalar.text + val parsedShape = AvroTextTypeParser(avroType, None).parse() + parsedShape.annotations += AVROSchemaType(avroType) + parsedShape + case map: YMap => new AvroShapeParser(map).parse().getOrElse(AnyShape()) + } + } } diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroComplexShapeParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroComplexShapeParser.scala index c81e1c625f..efb9c8dcf9 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroComplexShapeParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroComplexShapeParser.scala @@ -1,11 +1,13 @@ package amf.apicontract.internal.spec.avro.parser.domain import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext +import amf.core.client.scala.model.domain.Shape import amf.core.internal.datanode.DataNodeParser import amf.core.internal.metamodel.domain.ShapeModel import amf.core.internal.parser.YMapOps import amf.core.internal.parser.domain.Annotations import amf.shapes.client.scala.model.domain.AnyShape +import amf.shapes.internal.annotations.AVROSchemaType import amf.shapes.internal.domain.metamodel.AnyShapeModel import amf.shapes.internal.spec.common.parser.QuickFieldParserOps import org.yaml.model._ @@ -63,4 +65,6 @@ trait AvroKeyExtractor { def isPrimitive: Boolean = Seq("null", "boolean", "int", "long", "float", "double", "bytes", "string").contains(value) } + + def getAvroType(shape: Shape): Option[AVROSchemaType] = shape.annotations.find(classOf[AVROSchemaType]) } diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroEnumParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroEnumParser.scala index 2debf11526..da8cbcc00b 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroEnumParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroEnumParser.scala @@ -2,7 +2,9 @@ package amf.apicontract.internal.spec.avro.parser.domain import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext import amf.core.client.scala.model.DataType -import amf.core.client.scala.model.domain.ScalarNode +import amf.core.client.scala.model.domain.{AmfArray, ScalarNode} +import amf.core.internal.metamodel.domain.ShapeModel +import amf.core.internal.parser.domain.Annotations import amf.core.internal.parser.{YMapOps, YScalarYRead} import amf.shapes.client.scala.model.domain.AnyShape import org.yaml.model._ @@ -18,10 +20,10 @@ class AvroEnumParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroTex } override def parseSpecificFields(): Unit = { - map - .key("symbols") - .map(parseSymbols) - .map(shape.withValues) + map.key("symbols").map { entry => + val symbols = parseSymbols(entry) + shape.setWithoutId(ShapeModel.Values, AmfArray(symbols, Annotations(entry.value)), Annotations(entry)) + } } private def parseSymbols(e: YMapEntry): Seq[ScalarNode] = { diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroMapShapeParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroMapShapeParser.scala index 8b82c26ae1..2b8adc0c5f 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroMapShapeParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroMapShapeParser.scala @@ -1,13 +1,16 @@ package amf.apicontract.internal.spec.avro.parser.domain import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext +import amf.core.internal.parser.domain.Annotations import amf.shapes.client.scala.model.domain.{AnyShape, NodeShape} +import amf.shapes.internal.domain.metamodel.NodeShapeModel.AdditionalPropertiesSchema import org.yaml.model.YMap case class AvroMapShapeParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroCollectionShapeParser[NodeShape](map, "values") { - override val shape: NodeShape = NodeShape(map) - override def setMembers(anyShape: AnyShape): Unit = shape.withAdditionalPropertiesSchema(anyShape) + override val shape: NodeShape = NodeShape(map) + override def setMembers(anyShape: AnyShape): Unit = + shape.setWithoutId(AdditionalPropertiesSchema, anyShape, Annotations(map)) override def parseSpecificFields(): Unit = {} } diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroRecordParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroRecordParser.scala index 2884d81488..04614779fa 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroRecordParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroRecordParser.scala @@ -1,6 +1,7 @@ package amf.apicontract.internal.spec.avro.parser.domain import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext +import amf.core.client.scala.model.domain.AmfArray import amf.core.client.scala.model.domain.extensions.PropertyShape import amf.core.internal.datanode.DataNodeParser import amf.core.internal.metamodel.domain.ShapeModel @@ -9,6 +10,7 @@ import amf.core.internal.parser.YMapOps import amf.core.internal.parser.domain.Annotations import amf.shapes.client.scala.model.domain.{AnyShape, NodeShape} import amf.shapes.internal.domain.metamodel.AnyShapeModel +import amf.shapes.internal.domain.metamodel.NodeShapeModel.Properties import org.yaml.model.{YMap, YMapEntry, YNode} class AvroRecordParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroComplexShapeParser(map) { @@ -21,15 +23,25 @@ class AvroRecordParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroC private def parseFieldsEntry(e: YMapEntry): Unit = { val fields = e.value.as[Seq[YMap]].flatMap(parseField) - shape.withProperties(fields) + shape.setWithoutId(Properties, AmfArray(fields, Annotations(e.value)), Annotations(e)) } def parseField(map: YMap): Option[PropertyShape] = { - val maybeShape: Option[PropertyShape] = AvroRecordFieldParser(map).parse().map(buildProperty) + val maybeShape = + AvroRecordFieldParser(map) + .parse() + .map { s => + // add the map annotations + the avro type annotation to the PropertyShape wrapper + var ann = Annotations(map) + getAvroType(s).foreach(avroTypeAnnotation => ann = ann += avroTypeAnnotation) + val p = PropertyShape(ann).withRange(s) + p.setWithoutId(PropertyShapeModel.Range, s, s.annotations) + } maybeShape.foreach { p => map.key("name", AnyShapeModel.Name in p) map.key("aliases", AnyShapeModel.Aliases in p) map.key("doc", AnyShapeModel.Description in p) + // todo: change to new field Order (being a string) map.key("order", PropertyShapeModel.SerializationOrder in p) map.key( "default", @@ -41,9 +53,6 @@ class AvroRecordParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroC } maybeShape } - - private def buildProperty(anyShape: AnyShape): PropertyShape = - PropertyShape(Annotations.virtual()).withName("field").withRange(anyShape) } case class AvroRecordFieldParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroShapeParser(map) { diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroShapeParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroShapeParser.scala index 81eaa23277..e82164d97f 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroShapeParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroShapeParser.scala @@ -21,7 +21,7 @@ class AvroShapeParser(map: YMap)(implicit ctx: AvroSchemaContext) extends AvroKe // todo: should validate invalid type when using the AVRO Validator (None, "invalid avro type") } - maybeShape.map(_.annotations += AVROSchemaType(avroType)) + maybeShape.map(_.annotations += AVROSchemaType(avroType)) // avroType = record, enum, fixed, array, map, etc. maybeShape } diff --git a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroUnionShapeParser.scala b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroUnionShapeParser.scala index 6d1b62a2db..f13bbb5033 100644 --- a/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroUnionShapeParser.scala +++ b/amf-api-contract/shared/src/main/scala/amf/apicontract/internal/spec/avro/parser/domain/AvroUnionShapeParser.scala @@ -1,6 +1,7 @@ package amf.apicontract.internal.spec.avro.parser.domain import amf.apicontract.internal.spec.avro.parser.context.AvroSchemaContext +import amf.core.internal.parser.domain.Annotations import amf.shapes.client.scala.model.domain.UnionShape import org.yaml.model.{YMap, YNode} @@ -10,6 +11,6 @@ case class AvroUnionShapeParser(members: Seq[YNode], node: YNode)(implicit ctx: override def parseSpecificFields(): Unit = { val parsedMembers = members.map(node => AvroTextParser(node).parse()) - shape.withAnyOf(parsedMembers) + shape.withAnyOf(parsedMembers, Annotations(node)) } } diff --git a/amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.jsonld b/amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.jsonld index ca2035d186..2dcb89ce52 100644 --- a/amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.jsonld +++ b/amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.jsonld @@ -189,6 +189,42 @@ { "@value": "name" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -370,6 +406,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -560,6 +632,42 @@ { "@value": "favoriteProgrammingLanguage" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } ] }, { @@ -633,6 +741,42 @@ { "@value": "zipcode" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } ] } ], @@ -670,6 +814,42 @@ { "@value": "address" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] }, { @@ -724,6 +904,42 @@ { "@value": "someid" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/async-2.4-avro-valid.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.jsonld b/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.jsonld index 75644d361d..f03e47302b 100644 --- a/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.jsonld +++ b/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.jsonld @@ -189,6 +189,42 @@ { "@value": "name" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/name/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -370,6 +406,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/age/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -560,6 +632,42 @@ { "@value": "favoriteProgrammingLanguage" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } ] }, { @@ -633,6 +741,42 @@ { "@value": "zipcode" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } ] } ], @@ -670,6 +814,42 @@ { "@value": "address" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/address/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] }, { @@ -724,6 +904,42 @@ { "@value": "someid" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-components.yaml#/declares/msg/testMessage/payload/default/shape/Person/property/property/someid/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.jsonld b/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.jsonld index ba87f85183..3244216d62 100644 --- a/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.jsonld +++ b/amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.jsonld @@ -136,6 +136,42 @@ { "@value": "name" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/name/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/name" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/name/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -317,6 +353,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/age/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/age/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/age" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/age/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -482,6 +554,42 @@ { "@value": "favoriteProgrammingLanguage" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/favoriteProgrammingLanguage" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } ] }, { @@ -555,6 +663,42 @@ { "@value": "zipcode" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } ] } ], @@ -592,6 +736,42 @@ { "@value": "address" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/avro/tck/apis/valid/avro-inline.yaml#/async-api/endpoint/mychannel/supportedOperation/publish/expects/request/payload/default/shape/Person/property/property/address/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json new file mode 100644 index 0000000000..531bb52c67 --- /dev/null +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json @@ -0,0 +1,104 @@ +{ + "type": "record", + "name": "AllTypes", + "namespace": "root", + "aliases": [ + "EveryTypeInTheSameSchema" + ], + "doc": "this schema contains every possible type you can declare in avro inside it's fields", + "fields": [ + { + "name": "boolean-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the boolean primitive type", + "type": "boolean", + "default": false + }, + { + "name": "int-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the int primitive type", + "type": "int", + "default": 123 + }, + { + "name": "long-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the long primitive type", + "type": "long", + "default": 123 + }, + { + "name": "float-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the float primitive type", + "type": "float", + "default": 1.0 + }, + { + "name": "double-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the double primitive type", + "type": "double", + "default": 1.0 + }, + { + "name": "bytes-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the bytes primitive type", + "type": "bytes", + "default": "\u00FF" + }, + { + "name": "string-primitive-type", + "namespace": "primitives", + "doc": "this is a documentation for the string primitive type", + "type": "string", + "default": "foo" + }, + { + "name": "union", + "doc": "this is a documentation for the union type with recursive element", + "namespace": "unions", + "type": [ + "null", + "LongList" + ], + "default": null + }, + { + "type": "array", + "items": "long", + "default": [] + }, + { + "type": "array", + "items": { + "type": "array", + "items": "string" + }, + "default": [] + }, + { + "type": "enum", + "name": "Suit", + "symbols": [ + "SPADES", + "HEARTS", + "DIAMONDS", + "CLUBS" + ], + "default": "SPADES" + }, + { + "type": "fixed", + "size": 16, + "name": "md5" + }, + { + "type": "map", + "values": "long", + "default": {} + } + ] +} diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.jsonld new file mode 100644 index 0000000000..502ced1c5a --- /dev/null +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.jsonld @@ -0,0 +1,1983 @@ +[ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json", + "@type": [ + "http://a.ml/vocabularies/document#AvroSchemaDocumentModel", + "http://a.ml/vocabularies/document#Document", + "http://a.ml/vocabularies/document#Fragment", + "http://a.ml/vocabularies/document#Module", + "http://a.ml/vocabularies/document#Unit" + ], + "http://a.ml/vocabularies/document#encodes": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes", + "@type": [ + "http://www.w3.org/ns/shacl#NodeShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#property": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#boolean" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "boolean" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "boolean-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the boolean primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "false" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#boolean" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "boolean" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/boolean-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "boolean" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#int" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "int-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the int primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "123" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#integer" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/int-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#long" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "long-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the long primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "123" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#integer" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/long-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#float" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "float-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the float primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "1.0" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#double" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/float-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#double" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "double-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the double primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "1.0" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#double" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/double-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#bytes" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "bytes" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "bytes-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the bytes primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "\u00FF" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "bytes" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/bytes-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "bytes" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "string-primitive-type" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the string primitive type" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "foo" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/string-primitive-type/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union", + "@type": [ + "http://a.ml/vocabularies/shapes#UnionShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#anyOf": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/nil/null", + "@type": [ + "http://a.ml/vocabularies/shapes#NilShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "null" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/nil/null/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/nil/null/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/nil/null" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "null" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/anyOf/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "LongList" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "union" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the union type with recursive element" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "null" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#nil" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/shapes#namespace": [ + { + "@value": "unions" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/union/union" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "union" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this is a documentation for the union type with recursive element" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "null" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#nil" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/union/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array", + "@type": [ + "http://a.ml/vocabularies/shapes#ArrayShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#items": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#long" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/array_1", + "@type": [ + "http://a.ml/vocabularies/data#Array", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/2000/01/rdf-schema#member": [], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "array_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array/default-array" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/array_1", + "@type": [ + "http://a.ml/vocabularies/data#Array", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/2000/01/rdf-schema#member": [], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "array_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array", + "@type": [ + "http://a.ml/vocabularies/shapes#ArrayShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#items": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array", + "@type": [ + "http://a.ml/vocabularies/shapes#ArrayShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#items": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array/default-array" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/array_1", + "@type": [ + "http://a.ml/vocabularies/data#Array", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/2000/01/rdf-schema#member": [], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "array_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array/default-array" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/array_1", + "@type": [ + "http://a.ml/vocabularies/data#Array", + "http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/2000/01/rdf-schema#member": [], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "array_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_1/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "Suit" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "SPADES" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://www.w3.org/ns/shacl#in": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/list", + "@type": "http://www.w3.org/2000/01/rdf-schema#Seq", + "http://www.w3.org/2000/01/rdf-schema#_1": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/in/data-node", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "SPADES" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ] + } + ], + "http://www.w3.org/2000/01/rdf-schema#_2": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/in/data-node_3", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "HEARTS" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ] + } + ], + "http://www.w3.org/2000/01/rdf-schema#_3": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/in/data-node_4", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "DIAMONDS" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ] + } + ], + "http://www.w3.org/2000/01/rdf-schema#_4": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/in/data-node_5", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "CLUBS" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ] + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar/Suit" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "Suit" + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/scalar_1", + "@type": [ + "http://a.ml/vocabularies/data#Scalar", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/data#value": [ + { + "@value": "SPADES" + } + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "scalar_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/Suit/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/scalar/md5", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#fixed" + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "md5" + } + ], + "http://a.ml/vocabularies/shapes#size": [ + { + "@value": 16 + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/scalar/md5/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/scalar/md5/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/scalar/md5" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "fixed" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "md5" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "fixed" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/md5/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "fixed" + } + ] + } + ] + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2", + "@type": [ + "http://www.w3.org/ns/shacl#PropertyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/shapes#range": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node", + "@type": [ + "http://www.w3.org/ns/shacl#NodeShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#additionalPropertiesSchema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#long" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/object_1", + "@type": [ + "http://a.ml/vocabularies/data#Object", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "object_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/shape/default-node" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#defaultValue": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/object_1", + "@type": [ + "http://a.ml/vocabularies/data#Object", + "http://a.ml/vocabularies/data#Node", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://a.ml/vocabularies/core#name": [ + { + "@value": "object_1" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/property/property/default-property_2/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + } + ] + } + ] + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "AllTypes" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "this schema contains every possible type you can declare in avro inside it's fields" + } + ], + "http://a.ml/vocabularies/shapes#namespace": [ + { + "@value": "root" + } + ], + "http://a.ml/vocabularies/shapes#aliases": [ + { + "@value": "EveryTypeInTheSameSchema" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/shape/AllTypes" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } + ] + } + ], + "http://a.ml/vocabularies/document#root": [ + { + "@value": true + } + ], + "http://a.ml/vocabularies/document#package": [ + { + "@value": "root" + } + ], + "http://a.ml/vocabularies/document#processingData": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/all-types.json#/BaseUnitProcessingData", + "@type": [ + "http://a.ml/vocabularies/document#BaseUnitProcessingData" + ], + "http://a.ml/vocabularies/document#sourceSpec": [ + { + "@value": "Avro" + } + ] + } + ] + } +] diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.jsonld index e0c12b6e50..aa4a559e09 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.jsonld @@ -95,6 +95,42 @@ { "@value": "Unique identifier for this specific event" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/id/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/id/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/id" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/id/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -154,6 +190,42 @@ { "@value": "Instant the event took place" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/timestamp/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/timestamp/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/timestamp" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/shape/EventMetadata/property/property/timestamp/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } ] } ], @@ -206,6 +278,42 @@ { "@value": "Metadata about the event." } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/metadata/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] }, { @@ -265,6 +373,42 @@ { "@value": "Encrypted auth_code received when user authorizes the app." } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/auth_code/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/auth_code/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/auth_code" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/auth_code/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -324,6 +468,42 @@ { "@value": "ID of the user who triggered this event." } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/triggered_by/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/triggered_by/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/triggered_by" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/doc-schema.json#/shape/ConnectionRequested/property/property/triggered_by/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.jsonld index 0a567f6cbd..f23395ca9a 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.jsonld @@ -71,6 +71,42 @@ { "@value": "name" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/name/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/name" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/name/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -252,6 +288,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/age/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/age/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/age" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/age/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -417,6 +489,42 @@ { "@value": "favoriteProgrammingLanguage" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/favoriteProgrammingLanguage/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/favoriteProgrammingLanguage" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } ] }, { @@ -490,6 +598,42 @@ { "@value": "zipcode" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/shape/Address/property/property/zipcode/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/shape/Address/property/property/zipcode" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } ] } ], @@ -527,6 +671,42 @@ { "@value": "address" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/enum-schema.json#/shape/default-node/property/property/address/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.jsonld index fc8df36aa7..b09e2c2bcf 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.jsonld @@ -32,6 +32,29 @@ { "@id": "http://www.w3.org/2001/XMLSchema#long" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.json#/shape/default-node/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.json#/shape/default-node/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/map.json#/shape/default-node/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.jsonld index 2c5e04bbc1..47a46651ae 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.jsonld @@ -123,6 +123,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/arr/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/arr/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/arr" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/arr/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } ] }, { @@ -157,6 +193,29 @@ { "@id": "http://www.w3.org/2001/XMLSchema#long" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map/shape/default-node/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map/shape/default-node/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map/shape/default-node/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } ] } ], @@ -204,6 +263,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/map/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + } + ] + } ] }, { @@ -328,6 +423,42 @@ { "@value": "nested_arr" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_arr/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_arr/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_arr" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_arr/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } ] }, { @@ -350,13 +481,76 @@ ], "http://www.w3.org/ns/shacl#additionalPropertiesSchema": [ { - "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/scalar/default-scalar", + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node", "@type": [ - "http://a.ml/vocabularies/shapes#ScalarShape", + "http://www.w3.org/ns/shacl#NodeShape", "http://a.ml/vocabularies/shapes#AnyShape", "http://www.w3.org/ns/shacl#Shape", "http://a.ml/vocabularies/shapes#Shape", "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#additionalPropertiesSchema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node/scalar/default-scalar", + "@type": [ + "http://a.ml/vocabularies/shapes#ScalarShape", + "http://a.ml/vocabularies/shapes#AnyShape", + "http://www.w3.org/ns/shacl#Shape", + "http://a.ml/vocabularies/shapes#Shape", + "http://a.ml/vocabularies/document#DomainElement" + ], + "http://www.w3.org/ns/shacl#datatype": [ + { + "@id": "http://www.w3.org/2001/XMLSchema#long" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node/scalar/default-scalar/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/shape/default-node/shape/default-node" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + } + ] + } ] } ], @@ -389,6 +583,42 @@ { "@value": "nested_map" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/nested-schema.json#/shape/TestRecordWithMapsAndArrays/property/property/nested_map/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "map" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.jsonld index 571b8041c7..a478053bd5 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.jsonld @@ -71,6 +71,42 @@ { "@value": "name" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/name/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/name" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/name/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -125,6 +161,42 @@ { "@value": "serialNo" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/serialNo/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/serialNo/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/serialNo" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/serialNo/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -306,6 +378,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/email/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/email/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/email" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/email/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -487,6 +595,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/age/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/age/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/age" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/age/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -677,6 +821,42 @@ { "@value": "favoriteProgrammingLanguage" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/favoriteProgrammingLanguage/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/favoriteProgrammingLanguage" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } ] }, { @@ -766,6 +946,42 @@ { "@value": "certifications" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/certifications/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/certifications/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/certifications" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/certifications/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } ] }, { @@ -839,6 +1055,42 @@ { "@value": "zipcode" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } ] }, { @@ -1020,6 +1272,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/country/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/country/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/country" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/shape/Address/property/property/country/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] } ], @@ -1057,6 +1345,42 @@ { "@value": "address" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/address/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] }, { @@ -1111,6 +1435,42 @@ { "@value": "weight" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/weight/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/weight/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/weight" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/weight/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + } + ] + } ] }, { @@ -1165,6 +1525,42 @@ { "@value": "height" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/height/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/height/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/height" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/height/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + } + ] + } ] }, { @@ -1219,6 +1615,42 @@ { "@value": "someid" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/someid/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/someid/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/someid" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/non-standar.json#/shape/Person/property/property/someid/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.jsonld index 904cf03495..30292740ae 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.jsonld @@ -71,6 +71,42 @@ { "@value": "name" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/name/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/name" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/name/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -125,6 +161,42 @@ { "@value": "serialNo" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/serialNo/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/serialNo/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/serialNo" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/serialNo/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] }, { @@ -306,6 +378,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/email/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/email/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/email" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/email/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -487,6 +595,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/age/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/age/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/age" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/age/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] }, { @@ -677,6 +821,42 @@ { "@value": "favoriteProgrammingLanguage" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/favoriteProgrammingLanguage/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/favoriteProgrammingLanguage" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/favoriteProgrammingLanguage/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "enum" + } + ] + } + ] + } ] }, { @@ -766,6 +946,42 @@ { "@value": "certifications" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/certifications/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/certifications/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/certifications" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/certifications/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "array" + } + ] + } + ] + } ] }, { @@ -839,6 +1055,42 @@ { "@value": "zipcode" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/zipcode/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "int" + } + ] + } + ] + } ] }, { @@ -1020,6 +1272,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/country/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/country/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/country" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/shape/Address/property/property/country/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] } ], @@ -1057,6 +1345,42 @@ { "@value": "address" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/address/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "record" + } + ] + } + ] + } ] }, { @@ -1111,6 +1435,42 @@ { "@value": "weight" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/weight/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/weight/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/weight" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/weight/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "float" + } + ] + } + ] + } ] }, { @@ -1165,6 +1525,42 @@ { "@value": "height" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/height/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/height/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/height" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/height/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "double" + } + ] + } + ] + } ] }, { @@ -1219,6 +1615,42 @@ { "@value": "someid" } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/someid/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/someid/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/someid" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/person-schema.json#/shape/Person/property/property/someid/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "string" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.jsonld index 6b764e9f24..761ddcf03d 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.jsonld @@ -101,6 +101,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/value/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/value/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/value" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/value/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "long" + } + ] + } + ] + } ] }, { @@ -302,6 +338,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/next/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/next/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/next" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/record.json#/shape/LongList/property/property/next/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.jsonld b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.jsonld index ac7cc539c4..dcb8b64406 100644 --- a/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.jsonld +++ b/amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.jsonld @@ -198,6 +198,42 @@ } ] } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.json#/shape/TestUnionRecord/property/property/amount/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#avro-schema": [ + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.json#/shape/TestUnionRecord/property/property/amount/source-map/avro-schema/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.json#/shape/TestUnionRecord/property/property/amount" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + }, + { + "@id": "file://amf-cli/shared/src/test/resources/upanddown/cycle/avro/valid/test-union-record.json#/shape/TestUnionRecord/property/property/amount/source-map/avro-schema/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#range" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "union" + } + ] + } + ] + } ] } ], diff --git a/amf-cli/shared/src/test/scala/amf/avro/AvroSchemaTCKTest.scala b/amf-cli/shared/src/test/scala/amf/avro/AvroSchemaTCKTest.scala index 547ddea50c..dacfce1af7 100644 --- a/amf-cli/shared/src/test/scala/amf/avro/AvroSchemaTCKTest.scala +++ b/amf-cli/shared/src/test/scala/amf/avro/AvroSchemaTCKTest.scala @@ -21,7 +21,7 @@ class AvroSchemaValidTCKTest extends AvroSchemaCycleTest { } test("array with an schema in items field") { - cycle("array-with-items-schema.json", "array-with-items-schema.jsonld", AvroHint, AmfJsonHint) + cycle("record.json", "record.jsonld", AvroHint, AmfJsonHint) } override def renderOptions(): RenderOptions = RenderOptions().withoutFlattenedJsonLd.withPrettyPrint