Skip to content

Commit 992eec5

Browse files
author
socadk
committed
Public release MDSL V5.3.3
1 parent 636673c commit 992eec5

File tree

137 files changed

+6521
-766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+6521
-766
lines changed

Diff for: README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Microservice Domain-Specific Language (MDSL) 5.2
1+
Microservice Domain-Specific Language (MDSL) 5.3
22
================================================
33

44
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
@@ -41,7 +41,7 @@ These two languages can be used independently of each other; for instance, data
4141

4242
## Getting Started
4343

44-
* The [GitHub Pages for MDSL](https://microservice-api-patterns.github.io/MDSL-Specification) provide a tutorial and language reference information.<!-- * There is a [Project Wiki](https://github.com/Microservice-API-Patterns/MDSL-Specification/wiki/Getting-Started-with-MDSL), which is not populated much (yet) and not kept up to date as much as the GitHub pages. -->
44+
* The public [GitHub Pages for MDSL](https://microservice-api-patterns.github.io/MDSL-Specification/) provide a tutorial and language reference information.
4545
* There is an [Eclipse update site](https://microservice-api-patterns.github.io/MDSL-Specification/updates/) for the MDSL editor.
4646
* All generators are available via a Command Line Interface (CLI); see [this readme](./dsl-core/io.mdsl.cli/README.md) and [these examples](./examples/mdsl-standalone-example).
4747
* Presentations featuring Context Mapper, MAP and MDSL can be found [here](https://ozimmer.ch/papers/), and an [end-to-end demo](https://medium.com/olzzio/domain-driven-service-design-with-context-mapper-and-mdsl-d5a0fc6091c2) is available on Medium.
@@ -50,7 +50,7 @@ These two languages can be used independently of each other; for instance, data
5050

5151
## Language Specification
5252

53-
* [Overview](https://microservice-api-patterns.github.io/MDSL-Specification)
53+
* [Primer](https://microservice-api-patterns.github.io/MDSL-Specification/primer)
5454
* [Endpoint types](https://microservice-api-patterns.github.io/MDSL-Specification/servicecontract) (a.k.a. ports)
5555
* [Bindings](https://microservice-api-patterns.github.io/MDSL-Specification/bindings) (a.k.a. adapters)
5656
* [Data types](https://microservice-api-patterns.github.io/MDSL-Specification/datacontract) (a.k.a. published language)
@@ -76,7 +76,9 @@ If you want to contribute to MDSL, you have to clone this repo and generate the
7676

7777
## Change Log
7878

79-
The current version of the MDSL language is 5.2; the tool version is 5.2.2. This MDSL version extends service contracts with support for events, states, flows, compensation (as experimental technology previews). It also supports true REST level 3 concepts both on the abstract endpoint type level and in the redesigned bindings and comes with additional Fremarker generators (Markdown reports, ALPS).
79+
The latest version of the MDSL language MDSL version extends service contracts with support for events, states, compensation as well as integration scenarios as stories(as experimental technology previews). These concepts are featured in a number of model transformations that support rapid "API First" development.
80+
81+
Since Version 5.2, MDSL supports true REST level 3 concepts both on the abstract endpoint type level and in the redesigned bindings and comes with additional Freemarker generators (Markdown reports, ALPS).
8082

8183
See [change log](changelog.md) for an evolution history; see GitHub [release notes](https://github.com/Microservice-API-Patterns/MDSL-Specification/releases) for additional update information.
8284

Diff for: background/readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This folder contains pointers to background information such as related projects
2727
## MDSL and Context Mapper
2828

2929
* Zimmermann, O.: Dimensions of Successful Web API Design and Evolution: Context, Contracts, Components, Keynote, 20th International Conference on Web Engineering (ICWE), June 11, 2020. ([PDF](https://ozimmer.ch/assets/presos/ZIO-ICWEKeynoteWADEC3v10p.pdf), [blog post](https://ozimmer.ch/practices/2020/06/10/ICWEKeynoteAndDemo.html))
30-
* Kapferer, S.; Zimmermann, O.: Domain-driven Service Design — Context Modeling, Model Refactoring and Contract Generation. Proc. of SummerSoC 2020 conference, Springer CCIS Volume 1310 ([PDF](https://contextmapper.org/media/SummerSoC-2020_Domain-driven-Service-Design_Authors-Copy.pdf), [Presentation]())
30+
* Kapferer, S.; Zimmermann, O.: Domain-driven Service Design — Context Modeling, Model Refactoring and Contract Generation. Proc. of SummerSoC 2020 conference, Springer CCIS Volume 1310 ([PDF](https://contextmapper.org/media/SummerSoC-2020_Domain-driven-Service-Design_Authors-Copy.pdf), [Presentation](https://contextmapper.org/media/Stefan-Kapferer_SummerSoC2020_presentation.pdf))
3131

3232
<!-- plus VSS Vienna conference report by Leitner et al (Insights) -->
3333

Diff for: changelog.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
## MDSL change log (and release notes)
22

3-
Also see GitHub [release notes](https://github.com/Microservice-API-Patterns/MDSL-Specification/releases).
3+
V5.3
4+
5+
* Additional features and consistency cleanup in orchestration flow and story/scenario grammar
6+
* Corresponding tool support in 20+ quick fix transformations
7+
* Selected transformations also available in standalone API and CLI
8+
9+
V5.2.9, June 2021
10+
11+
* API client no longer needs an HTTP resource binding
12+
* `content` keyword removed from event types and command types
13+
* HTP binding validation disabled in gateway `Gate`s
14+
* Many quick fixes to support rapid SOAD and API refactoring to MAP
15+
* Demo of two menu-level refactorings: Move Operation/Extract Endpoint and Add MAP Decorator
16+
17+
* Grammar makes endpoint type optional
18+
* Type system can be `OTHER` or `AnyCustomString`
419

520
V5.2, June 2021
621

@@ -158,4 +173,6 @@ V0.93a, May 10, 2019:
158173
V0.93b, May 10, 2019 (experimental):
159174

160175
* Only `V<int>` supported as parameter role/type pair, `Value<int>` removed to avoid confusion with `<<stereotypes>>`
161-
* `<<Identifier>>` and `<<Link>>` and `<<Metadata>>` now available as pattern stereotypes (`<<Entity>>` was supported already)
176+
* `<<Identifier>>` and `<<Link>>` and `<<Metadata>>` now available as pattern stereotypes (`<<Entity>>` was supported already)
177+
178+
Also see GitHub [release notes](https://github.com/Microservice-API-Patterns/MDSL-Specification/releases).

Diff for: docs/HelloWorldWebsitePrimer.graphql

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# GraphQL generated for endpoint HelloWorldEndpoint of HelloWorldAPI
2+
3+
4+
input SampleDTOInput {
5+
anonymous1: VoidResponse!
6+
anonymous2: String!
7+
}
8+
input sayHelloRequestDataTypeInput {
9+
in: String!
10+
}
11+
type SampleDTOOutput {
12+
anonymous1: VoidResponse!
13+
anonymous2: String!
14+
}
15+
type sayHelloRequestDataTypeOutput {
16+
in: String!
17+
}
18+
19+
20+
type Mutation {
21+
sayHello(
22+
in: sayHelloRequestDataTypeInput
23+
): SampleDTOOutput
24+
}
25+
26+
schema {
27+
28+
mutation: Mutation
29+
}
30+
31+
# additional scalars for types in MDSL
32+
scalar Raw
33+
scalar VoidResponse

Diff for: docs/HelloWorldWebsitePrimer.proto

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
syntax = "proto3";
2+
3+
package HelloWorldAPI;
4+
5+
import "google/protobuf/any.proto";
6+
7+
message SampleDTO {
8+
google.protobuf.Any anonymous1 = 1;
9+
string anonymous2 = 2;
10+
}
11+
12+
message sayHelloRequestMessage {
13+
string in = 1;
14+
}
15+
16+
service HelloWorldEndpoint {
17+
rpc sayHello(sayHelloRequestMessage) returns (SampleDTO);
18+
}
19+

Diff for: docs/HelloWorldWebsitePrimer.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
openapi: 3.0.1
2+
info:
3+
title: HelloWorldAPI
4+
version: "1.0"
5+
servers:
6+
- url: http://localhost:8000
7+
tags:
8+
- name: HelloWorldAPIProvider-HomeResource
9+
externalDocs:
10+
description: The role of this endpoint, offering a HelloWorldEndpoint contract,
11+
is not specified.
12+
url: ""
13+
paths:
14+
/:
15+
post:
16+
tags:
17+
- HelloWorldAPIProvider-HomeResource
18+
description: unspecified operation responsibility
19+
operationId: HomeResource-sayHello
20+
parameters: []
21+
requestBody:
22+
content:
23+
application/json:
24+
schema:
25+
type: object
26+
properties:
27+
in:
28+
type: string
29+
responses:
30+
"200":
31+
description: sayHello successful execution
32+
content:
33+
application/json:
34+
schema:
35+
$ref: '#/components/schemas/SampleDTO'
36+
components:
37+
schemas:
38+
SampleDTO:
39+
type: object
40+
properties:
41+
anonymous1:
42+
type: string
43+
format: uuid
44+
anonymous2:
45+
type: string

Diff for: docs/HelloWorldWebsitePrimerGeneratedIDLs.zip

2.71 KB
Binary file not shown.

Diff for: docs/datacontract.md

+10-12
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ The role stereotypes can be combined with the following base types to yield prec
6666

6767
#### Complex Types
6868

69-
See explanations above (under "simple, yet powerful nesting is supported").
70-
71-
<!-- TODO (M): the "quick reference" cheat sheet that used to be in grammar/examples in V2 would fit here -->
69+
See explanations above (under "simple, yet powerful nesting is supported"), as well as [Quick Reference](./quickreference).
7270

7371
### Collections and optionality
7472

@@ -81,21 +79,21 @@ Parameter trees and atomic parameter lists can be used to express optionality if
8179
~~~
8280
DataContract:
8381
'data' 'type' name=ID
84-
('version' svi=semanticVersioningIdentifier)?
85-
structure=elementStructure;
86-
default=defaultValue?
82+
('version' svi=SemanticVersioningIdentifier)?
83+
structure=ElementStructure;
84+
default=DefaultValue?
8785
8886
ElementStructure:
89-
pf=parameterForest | pt=parameterTree
90-
| apl=atomicParameterList | np=singleParameterNode;
87+
pf=ParameterForest | pt=ParameterTree
88+
| apl=AtomicParameterList | np=SingleParameterNode;
9189
9290
[...]
9391
9492
TreeNode:
95-
spn=singleParameterNode | apl=atomicParameterList | pt=parameterTree;
93+
spn=SingleParameterNode | apl=AtomicParameterList | pt=ParameterTree;
9694
9795
SingleParameterNode:
98-
genP=genericParameter | atomP=atomicParameter | tr=typeReference;
96+
genP=GenericParameter | atomP=AtomicParameter | tr=TypeReference;
9997
~~~
10098

10199
The semantic versioning identifier `svi` is a simple `STRING`; at present, the entire API as well as data types, endpoints and operations can be versioned.
@@ -152,11 +150,11 @@ data type CustomerWithAddressAndMoveHistory {
152150

153151
Note that a parameter tree that only contains atomic parameters `{D<int>, D<string>}` can also be modeled as an Atomic Parameter List `(D<int>, D<string>)`. It is recommended to prefer the Parameter Tree syntax over that of the Atomic Parameter List (to promote information hiding and defer detailed modeling decisions until the last/most responsible moment). `<<Entity>>` is a patttern stereotype (see section "Outlook: MAP Decorators" of the [CSV tutorial](./tutorial) for explanations).
154152

155-
<!-- TODO (H): * feature choice '|' -->
153+
<!-- TODO (H): * feature choice '|' when supported in all tools -->
156154

157155
<!-- TODO feature CSV in new Tutorial "sheets": ["rows":{"columnCells":{Data|Formula}*}*] // title row is different? -->
158156

159-
<!-- TODO model this in JSON Schema and XML Schema (and/or Avro?) -->
157+
<!-- TODO model this in JSON Schema, XML Schema (and/or Avro?) -->
160158

161159

162160
## Technology Mappings

Diff for: docs/examples.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ copyright: Olaf Zimmermann, 2019. All rights reserved.
66

77
[Home](./index) &mdash; [Endpoint Type](./servicecontract) &mdash; [Data Type](./datacontract) &mdash; [Provider and Client](./optionalparts) &mdash; [Bindings](./bindings) &mdash; [Cheat Sheet](./quickreference) &mdash; [Tools](./tools)
88

9+
<!-- TODO (H) update for 5.3 and merge/align with primer? -->
910

1011
MDSL Examples
1112
=============
@@ -75,23 +76,23 @@ data type SomeFlatRecord (D<string>, D<int>, D<bool>)
7576
data type ChoiceDemo {"optionA":D | "optionB":D} // not implemented in tools yet
7677
~~~
7778

78-
## More Examples
79+
More examples can be found in in the [public](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples) <!-- and in the [private](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples) --> MDSL repository.
7980

80-
Can be found in the repo.
81-
82-
<!-- TODO feture RESTBucks here -->
81+
<!-- TODO (M) feature RESTBucks here -->
8382

8483
## Links
8584

86-
[Quick reference skeletons](./quickreference).
87-
88-
More on service [endpoint contract types](./servicecontract) and [data contracts (schemas)](./datacontract).
89-
90-
Optional [Instance-level language constructs](./optionalparts).
91-
92-
Back to [MDSL homepage](./index).
9385

94-
More examples in [public](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples) and in [private](https://github.com/Microservice-API-Patterns/MDSL-Specification/tree/master/examples) repository.
86+
* API usage [scenarios and stories](scenarios.md) (experimental)
87+
* Orchestration [flows](flows.md) (experimental)
88+
* Service [endpoint contract types](./servicecontract)
89+
* [Data contracts (schemas)](./datacontract)
90+
* [Bindings](./bindings)
91+
* Optional [language elements on the instance level (provider, client, gateway)](./optionalparts)
92+
* [Tutorial](./tutorial), another [example](./examples)
93+
* [Quick reference](./quickreference)
94+
* [Tool information (CLI, editor/linter)](./tools)
95+
* [SOAD transformations](./soad)
9596

9697
*Copyright: Olaf Zimmermann, 2018-2021. All rights reserved. See [license information](https://github.com/Microservice-API-Patterns/MDSL-Specification/blob/master/LICENSE).*
9798

Diff for: docs/flows.md

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
---
2+
title: Microservice Domain Specific Language (MDSL) Orchestration Flows
3+
author: Olaf Zimmermann
4+
copyright: Olaf Zimmermann, 2021. All rights reserved.
5+
---
6+
7+
[Home](./index) &mdash; [Data Types](./datacontract) &mdash; [Bindings](./bindings) &mdash; [Provider and Client](./optionalparts) &mdash; [Tutorial](./tutorial) &mdash; [Cheat Sheet](./quickreference) &mdash; [Tools](./tools)
8+
9+
Orchestration Flows
10+
===================
11+
12+
_Note:_ The status of these language concept is [*Experimental Preview*](https://microservice-api-patterns.org/patterns/evolution/ExperimentalPreview.html). The grammar and the tool support might change, in breaking ways, in future versions of MDSL.
13+
14+
## Use Cases (When to Specify)
15+
16+
* Rapid prototyping (for instance, of event storming results coming in from [Context Mapper](https://contextmapper.org/docs/application-and-process-layer/))
17+
* API call sequencing
18+
* Integration flows, as input for middleware such as Apache Camel
19+
20+
<!--
21+
* Early SOAD
22+
* Application flows in inside a service
23+
* Service orchestration, API operation call sequencing
24+
* EIP-style integration flows (asynch., pipes and filters)
25+
* Testing (mocking, staging)
26+
-->
27+
28+
## Grammar Excerpts
29+
30+
This is an optional language concept. The flow grammar is subject to change as this is a technology preview.
31+
32+
### Flow and flow steps (with technology binding)
33+
34+
~~~
35+
Orchestration:
36+
'flow' name=ID
37+
('realizes' scenario=[IntegrationScenario])? ('type' type=FlowType)?
38+
steps+=FlowStep*
39+
flowBinding=OrchestrationBinding?
40+
;
41+
~~~
42+
43+
~~~
44+
enum FlowType:
45+
APPLICATION_FLOW
46+
| INTEGRATION_FLOW
47+
| SERVICE_ORCHESTRATION
48+
| API_CALL_SEQUENCING
49+
| EVENT_SOURCING
50+
;
51+
~~~
52+
53+
~~~
54+
OrchestrationBinding:
55+
'binding' /* 'flow' */ 'to' (eptb+=EndpointTypeBinding|cb+=ChannelBinding)+
56+
('implemented' 'as' ft=FlowTechnology)?
57+
;
58+
~~~
59+
60+
~~~
61+
FlowTechnology:
62+
'APACHE_CAMEL_ROUTE' | 'SPRING_INTEGRATION_FLOW'
63+
| 'BPMN_PROCESS' | 'BPEL_PROCESS' | 'YET_ANOTHER_FLOW_LANGUAGE'
64+
| 'PLAIN_PROGRAMMING' | STRING
65+
;
66+
~~~
67+
68+
### Event types and command types
69+
70+
Only event types and command types that have been declared can be used in flows. The syntax for these declarations is similar to that of the [data types](./datacontract) used in endpoint contracts:
71+
72+
~~~
73+
EventTypes:
74+
'event' 'type' events+=EventType (',' events+=EventType)*
75+
;
76+
77+
EventType:
78+
name=ID (content=ElementStructure)? // the domain data reported
79+
('version' svi=SemanticVersioningIdentifier)?
80+
;
81+
82+
CommandTypes:
83+
'command' 'type' commands+=CommandType (',' commands+=CommandType)*
84+
;
85+
86+
CommandType:
87+
name=ID (subject=ElementStructure)? // in/out data or business object/item
88+
('version' svi=SemanticVersioningIdentifier)?
89+
;
90+
~~~
91+
92+
## Example
93+
94+
This basic flow was actually generated from the [sample story scenario](./scenarios) with one of the quick fix [transformations](./soad.md) in the [MDSL tools](./tools.md).
95+
96+
~~~
97+
flow Scenario1Flow realizes Scenario1
98+
event something_has_happened triggers command startProcess
99+
command startProcess emits event startProcessCompleted
100+
event CRUDSomeBusinessObjectTrigger triggers command CRUDSomeBusinessObject
101+
event startProcessCompleted triggers command startProcessCompletedProcessor
102+
command CRUDSomeBusinessObject emits event CRUDSomeBusinessObjectCompleted
103+
~~~
104+
105+
See section "Processes and Event/Command Flows" in the [CML language reference](https://contextmapper.org/docs/application-and-process-layer/) for explanations.
106+
107+
<!-- TODO document more advanced features: binding, type, ... -->
108+
109+
# Site Navigation
110+
111+
* Language specification:
112+
* [Scenarios and stories](scenarios.md)
113+
* Service [endpoint contract types](./servicecontract) (this page) and [data contracts (schemas)](./datacontract)
114+
* [Bindings](./bindings) and [instance-level concepts](./optionalparts)
115+
* [Quick reference](./quickreference), [tutorial](./tutorial) and [tools](./tools)
116+
* [MDSL homepage](./index)
117+
118+
*Copyright: Olaf Zimmermann, 2018-2021. All rights reserved. See [license information](https://github.com/Microservice-API-Patterns/MDSL-Specification/blob/master/LICENSE).*
119+
120+
<!-- *EOF* -->

0 commit comments

Comments
 (0)