diff --git a/demo/apis.json b/demo/apis.json index 61808f54e..455416ea8 100644 --- a/demo/apis.json +++ b/demo/apis.json @@ -39,5 +39,9 @@ "models/APIC-560/APIC-560.yaml": "ASYNC 2.0", "models/agens-api/agents-api.yaml": "OAS 3.0", "models/nested-examples/nested-examples-oas3.json": "OAS 3.0", - "models/nullable/nullable.yaml": "OAS 3.0" + "models/nullable/nullable.yaml": "OAS 3.0", + "models/oas31.yaml": { "type": "OAS 3.1", "mime": "application/yaml" }, + "models/oas32.yaml": { "type": "OAS 3.2", "mime": "application/yaml" }, + "models/async30.yaml": { "type": "ASYNC 3.0", "mime": "application/yaml" }, + "models/async31.yaml": { "type": "ASYNC 3.1", "mime": "application/yaml" } } diff --git a/demo/models/async30-compact.json b/demo/models/async30-compact.json new file mode 100644 index 000000000..dde77f001 --- /dev/null +++ b/demo/models/async30-compact.json @@ -0,0 +1 @@ +{"@graph":[{"@id":"amf://id#1","@type":["http://a.ml/vocabularies/document#APIContractProcessingData"],"http://a.ml/vocabularies/apiContract#modelVersion":"3.11.0","http://a.ml/vocabularies/document#transformed":true,"http://a.ml/vocabularies/document#sourceSpec":"ASYNC 3.0"},{"@id":"amf://id#2","@type":["http://a.ml/vocabularies/apiContract#AsyncAPI","http://a.ml/vocabularies/apiContract#API","http://a.ml/vocabularies/document#RootDomainElement","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#topLevelOperations":[{"@id":"amf://id#12"}],"http://a.ml/vocabularies/core#name":"AsyncAPI 3.0 Test","http://a.ml/vocabularies/core#version":"1.0.0","http://a.ml/vocabularies/apiContract#endpoint":[{"@id":"amf://id#3"}]},{"@id":"amf://id#12","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"sendUserSignedUp","http://a.ml/vocabularies/apiContract#operationId":"sendUserSignedUp","http://a.ml/vocabularies/apiContract#action":"send","http://a.ml/vocabularies/apiContract#channel":{"@id":"amf://id#13"},"http://a.ml/vocabularies/apiContract#operationMessages":[{"@id":"amf://id#4"}]},{"@id":"amf://id#3","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"user.signedup","http://a.ml/vocabularies/core#name":"userSignedUp","http://a.ml/vocabularies/core#description":"Channel for user signup events","http://a.ml/vocabularies/apiContract#supportedOperation":[{"@id":"amf://id#12"}],"http://a.ml/vocabularies/apiContract#server":[],"http://a.ml/vocabularies/apiContract#channelMessages":[{"@id":"amf://id#4"}]},{"@id":"amf://id#13","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"user.signedup","http://a.ml/vocabularies/core#name":"userSignedUp","http://a.ml/vocabularies/core#description":"Channel for user signup events","http://a.ml/vocabularies/apiContract#server":[],"http://a.ml/vocabularies/apiContract#channelMessages":[{"@id":"amf://id#4"}]},{"@id":"amf://id#4","@type":["http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"userSignedUpMessage","http://a.ml/vocabularies/apiContract#payload":[{"@id":"amf://id#5"}],"http://a.ml/vocabularies/core#displayName":"userSignedUpMessage"},{"@id":"amf://id#5","@type":["http://a.ml/vocabularies/apiContract#Payload","http://a.ml/vocabularies/core#Payload","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#mediaType":"application/json","http://a.ml/vocabularies/shapes#schema":{"@id":"amf://id#6"}},{"@id":"amf://id#6","@type":["http://www.w3.org/ns/shacl#NodeShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#closed":false,"http://www.w3.org/ns/shacl#property":[{"@id":"amf://id#7"},{"@id":"amf://id#9"}],"http://www.w3.org/ns/shacl#name":"schema"},{"@id":"amf://id#7","@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://www.w3.org/ns/shacl#path":[{"@id":"http://a.ml/vocabularies/data#userId"}],"http://a.ml/vocabularies/shapes#range":{"@id":"amf://id#8"},"http://www.w3.org/ns/shacl#minCount":0,"http://www.w3.org/ns/shacl#name":"userId"},{"@id":"amf://id#9","@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://www.w3.org/ns/shacl#path":[{"@id":"http://a.ml/vocabularies/data#email"}],"http://a.ml/vocabularies/shapes#range":{"@id":"amf://id#10"},"http://www.w3.org/ns/shacl#minCount":0,"http://www.w3.org/ns/shacl#name":"email"},{"@id":"amf://id#8","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://www.w3.org/2001/XMLSchema#string"}],"http://www.w3.org/ns/shacl#name":"userId"},{"@id":"amf://id#10","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://www.w3.org/2001/XMLSchema#string"}],"http://www.w3.org/ns/shacl#name":"email"},{"@id":"amf://id","@type":["http://a.ml/vocabularies/document#Document","http://a.ml/vocabularies/document#Fragment","http://a.ml/vocabularies/document#Module","http://a.ml/vocabularies/document#Unit"],"http://a.ml/vocabularies/document#encodes":{"@id":"amf://id#2"},"http://a.ml/vocabularies/document#root":true,"http://a.ml/vocabularies/document#processingData":{"@id":"amf://id#1"}}]} \ No newline at end of file diff --git a/demo/models/async30.json b/demo/models/async30.json new file mode 100644 index 000000000..843798d33 --- /dev/null +++ b/demo/models/async30.json @@ -0,0 +1,769 @@ +{ +"@graph": [ +{ +"@id": "amf://id#1", +"@type": [ +"http://a.ml/vocabularies/document#APIContractProcessingData" +], +"http://a.ml/vocabularies/apiContract#modelVersion": "3.11.0", +"http://a.ml/vocabularies/document#transformed": true, +"http://a.ml/vocabularies/document#sourceSpec": "ASYNC 3.0" +}, +{ +"@id": "amf://id#2", +"@type": [ +"http://a.ml/vocabularies/apiContract#AsyncAPI", +"http://a.ml/vocabularies/apiContract#API", +"http://a.ml/vocabularies/document#RootDomainElement", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#topLevelOperations": [ +{ +"@id": "amf://id#12" +} +], +"http://a.ml/vocabularies/core#name": "AsyncAPI 3.0 Test", +"http://a.ml/vocabularies/core#version": "1.0.0", +"http://a.ml/vocabularies/apiContract#endpoint": [ +{ +"@id": "amf://id#3" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#2/source-map" +} +] +}, +{ +"@id": "amf://id#12", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "sendUserSignedUp", +"http://a.ml/vocabularies/apiContract#operationId": "sendUserSignedUp", +"http://a.ml/vocabularies/apiContract#action": "send", +"http://a.ml/vocabularies/apiContract#channel": { +"@id": "amf://id#13" +}, +"http://a.ml/vocabularies/apiContract#operationMessages": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#12/source-map" +} +] +}, +{ +"@id": "amf://id#3", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "user.signedup", +"http://a.ml/vocabularies/core#name": "userSignedUp", +"http://a.ml/vocabularies/core#description": "Channel for user signup events", +"http://a.ml/vocabularies/apiContract#supportedOperation": [ +{ +"@id": "amf://id#12" +} +], +"http://a.ml/vocabularies/apiContract#server": [], +"http://a.ml/vocabularies/apiContract#channelMessages": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#3/source-map" +} +] +}, +{ +"@id": "amf://id#2/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#2/source-map/lexical/element_4" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_3" +} +] +}, +{ +"@id": "amf://id#13", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "user.signedup", +"http://a.ml/vocabularies/core#name": "userSignedUp", +"http://a.ml/vocabularies/core#description": "Channel for user signup events", +"http://a.ml/vocabularies/apiContract#server": [], +"http://a.ml/vocabularies/apiContract#channelMessages": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#13/source-map" +} +] +}, +{ +"@id": "amf://id#4", +"@type": [ +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "userSignedUpMessage", +"http://a.ml/vocabularies/apiContract#payload": [ +{ +"@id": "amf://id#5" +} +], +"http://a.ml/vocabularies/core#displayName": "userSignedUpMessage", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#4/source-map" +} +] +}, +{ +"@id": "amf://id#12/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#12/source-map/lexical/element_5" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_4" +} +], +"http://a.ml/vocabularies/document-source-maps#async3-flattened-operation": [ +{ +"@id": "amf://id#12/source-map/async3-flattened-operation/element_0" +} +] +}, +{ +"@id": "amf://id#3/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#3/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#3/source-map/lexical/element_4" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_3" +} +] +}, +{ +"@id": "amf://id#2/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#version", +"http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(7,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#2", +"http://a.ml/vocabularies/document-source-maps#value": "[(2,0)-(30,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#endpoint", +"http://a.ml/vocabularies/document-source-maps#value": "[(7,0)-(23,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(4,2)-(5,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#topLevelOperations", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,0)-(30,0)]" +}, +{ +"@id": "amf://id#13/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#13/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link": [ +{ +"@id": "amf://id#13/source-map/resolved-link/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link-target": [ +{ +"@id": "amf://id#13/source-map/resolved-link-target/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#13/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_2" +} +] +}, +{ +"@id": "amf://id#5", +"@type": [ +"http://a.ml/vocabularies/apiContract#Payload", +"http://a.ml/vocabularies/core#Payload", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#mediaType": "application/json", +"http://a.ml/vocabularies/shapes#schema": { +"@id": "amf://id#6" +}, +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#5/source-map" +} +] +}, +{ +"@id": "amf://id#4/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#virtual-element": [ +{ +"@id": "amf://id#4/source-map/virtual-element/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link": [ +{ +"@id": "amf://id#4/source-map/resolved-link/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link-target": [ +{ +"@id": "amf://id#4/source-map/resolved-link-target/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#4/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#12/source-map/lexical/element_5", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#channel", +"http://a.ml/vocabularies/document-source-maps#value": "[(26,4)-(28,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#12", +"http://a.ml/vocabularies/document-source-maps#value": "[(24,2)-(30,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#action", +"http://a.ml/vocabularies/document-source-maps#value": "[(25,4)-(26,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#operationMessages", +"http://a.ml/vocabularies/document-source-maps#value": "[(28,4)-(30,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(24,2)-(24,18)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#operationId", +"http://a.ml/vocabularies/document-source-maps#value": "[(24,2)-(24,18)]" +}, +{ +"@id": "amf://id#12/source-map/async3-flattened-operation/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#12", +"http://a.ml/vocabularies/document-source-maps#value": "" +}, +{ +"@id": "amf://id#3/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#server", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#description", +"http://a.ml/vocabularies/document-source-maps#value": "[(10,4)-(11,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#3", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(23,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#channelMessages", +"http://a.ml/vocabularies/document-source-maps#value": "[(11,4)-(23,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(8,14)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#path", +"http://a.ml/vocabularies/document-source-maps#value": "[(9,4)-(10,0)]" +}, +{ +"@id": "amf://id#13/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#server", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#13/source-map/resolved-link/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#13" +}, +{ +"@id": "amf://id#13/source-map/resolved-link-target/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#3" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#description", +"http://a.ml/vocabularies/document-source-maps#value": "[(10,4)-(11,0)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(8,14)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#channelMessages", +"http://a.ml/vocabularies/document-source-maps#value": "[(11,4)-(23,0)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(23,0)]" +}, +{ +"@id": "amf://id#6", +"@type": [ +"http://www.w3.org/ns/shacl#NodeShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#closed": false, +"http://www.w3.org/ns/shacl#property": [ +{ +"@id": "amf://id#7" +}, +{ +"@id": "amf://id#9" +} +], +"http://www.w3.org/ns/shacl#name": "schema", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#6/source-map" +} +] +}, +{ +"@id": "amf://id#5/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#5/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#4/source-map/virtual-element/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#payload", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#4/source-map/resolved-link/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#11" +}, +{ +"@id": "amf://id#4/source-map/resolved-link-target/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#4" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(12,6)-(12,25)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#displayName", +"http://a.ml/vocabularies/document-source-maps#value": "[(13,8)-(14,0)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "[(12,6)-(23,0)]" +}, +{ +"@id": "amf://id#7", +"@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://www.w3.org/ns/shacl#path": [ +{ +"@id": "http://a.ml/vocabularies/data#userId" +} +], +"http://a.ml/vocabularies/shapes#range": { +"@id": "amf://id#8" +}, +"http://www.w3.org/ns/shacl#minCount": 0, +"http://www.w3.org/ns/shacl#name": "userId", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#7/source-map" +} +] +}, +{ +"@id": "amf://id#9", +"@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://www.w3.org/ns/shacl#path": [ +{ +"@id": "http://a.ml/vocabularies/data#email" +} +], +"http://a.ml/vocabularies/shapes#range": { +"@id": "amf://id#10" +}, +"http://www.w3.org/ns/shacl#minCount": 0, +"http://www.w3.org/ns/shacl#name": "email", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#9/source-map" +} +] +}, +{ +"@id": "amf://id#6/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#6/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#6/source-map/type-property-lexical-info/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#6/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#5/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#mediaType", +"http://a.ml/vocabularies/document-source-maps#value": "[(14,8)-(15,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#schema", +"http://a.ml/vocabularies/document-source-maps#value": "[(15,8)-(23,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#5", +"http://a.ml/vocabularies/document-source-maps#value": "[(13,0)-(23,0)]" +}, +{ +"@id": "amf://id#8", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"http://www.w3.org/ns/shacl#name": "userId", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#8/source-map" +} +] +}, +{ +"@id": "amf://id#7/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#7/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#7/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#10", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"http://www.w3.org/ns/shacl#name": "email", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#10/source-map" +} +] +}, +{ +"@id": "amf://id#9/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#9/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#9/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#6/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#closed", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#6/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#6", +"http://a.ml/vocabularies/document-source-maps#value": "[(16,10)-(16,14)]" +}, +{ +"@id": "amf://id#6/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#6", +"http://a.ml/vocabularies/document-source-maps#value": "[(15,8)-(23,0)]" +}, +{ +"@id": "amf://id#8/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#8/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#8/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#7/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": "amf://id#7/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#7", +"http://a.ml/vocabularies/document-source-maps#value": "[(18,12)-(20,0)]" +}, +{ +"@id": "amf://id#10/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#10/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#10/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#9/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": "amf://id#9/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#9", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,12)-(23,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#8", +"http://a.ml/vocabularies/document-source-maps#value": "[(18,12)-(20,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,14)-(20,0)]" +}, +{ +"@id": "amf://id#8/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#8", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,14)-(19,18)]" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,12)-(23,0)]" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(21,14)-(23,0)]" +}, +{ +"@id": "amf://id#10/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(21,14)-(21,18)]" +}, +{ +"@id": "amf://id", +"@type": [ +"http://a.ml/vocabularies/document#Document", +"http://a.ml/vocabularies/document#Fragment", +"http://a.ml/vocabularies/document#Module", +"http://a.ml/vocabularies/document#Unit" +], +"http://a.ml/vocabularies/document#encodes": { +"@id": "amf://id#2" +}, +"http://a.ml/vocabularies/document#root": true, +"http://a.ml/vocabularies/document#processingData": { +"@id": "amf://id#1" +} +} +] +} diff --git a/demo/models/async30.yaml b/demo/models/async30.yaml new file mode 100644 index 000000000..10e8dbc4f --- /dev/null +++ b/demo/models/async30.yaml @@ -0,0 +1,29 @@ +# source: /Users/aloose/mulesoft/amf/amf-cli/shared/src/test/resources/validations/async3/bindings-kafka.yaml +asyncapi: '3.0.0' +info: + title: AsyncAPI 3.0 Test + version: '1.0.0' + +channels: + userSignedUp: + address: user.signedup + description: Channel for user signup events + messages: + userSignedUpMessage: + name: userSignedUpMessage + contentType: application/json + payload: + type: object + properties: + userId: + type: string + email: + type: string + +operations: + sendUserSignedUp: + action: send + channel: + $ref: '#/channels/userSignedUp' + messages: + - $ref: '#/channels/userSignedUp/messages/userSignedUpMessage' diff --git a/demo/models/async31-compact.json b/demo/models/async31-compact.json new file mode 100644 index 000000000..87f260543 --- /dev/null +++ b/demo/models/async31-compact.json @@ -0,0 +1 @@ +{"@graph":[{"@id":"amf://id#1","@type":["http://a.ml/vocabularies/document#APIContractProcessingData"],"http://a.ml/vocabularies/apiContract#modelVersion":"3.11.0","http://a.ml/vocabularies/document#transformed":true,"http://a.ml/vocabularies/document#sourceSpec":"ASYNC 3.1"},{"@id":"amf://id#2","@type":["http://a.ml/vocabularies/apiContract#AsyncAPI","http://a.ml/vocabularies/apiContract#API","http://a.ml/vocabularies/document#RootDomainElement","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#topLevelOperations":[{"@id":"amf://id#12"}],"http://a.ml/vocabularies/core#name":"AsyncAPI 3.1 Test","http://a.ml/vocabularies/core#version":"1.0.0","http://a.ml/vocabularies/apiContract#endpoint":[{"@id":"amf://id#3"}]},{"@id":"amf://id#12","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"publishDiagnostics","http://a.ml/vocabularies/apiContract#operationId":"publishDiagnostics","http://a.ml/vocabularies/apiContract#action":"send","http://a.ml/vocabularies/apiContract#channel":{"@id":"amf://id#13"},"http://a.ml/vocabularies/apiContract#operationMessages":[{"@id":"amf://id#4"}]},{"@id":"amf://id#3","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"/robot/diagnostics","http://a.ml/vocabularies/core#name":"diagnostics","http://a.ml/vocabularies/apiContract#supportedOperation":[{"@id":"amf://id#12"}],"http://a.ml/vocabularies/apiContract#server":[],"http://a.ml/vocabularies/apiContract#channelMessages":[{"@id":"amf://id#4"}]},{"@id":"amf://id#13","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"/robot/diagnostics","http://a.ml/vocabularies/core#name":"diagnostics","http://a.ml/vocabularies/apiContract#server":[],"http://a.ml/vocabularies/apiContract#channelMessages":[{"@id":"amf://id#4"}]},{"@id":"amf://id#4","@type":["http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"diagnosticMessage","http://a.ml/vocabularies/apiContract#payload":[{"@id":"amf://id#5"}],"http://a.ml/vocabularies/core#displayName":"diagnosticMessage"},{"@id":"amf://id#5","@type":["http://a.ml/vocabularies/apiContract#Payload","http://a.ml/vocabularies/core#Payload","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#mediaType":"application/json","http://a.ml/vocabularies/shapes#schema":{"@id":"amf://id#6"}},{"@id":"amf://id#6","@type":["http://www.w3.org/ns/shacl#NodeShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#closed":false,"http://www.w3.org/ns/shacl#property":[{"@id":"amf://id#7"},{"@id":"amf://id#9"}],"http://www.w3.org/ns/shacl#name":"schema"},{"@id":"amf://id#7","@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://www.w3.org/ns/shacl#path":[{"@id":"http://a.ml/vocabularies/data#status"}],"http://a.ml/vocabularies/shapes#range":{"@id":"amf://id#8"},"http://www.w3.org/ns/shacl#minCount":0,"http://www.w3.org/ns/shacl#name":"status"},{"@id":"amf://id#9","@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://www.w3.org/ns/shacl#path":[{"@id":"http://a.ml/vocabularies/data#timestamp"}],"http://a.ml/vocabularies/shapes#range":{"@id":"amf://id#10"},"http://www.w3.org/ns/shacl#minCount":0,"http://www.w3.org/ns/shacl#name":"timestamp"},{"@id":"amf://id#8","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://www.w3.org/2001/XMLSchema#string"}],"http://www.w3.org/ns/shacl#name":"status"},{"@id":"amf://id#10","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://a.ml/vocabularies/shapes#number"}],"http://www.w3.org/ns/shacl#name":"timestamp"},{"@id":"amf://id","@type":["http://a.ml/vocabularies/document#Document","http://a.ml/vocabularies/document#Fragment","http://a.ml/vocabularies/document#Module","http://a.ml/vocabularies/document#Unit"],"http://a.ml/vocabularies/document#encodes":{"@id":"amf://id#2"},"http://a.ml/vocabularies/document#root":true,"http://a.ml/vocabularies/document#processingData":{"@id":"amf://id#1"}}]} \ No newline at end of file diff --git a/demo/models/async31.json b/demo/models/async31.json new file mode 100644 index 000000000..adaf3032e --- /dev/null +++ b/demo/models/async31.json @@ -0,0 +1,751 @@ +{ +"@graph": [ +{ +"@id": "amf://id#1", +"@type": [ +"http://a.ml/vocabularies/document#APIContractProcessingData" +], +"http://a.ml/vocabularies/apiContract#modelVersion": "3.11.0", +"http://a.ml/vocabularies/document#transformed": true, +"http://a.ml/vocabularies/document#sourceSpec": "ASYNC 3.1" +}, +{ +"@id": "amf://id#2", +"@type": [ +"http://a.ml/vocabularies/apiContract#AsyncAPI", +"http://a.ml/vocabularies/apiContract#API", +"http://a.ml/vocabularies/document#RootDomainElement", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#topLevelOperations": [ +{ +"@id": "amf://id#12" +} +], +"http://a.ml/vocabularies/core#name": "AsyncAPI 3.1 Test", +"http://a.ml/vocabularies/core#version": "1.0.0", +"http://a.ml/vocabularies/apiContract#endpoint": [ +{ +"@id": "amf://id#3" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#2/source-map" +} +] +}, +{ +"@id": "amf://id#12", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "publishDiagnostics", +"http://a.ml/vocabularies/apiContract#operationId": "publishDiagnostics", +"http://a.ml/vocabularies/apiContract#action": "send", +"http://a.ml/vocabularies/apiContract#channel": { +"@id": "amf://id#13" +}, +"http://a.ml/vocabularies/apiContract#operationMessages": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#12/source-map" +} +] +}, +{ +"@id": "amf://id#3", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "/robot/diagnostics", +"http://a.ml/vocabularies/core#name": "diagnostics", +"http://a.ml/vocabularies/apiContract#supportedOperation": [ +{ +"@id": "amf://id#12" +} +], +"http://a.ml/vocabularies/apiContract#server": [], +"http://a.ml/vocabularies/apiContract#channelMessages": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#3/source-map" +} +] +}, +{ +"@id": "amf://id#2/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#2/source-map/lexical/element_4" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_3" +} +] +}, +{ +"@id": "amf://id#13", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "/robot/diagnostics", +"http://a.ml/vocabularies/core#name": "diagnostics", +"http://a.ml/vocabularies/apiContract#server": [], +"http://a.ml/vocabularies/apiContract#channelMessages": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#13/source-map" +} +] +}, +{ +"@id": "amf://id#4", +"@type": [ +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "diagnosticMessage", +"http://a.ml/vocabularies/apiContract#payload": [ +{ +"@id": "amf://id#5" +} +], +"http://a.ml/vocabularies/core#displayName": "diagnosticMessage", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#4/source-map" +} +] +}, +{ +"@id": "amf://id#12/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#12/source-map/lexical/element_5" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_4" +} +], +"http://a.ml/vocabularies/document-source-maps#async3-flattened-operation": [ +{ +"@id": "amf://id#12/source-map/async3-flattened-operation/element_0" +} +] +}, +{ +"@id": "amf://id#3/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#3/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#3/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_2" +} +] +}, +{ +"@id": "amf://id#2/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#version", +"http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(7,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#2", +"http://a.ml/vocabularies/document-source-maps#value": "[(2,0)-(29,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#endpoint", +"http://a.ml/vocabularies/document-source-maps#value": "[(7,0)-(22,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(4,2)-(5,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#topLevelOperations", +"http://a.ml/vocabularies/document-source-maps#value": "[(22,0)-(29,0)]" +}, +{ +"@id": "amf://id#13/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#13/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link": [ +{ +"@id": "amf://id#13/source-map/resolved-link/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link-target": [ +{ +"@id": "amf://id#13/source-map/resolved-link-target/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#13/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#5", +"@type": [ +"http://a.ml/vocabularies/apiContract#Payload", +"http://a.ml/vocabularies/core#Payload", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#mediaType": "application/json", +"http://a.ml/vocabularies/shapes#schema": { +"@id": "amf://id#6" +}, +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#5/source-map" +} +] +}, +{ +"@id": "amf://id#4/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#virtual-element": [ +{ +"@id": "amf://id#4/source-map/virtual-element/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link": [ +{ +"@id": "amf://id#4/source-map/resolved-link/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#resolved-link-target": [ +{ +"@id": "amf://id#4/source-map/resolved-link-target/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#4/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#12/source-map/lexical/element_5", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#channel", +"http://a.ml/vocabularies/document-source-maps#value": "[(25,4)-(27,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#12", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,2)-(29,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#action", +"http://a.ml/vocabularies/document-source-maps#value": "[(24,4)-(25,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#operationMessages", +"http://a.ml/vocabularies/document-source-maps#value": "[(27,4)-(29,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,2)-(23,20)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#operationId", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,2)-(23,20)]" +}, +{ +"@id": "amf://id#12/source-map/async3-flattened-operation/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#12", +"http://a.ml/vocabularies/document-source-maps#value": "" +}, +{ +"@id": "amf://id#3/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#server", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(8,13)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#path", +"http://a.ml/vocabularies/document-source-maps#value": "[(9,4)-(10,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#channelMessages", +"http://a.ml/vocabularies/document-source-maps#value": "[(10,4)-(22,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#3", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(22,0)]" +}, +{ +"@id": "amf://id#13/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#server", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#13/source-map/resolved-link/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#13" +}, +{ +"@id": "amf://id#13/source-map/resolved-link-target/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#3" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(8,13)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#channelMessages", +"http://a.ml/vocabularies/document-source-maps#value": "[(10,4)-(22,0)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(22,0)]" +}, +{ +"@id": "amf://id#6", +"@type": [ +"http://www.w3.org/ns/shacl#NodeShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#closed": false, +"http://www.w3.org/ns/shacl#property": [ +{ +"@id": "amf://id#7" +}, +{ +"@id": "amf://id#9" +} +], +"http://www.w3.org/ns/shacl#name": "schema", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#6/source-map" +} +] +}, +{ +"@id": "amf://id#5/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#5/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#4/source-map/virtual-element/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#payload", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#4/source-map/resolved-link/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#11" +}, +{ +"@id": "amf://id#4/source-map/resolved-link-target/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "amf://id#4" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(11,23)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#displayName", +"http://a.ml/vocabularies/document-source-maps#value": "[(12,8)-(13,0)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(22,0)]" +}, +{ +"@id": "amf://id#7", +"@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://www.w3.org/ns/shacl#path": [ +{ +"@id": "http://a.ml/vocabularies/data#status" +} +], +"http://a.ml/vocabularies/shapes#range": { +"@id": "amf://id#8" +}, +"http://www.w3.org/ns/shacl#minCount": 0, +"http://www.w3.org/ns/shacl#name": "status", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#7/source-map" +} +] +}, +{ +"@id": "amf://id#9", +"@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://www.w3.org/ns/shacl#path": [ +{ +"@id": "http://a.ml/vocabularies/data#timestamp" +} +], +"http://a.ml/vocabularies/shapes#range": { +"@id": "amf://id#10" +}, +"http://www.w3.org/ns/shacl#minCount": 0, +"http://www.w3.org/ns/shacl#name": "timestamp", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#9/source-map" +} +] +}, +{ +"@id": "amf://id#6/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#6/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#6/source-map/type-property-lexical-info/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#6/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#5/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#mediaType", +"http://a.ml/vocabularies/document-source-maps#value": "[(13,8)-(14,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#schema", +"http://a.ml/vocabularies/document-source-maps#value": "[(14,8)-(22,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#5", +"http://a.ml/vocabularies/document-source-maps#value": "[(12,0)-(22,0)]" +}, +{ +"@id": "amf://id#8", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"http://www.w3.org/ns/shacl#name": "status", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#8/source-map" +} +] +}, +{ +"@id": "amf://id#7/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#7/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#7/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#10", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://a.ml/vocabularies/shapes#number" +} +], +"http://www.w3.org/ns/shacl#name": "timestamp", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#10/source-map" +} +] +}, +{ +"@id": "amf://id#9/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#9/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#9/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#6/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#closed", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#6/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#6", +"http://a.ml/vocabularies/document-source-maps#value": "[(15,10)-(15,14)]" +}, +{ +"@id": "amf://id#6/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#6", +"http://a.ml/vocabularies/document-source-maps#value": "[(14,8)-(22,0)]" +}, +{ +"@id": "amf://id#8/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#8/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#8/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#7/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": "amf://id#7/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#7", +"http://a.ml/vocabularies/document-source-maps#value": "[(17,12)-(19,0)]" +}, +{ +"@id": "amf://id#10/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#10/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#10/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#9/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": "amf://id#9/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#9", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,12)-(22,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#8", +"http://a.ml/vocabularies/document-source-maps#value": "[(17,12)-(19,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(18,14)-(19,0)]" +}, +{ +"@id": "amf://id#8/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#8", +"http://a.ml/vocabularies/document-source-maps#value": "[(18,14)-(18,18)]" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,12)-(22,0)]" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,14)-(22,0)]" +}, +{ +"@id": "amf://id#10/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,14)-(20,18)]" +}, +{ +"@id": "amf://id", +"@type": [ +"http://a.ml/vocabularies/document#Document", +"http://a.ml/vocabularies/document#Fragment", +"http://a.ml/vocabularies/document#Module", +"http://a.ml/vocabularies/document#Unit" +], +"http://a.ml/vocabularies/document#encodes": { +"@id": "amf://id#2" +}, +"http://a.ml/vocabularies/document#root": true, +"http://a.ml/vocabularies/document#processingData": { +"@id": "amf://id#1" +} +} +] +} diff --git a/demo/models/async31.yaml b/demo/models/async31.yaml new file mode 100644 index 000000000..4e97ca34d --- /dev/null +++ b/demo/models/async31.yaml @@ -0,0 +1,28 @@ +# source: /Users/aloose/mulesoft/amf/amf-cli/shared/src/test/resources/validations/async31/validations/ros2-operation-valid.yaml +asyncapi: 3.1.0 +info: + title: AsyncAPI 3.1 Test + version: 1.0.0 + +channels: + diagnostics: + address: /robot/diagnostics + messages: + diagnosticMessage: + name: diagnosticMessage + contentType: application/json + payload: + type: object + properties: + status: + type: string + timestamp: + type: number + +operations: + publishDiagnostics: + action: send + channel: + $ref: '#/channels/diagnostics' + messages: + - $ref: '#/channels/diagnostics/messages/diagnosticMessage' diff --git a/demo/models/oas31-compact.json b/demo/models/oas31-compact.json new file mode 100644 index 000000000..ab10d00ec --- /dev/null +++ b/demo/models/oas31-compact.json @@ -0,0 +1 @@ +{"@graph":[{"@id":"amf://id#1","@type":["http://a.ml/vocabularies/document#APIContractProcessingData"],"http://a.ml/vocabularies/apiContract#modelVersion":"3.11.0","http://a.ml/vocabularies/document#transformed":true,"http://a.ml/vocabularies/document#sourceSpec":"OAS 3.1"},{"@id":"amf://id#2","@type":["http://a.ml/vocabularies/apiContract#WebAPI","http://a.ml/vocabularies/apiContract#API","http://a.ml/vocabularies/document#RootDomainElement","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"OAS 3.1 Test API","http://a.ml/vocabularies/core#description":"Minimal OAS 3.1 spec to test JSON Schema 2020-12 keywords","http://a.ml/vocabularies/core#version":"1.0.0","http://a.ml/vocabularies/apiContract#endpoint":[{"@id":"amf://id#3"}]},{"@id":"amf://id#3","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"/items","http://a.ml/vocabularies/apiContract#supportedOperation":[{"@id":"amf://id#4"}]},{"@id":"amf://id#4","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#method":"get","http://a.ml/vocabularies/apiContract#guiSummary":"Get items","http://a.ml/vocabularies/apiContract#returns":[{"@id":"amf://id#5"}]},{"@id":"amf://id#5","@type":["http://a.ml/vocabularies/apiContract#Response","http://a.ml/vocabularies/core#Response","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#statusCode":"200","http://a.ml/vocabularies/core#name":"200","http://a.ml/vocabularies/core#description":"Success","http://a.ml/vocabularies/apiContract#payload":[{"@id":"amf://id#6"}]},{"@id":"amf://id#6","@type":["http://a.ml/vocabularies/apiContract#Payload","http://a.ml/vocabularies/core#Payload","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#mediaType":"application/json","http://a.ml/vocabularies/shapes#schema":{"@id":"amf://id#7"}},{"@id":"amf://id#7","@type":["http://www.w3.org/ns/shacl#NodeShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#closed":false,"http://www.w3.org/ns/shacl#property":[{"@id":"amf://id#8"}],"http://www.w3.org/ns/shacl#name":"schema","http://a.ml/vocabularies/shapes#schemaVersion":"https://spec.openapis.org/oas/3.1/dialect/base"},{"@id":"amf://id#8","@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://www.w3.org/ns/shacl#path":[{"@id":"http://a.ml/vocabularies/data#items"}],"http://a.ml/vocabularies/shapes#range":{"@id":"amf://id#9"},"http://www.w3.org/ns/shacl#minCount":0,"http://www.w3.org/ns/shacl#name":"items"},{"@id":"amf://id#9","@type":["http://a.ml/vocabularies/shapes#TupleShape","http://a.ml/vocabularies/shapes#ArrayShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/shapes#items":{"@id":"amf://id#9/list"},"http://a.ml/vocabularies/shapes#closedItems":true,"http://www.w3.org/ns/shacl#name":"items","http://a.ml/vocabularies/shapes#schemaVersion":"https://spec.openapis.org/oas/3.1/dialect/base"},{"@id":"amf://id#9/list","@type":"http://www.w3.org/2000/01/rdf-schema#Seq","http://www.w3.org/2000/01/rdf-schema#_1":{"@id":"amf://id#10"},"http://www.w3.org/2000/01/rdf-schema#_2":{"@id":"amf://id#11"}},{"@id":"amf://id#10","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://www.w3.org/2001/XMLSchema#string"}],"http://www.w3.org/ns/shacl#name":"member0","http://a.ml/vocabularies/core#description":"First item is always a string","http://a.ml/vocabularies/shapes#schemaVersion":"https://spec.openapis.org/oas/3.1/dialect/base"},{"@id":"amf://id#11","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://a.ml/vocabularies/shapes#number"}],"http://www.w3.org/ns/shacl#name":"member1","http://a.ml/vocabularies/core#description":"Second item is always a number","http://a.ml/vocabularies/shapes#schemaVersion":"https://spec.openapis.org/oas/3.1/dialect/base"},{"@id":"amf://id","@type":["http://a.ml/vocabularies/document#Document","http://a.ml/vocabularies/document#Fragment","http://a.ml/vocabularies/document#Module","http://a.ml/vocabularies/document#Unit"],"http://a.ml/vocabularies/document#encodes":{"@id":"amf://id#2"},"http://a.ml/vocabularies/document#root":true,"http://a.ml/vocabularies/document#processingData":{"@id":"amf://id#1"}}]} \ No newline at end of file diff --git a/demo/models/oas31.json b/demo/models/oas31.json new file mode 100644 index 000000000..25322d7c2 --- /dev/null +++ b/demo/models/oas31.json @@ -0,0 +1,611 @@ +{ +"@graph": [ +{ +"@id": "amf://id#1", +"@type": [ +"http://a.ml/vocabularies/document#APIContractProcessingData" +], +"http://a.ml/vocabularies/apiContract#modelVersion": "3.11.0", +"http://a.ml/vocabularies/document#transformed": true, +"http://a.ml/vocabularies/document#sourceSpec": "OAS 3.1" +}, +{ +"@id": "amf://id#2", +"@type": [ +"http://a.ml/vocabularies/apiContract#WebAPI", +"http://a.ml/vocabularies/apiContract#API", +"http://a.ml/vocabularies/document#RootDomainElement", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "OAS 3.1 Test API", +"http://a.ml/vocabularies/core#description": "Minimal OAS 3.1 spec to test JSON Schema 2020-12 keywords", +"http://a.ml/vocabularies/core#version": "1.0.0", +"http://a.ml/vocabularies/apiContract#endpoint": [ +{ +"@id": "amf://id#3" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#2/source-map" +} +] +}, +{ +"@id": "amf://id#3", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "/items", +"http://a.ml/vocabularies/apiContract#supportedOperation": [ +{ +"@id": "amf://id#4" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#3/source-map" +} +] +}, +{ +"@id": "amf://id#2/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#2/source-map/lexical/element_4" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_3" +} +] +}, +{ +"@id": "amf://id#4", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#method": "get", +"http://a.ml/vocabularies/apiContract#guiSummary": "Get items", +"http://a.ml/vocabularies/apiContract#returns": [ +{ +"@id": "amf://id#5" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#4/source-map" +} +] +}, +{ +"@id": "amf://id#3/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#3/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#2/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#version", +"http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(6,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#2", +"http://a.ml/vocabularies/document-source-maps#value": "[(2,0)-(28,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#endpoint", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,0)-(28,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#description", +"http://a.ml/vocabularies/document-source-maps#value": "[(6,2)-(8,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(4,2)-(5,0)]" +}, +{ +"@id": "amf://id#5", +"@type": [ +"http://a.ml/vocabularies/apiContract#Response", +"http://a.ml/vocabularies/core#Response", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#statusCode": "200", +"http://a.ml/vocabularies/core#name": "200", +"http://a.ml/vocabularies/core#description": "Success", +"http://a.ml/vocabularies/apiContract#payload": [ +{ +"@id": "amf://id#6" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#5/source-map" +} +] +}, +{ +"@id": "amf://id#4/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#4/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#3", +"http://a.ml/vocabularies/document-source-maps#value": "[(9,2)-(28,0)]" +}, +{ +"@id": "amf://id#6", +"@type": [ +"http://a.ml/vocabularies/apiContract#Payload", +"http://a.ml/vocabularies/core#Payload", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#mediaType": "application/json", +"http://a.ml/vocabularies/shapes#schema": { +"@id": "amf://id#7" +}, +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#6/source-map" +} +] +}, +{ +"@id": "amf://id#5/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#5/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_2" +} +] +}, +{ +"@id": "amf://id#4/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#guiSummary", +"http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(12,0)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#returns", +"http://a.ml/vocabularies/document-source-maps#value": "[(12,6)-(28,0)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "[(10,4)-(28,0)]" +}, +{ +"@id": "amf://id#7", +"@type": [ +"http://www.w3.org/ns/shacl#NodeShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#closed": false, +"http://www.w3.org/ns/shacl#property": [ +{ +"@id": "amf://id#8" +} +], +"http://www.w3.org/ns/shacl#name": "schema", +"http://a.ml/vocabularies/shapes#schemaVersion": "https://spec.openapis.org/oas/3.1/dialect/base", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#7/source-map" +} +] +}, +{ +"@id": "amf://id#6/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#6/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#6/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#6/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#5/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#description", +"http://a.ml/vocabularies/document-source-maps#value": "[(14,10)-(15,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(13,8)-(13,13)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#payload", +"http://a.ml/vocabularies/document-source-maps#value": "[(15,10)-(28,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#5", +"http://a.ml/vocabularies/document-source-maps#value": "[(13,8)-(28,0)]" +}, +{ +"@id": "amf://id#8", +"@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://www.w3.org/ns/shacl#path": [ +{ +"@id": "http://a.ml/vocabularies/data#items" +} +], +"http://a.ml/vocabularies/shapes#range": { +"@id": "amf://id#9" +}, +"http://www.w3.org/ns/shacl#minCount": 0, +"http://www.w3.org/ns/shacl#name": "items", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#8/source-map" +} +] +}, +{ +"@id": "amf://id#7/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#7/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#7/source-map/type-property-lexical-info/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#auto-generated-name": [ +{ +"@id": "amf://id#7/source-map/auto-generated-name/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#7/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#6/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#mediaType", +"http://a.ml/vocabularies/document-source-maps#value": "[(16,12)-(16,28)]" +}, +{ +"@id": "amf://id#6/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#schema", +"http://a.ml/vocabularies/document-source-maps#value": "[(17,14)-(28,0)]" +}, +{ +"@id": "amf://id#6/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#6", +"http://a.ml/vocabularies/document-source-maps#value": "[(16,12)-(28,0)]" +}, +{ +"@id": "amf://id#9", +"@type": [ +"http://a.ml/vocabularies/shapes#TupleShape", +"http://a.ml/vocabularies/shapes#ArrayShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/shapes#items": { +"@id": "amf://id#9/list" +}, +"http://a.ml/vocabularies/shapes#closedItems": true, +"http://www.w3.org/ns/shacl#name": "items", +"http://a.ml/vocabularies/shapes#schemaVersion": "https://spec.openapis.org/oas/3.1/dialect/base", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#9/source-map" +} +] +}, +{ +"@id": "amf://id#8/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#8/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#8/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#7/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#closed", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#7/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#7", +"http://a.ml/vocabularies/document-source-maps#value": "[(18,16)-(18,20)]" +}, +{ +"@id": "amf://id#7/source-map/auto-generated-name/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#7", +"http://a.ml/vocabularies/document-source-maps#value": "" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#7", +"http://a.ml/vocabularies/document-source-maps#value": "[(17,14)-(28,0)]" +}, +{ +"@id": "amf://id#9/list", +"@type": "http://www.w3.org/2000/01/rdf-schema#Seq", +"http://www.w3.org/2000/01/rdf-schema#_1": { +"@id": "amf://id#10" +}, +"http://www.w3.org/2000/01/rdf-schema#_2": { +"@id": "amf://id#11" +} +}, +{ +"@id": "amf://id#9/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#9/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#9/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#8/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": "amf://id#8/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#8", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,18)-(28,0)]" +}, +{ +"@id": "amf://id#10", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"http://www.w3.org/ns/shacl#name": "member0", +"http://a.ml/vocabularies/core#description": "First item is always a string", +"http://a.ml/vocabularies/shapes#schemaVersion": "https://spec.openapis.org/oas/3.1/dialect/base", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#10/source-map" +} +] +}, +{ +"@id": "amf://id#11", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://a.ml/vocabularies/shapes#number" +} +], +"http://www.w3.org/ns/shacl#name": "member1", +"http://a.ml/vocabularies/core#description": "Second item is always a number", +"http://a.ml/vocabularies/shapes#schemaVersion": "https://spec.openapis.org/oas/3.1/dialect/base", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#11/source-map" +} +] +}, +{ +"@id": "amf://id#9/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#9", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,18)-(28,0)]" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#closedItems", +"http://a.ml/vocabularies/document-source-maps#value": "[(27,20)-(28,0)]" +}, +{ +"@id": "amf://id#9/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#9", +"http://a.ml/vocabularies/document-source-maps#value": "[(21,20)-(21,24)]" +}, +{ +"@id": "amf://id#10/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#10/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_1" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#10/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#11/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#11/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_1" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#11/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#10/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,24)-(24,0)]" +}, +{ +"@id": "amf://id#10/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": "[(24,24)-(25,0)]" +}, +{ +"@id": "amf://id#10/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,24)-(25,0)]" +}, +{ +"@id": "amf://id#10/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,24)-(23,28)]" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(25,24)-(26,0)]" +}, +{ +"@id": "amf://id#11/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": "[(26,24)-(27,0)]" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#11", +"http://a.ml/vocabularies/document-source-maps#value": "[(25,24)-(27,0)]" +}, +{ +"@id": "amf://id#11/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#11", +"http://a.ml/vocabularies/document-source-maps#value": "[(25,24)-(25,28)]" +}, +{ +"@id": "amf://id", +"@type": [ +"http://a.ml/vocabularies/document#Document", +"http://a.ml/vocabularies/document#Fragment", +"http://a.ml/vocabularies/document#Module", +"http://a.ml/vocabularies/document#Unit" +], +"http://a.ml/vocabularies/document#encodes": { +"@id": "amf://id#2" +}, +"http://a.ml/vocabularies/document#root": true, +"http://a.ml/vocabularies/document#processingData": { +"@id": "amf://id#1" +} +} +] +} diff --git a/demo/models/oas31.yaml b/demo/models/oas31.yaml new file mode 100644 index 000000000..9d0c05f67 --- /dev/null +++ b/demo/models/oas31.yaml @@ -0,0 +1,27 @@ +# source: /Users/aloose/mulesoft/amf/amf-cli/shared/src/test/resources/validations/oas31/items-property-array.yaml +openapi: 3.1.0 +info: + title: OAS 3.1 Test API + version: 1.0.0 + description: Minimal OAS 3.1 spec to test JSON Schema 2020-12 keywords + +paths: + /items: + get: + summary: Get items + responses: + '200': + description: Success + content: + application/json: + schema: + type: object + properties: + items: + type: array + prefixItems: + - type: string + description: First item is always a string + - type: number + description: Second item is always a number + items: false diff --git a/demo/models/oas32-compact.json b/demo/models/oas32-compact.json new file mode 100644 index 000000000..a30437a5c --- /dev/null +++ b/demo/models/oas32-compact.json @@ -0,0 +1 @@ +{"@graph":[{"@id":"amf://id#6","@type":["http://a.ml/vocabularies/document#APIContractProcessingData"],"http://a.ml/vocabularies/apiContract#modelVersion":"3.11.0","http://a.ml/vocabularies/document#transformed":true,"http://a.ml/vocabularies/document#sourceSpec":"OAS 3.2"},{"@id":"amf://id#7","@type":["http://a.ml/vocabularies/apiContract#WebAPI","http://a.ml/vocabularies/apiContract#API","http://a.ml/vocabularies/document#RootDomainElement","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"OAS 3.2 Test API","http://a.ml/vocabularies/core#version":"1.0.0","http://a.ml/vocabularies/apiContract#endpoint":[{"@id":"amf://id#10"},{"@id":"amf://id#14"}],"http://a.ml/vocabularies/apiContract#tag":[{"@id":"amf://id#8"},{"@id":"amf://id#9"}]},{"@id":"amf://id#10","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"/auth","http://a.ml/vocabularies/apiContract#supportedOperation":[{"@id":"amf://id#11"}]},{"@id":"amf://id#14","@type":["http://a.ml/vocabularies/apiContract#EndPoint","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#path":"/resources/{id}","http://a.ml/vocabularies/apiContract#supportedOperation":[{"@id":"amf://id#15"},{"@id":"amf://id#20"},{"@id":"amf://id#23"},{"@id":"amf://id#26"}]},{"@id":"amf://id#8","@type":["http://a.ml/vocabularies/apiContract#Tag","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"data","http://a.ml/vocabularies/core#summary":"Data operations"},{"@id":"amf://id#9","@type":["http://a.ml/vocabularies/apiContract#Tag","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"authentication","http://a.ml/vocabularies/core#summary":"All authentication-related operations","http://a.ml/vocabularies/apiContract#parentTag":"data"},{"@id":"amf://id#11","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#method":"get","http://a.ml/vocabularies/apiContract#guiSummary":"Get authenticated data","http://a.ml/vocabularies/apiContract#returns":[{"@id":"amf://id#13"}],"http://a.ml/vocabularies/apiContract#tag":[{"@id":"amf://id#12"}],"http://a.ml/vocabularies/apiContract#operationKind":"standard"},{"@id":"amf://id#15","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#method":"get","http://a.ml/vocabularies/apiContract#guiSummary":"Get a resource","http://a.ml/vocabularies/apiContract#expects":[{"@id":"amf://id#17"}],"http://a.ml/vocabularies/apiContract#returns":[{"@id":"amf://id#16"}],"http://a.ml/vocabularies/apiContract#operationKind":"standard"},{"@id":"amf://id#20","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#method":"QUERY","http://a.ml/vocabularies/apiContract#guiSummary":"Search resources","http://a.ml/vocabularies/apiContract#expects":[{"@id":"amf://id#22"}],"http://a.ml/vocabularies/apiContract#returns":[{"@id":"amf://id#21"}],"http://a.ml/vocabularies/apiContract#operationKind":"query"},{"@id":"amf://id#23","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#method":"COPY","http://a.ml/vocabularies/apiContract#guiSummary":"Copy the resource","http://a.ml/vocabularies/apiContract#expects":[{"@id":"amf://id#25"}],"http://a.ml/vocabularies/apiContract#returns":[{"@id":"amf://id#24"}],"http://a.ml/vocabularies/apiContract#operationKind":"additionalOperation"},{"@id":"amf://id#26","@type":["http://a.ml/vocabularies/apiContract#Operation","http://a.ml/vocabularies/core#Operation","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#method":"MOVE","http://a.ml/vocabularies/apiContract#guiSummary":"Move the resource","http://a.ml/vocabularies/apiContract#expects":[{"@id":"amf://id#28"}],"http://a.ml/vocabularies/apiContract#returns":[{"@id":"amf://id#27"}],"http://a.ml/vocabularies/apiContract#operationKind":"additionalOperation"},{"@id":"amf://id#13","@type":["http://a.ml/vocabularies/apiContract#Response","http://a.ml/vocabularies/core#Response","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#statusCode":"200","http://a.ml/vocabularies/core#name":"200","http://a.ml/vocabularies/core#description":"Success"},{"@id":"amf://id#12","@type":["http://a.ml/vocabularies/apiContract#Tag","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"authentication"},{"@id":"amf://id#17","@type":["http://a.ml/vocabularies/apiContract#Request","http://a.ml/vocabularies/core#Request","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#uriParameter":[{"@id":"amf://id#18"}]},{"@id":"amf://id#16","@type":["http://a.ml/vocabularies/apiContract#Response","http://a.ml/vocabularies/core#Response","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#statusCode":"200","http://a.ml/vocabularies/core#name":"200","http://a.ml/vocabularies/core#description":"OK"},{"@id":"amf://id#22","@type":["http://a.ml/vocabularies/apiContract#Request","http://a.ml/vocabularies/core#Request","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#uriParameter":[{"@id":"amf://id#18"}]},{"@id":"amf://id#21","@type":["http://a.ml/vocabularies/apiContract#Response","http://a.ml/vocabularies/core#Response","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#statusCode":"200","http://a.ml/vocabularies/core#name":"200","http://a.ml/vocabularies/core#description":"Results"},{"@id":"amf://id#25","@type":["http://a.ml/vocabularies/apiContract#Request","http://a.ml/vocabularies/core#Request","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#uriParameter":[{"@id":"amf://id#18"}]},{"@id":"amf://id#24","@type":["http://a.ml/vocabularies/apiContract#Response","http://a.ml/vocabularies/core#Response","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#statusCode":"200","http://a.ml/vocabularies/core#name":"200","http://a.ml/vocabularies/core#description":"Copied"},{"@id":"amf://id#28","@type":["http://a.ml/vocabularies/apiContract#Request","http://a.ml/vocabularies/core#Request","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#uriParameter":[{"@id":"amf://id#18"}]},{"@id":"amf://id#27","@type":["http://a.ml/vocabularies/apiContract#Response","http://a.ml/vocabularies/core#Response","http://a.ml/vocabularies/apiContract#Message","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/apiContract#statusCode":"200","http://a.ml/vocabularies/core#name":"200","http://a.ml/vocabularies/core#description":"Moved"},{"@id":"amf://id#18","@type":["http://a.ml/vocabularies/apiContract#Parameter","http://a.ml/vocabularies/core#Parameter","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"id","http://a.ml/vocabularies/apiContract#paramName":"id","http://a.ml/vocabularies/apiContract#required":true,"http://a.ml/vocabularies/apiContract#style":"simple","http://a.ml/vocabularies/apiContract#explode":false,"http://a.ml/vocabularies/apiContract#binding":"path","http://a.ml/vocabularies/shapes#schema":{"@id":"amf://id#19"}},{"@id":"amf://id#19","@type":["http://a.ml/vocabularies/shapes#ScalarShape","http://a.ml/vocabularies/shapes#AnyShape","http://www.w3.org/ns/shacl#Shape","http://a.ml/vocabularies/shapes#Shape","http://a.ml/vocabularies/document#DomainElement"],"http://www.w3.org/ns/shacl#datatype":[{"@id":"http://www.w3.org/2001/XMLSchema#string"}],"http://www.w3.org/ns/shacl#name":"id","http://a.ml/vocabularies/shapes#schemaVersion":"https://json-schema.org/draft/2020-12/schema"},{"@id":"amf://id","http://a.ml/vocabularies/document#declares":[{"@id":"amf://id#1"}],"@type":["http://a.ml/vocabularies/document#Document","http://a.ml/vocabularies/document#Fragment","http://a.ml/vocabularies/document#Module","http://a.ml/vocabularies/document#Unit"],"http://a.ml/vocabularies/document#encodes":{"@id":"amf://id#7"},"http://a.ml/vocabularies/document#root":true,"http://a.ml/vocabularies/document#processingData":{"@id":"amf://id#6"}},{"@id":"amf://id#1","@type":["http://a.ml/vocabularies/security#SecurityScheme","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"oauth2Device","http://a.ml/vocabularies/security#type":"OAuth 2.0","http://a.ml/vocabularies/security#settings":{"@id":"amf://id#2"}},{"@id":"amf://id#2","@type":["http://a.ml/vocabularies/security#OAuth2Settings","http://a.ml/vocabularies/security#Settings","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/security#flows":[{"@id":"amf://id#3"}]},{"@id":"amf://id#3","@type":["http://a.ml/vocabularies/security#OAuth2Flow","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/security#accessTokenUri":"https://example.com/oauth/token","http://a.ml/vocabularies/security#flow":"deviceAuthorization","http://a.ml/vocabularies/security#scope":[{"@id":"amf://id#4"},{"@id":"amf://id#5"}],"http://a.ml/vocabularies/security#deviceAuthorizationUri":"https://example.com/oauth/device/authorize"},{"@id":"amf://id#4","@type":["http://a.ml/vocabularies/security#Scope","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"read","http://a.ml/vocabularies/core#description":"Read access"},{"@id":"amf://id#5","@type":["http://a.ml/vocabularies/security#Scope","http://a.ml/vocabularies/document#DomainElement"],"http://a.ml/vocabularies/core#name":"write","http://a.ml/vocabularies/core#description":"Write access"}]} \ No newline at end of file diff --git a/demo/models/oas32.json b/demo/models/oas32.json new file mode 100644 index 000000000..6bce5a69a --- /dev/null +++ b/demo/models/oas32.json @@ -0,0 +1,1330 @@ +{ +"@graph": [ +{ +"@id": "amf://id#6", +"@type": [ +"http://a.ml/vocabularies/document#APIContractProcessingData" +], +"http://a.ml/vocabularies/apiContract#modelVersion": "3.11.0", +"http://a.ml/vocabularies/document#transformed": true, +"http://a.ml/vocabularies/document#sourceSpec": "OAS 3.2" +}, +{ +"@id": "amf://id#7", +"@type": [ +"http://a.ml/vocabularies/apiContract#WebAPI", +"http://a.ml/vocabularies/apiContract#API", +"http://a.ml/vocabularies/document#RootDomainElement", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "OAS 3.2 Test API", +"http://a.ml/vocabularies/core#version": "1.0.0", +"http://a.ml/vocabularies/apiContract#endpoint": [ +{ +"@id": "amf://id#10" +}, +{ +"@id": "amf://id#14" +} +], +"http://a.ml/vocabularies/apiContract#tag": [ +{ +"@id": "amf://id#8" +}, +{ +"@id": "amf://id#9" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#7/source-map" +} +] +}, +{ +"@id": "amf://id#10", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "/auth", +"http://a.ml/vocabularies/apiContract#supportedOperation": [ +{ +"@id": "amf://id#11" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#10/source-map" +} +] +}, +{ +"@id": "amf://id#14", +"@type": [ +"http://a.ml/vocabularies/apiContract#EndPoint", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#path": "/resources/{id}", +"http://a.ml/vocabularies/apiContract#supportedOperation": [ +{ +"@id": "amf://id#15" +}, +{ +"@id": "amf://id#20" +}, +{ +"@id": "amf://id#23" +}, +{ +"@id": "amf://id#26" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#14/source-map" +} +] +}, +{ +"@id": "amf://id#8", +"@type": [ +"http://a.ml/vocabularies/apiContract#Tag", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "data", +"http://a.ml/vocabularies/core#summary": "Data operations", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#8/source-map" +} +] +}, +{ +"@id": "amf://id#9", +"@type": [ +"http://a.ml/vocabularies/apiContract#Tag", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "authentication", +"http://a.ml/vocabularies/core#summary": "All authentication-related operations", +"http://a.ml/vocabularies/apiContract#parentTag": "data", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#9/source-map" +} +] +}, +{ +"@id": "amf://id#7/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#7/source-map/lexical/element_4" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_3" +} +] +}, +{ +"@id": "amf://id#11", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#method": "get", +"http://a.ml/vocabularies/apiContract#guiSummary": "Get authenticated data", +"http://a.ml/vocabularies/apiContract#returns": [ +{ +"@id": "amf://id#13" +} +], +"http://a.ml/vocabularies/apiContract#tag": [ +{ +"@id": "amf://id#12" +} +], +"http://a.ml/vocabularies/apiContract#operationKind": "standard", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#11/source-map" +} +] +}, +{ +"@id": "amf://id#10/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#10/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#15", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#method": "get", +"http://a.ml/vocabularies/apiContract#guiSummary": "Get a resource", +"http://a.ml/vocabularies/apiContract#expects": [ +{ +"@id": "amf://id#17" +} +], +"http://a.ml/vocabularies/apiContract#returns": [ +{ +"@id": "amf://id#16" +} +], +"http://a.ml/vocabularies/apiContract#operationKind": "standard", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#15/source-map" +} +] +}, +{ +"@id": "amf://id#20", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#method": "QUERY", +"http://a.ml/vocabularies/apiContract#guiSummary": "Search resources", +"http://a.ml/vocabularies/apiContract#expects": [ +{ +"@id": "amf://id#22" +} +], +"http://a.ml/vocabularies/apiContract#returns": [ +{ +"@id": "amf://id#21" +} +], +"http://a.ml/vocabularies/apiContract#operationKind": "query", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#20/source-map" +} +] +}, +{ +"@id": "amf://id#23", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#method": "COPY", +"http://a.ml/vocabularies/apiContract#guiSummary": "Copy the resource", +"http://a.ml/vocabularies/apiContract#expects": [ +{ +"@id": "amf://id#25" +} +], +"http://a.ml/vocabularies/apiContract#returns": [ +{ +"@id": "amf://id#24" +} +], +"http://a.ml/vocabularies/apiContract#operationKind": "additionalOperation", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#23/source-map" +} +] +}, +{ +"@id": "amf://id#26", +"@type": [ +"http://a.ml/vocabularies/apiContract#Operation", +"http://a.ml/vocabularies/core#Operation", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#method": "MOVE", +"http://a.ml/vocabularies/apiContract#guiSummary": "Move the resource", +"http://a.ml/vocabularies/apiContract#expects": [ +{ +"@id": "amf://id#28" +} +], +"http://a.ml/vocabularies/apiContract#returns": [ +{ +"@id": "amf://id#27" +} +], +"http://a.ml/vocabularies/apiContract#operationKind": "additionalOperation", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#26/source-map" +} +] +}, +{ +"@id": "amf://id#14/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#14/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#8/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#8/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#9/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#9/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_2" +} +] +}, +{ +"@id": "amf://id#7/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#endpoint", +"http://a.ml/vocabularies/document-source-maps#value": "[(7,0)-(46,0)]" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#7", +"http://a.ml/vocabularies/document-source-maps#value": "[(2,0)-(64,0)]" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#tag", +"http://a.ml/vocabularies/document-source-maps#value": "[(46,0)-(53,0)]" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#version", +"http://a.ml/vocabularies/document-source-maps#value": "[(5,2)-(7,0)]" +}, +{ +"@id": "amf://id#7/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(4,2)-(5,0)]" +}, +{ +"@id": "amf://id#13", +"@type": [ +"http://a.ml/vocabularies/apiContract#Response", +"http://a.ml/vocabularies/core#Response", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#statusCode": "200", +"http://a.ml/vocabularies/core#name": "200", +"http://a.ml/vocabularies/core#description": "Success", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#13/source-map" +} +] +}, +{ +"@id": "amf://id#12", +"@type": [ +"http://a.ml/vocabularies/apiContract#Tag", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "authentication", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#12/source-map" +} +] +}, +{ +"@id": "amf://id#11/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#11/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_2" +} +] +}, +{ +"@id": "amf://id#10/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#10", +"http://a.ml/vocabularies/document-source-maps#value": "[(8,2)-(17,0)]" +}, +{ +"@id": "amf://id#17", +"@type": [ +"http://a.ml/vocabularies/apiContract#Request", +"http://a.ml/vocabularies/core#Request", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#uriParameter": [ +{ +"@id": "amf://id#18" +} +] +}, +{ +"@id": "amf://id#16", +"@type": [ +"http://a.ml/vocabularies/apiContract#Response", +"http://a.ml/vocabularies/core#Response", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#statusCode": "200", +"http://a.ml/vocabularies/core#name": "200", +"http://a.ml/vocabularies/core#description": "OK", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#16/source-map" +} +] +}, +{ +"@id": "amf://id#15/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#15/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#15/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#15/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#22", +"@type": [ +"http://a.ml/vocabularies/apiContract#Request", +"http://a.ml/vocabularies/core#Request", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#uriParameter": [ +{ +"@id": "amf://id#18" +} +] +}, +{ +"@id": "amf://id#21", +"@type": [ +"http://a.ml/vocabularies/apiContract#Response", +"http://a.ml/vocabularies/core#Response", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#statusCode": "200", +"http://a.ml/vocabularies/core#name": "200", +"http://a.ml/vocabularies/core#description": "Results", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#21/source-map" +} +] +}, +{ +"@id": "amf://id#20/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#20/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#20/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#20/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#25", +"@type": [ +"http://a.ml/vocabularies/apiContract#Request", +"http://a.ml/vocabularies/core#Request", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#uriParameter": [ +{ +"@id": "amf://id#18" +} +] +}, +{ +"@id": "amf://id#24", +"@type": [ +"http://a.ml/vocabularies/apiContract#Response", +"http://a.ml/vocabularies/core#Response", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#statusCode": "200", +"http://a.ml/vocabularies/core#name": "200", +"http://a.ml/vocabularies/core#description": "Copied", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#24/source-map" +} +] +}, +{ +"@id": "amf://id#23/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#23/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#23/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#23/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#28", +"@type": [ +"http://a.ml/vocabularies/apiContract#Request", +"http://a.ml/vocabularies/core#Request", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#uriParameter": [ +{ +"@id": "amf://id#18" +} +] +}, +{ +"@id": "amf://id#27", +"@type": [ +"http://a.ml/vocabularies/apiContract#Response", +"http://a.ml/vocabularies/core#Response", +"http://a.ml/vocabularies/apiContract#Message", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/apiContract#statusCode": "200", +"http://a.ml/vocabularies/core#name": "200", +"http://a.ml/vocabularies/core#description": "Moved", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#27/source-map" +} +] +}, +{ +"@id": "amf://id#26/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#26/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#26/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#26/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#14/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#14", +"http://a.ml/vocabularies/document-source-maps#value": "[(17,2)-(46,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(47,4)-(48,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#summary", +"http://a.ml/vocabularies/document-source-maps#value": "[(48,4)-(49,0)]" +}, +{ +"@id": "amf://id#8/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#8", +"http://a.ml/vocabularies/document-source-maps#value": "[(47,4)-(49,0)]" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#summary", +"http://a.ml/vocabularies/document-source-maps#value": "[(50,4)-(51,0)]" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(49,4)-(50,0)]" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#parentTag", +"http://a.ml/vocabularies/document-source-maps#value": "[(51,4)-(53,0)]" +}, +{ +"@id": "amf://id#9/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#9", +"http://a.ml/vocabularies/document-source-maps#value": "[(49,4)-(53,0)]" +}, +{ +"@id": "amf://id#13/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#13/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#12/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#12/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#11/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#returns", +"http://a.ml/vocabularies/document-source-maps#value": "[(13,6)-(17,0)]" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#guiSummary", +"http://a.ml/vocabularies/document-source-maps#value": "[(10,6)-(11,0)]" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#tag", +"http://a.ml/vocabularies/document-source-maps#value": "[(11,6)-(13,0)]" +}, +{ +"@id": "amf://id#11/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#11", +"http://a.ml/vocabularies/document-source-maps#value": "[(9,4)-(17,0)]" +}, +{ +"@id": "amf://id#18", +"@type": [ +"http://a.ml/vocabularies/apiContract#Parameter", +"http://a.ml/vocabularies/core#Parameter", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "id", +"http://a.ml/vocabularies/apiContract#paramName": "id", +"http://a.ml/vocabularies/apiContract#required": true, +"http://a.ml/vocabularies/apiContract#style": "simple", +"http://a.ml/vocabularies/apiContract#explode": false, +"http://a.ml/vocabularies/apiContract#binding": "path", +"http://a.ml/vocabularies/shapes#schema": { +"@id": "amf://id#19" +}, +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#18/source-map" +} +] +}, +{ +"@id": "amf://id#16/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#16/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#16/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#16/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#15/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#guiSummary", +"http://a.ml/vocabularies/document-source-maps#value": "[(25,6)-(26,0)]" +}, +{ +"@id": "amf://id#15/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#returns", +"http://a.ml/vocabularies/document-source-maps#value": "[(26,6)-(29,0)]" +}, +{ +"@id": "amf://id#15/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#15", +"http://a.ml/vocabularies/document-source-maps#value": "[(24,4)-(29,0)]" +}, +{ +"@id": "amf://id#21/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#21/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#21/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#21/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#20/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#guiSummary", +"http://a.ml/vocabularies/document-source-maps#value": "[(30,6)-(31,0)]" +}, +{ +"@id": "amf://id#20/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#returns", +"http://a.ml/vocabularies/document-source-maps#value": "[(31,6)-(34,0)]" +}, +{ +"@id": "amf://id#20/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#20", +"http://a.ml/vocabularies/document-source-maps#value": "[(29,10)-(34,0)]" +}, +{ +"@id": "amf://id#24/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#24/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#24/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#24/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#23/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#guiSummary", +"http://a.ml/vocabularies/document-source-maps#value": "[(36,8)-(37,0)]" +}, +{ +"@id": "amf://id#23/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#returns", +"http://a.ml/vocabularies/document-source-maps#value": "[(37,8)-(40,0)]" +}, +{ +"@id": "amf://id#23/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#23", +"http://a.ml/vocabularies/document-source-maps#value": "[(35,6)-(40,0)]" +}, +{ +"@id": "amf://id#27/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#27/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#27/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#27/source-map/lexical/element_1" +} +] +}, +{ +"@id": "amf://id#26/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#guiSummary", +"http://a.ml/vocabularies/document-source-maps#value": "[(41,8)-(42,0)]" +}, +{ +"@id": "amf://id#26/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#returns", +"http://a.ml/vocabularies/document-source-maps#value": "[(42,8)-(46,0)]" +}, +{ +"@id": "amf://id#26/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#26", +"http://a.ml/vocabularies/document-source-maps#value": "[(40,6)-(46,0)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(14,8)-(14,13)]" +}, +{ +"@id": "amf://id#13/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": "[(15,10)-(17,0)]" +}, +{ +"@id": "amf://id#13/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#13", +"http://a.ml/vocabularies/document-source-maps#value": "[(14,8)-(17,0)]" +}, +{ +"@id": "amf://id#12/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#12", +"http://a.ml/vocabularies/document-source-maps#value": "[(12,10)-(12,24)]" +}, +{ +"@id": "amf://id#19", +"@type": [ +"http://a.ml/vocabularies/shapes#ScalarShape", +"http://a.ml/vocabularies/shapes#AnyShape", +"http://www.w3.org/ns/shacl#Shape", +"http://a.ml/vocabularies/shapes#Shape", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://www.w3.org/ns/shacl#datatype": [ +{ +"@id": "http://www.w3.org/2001/XMLSchema#string" +} +], +"http://www.w3.org/ns/shacl#name": "id", +"http://a.ml/vocabularies/shapes#schemaVersion": "https://json-schema.org/draft/2020-12/schema", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#19/source-map" +} +] +}, +{ +"@id": "amf://id#18/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#synthesized-field": [ +{ +"@id": "amf://id#18/source-map/synthesized-field/element_1" +}, +{ +"@id": "amf://id#18/source-map/synthesized-field/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#18/source-map/lexical/element_5" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_4" +} +] +}, +{ +"@id": "amf://id#16/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(27,8)-(27,13)]" +}, +{ +"@id": "amf://id#16/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": "[(28,10)-(29,0)]" +}, +{ +"@id": "amf://id#16/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#16", +"http://a.ml/vocabularies/document-source-maps#value": "[(27,8)-(29,0)]" +}, +{ +"@id": "amf://id#21/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(32,8)-(32,13)]" +}, +{ +"@id": "amf://id#21/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": "[(33,10)-(34,0)]" +}, +{ +"@id": "amf://id#21/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#21", +"http://a.ml/vocabularies/document-source-maps#value": "[(32,8)-(34,0)]" +}, +{ +"@id": "amf://id#24/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(38,10)-(38,15)]" +}, +{ +"@id": "amf://id#24/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": "[(39,12)-(40,0)]" +}, +{ +"@id": "amf://id#24/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#24", +"http://a.ml/vocabularies/document-source-maps#value": "[(38,10)-(40,0)]" +}, +{ +"@id": "amf://id#27/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(43,10)-(43,15)]" +}, +{ +"@id": "amf://id#27/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": "[(44,12)-(46,0)]" +}, +{ +"@id": "amf://id#27/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#27", +"http://a.ml/vocabularies/document-source-maps#value": "[(43,10)-(46,0)]" +}, +{ +"@id": "amf://id#19/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#19/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#19/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#19/source-map/lexical/element_1" +} +], +"http://a.ml/vocabularies/document-source-maps#auto-generated-name": [ +{ +"@id": "amf://id#19/source-map/auto-generated-name/element_0" +} +], +"http://a.ml/vocabularies/document-source-maps#type-property-lexical-info": [ +{ +"@id": "amf://id#19/source-map/type-property-lexical-info/element_0" +} +] +}, +{ +"@id": "amf://id#18/source-map/synthesized-field/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#style", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#18/source-map/synthesized-field/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#explode", +"http://a.ml/vocabularies/document-source-maps#value": "true" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_5", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#binding", +"http://a.ml/vocabularies/document-source-maps#value": "[(20,8)-(21,0)]" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#18", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,8)-(24,0)]" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#required", +"http://a.ml/vocabularies/document-source-maps#value": "[(21,8)-(22,0)]" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/shapes#schema", +"http://a.ml/vocabularies/document-source-maps#value": "[(22,8)-(24,0)]" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,8)-(20,0)]" +}, +{ +"@id": "amf://id#18/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/apiContract#paramName", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,8)-(20,0)]" +}, +{ +"@id": "amf://id#19/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#datatype", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,10)-(24,0)]" +}, +{ +"@id": "amf://id#19/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://www.w3.org/ns/shacl#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(19,8)-(20,0)]" +}, +{ +"@id": "amf://id#19/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#19", +"http://a.ml/vocabularies/document-source-maps#value": "[(22,8)-(24,0)]" +}, +{ +"@id": "amf://id#19/source-map/auto-generated-name/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#19", +"http://a.ml/vocabularies/document-source-maps#value": "" +}, +{ +"@id": "amf://id#19/source-map/type-property-lexical-info/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#19", +"http://a.ml/vocabularies/document-source-maps#value": "[(23,10)-(23,14)]" +}, +{ +"@id": "amf://id", +"http://a.ml/vocabularies/document#declares": [ +{ +"@id": "amf://id#1" +} +], +"@type": [ +"http://a.ml/vocabularies/document#Document", +"http://a.ml/vocabularies/document#Fragment", +"http://a.ml/vocabularies/document#Module", +"http://a.ml/vocabularies/document#Unit" +], +"http://a.ml/vocabularies/document#encodes": { +"@id": "amf://id#7" +}, +"http://a.ml/vocabularies/document#root": true, +"http://a.ml/vocabularies/document#processingData": { +"@id": "amf://id#6" +} +}, +{ +"@id": "amf://id#1", +"@type": [ +"http://a.ml/vocabularies/security#SecurityScheme", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "oauth2Device", +"http://a.ml/vocabularies/security#type": "OAuth 2.0", +"http://a.ml/vocabularies/security#settings": { +"@id": "amf://id#2" +}, +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#1/source-map" +} +] +}, +{ +"@id": "amf://id#2", +"@type": [ +"http://a.ml/vocabularies/security#OAuth2Settings", +"http://a.ml/vocabularies/security#Settings", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/security#flows": [ +{ +"@id": "amf://id#3" +} +], +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#2/source-map" +} +] +}, +{ +"@id": "amf://id#1/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#1/source-map/lexical/element_3" +}, +{ +"@id": "amf://id#1/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#1/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#1/source-map/lexical/element_2" +} +], +"http://a.ml/vocabularies/document-source-maps#declared-element": [ +{ +"@id": "amf://id#1/source-map/declared-element/element_0" +} +] +}, +{ +"@id": "amf://id#3", +"@type": [ +"http://a.ml/vocabularies/security#OAuth2Flow", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/security#accessTokenUri": "https://example.com/oauth/token", +"http://a.ml/vocabularies/security#flow": "deviceAuthorization", +"http://a.ml/vocabularies/security#scope": [ +{ +"@id": "amf://id#4" +}, +{ +"@id": "amf://id#5" +} +], +"http://a.ml/vocabularies/security#deviceAuthorizationUri": "https://example.com/oauth/device/authorize", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#3/source-map" +} +] +}, +{ +"@id": "amf://id#2/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#2/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#1/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#type", +"http://a.ml/vocabularies/document-source-maps#value": "[(56,6)-(57,0)]" +}, +{ +"@id": "amf://id#1/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/core#name", +"http://a.ml/vocabularies/document-source-maps#value": "[(55,4)-(55,16)]" +}, +{ +"@id": "amf://id#1/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#settings", +"http://a.ml/vocabularies/document-source-maps#value": "[(56,0)-(64,0)]" +}, +{ +"@id": "amf://id#1/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#1", +"http://a.ml/vocabularies/document-source-maps#value": "[(55,4)-(64,0)]" +}, +{ +"@id": "amf://id#1/source-map/declared-element/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#1", +"http://a.ml/vocabularies/document-source-maps#value": "" +}, +{ +"@id": "amf://id#4", +"@type": [ +"http://a.ml/vocabularies/security#Scope", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "read", +"http://a.ml/vocabularies/core#description": "Read access", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#4/source-map" +} +] +}, +{ +"@id": "amf://id#5", +"@type": [ +"http://a.ml/vocabularies/security#Scope", +"http://a.ml/vocabularies/document#DomainElement" +], +"http://a.ml/vocabularies/core#name": "write", +"http://a.ml/vocabularies/core#description": "Write access", +"http://a.ml/vocabularies/document-source-maps#sources": [ +{ +"@id": "amf://id#5/source-map" +} +] +}, +{ +"@id": "amf://id#3/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#3/source-map/lexical/element_4" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_2" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_1" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_3" +} +] +}, +{ +"@id": "amf://id#2/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#2", +"http://a.ml/vocabularies/document-source-maps#value": "[(56,0)-(64,0)]" +}, +{ +"@id": "amf://id#2/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#flows", +"http://a.ml/vocabularies/document-source-maps#value": "[(57,6)-(64,0)]" +}, +{ +"@id": "amf://id#4/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#4/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#5/source-map", +"@type": [ +"http://a.ml/vocabularies/document-source-maps#SourceMap" +], +"http://a.ml/vocabularies/document-source-maps#lexical": [ +{ +"@id": "amf://id#5/source-map/lexical/element_0" +} +] +}, +{ +"@id": "amf://id#3/source-map/lexical/element_4", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#scope", +"http://a.ml/vocabularies/document-source-maps#value": "[(61,10)-(64,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_2", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#3", +"http://a.ml/vocabularies/document-source-maps#value": "[(58,8)-(64,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#deviceAuthorizationUri", +"http://a.ml/vocabularies/document-source-maps#value": "[(59,10)-(60,0)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_1", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#flow", +"http://a.ml/vocabularies/document-source-maps#value": "[(58,8)-(58,27)]" +}, +{ +"@id": "amf://id#3/source-map/lexical/element_3", +"http://a.ml/vocabularies/document-source-maps#element": "http://a.ml/vocabularies/security#accessTokenUri", +"http://a.ml/vocabularies/document-source-maps#value": "[(60,10)-(61,0)]" +}, +{ +"@id": "amf://id#4/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#4", +"http://a.ml/vocabularies/document-source-maps#value": "[(62,12)-(63,0)]" +}, +{ +"@id": "amf://id#5/source-map/lexical/element_0", +"http://a.ml/vocabularies/document-source-maps#element": "amf://id#5", +"http://a.ml/vocabularies/document-source-maps#value": "[(63,12)-(64,0)]" +} +] +} diff --git a/demo/models/oas32.yaml b/demo/models/oas32.yaml new file mode 100644 index 000000000..4abac2b8c --- /dev/null +++ b/demo/models/oas32.yaml @@ -0,0 +1,63 @@ +# source: /Users/aloose/mulesoft/amf/amf-cli/shared/src/test/resources/validations/oas32/tag-cyclic-parent.yaml +openapi: 3.2.0 +info: + title: OAS 3.2 Test API + version: 1.0.0 + +paths: + /auth: + get: + summary: Get authenticated data + tags: + - authentication + responses: + '200': + description: Success + + /resources/{id}: + parameters: + - name: id + in: path + required: true + schema: + type: string + get: + summary: Get a resource + responses: + '200': + description: OK + query: + summary: Search resources + responses: + '200': + description: Results + additionalOperations: + COPY: + summary: Copy the resource + responses: + '200': + description: Copied + MOVE: + summary: Move the resource + responses: + '200': + description: Moved + +tags: + - name: data + summary: Data operations + - name: authentication + summary: All authentication-related operations + parent: data + +components: + securitySchemes: + oauth2Device: + type: oauth2 + flows: + deviceAuthorization: + deviceAuthorizationUrl: https://example.com/oauth/device/authorize + tokenUrl: https://example.com/oauth/token + scopes: + read: Read access + write: Write access