Skip to content

Commit

Permalink
Merge pull request #134 from aml-org/rel-21.0.0-2.5.0-master
Browse files Browse the repository at this point in the history
Release amf.vocabulary 21.0.0 and amf.transform 2.5.0
  • Loading branch information
looseale authored Mar 8, 2022
2 parents 3d434b1 + 0eed8bf commit 4bceb23
Show file tree
Hide file tree
Showing 9 changed files with 134 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,5 @@ project/plugins/project/
.cache
.lib/
# Ignore Gradle build output directory
build
build
.bsp
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:18.04
ARG USER_HOME_DIR="/root"

ENV SCALA_VERSION 2.12.11
ENV SBT_VERSION 1.3.9
ENV SBT_VERSION 1.6.1

# Update the repository sources list and install dependencies
RUN apt-get update
Expand Down Expand Up @@ -43,7 +43,7 @@ RUN \
curl -L -o sbt-$SBT_VERSION.deb https://scala.jfrog.io/artifactory/debian/sbt-$SBT_VERSION.deb && \
dpkg -i sbt-$SBT_VERSION.deb && \
rm sbt-$SBT_VERSION.deb && \
sbt sbtVersion
sbt -Dsbt.rootdir=true sbtVersion

VOLUME "$USER_HOME_DIR/.sbt"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class VocabularyPropertiesTest extends AsyncFunSuite with VocabularyTest {
}

test("Vocabularies parsing aml_meta") {
testVocabulary(aml_meta, 19, 31)
testVocabulary(aml_meta, 25, 38)
}

test("Vocabularies parsing api_contract") {
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.6.0
sbt.version=1.6.1
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
addSbtPlugin("com.eed3si9n" % "sbt-sriracha" % "0.1.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.github.mwz" % "sbt-sonar" % "2.1.0")
addSbtPlugin("com.eed3si9n" % "sbt-sriracha" % "0.1.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
addSbtPlugin("com.sonar-scala" % "sbt-sonar" % "2.3.0")
4 changes: 2 additions & 2 deletions transform/dependencies.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Leave here for the publication process to detect if amf-transform has to be published!
# Because we publish a version of amf-transform for each version of amf-client publish.
amf.apicontract=5.0.4
amf.rdf=6.0.4
amf.apicontract=5.0.5
amf.rdf=6.0.5
4 changes: 2 additions & 2 deletions versions.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
amf.vocabulary: 20.0.0
amf.transform: 2.4.0
amf.vocabulary: 21.0.0
amf.transform: 2.5.0
80 changes: 73 additions & 7 deletions vocabulary/src/main/resources/dialects/canonical_webapi_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ nodeMappings:
Scalar: ScalarShape
Any: AnyShape
Recursive: RecursiveShape

union:
- UnionShape
- TupleShape
Expand All @@ -45,7 +45,7 @@ nodeMappings:
- ScalarShape
- AnyShape
- RecursiveShape

SecuritySettingsUnion:
typeDiscriminatorName: settingsType
typeDiscriminator:
Expand All @@ -55,15 +55,15 @@ nodeMappings:
Http: HttpSettings
OpenID: OpenIDSettings
HttpAPIKey: HttpAPIKeySettings

union:
- OAuth2Settings
- OAuth1Settings
- APIKeySettings
- HttpSettings
- OpenIDSettings
- HttpAPIKeySettings


DataNodeUnion:
typeDiscriminatorName: elementType
Expand Down Expand Up @@ -812,7 +812,7 @@ nodeMappings:
- ParametrizedResourceType
- ParametrizedTrait
allowMultiple: true

path:
propertyTerm: apiContract.path
range: string
Expand Down Expand Up @@ -1116,7 +1116,7 @@ nodeMappings:
propertyTerm: doc.extends
range: Message
allowMultiple: true

name:
propertyTerm: core.name
range: string
Expand Down Expand Up @@ -1443,7 +1443,7 @@ nodeMappings:
- Operation
- ParametrizedTrait
allowMultiple: true

method:
propertyTerm: apiContract.method
range: string
Expand Down Expand Up @@ -2292,6 +2292,72 @@ nodeMappings:
allowMultiple: true


baseIRIModel:
classTerm: meta.ContextBaseIri
mapping:
iri:
propertyTerm: meta.iri
range: link
nulled:
propertyTerm: meta.nulled
range: boolean


contextMappingModel:
classTerm: meta.ContextMapping
mapping:
contextAlias:
propertyTerm: meta.contextAlias
range: string
iri:
propertyTerm: meta.iri
range: link
coercion:
propertyTerm: meta.coercion
range: string
nulled:
propertyTerm: meta.nulled
range: boolean


curiePrefixModel:
classTerm: meta.ContextCuriePrefix
mapping:
contextAlias:
propertyTerm: meta.contextAlias
range: string
iri:
propertyTerm: meta.iri
range: link


defaultVocabularyModel:
classTerm: meta.ContextDefaultVocabulary
mapping:
iri:
propertyTerm: meta.iri
range: link


semanticContextModel:
classTerm: meta.SemanticContext
mapping:
base:
propertyTerm: meta.base
range: baseIRIModel
vocab:
propertyTerm: meta.vocab
range: defaultVocabularyModel
curies:
propertyTerm: meta.curies
range: curiePrefixModel
allowMultiple: true
mappings:
propertyTerm: meta.mappings
range: contextMappingModel
allowMultiple: true




documents:
Expand Down
50 changes: 48 additions & 2 deletions vocabulary/src/main/resources/vocabularies/aml_meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,25 @@ vocabulary: meta
base: http://a.ml/vocabularies/meta#
usage: Vocabulary containing meta-definitions
uses:
doc: aml_doc.yaml
shacl: external/shacl.yaml
doc: aml_doc.yaml
owl: external/owl.yaml
classTerms:
ConditionalNodeMapping:
displayName: ConditionalNodeMapping
extends: shacl.Shape
ContextBaseIri:
displayName: baseIRIModel
description: Encodes information about the base document IRI for the model element @ids
ContextCuriePrefix:
displayName: curiePrefixModel
description: Stores information about a CURIE prefix defined in the context
ContextDefaultVocabulary:
displayName: defaultVocabularyModel
description: Encodes information about the base vocabulary to map by default properties and types in the model
ContextMapping:
displayName: contextMappingModel
description: Stores information about mapping rules for a property in the model
Dialect:
displayName: Dialect
description: Definition of an AML dialect, mapping AST nodes from dialect documents into an output semantic graph
Expand Down Expand Up @@ -77,6 +92,9 @@ classTerms:
PublicNodeMapping:
displayName: PublicNodeMapping
description: Mapping for a graph node mapping to a particular function in a dialect
SemanticContext:
displayName: semanticContextModel
description: Set of semantic contextual information that can be attached to a schema
UnionNodeMapping:
displayName: UnionNodeMapping
extends: shacl.Shape
Expand All @@ -96,8 +114,20 @@ propertyTerms:
range: boolean
base:
displayName: base
description: Base URI for the external model
description: Base IRI used to generate all the @ids in the model
range: ContextBaseIri
coercion:
displayName: coercion
description: Type to coerce the mapped model
range: string
contextAlias:
displayName: contextAlias
description: lexical value of the alias in the context
range: string
curies:
displayName: curies
description: Set of CURIE prefixes defined in a context
range: ContextCuriePrefix
declarationsPath:
displayName: declarationsPath
description: Information about the AST location of the declarations to be parsed as declared domain elements
Expand Down Expand Up @@ -143,6 +173,10 @@ propertyTerms:
displayName: fragments
description: Mapping of fragment base unit for a particular dialect
range: DocumentMapping
iri:
displayName: iri
description: Base IRI for all the elements in the model
range: uri
keyProperty:
displayName: keyProperty
description: Information about whether the dialect is defined by the header or a key property
Expand Down Expand Up @@ -171,10 +205,18 @@ propertyTerms:
displayName: mappedNode
description: Node in the dialect definition associated to this mapping
range: uri
mappings:
displayName: mappings
description: Set of property mappings and coercions defined in a context
range: ContextMapping
mergePolicy:
displayName: mergePolicy
description: Indication of how to merge this graph node when applying a patch document
range: string
nulled:
displayName: nulled
description: Marks the baseIRI as null, preventing generation of absolute IRIs in the model
range: boolean
properties:
displayName: properties
description: Properties that have the ClassTerm in the domain
Expand Down Expand Up @@ -210,3 +252,7 @@ propertyTerms:
displayName: unique
description: Marks the values for the property mapping as a primary key for this type of node
range: boolean
vocab:
displayName: vocab
description: Default IRI prefix used to map by default all properties and terms in the model
range: ContextDefaultVocabulary

0 comments on commit 4bceb23

Please sign in to comment.