Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libraries/core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Core annotations

This directory contains libraries that contain types and annotations
generically important for consuming RAML.

9 changes: 9 additions & 0 deletions libraries/core/namespaces.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#%RAML 1.0 Library
uses:
types: ./types.raml
annotationTypes:
namespace:
description: |
this annotation type allows you to associate unique identifier with a RAML document.
type: types.uri
(namespace): http://raml.org/vocabularies/annotations/core
20 changes: 20 additions & 0 deletions libraries/core/types.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#%RAML 1.0 Library
uses:
n: ./namespaces.raml
(n.namespace): http://raml.org/vocabularies/annotations/types
usage: This library contains set of commonly used data type definitions
types:
uri:
description: This type represents uniform resource identifiers as it is defined in http://www.ietf.org/rfc/rfc2396.txt
type: string
pattern: ^([a-z0-9+.-]+):(?://(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(\d*))?(/(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?|(/?(?:[a-z0-9-._~!$&'()*+,;=:@]|%[0-9A-F]{2})+(?:[a-z0-9-._~!$&'()*+,;=:@/]|%[0-9A-F]{2})*)?)(?:\?((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?(?:#((?:[a-z0-9-._~!$&'()*+,;=:/?@]|%[0-9A-F]{2})*))?$
examples:
url: http://raml.org/vocabularies/annotations/types
exchange: exchange:group.asset.version
url:
description: This type represents uniform resource locatar as it is defined in http://www.ietf.org/rfc/rfc2396.txt
type: string
pattern: ((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
examples:
simple: http://raml.org/vocabularies/annotations/types
file: file://usp/dev/mmbn/test.raml