Hide Comments

Language Syntax

Language

RAPID-ML uses an indent-based syntax where leading tab characters denote block scope, similar to Python or YAML.  A RAPID Model can Import Data Models, Resource API models and Definition Libraries from other RAPID Models.

RAPID-ML also includes documentation comments, which can be included in generated documentation formats.

Syntax Notation

The following table summarizes the syntax notation used in this specification.

Variables are enclosed in '<' and '>' symbols and are described in the topic parameters table.
Variable keywords are described in the topic parameters table.
Variable qualifier keywords are described in the topic parameters table.
Optional fluency keywords, which are there to help readability, are preceded by a '~' symbol and are not described in the topic parameters table.
Fixed keywords, which don't have any special meaning other than to delineate relevant parts of the statement, are also not described in the topic parameters table.

Form

Grouped

Optional

Repeating

Example

symbol

No

No

No

rapidModel

[symbol] or [~symbol]

No

Yes

No

<property-name> : [~as] [containing] reference [~to] <structure-name>

symbol...

No

No

Yes

<response>...

(group of symbols | group of symbols)

Yes

No

No

enum (int | string) <enum-name>

[group of symbols]

Yes

Yes

No

[<namespace-declaration>]

[group of symbols]...

Yes

Yes

Yes

[<property-name> : <property-type>]...

(group of symbols)...

Yes

No

Yes

(<built-in-media-type> | <user-defined-media-type>)...

Delimited Lists

Lists MAY be delimited either with commas or newlines. For example, in a Property Set we can do this:

with all properties including

firstName!, lastName!

excluding

addresses

Or we can do this:

with all properties including

firstName!

lastName!

excluding

addresses

Lists having nested structure MUST use the newline-delimited form:

with all properties including

id! // Add cardinality override

ssn // Add regex contraint

matching regex '(?!000|666)[0-8][0-9]{2}-(?!00)[0-9]{2}-(?!0000)[0-9]{4}'

Conventions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

Created with Help & Manual 6 and styled with Premium Pack Version 2.51 © by EC Software