From 9420f0b90b7c5402b029e090226982c97e5408b7 Mon Sep 17 00:00:00 2001 From: Agustin Bettati Date: Mon, 26 Jul 2021 14:47:12 -0300 Subject: [PATCH 01/16] cleanup: remove useless commons-compress dependency statement --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index 6e87faeee3..c20b67edbc 100644 --- a/build.sbt +++ b/build.sbt @@ -120,7 +120,6 @@ lazy val client = crossProject(JSPlatform, JVMPlatform) libraryDependencies += "org.scala-js" %% "scalajs-stubs" % scalaJSVersion % "provided", libraryDependencies += "org.reflections" % "reflections" % "0.9.12", libraryDependencies += "org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0", - libraryDependencies += "org.apache.commons" % "commons-compress" % "1.18", mainClass in Compile := Some("amf.Main"), packageOptions in (Compile, packageBin) += Package.ManifestAttributes("Automatic-Module-Name" → "org.mule.amf"), mappings in (Compile, packageBin) += file("amf-webapi.versions") -> "amf-webapi.versions", From 373aba2dd3f49fa71035d289c9ddeb69062d2cbb Mon Sep 17 00:00:00 2001 From: Loose Date: Tue, 27 Jul 2021 17:22:27 -0300 Subject: [PATCH 02/16] Publish 4.8.0-SNAPSHOT --- Jenkinsfile | 1 - amf-webapi.versions | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6bd75d55df..5d2c224834 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,7 +58,6 @@ pipeline { anyOf { branch 'master' branch 'develop' - branch 'release/*' } } steps { diff --git a/amf-webapi.versions b/amf-webapi.versions index abf9a55ef8..9bae2cb912 100644 --- a/amf-webapi.versions +++ b/amf-webapi.versions @@ -1,4 +1,4 @@ -amf.webapi=4.7.6-RC.1 +amf.webapi=4.8.0-SNAPSHOT amf.core=4.2.223 -amf.custom.validations=5.1.8-RC.1 +amf.custom.validations=5.2.0-SNAPSHOT amf.model=3.1.0 From e9fe332df14186abca5bb075389de59e6983c92e Mon Sep 17 00:00:00 2001 From: arielmirra Date: Wed, 4 Aug 2021 16:17:27 -0300 Subject: [PATCH 03/16] APIMF-2973: make nillable type behave like nil union --- .../union/optional-object.out.editing.raml | 20 +- .../resources/union/optional-object.out.raml | 8 +- .../union/optional-scalar.out.default.raml | 8 +- .../union/optional-scalar.out.editing.raml | 18 +- .../resources/union/optional-scalar.out.raml | 12 +- .../union/union-default.out.default.raml | 8 + .../union/union-default.out.editing.raml | 12 ++ .../resources/union/union-default.out.raml | 11 + .../test/resources/union/union-default.raml | 13 ++ .../api.raml.expanded.jsonld | 198 ++++++++++++------ .../api.raml.flattened.jsonld | 170 ++++++++++----- .../api.raml.jsonld.raml.ignore | 12 +- .../type_nil_shortcut/dumped.raml.ignore | 12 +- .../amf/emit/UnionRamlEmissionTest.scala | 19 ++ .../spec/declaration/Raml10TypeParser.scala | 38 ++-- 15 files changed, 370 insertions(+), 189 deletions(-) create mode 100644 amf-client/shared/src/test/resources/union/union-default.out.default.raml create mode 100644 amf-client/shared/src/test/resources/union/union-default.out.editing.raml create mode 100644 amf-client/shared/src/test/resources/union/union-default.out.raml create mode 100644 amf-client/shared/src/test/resources/union/union-default.raml diff --git a/amf-client/shared/src/test/resources/union/optional-object.out.editing.raml b/amf-client/shared/src/test/resources/union/optional-object.out.editing.raml index 515f26fac4..1c2445c2d5 100644 --- a/amf-client/shared/src/test/resources/union/optional-object.out.editing.raml +++ b/amf-client/shared/src/test/resources/union/optional-object.out.editing.raml @@ -1,16 +1,6 @@ #%RAML 1.0 title: New API types: - SomeType: - type: object - additionalProperties: true - properties: - a: - type: string - required: true - b: - type: integer - required: true OtherType: anyOf: - @@ -25,6 +15,16 @@ types: required: true - type: nil + SomeType: + type: object + additionalProperties: true + properties: + a: + type: string + required: true + b: + type: integer + required: true /someEndpoint: post: body: diff --git a/amf-client/shared/src/test/resources/union/optional-object.out.raml b/amf-client/shared/src/test/resources/union/optional-object.out.raml index c7159f11cd..a8b5770006 100644 --- a/amf-client/shared/src/test/resources/union/optional-object.out.raml +++ b/amf-client/shared/src/test/resources/union/optional-object.out.raml @@ -1,6 +1,8 @@ #%RAML 1.0 title: New API types: + OtherType: + type: SomeType | nil SomeType: type: object properties: @@ -8,12 +10,6 @@ types: type: string b: type: integer - OtherType: - anyOf: - - - type: SomeType - - - type: nil /someEndpoint: post: body: diff --git a/amf-client/shared/src/test/resources/union/optional-scalar.out.default.raml b/amf-client/shared/src/test/resources/union/optional-scalar.out.default.raml index 0e03f22965..eaa2124ac5 100644 --- a/amf-client/shared/src/test/resources/union/optional-scalar.out.default.raml +++ b/amf-client/shared/src/test/resources/union/optional-scalar.out.default.raml @@ -4,9 +4,5 @@ title: New API post: body: application/json: - anyOf: - - - type: string - description: some description - - - type: nil + description: some description + type: string | nil diff --git a/amf-client/shared/src/test/resources/union/optional-scalar.out.editing.raml b/amf-client/shared/src/test/resources/union/optional-scalar.out.editing.raml index 86db6c0d1e..29b3055da9 100644 --- a/amf-client/shared/src/test/resources/union/optional-scalar.out.editing.raml +++ b/amf-client/shared/src/test/resources/union/optional-scalar.out.editing.raml @@ -1,20 +1,12 @@ #%RAML 1.0 title: New API +types: + SomeType: + description: some description + type: string | nil /someEndpoint: post: body: application/json: - anyOf: - - - type: string - description: some description - - - type: nil -types: - SomeType: - anyOf: - - - type: string description: some description - - - type: nil + type: string | nil diff --git a/amf-client/shared/src/test/resources/union/optional-scalar.out.raml b/amf-client/shared/src/test/resources/union/optional-scalar.out.raml index 355e52c388..e0f5f0571f 100644 --- a/amf-client/shared/src/test/resources/union/optional-scalar.out.raml +++ b/amf-client/shared/src/test/resources/union/optional-scalar.out.raml @@ -1,15 +1,11 @@ #%RAML 1.0 title: New API +types: + SomeType: + type: string | nil + description: some description /someEndpoint: post: body: application/json: type: SomeType -types: - SomeType: - anyOf: - - - type: string - description: some description - - - type: nil diff --git a/amf-client/shared/src/test/resources/union/union-default.out.default.raml b/amf-client/shared/src/test/resources/union/union-default.out.default.raml new file mode 100644 index 0000000000..7336abb80e --- /dev/null +++ b/amf-client/shared/src/test/resources/union/union-default.out.default.raml @@ -0,0 +1,8 @@ +#%RAML 1.0 +title: New API +/someEndpoint: + post: + body: + application/json: + default: 20 + type: integer | nil diff --git a/amf-client/shared/src/test/resources/union/union-default.out.editing.raml b/amf-client/shared/src/test/resources/union/union-default.out.editing.raml new file mode 100644 index 0000000000..0e7e091a96 --- /dev/null +++ b/amf-client/shared/src/test/resources/union/union-default.out.editing.raml @@ -0,0 +1,12 @@ +#%RAML 1.0 +title: New API +types: + UnionType: + default: 20 + type: integer | nil +/someEndpoint: + post: + body: + application/json: + default: 20 + type: integer | nil diff --git a/amf-client/shared/src/test/resources/union/union-default.out.raml b/amf-client/shared/src/test/resources/union/union-default.out.raml new file mode 100644 index 0000000000..6dc8f750c9 --- /dev/null +++ b/amf-client/shared/src/test/resources/union/union-default.out.raml @@ -0,0 +1,11 @@ +#%RAML 1.0 +title: New API +types: + UnionType: + type: integer | nil + default: 20 +/someEndpoint: + post: + body: + application/json: + type: UnionType diff --git a/amf-client/shared/src/test/resources/union/union-default.raml b/amf-client/shared/src/test/resources/union/union-default.raml new file mode 100644 index 0000000000..41dd3a7178 --- /dev/null +++ b/amf-client/shared/src/test/resources/union/union-default.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 +title: New API + +types: + UnionType: + type: integer? + default: 20 + +/someEndpoint: + post: + body: + application/json: + type: UnionType diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.expanded.jsonld index be66af13e8..d18edc4f81 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.expanded.jsonld @@ -335,7 +335,7 @@ ], "http://a.ml/vocabularies/shapes#schema": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored", "@type": [ "http://a.ml/vocabularies/shapes#UnionShape", "http://a.ml/vocabularies/shapes#AnyShape", @@ -343,128 +343,196 @@ "http://a.ml/vocabularies/shapes#Shape", "http://a.ml/vocabularies/document#DomainElement" ], - "http://a.ml/vocabularies/shapes#anyOf": [ + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "ignored" + } + ], + "http://a.ml/vocabularies/core#description": [ + { + "@value": "This annotation allows to specify a method which will not be transformed into an operation.\nOptionally, a reason can be defined.\n" + } + ], + "http://a.ml/vocabularies/shapes#inherits": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union", "@type": [ - "http://a.ml/vocabularies/shapes#ScalarShape", + "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://www.w3.org/ns/shacl#datatype": [ - { - "@id": "http://www.w3.org/2001/XMLSchema#string" - } - ], - "http://www.w3.org/ns/shacl#name": [ - { - "@value": "" - } - ], - "http://a.ml/vocabularies/core#description": [ - { - "@value": "This annotation allows to specify a method which will not be transformed into an operation.\nOptionally, a reason can be defined.\n" - } - ], - "http://a.ml/vocabularies/document-source-maps#sources": [ + "http://a.ml/vocabularies/shapes#anyOf": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar", "@type": [ - "http://a.ml/vocabularies/document-source-maps#SourceMap" + "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#type-property-lexical-info": [ + "http://www.w3.org/ns/shacl#datatype": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/type-property-lexical-info/element_0", - "http://a.ml/vocabularies/document-source-maps#element": [ - { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/" - } + "@id": "http://www.w3.org/2001/XMLSchema#string" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#value": [ + "http://a.ml/vocabularies/document-source-maps#lexical": [ { - "@value": "[(1,0)-(1,0)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "[(0,0)-(0,6)]" + } + ] } ] } + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil", + "@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://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#sources": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_2", - "http://a.ml/vocabularies/document-source-maps#element": [ - { - "@value": "http://www.w3.org/ns/shacl#datatype" - } + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#value": [ + "http://a.ml/vocabularies/document-source-maps#lexical": [ { - "@value": "[(1,0)-(1,0)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "[(0,9)-(0,12)]" + } + ] } ] - }, + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#type-expression": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_0", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map/type-expression/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://a.ml/vocabularies/core#description" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(10,8)-(13,0)]" + "@value": "string | nil" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(13,8)-(15,0)]" + "@value": "[(1,0)-(1,0)]" } ] } ] } ] - }, - { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/nil/default-nil", - "@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": "schema" } ], "http://a.ml/vocabularies/document-source-maps#sources": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/source-map", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map", "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ + "http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/source-map/synthesized-field/element_0", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/type-property-lexical-info/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://a.ml/vocabularies/shapes#anyOf" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "true" + "@value": "[(1,0)-(1,0)]" + } + ] + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_2", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/core#description" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "[(10,8)-(13,0)]" + } + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://a.ml/vocabularies/shapes#inherits" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "[(1,0)-(1,0)]" + } + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "[(13,8)-(15,0)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.flattened.jsonld index 12d17129ce..35f9ba700a 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.flattened.jsonld @@ -159,7 +159,7 @@ } ], "http://a.ml/vocabularies/shapes#schema": { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored" }, "http://a.ml/vocabularies/core#name": "ignored", "http://a.ml/vocabularies/document-source-maps#sources": [ @@ -256,7 +256,7 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored", "@type": [ "http://a.ml/vocabularies/shapes#UnionShape", "http://a.ml/vocabularies/shapes#AnyShape", @@ -264,18 +264,16 @@ "http://a.ml/vocabularies/shapes#Shape", "http://a.ml/vocabularies/document#DomainElement" ], - "http://a.ml/vocabularies/shapes#anyOf": [ - { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/" - }, + "http://www.w3.org/ns/shacl#name": "ignored", + "http://a.ml/vocabularies/core#description": "This annotation allows to specify a method which will not be transformed into an operation.\nOptionally, a reason can be defined.\n", + "http://a.ml/vocabularies/shapes#inherits": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/nil/default-nil" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union" } ], - "http://www.w3.org/ns/shacl#name": "schema", "http://a.ml/vocabularies/document-source-maps#sources": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/source-map" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map" } ] }, @@ -455,44 +453,47 @@ "http://a.ml/vocabularies/document-source-maps#value": "[(7,4)-(7,8)]" }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union", "@type": [ - "http://a.ml/vocabularies/shapes#ScalarShape", + "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://www.w3.org/ns/shacl#datatype": [ + "http://a.ml/vocabularies/shapes#anyOf": [ { - "@id": "http://www.w3.org/2001/XMLSchema#string" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar" + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil" } ], - "http://www.w3.org/ns/shacl#name": "", - "http://a.ml/vocabularies/core#description": "This annotation allows to specify a method which will not be transformed into an operation.\nOptionally, a reason can be defined.\n", "http://a.ml/vocabularies/document-source-maps#sources": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map" } ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/nil/default-nil", - "@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" - ] - }, - { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/source-map", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map", "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ + "http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/type-property-lexical-info/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_2" + }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/source-map/synthesized-field/element_0" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_0" + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_1" } ] }, @@ -635,31 +636,74 @@ "http://a.ml/vocabularies/document-source-maps#value": "true" }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar", "@type": [ - "http://a.ml/vocabularies/document-source-maps#SourceMap" + "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#type-property-lexical-info": [ + "http://www.w3.org/ns/shacl#datatype": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/type-property-lexical-info/element_0" + "@id": "http://www.w3.org/2001/XMLSchema#string" } ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#sources": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_2" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar/source-map" + } + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil", + "@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://a.ml/vocabularies/document-source-maps#sources": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_0" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil/source-map" + } + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#type-expression": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map/type-expression/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_1" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map/lexical/element_0" } ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/source-map/synthesized-field/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#anyOf", - "http://a.ml/vocabularies/document-source-maps#value": "true" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/type-property-lexical-info/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored", + "http://a.ml/vocabularies/document-source-maps#value": "[(1,0)-(1,0)]" + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_2", + "http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#description", + "http://a.ml/vocabularies/document-source-maps#value": "[(10,8)-(13,0)]" + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#inherits", + "http://a.ml/vocabularies/document-source-maps#value": "[(1,0)-(1,0)]" + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored/source-map/lexical/element_1", + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/ignored", + "http://a.ml/vocabularies/document-source-maps#value": "[(13,8)-(15,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/operationName/scalar/schema/source-map/type-property-lexical-info/element_0", @@ -712,24 +756,46 @@ "http://a.ml/vocabularies/document-source-maps#value": "[(1,0)-(1,0)]" }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/type-property-lexical-info/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/", - "http://a.ml/vocabularies/document-source-maps#value": "[(1,0)-(1,0)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar/source-map/lexical/element_0" + } + ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_2", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil/source-map/lexical/element_0" + } + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map/type-expression/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union", + "http://a.ml/vocabularies/document-source-maps#value": "string | nil" + }, + { + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union", "http://a.ml/vocabularies/document-source-maps#value": "[(1,0)-(1,0)]" }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#description", - "http://a.ml/vocabularies/document-source-maps#value": "[(10,8)-(13,0)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/0/scalar/default-scalar", + "http://a.ml/vocabularies/document-source-maps#value": "[(0,0)-(0,6)]" }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/scalar/", - "http://a.ml/vocabularies/document-source-maps#value": "[(13,8)-(15,0)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil/source-map/lexical/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml#/declarations/annotations/ignored/union/schema/union/default-union/1/nil/default-nil", + "http://a.ml/vocabularies/document-source-maps#value": "[(0,9)-(0,12)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.jsonld.raml.ignore b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.jsonld.raml.ignore index 9f97a2221a..2ba8f8b1d8 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.jsonld.raml.ignore +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/api.raml.jsonld.raml.ignore @@ -5,16 +5,12 @@ annotationTypes: base: type: string | nil ignored: + type: string | nil + description: | + This annotation allows to specify a method which will not be transformed into an operation. + Optionally, a reason can be defined. allowedTargets: - Method - anyOf: - - - type: string - description: | - This annotation allows to specify a method which will not be transformed into an operation. - Optionally, a reason can be defined. - - - type: nil operationName: type: string description: | diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/dumped.raml.ignore b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/dumped.raml.ignore index b97a358615..f5ef35fc05 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/dumped.raml.ignore +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/type_nil_shortcut/dumped.raml.ignore @@ -5,19 +5,15 @@ annotationTypes: base: type: string | nil ignored: + type: string | nil + description: | + This annotation allows to specify a method which will not be transformed into an operation. + Optionally, a reason can be defined. description: | This annotation allows to specify a method which will not be transformed into an operation. Optionally, a reason can be defined. allowedTargets: - Method - anyOf: - - - type: string - description: | - This annotation allows to specify a method which will not be transformed into an operation. - Optionally, a reason can be defined. - - - type: nil operationName: type: string description: | diff --git a/amf-client/shared/src/test/scala/amf/emit/UnionRamlEmissionTest.scala b/amf-client/shared/src/test/scala/amf/emit/UnionRamlEmissionTest.scala index acd536794b..011f63b235 100644 --- a/amf-client/shared/src/test/scala/amf/emit/UnionRamlEmissionTest.scala +++ b/amf-client/shared/src/test/scala/amf/emit/UnionRamlEmissionTest.scala @@ -241,4 +241,23 @@ class UnionRamlEmissionTest extends FunSuiteCycleTests { pipeline = Some(DEFAULT_PIPELINE)) } + test("Union with default - No Resolution") { + cycle("union-default.raml", "union-default.out.raml", RamlYamlHint, Raml10, pipeline = None) + } + + test("Union with default - Editing Resolution") { + cycle("union-default.raml", + "union-default.out.editing.raml", + RamlYamlHint, + Raml10, + pipeline = Some(EDITING_PIPELINE)) + } + + test("Union with default - Default Resolution") { + cycle("union-default.raml", + "union-default.out.default.raml", + RamlYamlHint, + Raml10, + pipeline = Some(DEFAULT_PIPELINE)) + } } diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala index 0f5e5f7ce3..48afe874e9 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala @@ -27,6 +27,7 @@ import amf.plugins.document.webapi.parser.spec.raml.expression.RamlExpressionPar import amf.plugins.document.webapi.parser.spec.toOas import amf.plugins.document.webapi.parser.{RamlTypeDefMatcher, TypeName} import amf.plugins.document.webapi.vocabulary.VocabularyMappings +import amf.plugins.document.webapi.vocabulary.VocabularyMappings.shape import amf.plugins.domain.shapes.metamodel._ import amf.plugins.domain.shapes.models.TypeDef._ import amf.plugins.domain.shapes.models.{ScalarType, _} @@ -558,29 +559,40 @@ sealed abstract class RamlTypeParser(entryOrNode: YMapEntryLike, val union = UnionShape(Annotations.virtual()).withName(name, nameAnnotations) adopt(union) - val parsed = node.value match { + node.value match { case s: YScalar => val toParse = YMapEntry(YNode(""), YNode(s.text.stripSuffix("?"))) - ctx.factory.typeParser(toParse, s => s.withId(union.id), typeInfo.isAnnotation, defaultType).parse().get + val parsed = + ctx.factory.typeParser(toParse, s => s.withId(union.id), typeInfo.isAnnotation, defaultType).parse().get + union.set(UnionShapeModel.AnyOf, + AmfArray( + Seq( + parsed, + NilShape(Annotations.virtual()).withId(union.id) + )), + Annotations.synthesized()) case m: YMap => val newEntries = m.entries.map { entry => if (entry.key.as[YScalar].text == "type") { - YMapEntry("type", entry.value.as[YScalar].text.stripSuffix("?")) + val typeToUnion = s"${entry.value.as[YScalar].text.stripSuffix("?")} | nil" + YMapEntry("type", typeToUnion) } else { entry } } - - val toParse = YMapEntry(YNode(""), YMap(newEntries, newEntries.headOption.map(_.sourceName).getOrElse(""))) - ctx.factory.typeParser(toParse, s => s.withId(union.id), typeInfo.isAnnotation, defaultType).parse().get + val toParse = YMapEntry(YNode(name), YMap(newEntries, newEntries.headOption.map(_.sourceName).getOrElse(""))) + val parsed = + ctx.factory.typeParser(toParse, s => s.withId(union.id), typeInfo.isAnnotation, defaultType).parse().get + parsed.inherits.head match { + case union: UnionShape => + union.anyOf.tail.head match { + case nil: NilShape => nil.add(Annotations.virtual()) + case _ => // ignore + } + case _ => // ignore + } + parsed } - union.set(UnionShapeModel.AnyOf, - AmfArray( - Seq( - parsed, - NilShape(Annotations.virtual()).withId(union.id) - )), - Annotations.synthesized()) } // These are the actual custom facets, just regular properties in the AST map that have been From 4823048d8c312bed0ff7872d357dab2fc1b7bceb Mon Sep 17 00:00:00 2001 From: arielmirra Date: Thu, 5 Aug 2021 16:46:32 -0300 Subject: [PATCH 04/16] APIMF-2975: nillable properties now accept required facet --- .../resources/validations/nillable-with-nillable.raml | 7 +++++++ .../resources/validations/nillable-with-required.raml | 8 ++++++++ .../validation/RamlModelUniquePlatformReportTest.scala | 8 ++++++++ .../webapi/parser/spec/declaration/Raml10TypeParser.scala | 3 +-- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 amf-client/shared/src/test/resources/validations/nillable-with-nillable.raml create mode 100644 amf-client/shared/src/test/resources/validations/nillable-with-required.raml diff --git a/amf-client/shared/src/test/resources/validations/nillable-with-nillable.raml b/amf-client/shared/src/test/resources/validations/nillable-with-nillable.raml new file mode 100644 index 0000000000..90759c70f6 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/nillable-with-nillable.raml @@ -0,0 +1,7 @@ +#%RAML 1.0 +title: Sample API +types: + TestObject: + properties: + testProperty?: + type: string? diff --git a/amf-client/shared/src/test/resources/validations/nillable-with-required.raml b/amf-client/shared/src/test/resources/validations/nillable-with-required.raml new file mode 100644 index 0000000000..d65cef6f4a --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/nillable-with-required.raml @@ -0,0 +1,8 @@ +#%RAML 1.0 +title: Sample API +types: + TestObject: + properties: + testProperty: + required: false + type: string? diff --git a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala index b95bec4fa0..9aafb17cfd 100644 --- a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala +++ b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala @@ -602,4 +602,12 @@ class RamlModelUniquePlatformReportTest extends UniquePlatformReportGenTest { test("invalid duplicated nullable property") { validate("duplicate-property/api.raml", Some("raml/duplicated-property.report")) } + + test("nillable type notation should accept required facet") { + validate("nillable-with-required.raml") + } + + test("nillable property of nillable type") { + validate("nillable-with-nillable.raml") + } } diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala index 48afe874e9..6aab655713 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/Raml10TypeParser.scala @@ -581,8 +581,7 @@ sealed abstract class RamlTypeParser(entryOrNode: YMapEntryLike, } } val toParse = YMapEntry(YNode(name), YMap(newEntries, newEntries.headOption.map(_.sourceName).getOrElse(""))) - val parsed = - ctx.factory.typeParser(toParse, s => s.withId(union.id), typeInfo.isAnnotation, defaultType).parse().get + val parsed = Raml10TypeParser(toParse, s => s.withId(union.id), typeInfo).parse().get parsed.inherits.head match { case union: UnionShape => union.anyOf.tail.head match { From 488c2c0a4864250245b72fcce751481c9c13fe4b Mon Sep 17 00:00:00 2001 From: Ariel Mirra <8195364+arielmirra@users.noreply.github.com> Date: Fri, 6 Aug 2021 11:25:31 -0300 Subject: [PATCH 05/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f6fb60bff3..0506d1021c 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ The **only** guaranteed output of AMF is the JSON-LD "AMF model". Any other outp ## Documentation - [The AML Project](https://a.ml) -- [What is AMF?](https://a.ml/docbook/overview_amf.html) +- [What is AMF?](https://a.ml/docs) - [AMF model documentation](documentation/model.md) - [Validation insights](./documentation/validation.md) - [Basic use cases - parsing & validating an API](documentation/basic_use_cases.md) From 53f64a081d650886a3b099ec1073a28a20b1f99e Mon Sep 17 00:00:00 2001 From: arielmirra Date: Fri, 20 Aug 2021 13:43:17 -0300 Subject: [PATCH 06/16] add ADR for annotation types --- adrs/0010-shape-annotation-types.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 adrs/0010-shape-annotation-types.md diff --git a/adrs/0010-shape-annotation-types.md b/adrs/0010-shape-annotation-types.md new file mode 100644 index 0000000000..89dbb455d1 --- /dev/null +++ b/adrs/0010-shape-annotation-types.md @@ -0,0 +1,27 @@ +# 10. Annotation types +Date: 2021-08-20 + +## Status +Accepted + +## Context +When AMF builds a model from a content, it must justify from where each node and property came from, so the users can track and know for sure the origin of the values. This source map information is fundamental for editing features. + +In a parsed API, the elements declared in the source document have their corresponding annotations (think of `LexicalInformation` or `SourceNode`) in the final model, but some elements in the AMF model are not explicitly declared. Moreover, some of this not-declared elements are fields we can easily infer from the source document (like the name of an operation) while others have no real counterpart in the source document. + +## Decision +For these reasons, the decision has been made in favor of adding 3 annotation types to make every object or field traceable to where it came from, whether it was from the source document or it was generated by AMF: + +- `Annotations.inferred()` + - A field is **inferred** when the entry has been inferred but the value is real (is present in the source document) + - Example: The name of an operation, which has no entry `name` but we can infer it from it's declaration in the document +- `Annotations.virtual()` + - An object is **virtual** when it's generated without having a counterpart in the source document + - Example: The `Request` object in the AMF model +- `Annotations.synthesized()` + - A field is **synthesized** when the entry as well as the value are inferred + - This field has nothing that matches it on the AST, and the same is true for its children + - Examples: `PropertyShape.MinCount` when it's set to 1 based on a `required: true` + +## Consequences +This decision has no immediate impact. From 4b3768cf56ea82ad44b51f6120a43aa3dc43f2c8 Mon Sep 17 00:00:00 2001 From: arielmirra Date: Wed, 18 Aug 2021 10:39:49 -0300 Subject: [PATCH 07/16] APIMF-3025: generate a PropertyShape when `required` facet is inlined - add required facet as criteria to detect an object - generate a PropertyShape when required facet is inlined --- .../api.resolved.expanded.jsonld | 53 +++++++++++++++++++ .../api.resolved.flattened.jsonld | 47 ++++++++++++++++ .../raml-implicit-required-property.raml | 29 ++++++++++ .../validations/raml-inline-required.raml | 28 ++++++++++ .../raml-subschema-with-required.raml | 31 +++++++++++ .../RamlModelUniquePlatformReportTest.scala | 12 +++++ .../spec/declaration/types/TypeDetector.scala | 1 + .../parser/types/InlineOasTypeParser.scala | 29 +++++++--- 8 files changed, 222 insertions(+), 8 deletions(-) create mode 100644 amf-client/shared/src/test/resources/validations/raml-implicit-required-property.raml create mode 100644 amf-client/shared/src/test/resources/validations/raml-inline-required.raml create mode 100644 amf-client/shared/src/test/resources/validations/raml-subschema-with-required.raml diff --git a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld index 94fa2d48ff..f9c0e71904 100644 --- a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld @@ -4833,6 +4833,59 @@ ] } ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name", + "@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-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/any/default-any", + "@type": [ + "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#minCount": [ + { + "@value": 1 + } + ], + "http://www.w3.org/ns/shacl#name": [ + { + "@value": "name" + } + ], + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://www.w3.org/ns/shacl#minCount" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "true" + } + ] + } + ] + } + ] } ], "http://www.w3.org/ns/shacl#name": [ diff --git a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld index 144fec4040..68c470836a 100644 --- a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld @@ -2091,6 +2091,9 @@ "http://www.w3.org/ns/shacl#property": [ { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/description" + }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name" } ], "http://www.w3.org/ns/shacl#name": "item1", @@ -2655,6 +2658,25 @@ } ] }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name", + "@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-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/any/default-any" + }, + "http://www.w3.org/ns/shacl#minCount": 1, + "http://www.w3.org/ns/shacl#name": "name", + "http://a.ml/vocabularies/document-source-maps#sources": [ + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map" + } + ] + }, { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/source-map", "@type": [ @@ -3116,6 +3138,26 @@ } ] }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/any/default-any", + "@type": [ + "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" + ] + }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map", + "@type": [ + "http://a.ml/vocabularies/document-source-maps#SourceMap" + ], + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_0" + } + ] + }, { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#closed", @@ -3373,6 +3415,11 @@ "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/description", "http://a.ml/vocabularies/document-source-maps#value": "[(12,8)-(15,9)]" }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" + }, { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/Pet.json#/schema/property/id/scalar/id/source-map/type-property-lexical-info/element_0", "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/Pet.json#/schema/property/id/scalar/id", diff --git a/amf-client/shared/src/test/resources/validations/raml-implicit-required-property.raml b/amf-client/shared/src/test/resources/validations/raml-implicit-required-property.raml new file mode 100644 index 0000000000..7aee8451c0 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/raml-implicit-required-property.raml @@ -0,0 +1,29 @@ +#%RAML 1.0 +title: "test api" + +types: + testSchema: | + { + "type": "object", + "properties": { + "a": { "type": "string", "required": "false" }, + "b": { "type": "string", "required": "false" } + }, + "required": ["c"] + } + +/pets: + get: + responses: + 200: + description: Not Found + body: + application/json: + type: testSchema + examples: + complete-object: + a: a string + b: a string + c: a string + only-required: + c: null diff --git a/amf-client/shared/src/test/resources/validations/raml-inline-required.raml b/amf-client/shared/src/test/resources/validations/raml-inline-required.raml new file mode 100644 index 0000000000..a2f08828fa --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/raml-inline-required.raml @@ -0,0 +1,28 @@ +#%RAML 1.0 +title: "test api" + +types: + testSchema: | + { + "required": [ + "option_two" + ] + } + +/pets: + get: + responses: + 200: + description: Not Found + body: + application/json: + type: testSchema + examples: + plain-object: + option_two: {} + null-object: + option_two: null + a-string: + option_two: this is a string + a-number: + option_two: 1 diff --git a/amf-client/shared/src/test/resources/validations/raml-subschema-with-required.raml b/amf-client/shared/src/test/resources/validations/raml-subschema-with-required.raml new file mode 100644 index 0000000000..fecd86db25 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/raml-subschema-with-required.raml @@ -0,0 +1,31 @@ +#%RAML 1.0 +title: "test api" + +types: + testSchema: | + { + "type": "object", + "oneOf": [ + { + "required": [ + "option_one" + ] + }, + { + "required": [ + "option_two" + ] + } + ] + } + +/pets: + get: + responses: + 200: + description: ok + body: + application/json: + type: testSchema + example: + option_one: {} diff --git a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala index 9aafb17cfd..9b9a51b9c2 100644 --- a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala +++ b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala @@ -610,4 +610,16 @@ class RamlModelUniquePlatformReportTest extends UniquePlatformReportGenTest { test("nillable property of nillable type") { validate("nillable-with-nillable.raml") } + + test("inline schema with required facet") { + validate("raml-inline-required.raml") + } + + test("schema with properties and undefined required property") { + validate("raml-implicit-required-property.raml") + } + + test("valid subschema with required facet") { + validate("raml-subschema-with-required.raml") + } } diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala index bdaf0f0df4..74149013bb 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala @@ -79,6 +79,7 @@ object TypeDetector { .orElse(map.key("patternProperties")) .orElse(map.key("additionalProperties")) .orElse(map.key("discriminator")) + .orElse(map.key("required")) .map(_ => ObjectType) } diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala index 56e314440b..10af9c0383 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala @@ -46,7 +46,6 @@ import amf.plugins.domain.webapi.models import amf.plugins.domain.webapi.models.IriTemplateMapping import amf.validations.ParserSideValidations._ import org.yaml.model._ -import amf.core.utils.AmfStrings import scala.collection.mutable import scala.util.Try @@ -674,9 +673,9 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, val requiredFields = parseRequiredFields(map, shape) - val properties = mutable.LinkedHashMap[String, PropertyShape]() - val properEntry = map.key("properties") - properEntry.foreach(entry => { + val properties = mutable.LinkedHashMap[String, PropertyShape]() + val propertiesEntry = map.key("properties") + propertiesEntry.foreach(entry => { Option(entry.value.as[YMap]) match { case Some(m) => val props = PropertiesParser(m, shape.withProperty, requiredFields).parse() @@ -684,6 +683,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, case _ => // Empty properties node. } }) + generateUndefinedRequiredProperties(requiredFields, shape, properties) if (version isBiggerThanOrEqualTo JSONSchemaDraft7SchemaVersion) InnerShapeParser("propertyNames", NodeShapeModel.PropertyNames, map, shape, adopt, version).parse() @@ -699,17 +699,16 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, case _ => // Empty properties node. } }) - val valueAnnotations = properEntry.map { pe => + val valueAnnotations = propertiesEntry.map { pe => Annotations(pe.value) } orElse { patternPropEntry.map { pp => Annotations(pp.value) } - } getOrElse { Annotations() } + } getOrElse { Annotations.virtual() } if (properties.nonEmpty) shape.set(NodeShapeModel.Properties, AmfArray(properties.values.toSeq, valueAnnotations), valueAnnotations) - shape.properties.foreach(p => properties += (p.name.value() -> p)) parseShapeDependencies(shape) @@ -725,6 +724,20 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, } } + private def generateUndefinedRequiredProperties(requiredFields: Map[String, YNode], + shape: NodeShape, + properties: mutable.LinkedHashMap[String, PropertyShape]): Unit = { + val undefinedRequiredProperties = requiredFields.keySet.filter(!properties.keySet.contains(_)) + val generatedRequiredProperties = undefinedRequiredProperties + .map(propertyName => { + PropertyShape(Annotations.virtual()) + .withName(propertyName) + .set(PropertyShapeModel.MinCount, AmfScalar(1), Annotations.synthesized()) + .set(PropertyShapeModel.Range, AnyShape(), Annotations.synthesized()) + }) + properties ++= generatedRequiredProperties.map(p => p.name.value() -> p) + } + private def parseShapeDependencies(shape: NodeShape): Unit = { if (version == JSONSchemaDraft201909SchemaVersion) { Draft2019ShapeDependenciesParser(shape, map, shape.id, version).parse() @@ -909,7 +922,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, val required = ScalarNode(entry.value).boolean().value.asInstanceOf[Boolean] property.set( PropertyShapeModel.MinCount, - AmfScalar(if (required) 1 else 0, Annotations.synthesized()), // does this annotation make sense? should parent not be `synthetized`? + AmfScalar(if (required) 1 else 0, Annotations.synthesized()), // does this annotation make sense? should parent not be `synthesized`? Annotations(entry) += ExplicitField() ) } From c74544e4a848211b60fe40e80716b4c92a902ad2 Mon Sep 17 00:00:00 2001 From: arielmirra Date: Fri, 20 Aug 2021 17:52:05 -0300 Subject: [PATCH 08/16] APIMF-3025: change annotation types for properties field and values --- .../api.raml.expanded.jsonld | 4 +- .../api.raml.flattened.jsonld | 4 +- .../api.raml.expanded.jsonld | 4 +- .../api.raml.flattened.jsonld | 4 +- .../api.raml.expanded.jsonld | 6 +- .../api.raml.flattened.jsonld | 6 +- .../api.raml.expanded.jsonld | 4 +- .../api.raml.flattened.jsonld | 4 +- .../jsonschema/api.raml.expanded.jsonld | 2 +- .../jsonschema/api.raml.flattened.jsonld | 2 +- .../data-type-fragment.json.expanded.jsonld | 2 +- .../data-type-fragment.json.flattened.jsonld | 2 +- .../references/lib/lib.json.expanded.jsonld | 2 +- .../references/lib/lib.json.flattened.jsonld | 2 +- .../references/libraries.json.expanded.jsonld | 2 +- .../libraries.json.flattened.jsonld | 2 +- .../oas/oas-references/oas-2-root.jsonld | 4 +- .../oas/oas-references/oas-3-root.jsonld | 4 +- .../api.raml.expanded.jsonld | 100 +++++++++------- .../api.raml.flattened.jsonld | 112 ++++++++++-------- .../api.raml.expanded.jsonld | 2 +- .../api.raml.flattened.jsonld | 2 +- .../schema-position/api.raml.expanded.jsonld | 18 +-- .../schema-position/api.raml.flattened.jsonld | 20 ++-- .../api.raml.expanded.jsonld | 2 +- .../api.raml.flattened.jsonld | 2 +- .../raml10/externals/api.raml.expanded.jsonld | 4 +- .../externals/api.raml.flattened.jsonld | 4 +- .../jukebox-api/api.raml.expanded.jsonld | 50 ++++---- .../jukebox-api/api.raml.flattened.jsonld | 56 +++++---- .../missing_example/api.raml.expanded.jsonld | 2 +- .../missing_example/api.raml.flattened.jsonld | 2 +- .../api.raml.expanded.jsonld | 66 ++++++----- .../api.raml.flattened.jsonld | 74 ++++++------ .../parameters/api.raml.expanded.jsonld | 2 +- .../parameters/api.raml.flattened.jsonld | 2 +- .../enums/enums.raml.expanded.jsonld | 2 +- .../enums/enums.raml.flattened.jsonld | 2 +- .../upanddown/examples.json.expanded.jsonld | 4 +- .../upanddown/examples.json.flattened.jsonld | 4 +- .../upanddown/externals.json.expanded.jsonld | 4 +- .../upanddown/externals.json.flattened.jsonld | 2 +- .../upanddown/parameters.json.expanded.jsonld | 2 +- .../parameters.json.flattened.jsonld | 2 +- .../petstore/petstore.expanded.jsonld | 2 +- .../petstore/petstore.flattened.jsonld | 2 +- .../query-string.json.expanded.jsonld | 6 +- .../query-string.json.flattened.jsonld | 6 +- ...aml-default-schema-version.expanded.jsonld | 4 +- ...ml-default-schema-version.flattened.jsonld | 4 +- .../raml-reference-draft-7.expanded.jsonld | 6 +- .../raml-reference-draft-7.flattened.jsonld | 6 +- ...-json-schema-in-type-facet.expanded.jsonld | 18 +-- ...json-schema-in-type-facet.flattened.jsonld | 20 ++-- ...ity-with-query-string.json.expanded.jsonld | 6 +- ...ty-with-query-string.json.flattened.jsonld | 6 +- .../types-dependency.json.expanded.jsonld | 6 +- .../types-dependency.json.flattened.jsonld | 6 +- .../types-facet.json.expanded.jsonld | 2 +- .../types-facet.json.flattened.jsonld | 2 +- .../async-components.expanded.jsonld | 12 +- .../async-components.flattened.jsonld | 12 +- .../async20/draft-7-schemas.expanded.jsonld | 14 +-- .../async20/draft-7-schemas.flattened.jsonld | 14 +-- .../draft-7/references.expanded.jsonld | 8 +- .../draft-7/references.flattened.jsonld | 8 +- .../http-message-binding.expanded.jsonld | 2 +- .../http-message-binding.flattened.jsonld | 2 +- .../http-operation-binding.expanded.jsonld | 2 +- .../http-operation-binding.flattened.jsonld | 2 +- .../async20/message-obj.expanded.jsonld | 2 +- .../async20/message-obj.flattened.jsonld | 2 +- .../async20/rpc-server.expanded.jsonld | 4 +- .../async20/rpc-server.flattened.jsonld | 4 +- .../ws-channel-binding.expanded.jsonld | 4 +- .../ws-channel-binding.flattened.jsonld | 4 +- .../japanese/cycle/oas30api.expanded.jsonld | 6 +- .../japanese/cycle/oas30api.flattened.jsonld | 6 +- .../japanese/cycle/oasapi.expanded.jsonld | 4 +- .../japanese/cycle/oasapi.flattened.jsonld | 4 +- .../parser/types/InlineOasTypeParser.scala | 47 ++++---- 81 files changed, 464 insertions(+), 403 deletions(-) diff --git a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.expanded.jsonld index 68561b6a0a..2dac444b40 100644 --- a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.expanded.jsonld @@ -577,7 +577,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(7,20)-(11,7)]" + "@value": "[(7,6)-(11,7)]" } ] }, @@ -926,7 +926,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(5,16)-(15,3)]" + "@value": "[(5,2)-(15,3)]" } ] }, diff --git a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.flattened.jsonld index 586d3352b4..f181a41a57 100644 --- a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml.flattened.jsonld @@ -442,7 +442,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml#/declarations/schemas/someSchema/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(5,16)-(15,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(15,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml#/declarations/schemas/someSchema/source-map/lexical/element_0", @@ -646,7 +646,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml#/declarations/schemas/someSchema/property/a1/B/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(7,20)-(11,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(7,6)-(11,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles/api.raml#/declarations/schemas/someSchema/property/a1/B/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.expanded.jsonld index 3c8fda389e..dc82aaf287 100644 --- a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.expanded.jsonld @@ -848,7 +848,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(7,20)-(11,7)]" + "@value": "[(7,6)-(11,7)]" } ] }, @@ -1197,7 +1197,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(5,16)-(15,3)]" + "@value": "[(5,2)-(15,3)]" } ] }, diff --git a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.flattened.jsonld index 631ba07a64..081067a4d4 100644 --- a/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml.flattened.jsonld @@ -663,7 +663,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml#/declarations/schemas/someSchema/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(5,16)-(15,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(15,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml#/declarations/schemas/someSchema/source-map/lexical/element_0", @@ -867,7 +867,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml#/declarations/schemas/someSchema/property/a1/B/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(7,20)-(11,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(7,6)-(11,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops-crossfiles2/api.raml#/declarations/schemas/someSchema/property/a1/B/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.expanded.jsonld index 0c52774e34..5d165286b8 100644 --- a/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.expanded.jsonld @@ -840,7 +840,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(35,20)-(45,7)]" + "@value": "[(35,6)-(45,7)]" } ] }, @@ -1231,7 +1231,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(20,20)-(30,7)]" + "@value": "[(20,6)-(30,7)]" } ] }, @@ -1590,7 +1590,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(5,16)-(15,3)]" + "@value": "[(5,2)-(15,3)]" } ] }, diff --git a/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.flattened.jsonld index b9647b6f0f..eba00da531 100644 --- a/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml.flattened.jsonld @@ -418,7 +418,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml#/declarations/schemas/someSchema/source-map/lexical/element_3", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(5,16)-(15,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(15,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml#/declarations/schemas/someSchema/source-map/lexical/element_1", @@ -732,7 +732,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml#/declarations/schemas/someSchema/property/auditDetails/auditDetails/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(20,20)-(30,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(20,6)-(30,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml#/declarations/schemas/someSchema/property/auditDetails/auditDetails/source-map/lexical/element_1", @@ -1083,7 +1083,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml#/declarations/schemas/someSchema/property/auditDetails/auditDetails/property/formOfPayment/formOfPayment/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(35,20)-(45,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(35,6)-(45,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml08/definitions-loops/api.raml#/declarations/schemas/someSchema/property/auditDetails/auditDetails/property/formOfPayment/formOfPayment/source-map/lexical/element_1", diff --git a/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.expanded.jsonld index 4e776f6c12..15328615f1 100644 --- a/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.expanded.jsonld @@ -781,7 +781,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(28,20)-(35,7)]" + "@value": "[(28,6)-(35,7)]" } ] } @@ -939,7 +939,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(14,20)-(24,7)]" + "@value": "[(14,6)-(24,7)]" } ] } diff --git a/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.flattened.jsonld index 25273524ae..4ce1ba1bc8 100644 --- a/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/raml10/jsonschema-apiwithfragmentref/api.raml.flattened.jsonld @@ -388,7 +388,7 @@ { "@id": "file://../jsonschema/schema-lib.json/#/definitions/address/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(14,20)-(24,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(14,6)-(24,7)]" }, { "@id": "file://../jsonschema/schema-lib.json/#/definitions/address/source-map/declared-element/element_0", @@ -657,7 +657,7 @@ { "@id": "file://../jsonschema/schema-lib.json/#/definitions/address/property/location/location/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(28,20)-(35,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(28,6)-(35,7)]" }, { "@id": "file://../jsonschema/schema-lib.json/#/definitions/address/property/location/location/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.expanded.jsonld index 69c62fd733..3f95be448a 100644 --- a/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.expanded.jsonld @@ -337,7 +337,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(11,20)-(15,7)]" + "@value": "[(11,6)-(15,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.flattened.jsonld index 69c246a0c8..c9f5947871 100644 --- a/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml.flattened.jsonld @@ -240,7 +240,7 @@ { "@id": "file://amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml#/declarations/types/jsonSchema/source-map/lexical/element_3", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(11,20)-(15,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(15,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/production/raml10/jsonschema/api.raml#/declarations/types/jsonSchema/source-map/lexical/element_1", diff --git a/amf-client/shared/src/test/resources/references/data-type-fragment.json.expanded.jsonld b/amf-client/shared/src/test/resources/references/data-type-fragment.json.expanded.jsonld index 3852d054db..083b07d65b 100644 --- a/amf-client/shared/src/test/resources/references/data-type-fragment.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/references/data-type-fragment.json.expanded.jsonld @@ -323,7 +323,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(7,16)-(11,3)]" + "@value": "[(7,2)-(11,3)]" } ] } diff --git a/amf-client/shared/src/test/resources/references/data-type-fragment.json.flattened.jsonld b/amf-client/shared/src/test/resources/references/data-type-fragment.json.flattened.jsonld index 9e1a974717..55effb4448 100644 --- a/amf-client/shared/src/test/resources/references/data-type-fragment.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/references/data-type-fragment.json.flattened.jsonld @@ -318,7 +318,7 @@ { "@id": "file://amf-client/shared/src/test/resources/references/fragments/person.json#/type/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(7,16)-(11,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(7,2)-(11,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/references/fragments/person.json#/type/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/references/lib/lib.json.expanded.jsonld b/amf-client/shared/src/test/resources/references/lib/lib.json.expanded.jsonld index 856c2955cc..f366ca3cff 100644 --- a/amf-client/shared/src/test/resources/references/lib/lib.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/references/lib/lib.json.expanded.jsonld @@ -409,7 +409,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { -"@value": "[(7,20)-(14,7)]" +"@value": "[(7,6)-(14,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/references/lib/lib.json.flattened.jsonld b/amf-client/shared/src/test/resources/references/lib/lib.json.flattened.jsonld index 48a41bd073..6acb580ae3 100644 --- a/amf-client/shared/src/test/resources/references/lib/lib.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/references/lib/lib.json.flattened.jsonld @@ -246,7 +246,7 @@ { "@id": "file://amf-client/shared/src/test/resources/references/lib/lib.json#/declarations/types/ObjectType/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", -"http://a.ml/vocabularies/document-source-maps#value": "[(7,20)-(14,7)]" +"http://a.ml/vocabularies/document-source-maps#value": "[(7,6)-(14,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/references/lib/lib.json#/declarations/types/ObjectType/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/references/libraries.json.expanded.jsonld b/amf-client/shared/src/test/resources/references/libraries.json.expanded.jsonld index 7e3d671bef..f84adc84f3 100644 --- a/amf-client/shared/src/test/resources/references/libraries.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/references/libraries.json.expanded.jsonld @@ -484,7 +484,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(7,20)-(14,7)]" + "@value": "[(7,6)-(14,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/references/libraries.json.flattened.jsonld b/amf-client/shared/src/test/resources/references/libraries.json.flattened.jsonld index a1e5adc570..52e932f795 100644 --- a/amf-client/shared/src/test/resources/references/libraries.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/references/libraries.json.flattened.jsonld @@ -353,7 +353,7 @@ { "@id": "file://amf-client/shared/src/test/resources/references/lib/lib.json#/declarations/types/ObjectType/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(7,20)-(14,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(7,6)-(14,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/references/lib/lib.json#/declarations/types/ObjectType/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/references/oas/oas-references/oas-2-root.jsonld b/amf-client/shared/src/test/resources/references/oas/oas-references/oas-2-root.jsonld index 19bb06fb37..6a96b93e15 100644 --- a/amf-client/shared/src/test/resources/references/oas/oas-references/oas-2-root.jsonld +++ b/amf-client/shared/src/test/resources/references/oas/oas-references/oas-2-root.jsonld @@ -450,7 +450,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(4,15)-(6,48)]" + "@value": "[(4,4)-(6,48)]" } ] } @@ -575,7 +575,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(8,15)-(11,0)]" + "@value": "[(8,4)-(11,0)]" } ] }, diff --git a/amf-client/shared/src/test/resources/references/oas/oas-references/oas-3-root.jsonld b/amf-client/shared/src/test/resources/references/oas/oas-references/oas-3-root.jsonld index e5ec7108cd..90b97dd932 100644 --- a/amf-client/shared/src/test/resources/references/oas/oas-references/oas-3-root.jsonld +++ b/amf-client/shared/src/test/resources/references/oas/oas-references/oas-3-root.jsonld @@ -450,7 +450,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(4,15)-(6,55)]" + "@value": "[(4,4)-(6,55)]" } ] } @@ -575,7 +575,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(9,17)-(12,0)]" + "@value": "[(9,6)-(12,0)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.expanded.jsonld index a446092149..298cf3e8ae 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.expanded.jsonld @@ -7966,30 +7966,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(10,15)-(14,16)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(13,17)-(13,33)]" + "@value": "[(10,15)-(14,16)]" } ] } @@ -8117,30 +8119,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(15,15)-(19,16)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(18,17)-(18,33)]" + "@value": "[(15,15)-(19,16)]" } ] } @@ -8268,30 +8272,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(20,15)-(24,16)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(23,17)-(23,33)]" + "@value": "[(20,15)-(24,16)]" } ] } @@ -8419,30 +8425,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(25,15)-(29,16)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(28,17)-(28,33)]" + "@value": "[(25,15)-(29,16)]" } ] } @@ -8570,30 +8578,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(30,15)-(34,16)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(33,17)-(33,33)]" + "@value": "[(30,15)-(34,16)]" } ] } @@ -8721,30 +8731,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(35,15)-(39,16)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(38,17)-(38,33)]" + "@value": "[(35,15)-(39,16)]" } ] } @@ -9093,7 +9105,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(43,31)-(50,18)]" + "@value": "[(43,17)-(50,18)]" } ] }, @@ -9242,7 +9254,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(9,27)-(52,14)]" + "@value": "[(9,13)-(52,14)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.flattened.jsonld index 04440d70e1..dd37c986d7 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml.flattened.jsonld @@ -6221,10 +6221,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/lexical/element_0" } @@ -6257,10 +6259,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/lexical/element_0" } @@ -6293,10 +6297,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/lexical/element_0" } @@ -6329,10 +6335,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/lexical/element_0" } @@ -6365,10 +6373,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/lexical/element_0" } @@ -6401,10 +6411,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/lexical/element_0" } @@ -6465,7 +6477,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(9,27)-(52,14)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(9,13)-(52,14)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/source-map/declared-element/element_0", @@ -6500,14 +6512,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code", - "http://a.ml/vocabularies/document-source-maps#value": "[(10,15)-(14,16)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(13,17)-(13,33)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/code", + "http://a.ml/vocabularies/document-source-maps#value": "[(10,15)-(14,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/scalar/price/source-map", @@ -6532,14 +6544,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price", - "http://a.ml/vocabularies/document-source-maps#value": "[(15,15)-(19,16)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(18,17)-(18,33)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/price", + "http://a.ml/vocabularies/document-source-maps#value": "[(15,15)-(19,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/scalar/departureDate/source-map", @@ -6564,14 +6576,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate", - "http://a.ml/vocabularies/document-source-maps#value": "[(20,15)-(24,16)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(23,17)-(23,33)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/departureDate", + "http://a.ml/vocabularies/document-source-maps#value": "[(20,15)-(24,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/scalar/origin/source-map", @@ -6596,14 +6608,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin", - "http://a.ml/vocabularies/document-source-maps#value": "[(25,15)-(29,16)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(28,17)-(28,33)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/origin", + "http://a.ml/vocabularies/document-source-maps#value": "[(25,15)-(29,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/scalar/destination/source-map", @@ -6628,14 +6640,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination", - "http://a.ml/vocabularies/document-source-maps#value": "[(30,15)-(34,16)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(33,17)-(33,33)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/destination", + "http://a.ml/vocabularies/document-source-maps#value": "[(30,15)-(34,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/scalar/emptySeats/source-map", @@ -6660,14 +6672,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats", - "http://a.ml/vocabularies/document-source-maps#value": "[(35,15)-(39,16)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(38,17)-(38,33)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/emptySeats", + "http://a.ml/vocabularies/document-source-maps#value": "[(35,15)-(39,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/plane/plane/property/type", @@ -6956,7 +6968,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/plane/plane/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(43,31)-(50,18)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(43,17)-(50,18)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/americanflightapi/api.raml#/declarations/schemas/flight/property/plane/plane/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.expanded.jsonld index 92e7504970..f5c6278bcf 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.expanded.jsonld @@ -547,7 +547,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(5,16)-(15,3)]" + "@value": "[(5,2)-(15,3)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.flattened.jsonld index 09b2ca0688..8b3038fe4e 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml.flattened.jsonld @@ -311,7 +311,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml#/declarations/schemas/wip/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(5,16)-(15,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(15,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/json_schema_array/api.raml#/declarations/schemas/wip/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.expanded.jsonld index b87e1618d1..f9d1183d32 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.expanded.jsonld @@ -202,30 +202,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(14,22)-(17,23)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(15,26)-(15,43)]" + "@value": "[(14,22)-(17,23)]" } ] } @@ -283,7 +285,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(13,32)-(18,19)]" + "@value": "[(13,18)-(18,19)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.flattened.jsonld index 11109ea63f..bfbdfc420b 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml.flattened.jsonld @@ -174,10 +174,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/lexical/element_0" } @@ -196,7 +198,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(13,32)-(18,19)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(13,18)-(18,19)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/source-map/type-property-lexical-info/element_0", @@ -233,14 +235,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input", - "http://a.ml/vocabularies/document-source-maps#value": "[(14,22)-(17,23)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(15,26)-(15,43)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input", + "http://a.ml/vocabularies/document-source-maps#value": "[(14,22)-(17,23)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml08/schema-position/api.raml#/declarations/schemas/inputSchema/property/input/scalar/input/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.expanded.jsonld index 50304d9cec..80271eae57 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.expanded.jsonld @@ -533,7 +533,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(10,27)-(18,14)]" + "@value": "[(10,13)-(18,14)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.flattened.jsonld index 636c4082cc..1545686cec 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml.flattened.jsonld @@ -236,7 +236,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml#/declarations/types/mySchema/source-map/lexical/element_3", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(10,27)-(18,14)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(10,13)-(18,14)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/api-with-multi-line-schema/api.raml#/declarations/types/mySchema/source-map/declared-element/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.expanded.jsonld index 34fc304d72..c6d63073f3 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.expanded.jsonld @@ -424,7 +424,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(10,58)-(10,85)]" + "@value": "[(10,44)-(10,85)]" } ] } @@ -967,7 +967,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(18,48)-(18,75)]" + "@value": "[(18,34)-(18,75)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.flattened.jsonld index 0b8fff54c7..6fd8e5bed7 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml.flattened.jsonld @@ -754,7 +754,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml#/web-api/end-points/%2Fgroups/post/request/application%2Fjson/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(10,58)-(10,85)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(10,44)-(10,85)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml#/web-api/end-points/%2Fgroups/post/request/application%2Fjson/schema/source-map/auto-generated-name/element_0", @@ -933,7 +933,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml#/web-api/end-points/%2Fgroups%2F2/post/request/application%2Fjson/schema/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(18,48)-(18,75)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(18,34)-(18,75)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/externals/api.raml#/web-api/end-points/%2Fgroups%2F2/post/request/application%2Fjson/schema/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.expanded.jsonld index 07ad16cbc0..1ecd951834 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.expanded.jsonld @@ -1365,30 +1365,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(6,4)-(11,5)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(8,6)-(8,22)]" + "@value": "[(6,4)-(11,5)]" } ] } @@ -1498,30 +1500,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(12,4)-(15,5)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(14,6)-(14,22)]" + "@value": "[(12,4)-(15,5)]" } ] } @@ -1667,30 +1671,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(16,4)-(21,5)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(18,6)-(18,22)]" + "@value": "[(16,4)-(21,5)]" } ] } @@ -1755,7 +1761,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(5,16)-(22,3)]" + "@value": "[(5,2)-(22,3)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.flattened.jsonld index 7a50cd67d3..5dfc025d01 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml.flattened.jsonld @@ -1102,10 +1102,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/lexical/element_0" } @@ -1137,10 +1139,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/lexical/element_0" } @@ -1174,10 +1178,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/lexical/element_0" } @@ -1196,7 +1202,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(5,16)-(22,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(22,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/source-map/lexical/element_0", @@ -1254,14 +1260,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId", - "http://a.ml/vocabularies/document-source-maps#value": "[(6,4)-(11,5)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(8,6)-(8,22)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId", + "http://a.ml/vocabularies/document-source-maps#value": "[(6,4)-(11,5)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/scalar/songTitle/source-map", @@ -1283,14 +1289,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle", - "http://a.ml/vocabularies/document-source-maps#value": "[(12,4)-(15,5)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(14,6)-(14,22)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songTitle", + "http://a.ml/vocabularies/document-source-maps#value": "[(12,4)-(15,5)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/scalar/albumId/source-map", @@ -1318,14 +1324,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId", - "http://a.ml/vocabularies/document-source-maps#value": "[(16,4)-(21,5)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(18,6)-(18,22)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/albumId", + "http://a.ml/vocabularies/document-source-maps#value": "[(16,4)-(21,5)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/jukebox-api/api.raml#/declarations/types/song/property/songId/scalar/songId/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.expanded.jsonld index b913fd4337..bb1f5ebd11 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.expanded.jsonld @@ -580,7 +580,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(12,29)-(24,16)]" + "@value": "[(12,15)-(24,16)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.flattened.jsonld index f039941125..acd91275da 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml.flattened.jsonld @@ -622,7 +622,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml#/web-api/end-points/%2Fok0/post/request/default/schema/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(12,29)-(24,16)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(12,15)-(24,16)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/missing_example/api.raml#/web-api/end-points/%2Fok0/post/request/default/schema/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.expanded.jsonld index 1ca894b089..4bc832924d 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.expanded.jsonld @@ -1317,30 +1317,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(14,12)-(18,13)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(17,12)-(17,28)]" + "@value": "[(14,12)-(18,13)]" } ] } @@ -1468,30 +1470,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(19,12)-(23,13)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(22,12)-(22,28)]" + "@value": "[(19,12)-(23,13)]" } ] } @@ -1619,30 +1623,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(24,12)-(28,13)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(27,12)-(27,28)]" + "@value": "[(24,12)-(28,13)]" } ] } @@ -1770,30 +1776,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(29,12)-(33,13)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(32,12)-(32,28)]" + "@value": "[(29,12)-(33,13)]" } ] } @@ -1856,7 +1864,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(13,26)-(34,13)]" + "@value": "[(13,12)-(34,13)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.flattened.jsonld index bc62c0c855..091048b5e8 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml.flattened.jsonld @@ -1146,10 +1146,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/lexical/element_0" } @@ -1182,10 +1184,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/lexical/element_0" } @@ -1218,10 +1222,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/lexical/element_0" } @@ -1254,10 +1260,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/lexical/element_0" } @@ -1276,7 +1284,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(13,26)-(34,13)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(13,12)-(34,13)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/source-map/lexical/element_0", @@ -1346,14 +1354,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant", - "http://a.ml/vocabularies/document-source-maps#value": "[(14,12)-(18,13)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(17,12)-(17,28)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant", + "http://a.ml/vocabularies/document-source-maps#value": "[(14,12)-(18,13)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/scalar/objectType/source-map", @@ -1378,14 +1386,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType", - "http://a.ml/vocabularies/document-source-maps#value": "[(19,12)-(23,13)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(22,12)-(22,28)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectType", + "http://a.ml/vocabularies/document-source-maps#value": "[(19,12)-(23,13)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/scalar/objectKey/source-map", @@ -1410,14 +1418,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey", - "http://a.ml/vocabularies/document-source-maps#value": "[(24,12)-(28,13)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(27,12)-(27,28)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/objectKey", + "http://a.ml/vocabularies/document-source-maps#value": "[(24,12)-(28,13)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/scalar/txnType/source-map", @@ -1442,14 +1450,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType", - "http://a.ml/vocabularies/document-source-maps#value": "[(29,12)-(33,13)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(32,12)-(32,28)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/txnType", + "http://a.ml/vocabularies/document-source-maps#value": "[(29,12)-(33,13)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/multiple-media-types/api.raml#/declarations/types/jsonSchema/property/tenant/scalar/tenant/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.expanded.jsonld index 14136a68df..dd16bd6b84 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.expanded.jsonld @@ -660,7 +660,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(11,17)-(14,0)]" + "@value": "[(11,6)-(14,0)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.flattened.jsonld index 68695f5cb7..c96f59f6a4 100644 --- a/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml.flattened.jsonld @@ -513,7 +513,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml#/parameters/payload%3F/payload%3F/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(11,17)-(14,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(14,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/cycle/raml10/parameters/api.raml#/parameters/payload%3F/payload%3F/source-map/parameter-binding-in-body-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.expanded.jsonld index f8a62dac50..2ac255946d 100644 --- a/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.expanded.jsonld @@ -1471,7 +1471,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(39,20)-(46,7)]" + "@value": "[(39,6)-(46,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.flattened.jsonld index dc3103dd18..ca8e163cfd 100644 --- a/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/enums/enums.raml.flattened.jsonld @@ -695,7 +695,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/enums/enums.json#/declarations/types/objectType/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(39,20)-(46,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(39,6)-(46,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/enums/enums.json#/declarations/types/objectType/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/examples.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/examples.json.expanded.jsonld index 2cf606217c..e7d3d8f83e 100644 --- a/amf-client/shared/src/test/resources/upanddown/examples.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/examples.json.expanded.jsonld @@ -4185,7 +4185,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(90,20)-(97,7)]" + "@value": "[(90,6)-(97,7)]" } ] }, @@ -5020,7 +5020,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(105,20)-(115,7)]" + "@value": "[(105,6)-(115,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/examples.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/examples.json.flattened.jsonld index d49b423191..4f105b10b7 100644 --- a/amf-client/shared/src/test/resources/upanddown/examples.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/examples.json.flattened.jsonld @@ -3018,7 +3018,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/examples.json#/declarations/types/User/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(90,20)-(97,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(90,6)-(97,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/examples.json#/declarations/types/User/source-map/lexical/element_0", @@ -3203,7 +3203,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/examples.json#/declarations/types/Org/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(105,20)-(115,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(105,6)-(115,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/examples.json#/declarations/types/Org/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/externals.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/externals.json.expanded.jsonld index 5b3681b65b..3d66e69641 100644 --- a/amf-client/shared/src/test/resources/upanddown/externals.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/externals.json.expanded.jsonld @@ -288,7 +288,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(23,28)-(27,15)]" + "@value": "[(23,14)-(27,15)]" } ] }, @@ -926,7 +926,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(56,32)-(60,19)]" + "@value": "[(56,18)-(60,19)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/externals.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/externals.json.flattened.jsonld index 1abc96ff12..c758915a46 100644 --- a/amf-client/shared/src/test/resources/upanddown/externals.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/externals.json.flattened.jsonld @@ -858,7 +858,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/externals.json#/web-api/end-points/%2Fgroups/post/request/application%2Fjson/generated/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(23,28)-(27,15)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(23,14)-(27,15)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/externals.json#/web-api/end-points/%2Fgroups/post/request/application%2Fjson/generated/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/parameters.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/parameters.json.expanded.jsonld index c2def215ef..ab02b17098 100644 --- a/amf-client/shared/src/test/resources/upanddown/parameters.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/parameters.json.expanded.jsonld @@ -663,7 +663,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(28,22)-(32,9)]" + "@value": "[(28,8)-(32,9)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/parameters.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/parameters.json.flattened.jsonld index 63039d1a31..488e6629d6 100644 --- a/amf-client/shared/src/test/resources/upanddown/parameters.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/parameters.json.flattened.jsonld @@ -519,7 +519,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/parameters.json#/declarations/parameters/payload/payload/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(28,22)-(32,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(28,8)-(32,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/parameters.json#/declarations/parameters/payload/payload/source-map/parameter-binding-in-body-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/petstore/petstore.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/petstore/petstore.expanded.jsonld index e1845e474c..bc518397e3 100644 --- a/amf-client/shared/src/test/resources/upanddown/petstore/petstore.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/petstore/petstore.expanded.jsonld @@ -1302,7 +1302,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(15,22)-(29,9)]" + "@value": "[(15,8)-(29,9)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/petstore/petstore.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/petstore/petstore.flattened.jsonld index 5e257d215f..a356b78d35 100644 --- a/amf-client/shared/src/test/resources/upanddown/petstore/petstore.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/petstore/petstore.flattened.jsonld @@ -764,7 +764,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/petstore/Pet.json#/array/root/items/items/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(15,22)-(29,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(15,8)-(29,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/petstore/Pet.json#/array/root/items/items/source-map/lexical/element_1", diff --git a/amf-client/shared/src/test/resources/upanddown/query-string.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/query-string.json.expanded.jsonld index df94a5ae2b..8692d15d8c 100644 --- a/amf-client/shared/src/test/resources/upanddown/query-string.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/query-string.json.expanded.jsonld @@ -863,7 +863,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(23,20)-(30,7)]" + "@value": "[(23,6)-(30,7)]" } ] }, @@ -1114,7 +1114,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(34,20)-(38,7)]" + "@value": "[(34,6)-(38,7)]" } ] }, @@ -1500,7 +1500,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(42,20)-(49,7)]" + "@value": "[(42,6)-(49,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/query-string.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/query-string.json.flattened.jsonld index 5151e93585..ec2bc9586d 100644 --- a/amf-client/shared/src/test/resources/upanddown/query-string.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/query-string.json.flattened.jsonld @@ -530,7 +530,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/query-string.json#/declarations/types/paging/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(42,20)-(49,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(42,6)-(49,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/query-string.json#/declarations/types/paging/source-map/lexical/element_0", @@ -992,7 +992,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/query-string.json#/declarations/types/lat-long/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(23,20)-(30,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(23,6)-(30,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/query-string.json#/declarations/types/lat-long/source-map/lexical/element_0", @@ -1059,7 +1059,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/query-string.json#/declarations/types/loc/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(34,20)-(38,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(34,6)-(38,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/query-string.json#/declarations/types/loc/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.expanded.jsonld index d758a16876..f5f48a77ee 100644 --- a/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.expanded.jsonld @@ -695,7 +695,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(3,16)-(7,3)]" + "@value": "[(3,2)-(7,3)]" } ] } @@ -825,7 +825,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(3,16)-(10,3)]" + "@value": "[(3,2)-(10,3)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.flattened.jsonld index 23849ebd9b..d4e661ccba 100644 --- a/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.flattened.jsonld @@ -381,7 +381,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.raml#/declarations/types/MyType/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(3,16)-(10,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(3,2)-(10,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.raml#/declarations/types/MyType/source-map/lexical/element_0", @@ -592,7 +592,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.raml#/declarations/types/MyType/property/age/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(3,16)-(7,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(3,2)-(7,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-default-schema-version.raml#/declarations/types/MyType/property/age/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.expanded.jsonld index 634caf4a41..9e063937c2 100644 --- a/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.expanded.jsonld @@ -784,7 +784,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(12,22)-(16,9)]" + "@value": "[(12,8)-(16,9)]" } ] } @@ -824,7 +824,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(6,20)-(10,7)]" + "@value": "[(6,6)-(10,7)]" } ] }, @@ -938,7 +938,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(4,16)-(8,3)]" + "@value": "[(4,2)-(8,3)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.flattened.jsonld index 27fc0d95d6..4912d4da5a 100644 --- a/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.flattened.jsonld @@ -390,7 +390,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.raml#/declarations/types/MyType/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(4,16)-(8,3)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(4,2)-(8,3)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.raml#/declarations/types/MyType/source-map/lexical/element_0", @@ -545,7 +545,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.raml#/declarations/types/MyType/anotherMain/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(6,20)-(10,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(6,6)-(10,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.raml#/declarations/types/MyType/anotherMain/source-map/lexical/element_0", @@ -658,7 +658,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/second-level-schema.json#/definitions/anotherMain/if/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(12,22)-(16,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(12,8)-(16,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/raml-reference-draft-7.raml#/declarations/types/MyType/anotherMain/property/anotherName/scalar/anotherName/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.expanded.jsonld index 5b96ff5d7d..0eb3f6b248 100644 --- a/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.expanded.jsonld @@ -222,30 +222,32 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/lexical/element_1", + "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input" + "@value": "http://www.w3.org/ns/shacl#minCount" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(13,13)-(16,14)]" + "@value": "true" } ] - }, + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ { - "@value": "http://www.w3.org/ns/shacl#minCount" + "@value": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input" } ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(14,15)-(14,32)]" + "@value": "[(13,13)-(16,14)]" } ] } @@ -295,7 +297,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(12,25)-(17,12)]" + "@value": "[(12,11)-(17,12)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.flattened.jsonld index 28987ccd38..096714aeb2 100644 --- a/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.flattened.jsonld @@ -304,10 +304,12 @@ "@type": [ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], - "http://a.ml/vocabularies/document-source-maps#lexical": [ + "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ { - "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/lexical/element_1" - }, + "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/synthesized-field/element_0" + } + ], + "http://a.ml/vocabularies/document-source-maps#lexical": [ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/lexical/element_0" } @@ -321,7 +323,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(12,25)-(17,12)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(12,11)-(17,12)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/source-map/lexical/element_0", @@ -417,14 +419,14 @@ ] }, { - "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/lexical/element_1", - "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input", - "http://a.ml/vocabularies/document-source-maps#value": "[(13,13)-(16,14)]" + "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/synthesized-field/element_0", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", + "http://a.ml/vocabularies/document-source-maps#value": "true" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input/source-map/lexical/element_0", - "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", - "http://a.ml/vocabularies/document-source-maps#value": "[(14,15)-(14,32)]" + "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/schema/property/input", + "http://a.ml/vocabularies/document-source-maps#value": "[(13,13)-(16,14)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/raml10/type-with-json-schema-in-type-facet.raml#/declarations/types/A/example/test/object_1/scalar_2/source-map", diff --git a/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.expanded.jsonld index de1be84205..30d3750573 100644 --- a/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.expanded.jsonld @@ -454,7 +454,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(11,20)-(18,7)]" + "@value": "[(11,6)-(18,7)]" } ] }, @@ -705,7 +705,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(22,20)-(26,7)]" + "@value": "[(22,6)-(26,7)]" } ] }, @@ -1091,7 +1091,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(30,20)-(37,7)]" + "@value": "[(30,6)-(37,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.flattened.jsonld index 40684fa583..6ead5430c3 100644 --- a/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/security-with-query-string.json.flattened.jsonld @@ -525,7 +525,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/security-with-query-string.json#/declarations/types/lat-long/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(11,20)-(18,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(18,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/security-with-query-string.json#/declarations/types/lat-long/source-map/lexical/element_0", @@ -592,7 +592,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/security-with-query-string.json#/declarations/types/loc/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(22,20)-(26,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(22,6)-(26,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/security-with-query-string.json#/declarations/types/loc/source-map/lexical/element_0", @@ -696,7 +696,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/security-with-query-string.json#/declarations/types/paging/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(30,20)-(37,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(30,6)-(37,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/security-with-query-string.json#/declarations/types/paging/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/types-dependency.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/types-dependency.json.expanded.jsonld index d215c5304c..ab97d83529 100644 --- a/amf-client/shared/src/test/resources/upanddown/types-dependency.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/types-dependency.json.expanded.jsonld @@ -1291,7 +1291,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(41,32)-(54,19)]" + "@value": "[(41,18)-(54,19)]" } ] } @@ -1416,7 +1416,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(32,28)-(69,15)]" + "@value": "[(32,14)-(69,15)]" } ] }, @@ -2492,7 +2492,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(79,28)-(95,15)]" + "@value": "[(79,14)-(95,15)]" } ] } diff --git a/amf-client/shared/src/test/resources/upanddown/types-dependency.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/types-dependency.json.flattened.jsonld index d388657349..dc4e2ce6d9 100644 --- a/amf-client/shared/src/test/resources/upanddown/types-dependency.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/types-dependency.json.flattened.jsonld @@ -966,7 +966,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-dependency.json#/web-api/end-points/%2Flevel-zero/get/request/someName/someName/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(32,28)-(69,15)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(32,14)-(69,15)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-dependency.json#/web-api/end-points/%2Flevel-zero/get/request/someName/someName/source-map/lexical/element_0", @@ -1232,7 +1232,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-dependency.json#/web-api/end-points/%2Flevel-zero/get/request/application%2Framl/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(79,28)-(95,15)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(79,14)-(95,15)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-dependency.json#/web-api/end-points/%2Flevel-zero/get/request/application%2Framl/schema/source-map/type-property-lexical-info/element_0", @@ -1909,7 +1909,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-dependency.json#/web-api/end-points/%2Flevel-zero/get/request/someName/someName/property/address/address/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(41,32)-(54,19)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(41,18)-(54,19)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-dependency.json#/web-api/end-points/%2Flevel-zero/get/request/someName/someName/property/address/address/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/upanddown/types-facet.json.expanded.jsonld b/amf-client/shared/src/test/resources/upanddown/types-facet.json.expanded.jsonld index 2b1dfe11da..0e03ddfb57 100644 --- a/amf-client/shared/src/test/resources/upanddown/types-facet.json.expanded.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/types-facet.json.expanded.jsonld @@ -1483,7 +1483,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(40,20)-(45,7)]" + "@value": "[(40,6)-(45,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/upanddown/types-facet.json.flattened.jsonld b/amf-client/shared/src/test/resources/upanddown/types-facet.json.flattened.jsonld index 9e3fa8ef68..8b2e5358f6 100644 --- a/amf-client/shared/src/test/resources/upanddown/types-facet.json.flattened.jsonld +++ b/amf-client/shared/src/test/resources/upanddown/types-facet.json.flattened.jsonld @@ -801,7 +801,7 @@ { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-facet.json#/declarations/types/ObjectTest/source-map/lexical/element_10", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(40,20)-(45,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(40,6)-(45,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/upanddown/types-facet.json#/declarations/types/ObjectTest/source-map/lexical/element_12", diff --git a/amf-client/shared/src/test/resources/validations/async20/components/async-components.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/components/async-components.expanded.jsonld index 348b638849..85ae809c38 100644 --- a/amf-client/shared/src/test/resources/validations/async20/components/async-components.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/components/async-components.expanded.jsonld @@ -1744,7 +1744,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(21,19)-(24,0)]" + "@value": "[(21,8)-(24,0)]" } ] } @@ -1959,7 +1959,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(25,19)-(28,0)]" + "@value": "[(25,8)-(28,0)]" } ] } @@ -2174,7 +2174,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(29,19)-(32,0)]" + "@value": "[(29,8)-(32,0)]" } ] } @@ -2504,7 +2504,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(4,18)-(8,5)]" + "@value": "[(4,4)-(8,5)]" } ] }, @@ -3722,7 +3722,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(98,21)-(101,0)]" + "@value": "[(98,10)-(101,0)]" } ] } @@ -4957,7 +4957,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(48,19)-(53,0)]" + "@value": "[(48,8)-(53,0)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/components/async-components.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/components/async-components.flattened.jsonld index c6995919f8..6061ba108a 100644 --- a/amf-client/shared/src/test/resources/validations/async20/components/async-components.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/components/async-components.flattened.jsonld @@ -2317,7 +2317,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/external-obj/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(4,18)-(8,5)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(4,4)-(8,5)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/external-obj/source-map/lexical/element_0", @@ -2939,7 +2939,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/scalar/conditional-subschemas/if/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(21,19)-(24,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(21,8)-(24,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/scalar/conditional-subschemas/then/property/postal_code/scalar/postal_code", @@ -2992,7 +2992,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/scalar/conditional-subschemas/then/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(25,19)-(28,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(25,8)-(28,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/scalar/conditional-subschemas/else/property/postal_code/scalar/postal_code", @@ -3045,7 +3045,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/scalar/conditional-subschemas/else/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(29,19)-(32,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(29,8)-(32,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/types/external-obj/property/a/scalar/a/source-map", @@ -3394,7 +3394,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/messages/someMessage/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(48,19)-(53,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(48,8)-(53,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/messages/someMessage/schema/source-map/type-property-lexical-info/element_0", @@ -3570,7 +3570,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/operationBindings/someOperationBinding/http-operation/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(98,21)-(101,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(98,10)-(101,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/components/async-components.yaml#/declarations/operationBindings/someOperationBinding/http-operation/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.expanded.jsonld index d2c48f3a73..3bbd8206c6 100644 --- a/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.expanded.jsonld @@ -965,7 +965,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(23,23)-(26,0)]" + "@value": "[(23,12)-(26,0)]" } ] } @@ -1180,7 +1180,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(27,23)-(30,0)]" + "@value": "[(27,12)-(30,0)]" } ] } @@ -1395,7 +1395,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(31,23)-(35,0)]" + "@value": "[(31,12)-(35,0)]" } ] } @@ -2127,7 +2127,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(19,21)-(22,0)]" + "@value": "[(19,10)-(22,0)]" } ] }, @@ -4243,7 +4243,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(93,21)-(99,0)]" + "@value": "[(93,10)-(99,0)]" } ] }, @@ -4917,7 +4917,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(104,21)-(114,0)]" + "@value": "[(104,10)-(114,0)]" } ] } @@ -5463,7 +5463,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(120,23)-(125,0)]" + "@value": "[(120,12)-(125,0)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.flattened.jsonld index 37f695a2a5..a45e21ef7f 100644 --- a/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.flattened.jsonld @@ -2591,7 +2591,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(19,21)-(22,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(19,10)-(22,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/source-map/lexical/element_4", @@ -2827,7 +2827,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/readOnly-writeOnly-schema-level/subscribe/default-response/default/schema/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(93,21)-(99,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(93,10)-(99,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/readOnly-writeOnly-schema-level/subscribe/default-response/default/schema/source-map/lexical/element_0", @@ -2937,7 +2937,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/exclusiveWithValues/subscribe/default-response/default/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(104,21)-(114,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(104,10)-(114,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/exclusiveWithValues/subscribe/default-response/default/schema/source-map/type-property-lexical-info/element_0", @@ -3181,7 +3181,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/if/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(23,23)-(26,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(23,12)-(26,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/then/property/postal_code/scalar/postal_code", @@ -3234,7 +3234,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/then/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(27,23)-(30,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(27,12)-(30,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/else/property/postal_code/scalar/postal_code", @@ -3287,7 +3287,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/else/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(31,23)-(35,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(31,12)-(35,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/conditional-subschemas/subscribe/default-response/default/schema/example/default-example_1/object_1/scalar_2", @@ -3750,7 +3750,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/notKeyWord/subscribe/default-response/default/any/schema/not/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(120,23)-(125,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(120,12)-(125,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7-schemas.yaml#/async-api/end-points/notKeyWord/subscribe/default-response/default/any/schema/not/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/draft-7/references.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/draft-7/references.expanded.jsonld index 647952b222..3fd03f1d09 100644 --- a/amf-client/shared/src/test/resources/validations/async20/draft-7/references.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/draft-7/references.expanded.jsonld @@ -966,7 +966,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(12,22)-(16,9)]" + "@value": "[(12,8)-(16,9)]" } ] } @@ -1006,7 +1006,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(6,20)-(10,7)]" + "@value": "[(6,6)-(10,7)]" } ] }, @@ -1087,7 +1087,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(6,20)-(10,7)]" + "@value": "[(6,6)-(10,7)]" } ] }, @@ -1223,7 +1223,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(9,17)-(13,59)]" + "@value": "[(9,6)-(13,59)]" } ] }, diff --git a/amf-client/shared/src/test/resources/validations/async20/draft-7/references.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/draft-7/references.flattened.jsonld index 80507ca318..02bdc8f6d7 100644 --- a/amf-client/shared/src/test/resources/validations/async20/draft-7/references.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/draft-7/references.flattened.jsonld @@ -338,7 +338,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/references.yaml#/declarations/types/MySchema/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(9,17)-(13,59)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(9,6)-(13,59)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/references.yaml#/declarations/types/MySchema/source-map/lexical/element_0", @@ -624,7 +624,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/references.yaml#/declarations/types/MySchema/property/age/main/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(6,20)-(10,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(6,6)-(10,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/references.yaml#/declarations/types/MySchema/property/age/main/source-map/lexical/element_0", @@ -758,7 +758,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/first-level-schema.json#/definitions/main/anotherMain/source-map/lexical/element_2", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(6,20)-(10,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(6,6)-(10,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/first-level-schema.json#/definitions/main/anotherMain/source-map/lexical/element_0", @@ -866,7 +866,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/second-level-schema.json#/definitions/anotherMain/if/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(12,22)-(16,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(12,8)-(16,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/draft-7/first-level-schema.json#/definitions/main/anotherMain/property/anotherName/scalar/anotherName/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/http-message-binding.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/http-message-binding.expanded.jsonld index 0902303739..3a894541ed 100644 --- a/amf-client/shared/src/test/resources/validations/async20/http-message-binding.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/http-message-binding.expanded.jsonld @@ -274,7 +274,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(14,25)-(16,30)]" + "@value": "[(14,14)-(16,30)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/http-message-binding.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/http-message-binding.flattened.jsonld index 7a5d4256ac..2273125b28 100644 --- a/amf-client/shared/src/test/resources/validations/async20/http-message-binding.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/http-message-binding.flattened.jsonld @@ -416,7 +416,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/http-message-binding.yaml#/async-api/end-points/some-channel/publish/request/message-bindings/http-message/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(14,25)-(16,30)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(14,14)-(16,30)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/http-message-binding.yaml#/async-api/end-points/some-channel/publish/request/message-bindings/http-message/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.expanded.jsonld index d3c1a867d2..6bd4a40675 100644 --- a/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.expanded.jsonld @@ -276,7 +276,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(16,23)-(18,28)]" + "@value": "[(16,12)-(18,28)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.flattened.jsonld index bae30c290e..7713d82e36 100644 --- a/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/http-operation-binding.flattened.jsonld @@ -390,7 +390,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/http-operation-binding.yaml#/async-api/end-points/some-channel/publish/operation-bindings/http-operation/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(16,23)-(18,28)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(16,12)-(18,28)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/http-operation-binding.yaml#/async-api/end-points/some-channel/publish/operation-bindings/http-operation/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/message-obj.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/message-obj.expanded.jsonld index dcad848898..468aa151aa 100644 --- a/amf-client/shared/src/test/resources/validations/async20/message-obj.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/message-obj.expanded.jsonld @@ -1797,7 +1797,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(16,21)-(21,0)]" + "@value": "[(16,10)-(21,0)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/message-obj.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/message-obj.flattened.jsonld index 899b940f72..ce93f1608f 100644 --- a/amf-client/shared/src/test/resources/validations/async20/message-obj.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/message-obj.flattened.jsonld @@ -1261,7 +1261,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/message-obj.yaml#/async-api/end-points/smartylighting%2Fstreetlights%2F1%2F0%2Fevent%2F%7BstreetlightId%7D%2Flighting%2Fmeasured/publish/request/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(16,21)-(21,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(16,10)-(21,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/message-obj.yaml#/async-api/end-points/smartylighting%2Fstreetlights%2F1%2F0%2Fevent%2F%7BstreetlightId%7D%2Flighting%2Fmeasured/publish/request/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/rpc-server.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/rpc-server.expanded.jsonld index 5a78ff42a0..d299b7a847 100644 --- a/amf-client/shared/src/test/resources/validations/async20/rpc-server.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/rpc-server.expanded.jsonld @@ -523,7 +523,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(37,21)-(43,0)]" + "@value": "[(37,10)-(43,0)]" } ] } @@ -1914,7 +1914,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(59,21)-(65,23)]" + "@value": "[(59,10)-(65,23)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/rpc-server.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/rpc-server.flattened.jsonld index 8a5a76cfcb..8adb36e730 100644 --- a/amf-client/shared/src/test/resources/validations/async20/rpc-server.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/rpc-server.flattened.jsonld @@ -1471,7 +1471,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/rpc-server.yaml#/async-api/end-points/%7Bqueue%7D/subscribe/default-response/default/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(37,21)-(43,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(37,10)-(43,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/rpc-server.yaml#/async-api/end-points/%7Bqueue%7D/subscribe/default-response/default/schema/source-map/type-property-lexical-info/element_0", @@ -1531,7 +1531,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/rpc-server.yaml#/async-api/end-points/rpc_queue/publish/request/default/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(59,21)-(65,23)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(59,10)-(65,23)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/rpc-server.yaml#/async-api/end-points/rpc_queue/publish/request/default/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.expanded.jsonld b/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.expanded.jsonld index d81c59ccb8..57fef58884 100644 --- a/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.expanded.jsonld @@ -259,7 +259,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(13,21)-(16,0)]" + "@value": "[(13,10)-(16,0)]" } ] } @@ -484,7 +484,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(18,21)-(21,0)]" + "@value": "[(18,10)-(21,0)]" } ] } diff --git a/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.flattened.jsonld b/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.flattened.jsonld index d9baeeca51..1e25d7e0a0 100644 --- a/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.flattened.jsonld @@ -420,7 +420,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.yaml#/async-api/end-points/some-channel/channel-bindings/web-socket-channel/query/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(13,21)-(16,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(13,10)-(16,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.yaml#/async-api/end-points/some-channel/channel-bindings/web-socket-channel/query/schema/source-map/type-property-lexical-info/element_0", @@ -477,7 +477,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.yaml#/async-api/end-points/some-channel/channel-bindings/web-socket-channel/headers/schema/source-map/lexical/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(18,21)-(21,0)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(18,10)-(21,0)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/async20/ws-channel-binding.yaml#/async-api/end-points/some-channel/channel-bindings/web-socket-channel/headers/schema/source-map/type-property-lexical-info/element_0", diff --git a/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.expanded.jsonld b/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.expanded.jsonld index 2f18b763e9..05774d30a5 100644 --- a/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.expanded.jsonld @@ -1821,7 +1821,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(59,22)-(66,9)]" + "@value": "[(59,8)-(66,9)]" } ] }, @@ -2969,7 +2969,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(74,22)-(87,9)]" + "@value": "[(74,8)-(87,9)]" } ] }, @@ -4473,7 +4473,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(97,22)-(110,9)]" + "@value": "[(97,8)-(110,9)]" } ] }, diff --git a/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.flattened.jsonld b/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.flattened.jsonld index e15504ff59..4d7f95d354 100644 --- a/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.flattened.jsonld @@ -1507,7 +1507,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.json#/declarations/types/VehicleDetails/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(59,22)-(66,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(59,8)-(66,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.json#/declarations/types/VehicleDetails/source-map/lexical/element_0", @@ -1735,7 +1735,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.json#/declarations/types/Branch/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(74,22)-(87,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(74,8)-(87,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.json#/declarations/types/Branch/source-map/lexical/element_0", @@ -1965,7 +1965,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.json#/declarations/types/Application/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(97,22)-(110,9)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(97,8)-(110,9)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oas30api.json#/declarations/types/Application/source-map/lexical/element_0", diff --git a/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.expanded.jsonld b/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.expanded.jsonld index 6e15680cc2..399734214e 100644 --- a/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.expanded.jsonld +++ b/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.expanded.jsonld @@ -2342,7 +2342,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(62,20)-(76,7)]" + "@value": "[(62,6)-(76,7)]" } ] }, @@ -3042,7 +3042,7 @@ ], "http://a.ml/vocabularies/document-source-maps#value": [ { - "@value": "[(85,20)-(92,7)]" + "@value": "[(85,6)-(92,7)]" } ] }, diff --git a/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.flattened.jsonld b/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.flattened.jsonld index a044739d3a..a22d404df1 100644 --- a/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.flattened.jsonld +++ b/amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.flattened.jsonld @@ -1566,7 +1566,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.json#/declarations/types/%E8%BB%8A%E4%B8%A1/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(62,20)-(76,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(62,6)-(76,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.json#/declarations/types/%E8%BB%8A%E4%B8%A1/source-map/lexical/element_0", @@ -1714,7 +1714,7 @@ { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.json#/declarations/types/%E8%BB%8A%E4%B8%A1%E8%A9%B3%E7%B4%B0/source-map/lexical/element_1", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#property", - "http://a.ml/vocabularies/document-source-maps#value": "[(85,20)-(92,7)]" + "http://a.ml/vocabularies/document-source-maps#value": "[(85,6)-(92,7)]" }, { "@id": "file://amf-client/shared/src/test/resources/validations/japanese/cycle/oasapi.json#/declarations/types/%E8%BB%8A%E4%B8%A1%E8%A9%B3%E7%B4%B0/source-map/lexical/element_0", diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala index 10af9c0383..0e5b6f98d1 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala @@ -7,6 +7,7 @@ import amf.core.metamodel.domain.{LinkableElementModel, ShapeModel} import amf.core.model.DataType import amf.core.model.domain._ import amf.core.model.domain.extensions.PropertyShape +import amf.core.parser.Annotations.{inferred, synthesized, virtual} import amf.core.parser.errorhandler.ParserErrorHandler import amf.core.parser.{Annotations, Fields, FutureDeclarations, Range, ScalarNode, SearchScope, YMapOps, YNodeLikeOps} import amf.core.utils.{AmfStrings, IdCounter} @@ -107,7 +108,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, parsed, NilShape().withId(union.id + "_nil") ), - Annotations.synthesized() + synthesized() ) union case _ => @@ -320,11 +321,8 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, map .key("type") - .fold( - shape - .set(ScalarShapeModel.DataType, - AmfScalar(XsdTypeDefMapping.xsd(validatedTypeDef)), - Annotations.synthesized()))( + .fold(shape + .set(ScalarShapeModel.DataType, AmfScalar(XsdTypeDefMapping.xsd(validatedTypeDef)), synthesized()))( entry => shape.set(ScalarShapeModel.DataType, AmfScalar(XsdTypeDefMapping.xsd(validatedTypeDef), Annotations(entry.value)), @@ -643,14 +641,14 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, map.key("minProperties", NodeShapeModel.MinProperties in shape) map.key("maxProperties", NodeShapeModel.MaxProperties in shape) - shape.set(NodeShapeModel.Closed, AmfScalar(value = false), Annotations.synthesized()) + shape.set(NodeShapeModel.Closed, AmfScalar(value = false), synthesized()) map.key("additionalProperties").foreach { entry => entry.value.tagType match { case YType.Bool => (NodeShapeModel.Closed in shape).negated.explicit(entry) case YType.Map => OasTypeParser(entry, s => s.adopted(shape.id), version).parse().foreach { s => - shape.set(NodeShapeModel.AdditionalPropertiesSchema, s, Annotations.synthesized()) + shape.set(NodeShapeModel.AdditionalPropertiesSchema, s, synthesized()) } case _ => ctx.eh.violation(InvalidAdditionalPropertiesType, @@ -699,16 +697,19 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, case _ => // Empty properties node. } }) - val valueAnnotations = propertiesEntry.map { pe => - Annotations(pe.value) + + val (propertiesAnnotations, propertiesFieldAnnotations) = propertiesEntry.map { pe => + (Annotations(pe.value), Annotations(pe)) } orElse { patternPropEntry.map { pp => - Annotations(pp.value) + (Annotations(pp.value), Annotations(pp)) } - } getOrElse { Annotations.virtual() } + } getOrElse { (virtual(), inferred()) } if (properties.nonEmpty) - shape.set(NodeShapeModel.Properties, AmfArray(properties.values.toSeq, valueAnnotations), valueAnnotations) + shape.set(NodeShapeModel.Properties, + AmfArray(properties.values.toSeq, propertiesAnnotations), + propertiesFieldAnnotations) parseShapeDependencies(shape) @@ -730,10 +731,10 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, val undefinedRequiredProperties = requiredFields.keySet.filter(!properties.keySet.contains(_)) val generatedRequiredProperties = undefinedRequiredProperties .map(propertyName => { - PropertyShape(Annotations.virtual()) + PropertyShape(virtual()) .withName(propertyName) - .set(PropertyShapeModel.MinCount, AmfScalar(1), Annotations.synthesized()) - .set(PropertyShapeModel.Range, AnyShape(), Annotations.synthesized()) + .set(PropertyShapeModel.MinCount, AmfScalar(1), synthesized()) + .set(PropertyShapeModel.Range, AnyShape(), synthesized()) }) properties ++= generatedRequiredProperties.map(p => p.name.value() -> p) } @@ -836,7 +837,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, ctx.declarations .findType(definitionName, SearchScope.All) match { case Some(s) => - s.link(AmfScalar(key.toString), Annotations(ast), Annotations.synthesized()) + s.link(AmfScalar(key.toString), Annotations(ast), synthesized()) .asInstanceOf[AnyShape] .withName(name, nameAnnotations) .withSupportsRecursion(true) @@ -888,18 +889,18 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, val name = entry.key.as[YScalar].text val required = requiredFields.contains(name) val requiredAnnotations = - requiredFields.get(name).map(node => Annotations(node)).getOrElse(Annotations.synthesized()) + requiredFields.get(name).map(node => Annotations(node)).getOrElse(synthesized()) val property = producer(name) .add(Annotations(entry)) .set(PropertyShapeModel.MinCount, - AmfScalar(if (required) 1 else 0, Annotations.synthesized()), + AmfScalar(if (required) 1 else 0, synthesized()), requiredAnnotations += ExplicitField()) property.set( PropertyShapeModel.Path, AmfScalar((Namespace.Data + entry.key.as[YScalar].text.urlComponentEncoded).iri(), Annotations(entry.key)), - Annotations.inferred() + inferred() ) if (version.isInstanceOf[OAS20SchemaVersion]) @@ -922,8 +923,8 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, val required = ScalarNode(entry.value).boolean().value.asInstanceOf[Boolean] property.set( PropertyShapeModel.MinCount, - AmfScalar(if (required) 1 else 0, Annotations.synthesized()), // does this annotation make sense? should parent not be `synthesized`? - Annotations(entry) += ExplicitField() + AmfScalar(if (required) 1 else 0), + synthesized() ) } } @@ -932,7 +933,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, OasTypeParser(entry, shape => shape.adopted(property.id), version) .parse() - .foreach(property.set(PropertyShapeModel.Range, _, Annotations.inferred())) + .foreach(property.set(PropertyShapeModel.Range, _, inferred())) if (patterned) property.withPatternName(name) From 0ef0f172e750a41698fe5ebd928de9b23d5cd83f Mon Sep 17 00:00:00 2001 From: Agustin Bettati Date: Mon, 23 Aug 2021 08:37:55 -0700 Subject: [PATCH 09/16] Publish 4.7.7-RC.0 --- Jenkinsfile | 1 + amf-webapi.versions | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5d2c224834..6bd75d55df 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,6 +58,7 @@ pipeline { anyOf { branch 'master' branch 'develop' + branch 'release/*' } } steps { diff --git a/amf-webapi.versions b/amf-webapi.versions index 9bae2cb912..b5ba7873f2 100644 --- a/amf-webapi.versions +++ b/amf-webapi.versions @@ -1,4 +1,4 @@ -amf.webapi=4.8.0-SNAPSHOT +amf.webapi=4.7.7-RC.0 amf.core=4.2.223 -amf.custom.validations=5.2.0-SNAPSHOT +amf.custom.validations=5.1.9-RC.0 amf.model=3.1.0 From e895454e8cf58e2a2c55b38ab59db9aadc0f408d Mon Sep 17 00:00:00 2001 From: arielmirra Date: Tue, 24 Aug 2021 17:49:39 -0300 Subject: [PATCH 10/16] APIMF-3025 (fix): improve object criteria for required facet --- .../boolean-required-in-draft-4.raml | 18 ++++++++ .../validations/invalid-boolean-required.raml | 19 ++++++++ .../raml/boolean-required-in-draft-4.report | 22 ++++++++++ .../raml/invalid-boolean-required.report | 32 ++++++++++++++ .../validations/valid-draft-3-required.raml | 20 +++++++++ .../RamlModelUniquePlatformReportTest.scala | 12 +++++ .../spec/declaration/types/TypeDetector.scala | 44 +++++++++++++------ .../parser/types/InlineOasTypeParser.scala | 2 +- 8 files changed, 154 insertions(+), 15 deletions(-) create mode 100644 amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml create mode 100644 amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml create mode 100644 amf-client/shared/src/test/resources/validations/reports/model/raml/boolean-required-in-draft-4.report create mode 100644 amf-client/shared/src/test/resources/validations/reports/model/raml/invalid-boolean-required.report create mode 100644 amf-client/shared/src/test/resources/validations/valid-draft-3-required.raml diff --git a/amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml b/amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml new file mode 100644 index 0000000000..d87fc4be09 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml @@ -0,0 +1,18 @@ +#%RAML 1.0 + +title: test + +types: + A: | + { + "type": "object", + "properties": { + "someProp" : { + "required": true + }, + "otherProp" : { + "type": "string", + "required": true + } + } + } diff --git a/amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml b/amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml new file mode 100644 index 0000000000..feac5692c2 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml @@ -0,0 +1,19 @@ +#%RAML 1.0 + +title: test + +types: + A: | + { + "type": "object", + "properties": { + "someProp" : { + "required": true + }, + "otherProp" : { + "type": "string", + "required": true + } + }, + "required": true + } diff --git a/amf-client/shared/src/test/resources/validations/reports/model/raml/boolean-required-in-draft-4.report b/amf-client/shared/src/test/resources/validations/reports/model/raml/boolean-required-in-draft-4.report new file mode 100644 index 0000000000..793023b532 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/reports/model/raml/boolean-required-in-draft-4.report @@ -0,0 +1,22 @@ +Model: file://amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml +Profile: RAML 1.0 +Conforms? true +Number of results: 2 + +Level: Warning + +- Source: http://a.ml/vocabularies/amf/parser#invalid-required-boolean-for-schema-version + Message: Required property boolean value is only supported in JSON Schema draft-3 + Level: Warning + Target: file://amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml#/declarations/types/A/property/someProp + Property: + Position: Some(LexicalInformation([(11,10)-(11,26)])) + Location: file://amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml + +- Source: http://a.ml/vocabularies/amf/parser#invalid-required-boolean-for-schema-version + Message: Required property boolean value is only supported in JSON Schema draft-3 + Level: Warning + Target: file://amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml#/declarations/types/A/property/otherProp + Property: + Position: Some(LexicalInformation([(15,10)-(15,26)])) + Location: file://amf-client/shared/src/test/resources/validations/boolean-required-in-draft-4.raml diff --git a/amf-client/shared/src/test/resources/validations/reports/model/raml/invalid-boolean-required.report b/amf-client/shared/src/test/resources/validations/reports/model/raml/invalid-boolean-required.report new file mode 100644 index 0000000000..d489ae92d6 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/reports/model/raml/invalid-boolean-required.report @@ -0,0 +1,32 @@ +Model: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml +Profile: RAML 1.0 +Conforms? false +Number of results: 3 + +Level: Violation + +- Source: http://a.ml/vocabularies/amf/parser#invalid-required-value + Message: 'required' field has to be an array + Level: Violation + Target: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml#/declarations/types/A + Property: + Position: Some(LexicalInformation([(18,6)-(18,22)])) + Location: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml + +Level: Warning + +- Source: http://a.ml/vocabularies/amf/parser#invalid-required-boolean-for-schema-version + Message: Required property boolean value is only supported in JSON Schema draft-3 + Level: Warning + Target: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml#/declarations/types/A/property/someProp + Property: + Position: Some(LexicalInformation([(11,10)-(11,26)])) + Location: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml + +- Source: http://a.ml/vocabularies/amf/parser#invalid-required-boolean-for-schema-version + Message: Required property boolean value is only supported in JSON Schema draft-3 + Level: Warning + Target: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml#/declarations/types/A/property/otherProp + Property: + Position: Some(LexicalInformation([(15,10)-(15,26)])) + Location: file://amf-client/shared/src/test/resources/validations/invalid-boolean-required.raml diff --git a/amf-client/shared/src/test/resources/validations/valid-draft-3-required.raml b/amf-client/shared/src/test/resources/validations/valid-draft-3-required.raml new file mode 100644 index 0000000000..e28bf0c6c6 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/valid-draft-3-required.raml @@ -0,0 +1,20 @@ +#%RAML 1.0 + +title: test + +types: + A: | + { + "$schema": "http://json-schema.org/draft-03/schema#", + "type": "object", + "properties": { + "someProp" : { + "required": true + }, + "otherProp" : { + "type": "string", + "required": true + } + }, + "required": true + } diff --git a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala index 9b9a51b9c2..7bd4d64120 100644 --- a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala +++ b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala @@ -622,4 +622,16 @@ class RamlModelUniquePlatformReportTest extends UniquePlatformReportGenTest { test("valid subschema with required facet") { validate("raml-subschema-with-required.raml") } + + test("valid required key with boolean value in draft 3") { + validate("valid-draft-3-required.raml") + } + + test("required key with boolean value in draft 4 onwards") { + validate("boolean-required-in-draft-4.raml", Some("raml/boolean-required-in-draft-4.report")) + } + + test("invalid required key with boolean value in draft 4 onwards") { + validate("invalid-boolean-required.raml", Some("raml/invalid-boolean-required.report")) + } } diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala index 74149013bb..43fc1e6fc1 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/declaration/types/TypeDetector.scala @@ -1,16 +1,20 @@ package amf.plugins.document.webapi.parser.spec.declaration.types -import amf.core.errorhandling.ErrorHandler import amf.core.parser.errorhandler.ParserErrorHandler import amf.core.parser.{YMapOps, YNodeLikeOps} import amf.plugins.document.webapi.parser.OasTypeDefMatcher.matchType +import amf.plugins.document.webapi.parser.spec.declaration.{ + JSONSchemaDraft3SchemaVersion, + JSONSchemaDraft4SchemaVersion, + SchemaVersion +} import amf.plugins.domain.shapes.models.TypeDef import amf.plugins.domain.shapes.models.TypeDef._ import amf.validations.ParserSideValidations.InvalidJsonSchemaType -import org.yaml.model.{YMap, YScalar} +import org.yaml.model.{YMap, YScalar, YType} object TypeDetector { - def detect(map: YMap)(implicit errorHandler: ParserErrorHandler): Option[TypeDef] = { + def detect(map: YMap, version: SchemaVersion)(implicit errorHandler: ParserErrorHandler): Option[TypeDef] = { val detectionCriteria = ExplicitTypeCriteria() .chain(ObjectCriteria) @@ -19,20 +23,21 @@ object TypeDetector { .chain(NumberCriteria) .chain(StringCriteria) - detectionCriteria.detect(map) + detectionCriteria.detect(map)(version) } abstract class TypeCriteria { - def detect(map: YMap): Option[TypeDef] + def detect(map: YMap)(implicit version: SchemaVersion = JSONSchemaDraft4SchemaVersion): Option[TypeDef] def chain(criteria: TypeCriteria): TypeCriteria = ChainedCriteria(this, criteria) } case class ChainedCriteria(first: TypeCriteria, second: TypeCriteria) extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = first.detect(map).orElse(second.detect(map)) + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = + first.detect(map).orElse(second.detect(map)) } case class ExplicitTypeCriteria()(implicit val errorHandler: ParserErrorHandler) extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = map.key("type").flatMap { e => + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = map.key("type").flatMap { e => val typeText = e.value.as[YScalar].text val formatTextOrEmpty = map.key("format").flatMap(e => e.value.toOption[YScalar].map(_.text)).getOrElse("") val result = matchType(typeText, formatTextOrEmpty, UndefinedType) @@ -44,11 +49,12 @@ object TypeDetector { } object AmfUnionCriteria extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = map.key("x-amf-union").map(_ => UnionType) + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = + map.key("x-amf-union").map(_ => UnionType) } object StringCriteria extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = map .key("minLength") .orElse(map.key("maxLength")) @@ -58,7 +64,7 @@ object TypeDetector { } object NumberCriteria extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = map .key("multipleOf") .orElse(map.key("minimum")) @@ -69,7 +75,7 @@ object TypeDetector { } object ObjectCriteria extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = map .key("properties") .orElse(map.key("x-amf-merge")) @@ -79,16 +85,26 @@ object TypeDetector { .orElse(map.key("patternProperties")) .orElse(map.key("additionalProperties")) .orElse(map.key("discriminator")) - .orElse(map.key("required")) + .orElse { + map.key("required") match { + case Some(entry) => { + val isArray = entry.value.tagType == YType.Seq + val isNotDraft3orUnder = version isBiggerThanOrEqualTo JSONSchemaDraft4SchemaVersion + if (isArray && isNotDraft3orUnder) Some(entry) else None + } + case None => None + } + } .map(_ => ObjectType) } object LinkCriteria extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = map.key("$ref").map(_ => LinkType) + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = + map.key("$ref").map(_ => LinkType) } object ArrayCriteria extends TypeCriteria { - override def detect(map: YMap): Option[TypeDef] = + override def detect(map: YMap)(implicit version: SchemaVersion): Option[TypeDef] = map .key("items") .orElse(map.key("minItems")) diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala index 0e5b6f98d1..99cd0f72fe 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala @@ -131,7 +131,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, case oasSchema: OASSchemaVersion if oasSchema.position.toString == "parameter" => UndefinedType case _ => AnyType } - TypeDetector.detect(map)(ctx.eh).getOrElse(defaultType) + TypeDetector.detect(map, version)(ctx.eh).getOrElse(defaultType) } private def parseDisjointUnionType(): UnionShape = { From 725d0728cf9e104fcbf14a5e7b5a8b01f444e227 Mon Sep 17 00:00:00 2001 From: arielmirra Date: Wed, 25 Aug 2021 16:13:29 -0300 Subject: [PATCH 11/16] APIMF-3348: add path to generated property shapes --- .../api.resolved.expanded.jsonld | 18 ++++++++++++ .../api.resolved.flattened.jsonld | 13 +++++++++ .../required-with-no-additional-props.raml | 29 +++++++++++++++++++ .../RamlModelUniquePlatformReportTest.scala | 4 +++ .../parser/types/InlineOasTypeParser.scala | 1 + 5 files changed, 65 insertions(+) create mode 100644 amf-client/shared/src/test/resources/validations/required-with-no-additional-props.raml diff --git a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld index f9c0e71904..ca1b1cb588 100644 --- a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld +++ b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.expanded.jsonld @@ -4842,6 +4842,11 @@ "http://a.ml/vocabularies/shapes#Shape", "http://a.ml/vocabularies/document#DomainElement" ], + "http://www.w3.org/ns/shacl#path": [ + { + "@id": "http://a.ml/vocabularies/data#name" + } + ], "http://a.ml/vocabularies/shapes#range": [ { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/any/default-any", @@ -4870,6 +4875,19 @@ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_1", + "http://a.ml/vocabularies/document-source-maps#element": [ + { + "@value": "http://www.w3.org/ns/shacl#path" + } + ], + "http://a.ml/vocabularies/document-source-maps#value": [ + { + "@value": "true" + } + ] + }, { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": [ diff --git a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld index 68c470836a..4656728136 100644 --- a/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld +++ b/amf-client/shared/src/test/resources/production/oas-complex-example/api.resolved.flattened.jsonld @@ -2666,6 +2666,11 @@ "http://a.ml/vocabularies/shapes#Shape", "http://a.ml/vocabularies/document#DomainElement" ], + "http://www.w3.org/ns/shacl#path": [ + { + "@id": "http://a.ml/vocabularies/data#name" + } + ], "http://a.ml/vocabularies/shapes#range": { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/any/default-any" }, @@ -3153,6 +3158,9 @@ "http://a.ml/vocabularies/document-source-maps#SourceMap" ], "http://a.ml/vocabularies/document-source-maps#synthesized-field": [ + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_1" + }, { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_0" } @@ -3415,6 +3423,11 @@ "http://a.ml/vocabularies/document-source-maps#element": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/description", "http://a.ml/vocabularies/document-source-maps#value": "[(12,8)-(15,9)]" }, + { + "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_1", + "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#path", + "http://a.ml/vocabularies/document-source-maps#value": "true" + }, { "@id": "file://amf-client/shared/src/test/resources/production/oas-complex-example/spec/NewPet.json#/and/1/item1/property/name/source-map/synthesized-field/element_0", "http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#minCount", diff --git a/amf-client/shared/src/test/resources/validations/required-with-no-additional-props.raml b/amf-client/shared/src/test/resources/validations/required-with-no-additional-props.raml new file mode 100644 index 0000000000..26f1cb7017 --- /dev/null +++ b/amf-client/shared/src/test/resources/validations/required-with-no-additional-props.raml @@ -0,0 +1,29 @@ +#%RAML 0.8 + +title: Test + +/person: + get: + responses: + 200: + body: + application/json: + schema: | + { + "$schema": "http://json-schema.org/draft-04/schema#", + "type" : "object", + "properties": { + "name": {"type": "string"}, + "age": {"type": "integer"} + }, + "additionalProperties": false, + "required": [ + "address" + ] + } + example: | + { + "name": "Pepito", + "age": 33, + "address": "anything" + } diff --git a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala index 7bd4d64120..04d9dad590 100644 --- a/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala +++ b/amf-client/shared/src/test/scala/amf/validation/RamlModelUniquePlatformReportTest.scala @@ -634,4 +634,8 @@ class RamlModelUniquePlatformReportTest extends UniquePlatformReportGenTest { test("invalid required key with boolean value in draft 4 onwards") { validate("invalid-boolean-required.raml", Some("raml/invalid-boolean-required.report")) } + + test("required with non-declared property and additionalProperties = false") { + validate("required-with-no-additional-props.raml", None, Raml08Profile) + } } diff --git a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala index 99cd0f72fe..de33456f85 100644 --- a/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala +++ b/amf-webapi/shared/src/main/scala/amf/plugins/document/webapi/parser/spec/oas/parser/types/InlineOasTypeParser.scala @@ -735,6 +735,7 @@ case class InlineOasTypeParser(entryOrNode: YMapEntryLike, .withName(propertyName) .set(PropertyShapeModel.MinCount, AmfScalar(1), synthesized()) .set(PropertyShapeModel.Range, AnyShape(), synthesized()) + .set(PropertyShapeModel.Path, AmfScalar((Namespace.Data + propertyName).iri()), synthesized()) }) properties ++= generatedRequiredProperties.map(p => p.name.value() -> p) } From 67a900149cf0e2fa40a84a4a7cf36fd384641da3 Mon Sep 17 00:00:00 2001 From: Loose Date: Wed, 25 Aug 2021 19:53:43 -0300 Subject: [PATCH 12/16] Publish 4.7.7-RC.1 --- amf-webapi.versions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/amf-webapi.versions b/amf-webapi.versions index b5ba7873f2..feba8cfc97 100644 --- a/amf-webapi.versions +++ b/amf-webapi.versions @@ -1,4 +1,4 @@ -amf.webapi=4.7.7-RC.0 -amf.core=4.2.223 -amf.custom.validations=5.1.9-RC.0 +amf.webapi=4.7.7-RC.1 +amf.core=4.2.224 +amf.custom.validations=5.1.9-RC.1 amf.model=3.1.0 From 1bf6be17f8a0906e8b625a6e73080f261220151b Mon Sep 17 00:00:00 2001 From: Loose Date: Wed, 25 Aug 2021 19:29:53 -0300 Subject: [PATCH 13/16] Use Dockerhub Pro on Jenknins --- Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6bd75d55df..63ca560b02 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,10 @@ def headerFlavour = "WARNING" pipeline { agent { - dockerfile true + dockerfile { + filename 'Dockerfile' + registryCredentialsId 'dockerhub-pro-credentials' + } } environment { NEXUS = credentials('exchange-nexus') From dd00972cddf47332d7f849866395ae923fbb8de0 Mon Sep 17 00:00:00 2001 From: Tomas Fernandez Date: Thu, 26 Aug 2021 14:13:08 -0300 Subject: [PATCH 14/16] Chore: Add cli publish --- build.sbt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index c20b67edbc..68d55af1fe 100644 --- a/build.sbt +++ b/build.sbt @@ -143,7 +143,12 @@ lazy val client = crossProject(JSPlatform, JVMPlatform) case x => val oldStrategy = (assemblyMergeStrategy in assembly).value oldStrategy(x) - } + }, + assembly / artifact := { + val art = (assembly / artifact).value + art.withClassifier(Some("assembly")) + }, + addArtifact(assembly / artifact, assembly) ) .jsSettings( scalaJSModuleKind := ModuleKind.CommonJSModule, From fa946564f0a02ef15a39cb1b0db0d002d8a6b511 Mon Sep 17 00:00:00 2001 From: Tomas Fernandez Date: Thu, 26 Aug 2021 15:10:55 -0300 Subject: [PATCH 15/16] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 63ca560b02..e39e38c23d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -162,7 +162,7 @@ pipeline { } def newAmfVersion = getAmfVersion() echo "Starting ApiQuery hook API-Query/api-query-amf-integration/master with amf version: ${newAmfVersion}" - build job: "API-Query/api-query-amf-integration/master", wait: false, parameters: [[$class: 'StringParameterValue', name: 'AMF_NEW_VERSION', value: newAmfVersion]] + build job: "API-Query-new/api-query-amf-integration/master", wait: false, parameters: [[$class: 'StringParameterValue', name: 'AMF_NEW_VERSION', value: newAmfVersion]] } } catch(ignored) { failedStage = failedStage + " JOBS TRIGGER " From cf24357e8f103b0f53ae48e8add99c65c3c81e73 Mon Sep 17 00:00:00 2001 From: arielmirra Date: Thu, 26 Aug 2021 17:25:46 -0300 Subject: [PATCH 16/16] publish 4.7.7 --- Jenkinsfile | 1 - amf-webapi.versions | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e39e38c23d..34316ee455 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -61,7 +61,6 @@ pipeline { anyOf { branch 'master' branch 'develop' - branch 'release/*' } } steps { diff --git a/amf-webapi.versions b/amf-webapi.versions index feba8cfc97..76132c89c0 100644 --- a/amf-webapi.versions +++ b/amf-webapi.versions @@ -1,4 +1,4 @@ -amf.webapi=4.7.7-RC.1 +amf.webapi=4.7.7 amf.core=4.2.224 -amf.custom.validations=5.1.9-RC.1 +amf.custom.validations=5.1.9 amf.model=3.1.0