Skip to content

Commit 79ef501

Browse files
author
socadk
committed
Release v5.0.3
1 parent 1053924 commit 79ef501

File tree

154 files changed

+6615
-1506
lines changed

Some content is hidden

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

154 files changed

+6615
-1506
lines changed

README.md

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Microservice Domain-Specific Language (MDSL) 4.2
1+
Microservice Domain-Specific Language (MDSL) 5.0
22
================================================
33

44
[![Build Status](https://travis-ci.com/Microservice-API-Patterns/MDSL-Specification.svg?branch=master)](https://travis-ci.com/Microservice-API-Patterns/MDSL-Specification) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
@@ -40,15 +40,15 @@ These two languages can be used independently of each other; for instance, data
4040
## Getting Started
4141

4242
* Presentations featuring Context Mapper, MAP and MDSL can be found [here](https://ozimmer.ch/papers/).
43-
* 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. -->
43+
* The [GitHub Pages for MDSL](https://microservice-api-patterns.github.io/MDSL-Specification) provide a tutorial and language reference information.
4444
* There is an [Eclipse update site](https://microservice-api-patterns.github.io/MDSL-Specification/updates/) for the MDSL editor.
4545
* All generators are available via a Command Line Interface (CLI) now; see [this readme](./dsl-core/io.mdsl.cli/README.md) and [these examples](./examples/mdsl-standalone-example).
4646
* As a contributor, please consult the [readme file of the dsl-core](./dsl-core/README.md) project for getting started information and prerequisites.
4747

4848

4949
## Language Specification
5050

51-
* [Overview](https://microservice-api-patterns.github.io/MDSL-Specification/)
51+
* [Overview](https://microservice-api-patterns.github.io/MDSL-Specification)
5252
* [Endpoint types](https://microservice-api-patterns.github.io/MDSL-Specification/servicecontract) (a.k.a. ports)
5353
* [Bindings](https://microservice-api-patterns.github.io/MDSL-Specification/bindings) (a.k.a. adapters)
5454
* [Data types](https://microservice-api-patterns.github.io/MDSL-Specification/datacontract) (a.k.a. published language)
@@ -62,6 +62,7 @@ These two languages can be used independently of each other; for instance, data
6262
This repository contains:
6363

6464
* [dsl-core](dsl-core), the DSL project, Xtext grammar and everything else needed to build an Eclipse plugin providing a MDSL editor.
65+
<!-- * An older, not fully equivalent version of the grammar in [this folder](antlr4). -->
6566
* Various [examples](examples).
6667
* The [sources of the GitHub pages](docs) for MDSL.
6768
* Some [background information](background) on other IDLs and related projects.
@@ -73,8 +74,15 @@ If you want to contribute to MDSL, you have to clone this repo and generate the
7374

7475
## Change Log
7576

76-
The current version of MDSL is 4.2. 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.
77+
The current version of the MDSL language is 5.0; the tool version is 5.0.1. This MDSL version extends service contracts with support for events, states, flows, compensation. It also supports true REST level 3 concepts both on the abstract endpoint type level and in the redesigned bindings.
7778

79+
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.
80+
81+
<!--
82+
A possible roadmap for language and tools is (subject to change at any time):
83+
84+
* to be continued
85+
-->
7886

7987
## Context Information: MAP and Xtext
8088

@@ -84,7 +92,7 @@ All [Microservice API Patterns (MAP)](https://microservice-api-patterns.org/) ar
8492
* As enums for roles and responsibilities
8593
* As stereotypes annotating representation elements
8694

87-
See ["MAP Decorators" section of the MDSL tutorial](https://github.com/Microservice-API-Patterns/MDSL-Specification/tutorial) for more information. <!-- TODO copy one-pager in SummerSoC paper to GitHub pages or elsewhere in repo -->
95+
See ["MAP Decorators" section of the MDSL tutorial](https://microservice-api-patterns.github.io/MDSL-Specification/tutorial) for more information. <!-- TODO copy one-pager in SummerSoC paper to GitHub pages or elsewhere in repo -->
8896

8997
The MDSL grammar, to be found in src folder of the `dsl-core/io.mdsl` project, was originally developed with Eclipse Photon (4.8.0) and Xtext (2.14) as provided by the Eclipse Modeling Platform. MDSL makes use of the referencing feature in Xtext ('name' attribute). Future work is required to also support this technology in other IDEs (such as Visual Studio Code).
9098

background/readme.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
This folder contains pointers to background information and supporting tools.
22

3-
# Tools supporting MDSL
3+
# Microservice API Patterns (MAP)
4+
5+
* MAP <https://microservice-api-patterns.org/> uses MDSL to feature patterns in action.
6+
7+
# Design Practice Repository (DPR)
8+
9+
* <https://github.com/socadk/design-practice-repository> features MDSL in its Stepwise Service Design activity.
10+
11+
# Other Tools supporting MDSL
412

513
* Context Mapper has a MDSL generator, see [here](https://contextmapper.org/docs/mdsl/).
614

changelog.md

+56-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Also see GitHub [release notes](https://github.com/Microservice-API-Patterns/MDSL-Specification/releases).
44

5+
V5.0, December 2020
6+
7+
* Extended HTTP binding: new resource concept, media types, security policies, (error, status) reporting, HATEOAS links (technology preview)
8+
* Refactored and adopted oasgen tool accordingly: now featuring default and fully flexible verb-parameter mappings, improved naming heuristics, deep query objects; server instance, header payload mapped (still some documented known limitations)
9+
* New binding-level validators (more in the backlog)
10+
* Experimental/preview support for events, states, flows
11+
* Grammar cleanup (working around XText limitation: <https://www.eclipse.org/forums/index.php?t=msg&th=877258&goto=1494895&#msg_1494895>)
12+
513
V4.2, October 2020
614

715
* Java interface ("modulith") generator
@@ -23,6 +31,8 @@ V3.4, July 2020
2331
* Cleanup
2432
* Additional generators: gRPC protocol buffers, Jolie (and, indirectly, WSDL/XML Schema)
2533

34+
<!--V 3.2, V3.3? -->
35+
2636
V3.1.1, June 2, 2020
2737

2838
* Added three EIPs as stereotypes on message level: `'Command_Message' | 'Document_Message' | 'Event_Message'`
@@ -56,7 +66,7 @@ V2.0, May 5, 2020
5666
V1.2.0, March 17, 2020
5767

5868
* Extended proposal for asynch. messaging support on binding level (provider, client, gateway -> sender, receiver, broker)
59-
69+
* March 25: project [wiki](https://github.com/Microservice-API-Patterns/MDSL-Specification/wiki) updated (presentations, getting started page)
6070

6171
V1.1.0, February 8, 2020
6272

@@ -87,4 +97,48 @@ V1.0, July 19, 2019
8797
* Removed unnecessary () in treeNode rule (line 130)
8898
* Grammar rules edited for better antlr4 compatibility (no changes to language)
8999
* Endpoint parameters were experimental so far, and are now deprecated (but not featured in examples anyway)
90-
* Repository/examples cleanup (TODOs)
100+
* Repository/examples cleanup (TODOs)
101+
102+
V0.99, June 26, 2019 (backward compatible except for `blob` -> `raw` and typo fix: `AGGRESSIVE_OBSOLESCENCE`)
103+
104+
* Housekeeping
105+
* Mappy demo support (examples)
106+
* Renamed byte array base type from `blob` to `raw`
107+
* Type in EvolutionStrategy rule fixed: from `AGGRESSIVE_OBSOLESCENSE` to `AGGRESSIVE_OBSOLESCENCE`
108+
109+
V0.98, May 22, 2019 (backward compatible)
110+
111+
* Data types and operations can now be versioned as well:
112+
* `data type VersionedDataType version 0.0.1 {ID, V}`
113+
* `operation sampleOperation version 0.0.1 with responsibility EVENT_PROCESSOR`
114+
115+
V0.97, May 15, 2019
116+
117+
* Removed '|' from Cardinality rule, no longer needed and not featured in examples anyway
118+
* Some new comments and TODOs
119+
120+
V0.95 and v.096, May 13, 2019
121+
122+
* `V<"SomeUnknownType">` is now illegal, same effect can be achieved with plain identifier or `data type SomeUnknownType P`
123+
* Refactored data type grammar to make it more precise and to make code completion more useful (to be tested)
124+
* External SLAs now supported
125+
* Many other tweaks in API provider part (e.g. SimpleMeasurement)
126+
127+
V0.94, May 13, 2019
128+
129+
* Added `V<void>` due to user feedback and test results
130+
* Changed base types to include 'long' and 'double' (instead of 'float')
131+
* Enabled support for choice modeling on PT level data type ChoiceDemo `{"optionA":V|"optionB":V}`
132+
* Updated pattern stereotype enum to reflect latest MAP status
133+
134+
V0.93a, May 10, 2019:
135+
136+
* Removed "contract" from "endpoint contact type" for brevity
137+
* Removed "instance" from "endpoint instance location" for brevity
138+
* `<<Value>>` no longer available as pattern stereotype (undone later)
139+
* Entity and E no longer available as parameter roles (but D and Data)
140+
141+
V0.93b, May 10, 2019 (experimental):
142+
143+
* Only `V<int>` supported as parameter role/type pair, `Value<int>` removed to avoid confusion with `<<stereotypes>>`
144+
* `<<Identifier>>` and `<<Link>>` and `<<Metadata>>` now available as pattern stereotypes (`<<Entity>>` was supported already)

docs/_config - Copy.yml

-7
This file was deleted.

docs/bindings.md

+35-22
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ author: Olaf Zimmermann
44
copyright: Olaf Zimmermann, 2019-2020. All rights reserved.
55
---
66

7+
[Home](./index) &mdash; [Endpoint Type](./servicecontract) &mdash; [Data Types](./datacontract) &mdash; [Provider and Client](./optionalparts) &mdash; [Tutorial](./tutorial) &mdash; [Cheat Sheet](./quickreference) &mdash; [Tools](./tools)
8+
9+
710
Protocol Bindings for HTTP, gRPC, Jolie, Java
811
=============================================
912

@@ -22,7 +25,7 @@ Let us start with the following endpoint type (and then show all available bindi
2225
API description ProductManagement version "v0.0.1"
2326
2427
data type ProductDescription P /* defined incompletely */
25-
data type Money {"currency", "amount":D<int>} /* defined incompletely, but a bit more precise */
28+
data type Money {"currency":D, "amount":D<int>} /* defined incompletely, but a bit more precisely */
2629
data type ErrorReport {"rootCause":D<string>, "correctiveAction":D<string>}
2730
2831
endpoint type ProductManagementService
@@ -31,41 +34,54 @@ exposes
3134
expecting payload "productDescription": ProductDescription
3235
delivering payload "successAck": D<bool>
3336
// technology-neutral error reporting (to be bound to OAS/HTTP, gRPC, Java, Jolie):
34-
reporting error "DuplicateEntry": D<string>
37+
reporting error DuplicateEntry D<string>
3538
// technology-neutral security policy (to be bound to protocols and platforms):
36-
protected by policy "UserIdPassword":{"userId":ID<string>, "password":MD<string>}
39+
protected by policy BasicAuthentication "UserIdPassword": {"userId":ID<string>, "password":MD<string>}
3740
operation updatePrice /* optional: "in REQUEST_REPLY conversation" */
3841
expecting payload "price": Money
39-
delivering payload D<void>
40-
// not delivering any payload, just a transport-level status code (?)
42+
// delivering payload D<void>
43+
// not delivering any payload, just a transport-level status code
4144
~~~
4245

4346

4447
## HTTP Protocol Binding
4548

4649
HTTP handles addressing, request and response parameters, errors, and security concerns in certain ways (for good reasons). The protocol design deviates from than of most interface definition languages and "RPC-ish" communication protocols. To generate OpenAPI and, later on, server-side stubs and client-side proxies from MDSL specifications, some of the required information can therefore always be derived from the abstract endpoint types. A primary example is the mapping of MDSL operations to HTTP verbs/methods such as GET, POST, PUT etc.
4750

48-
The additional information can be specified in a provider-level *binding*:
51+
The additional information can be specified in a provider-level *HTTP binding*:
4952

5053
~~~
5154
API provider ProductManagementWebServiceProvider
5255
offers ProductManagementService
5356
at endpoint location "http://www.tbc.io:80/path/subpath"
54-
via protocol HTTP
57+
via protocol HTTP
5558
binding
56-
operation define to POST at "/products/{productId}" // PATH parameter (implicit)
57-
element productDescription realized as BODY parameter
58-
element successAck realized as BODY parameter // only possibility for response payload element
59-
report DuplicateEntry realized as 412 with ErrorReport
60-
policy UserIdPassword realized as BASIC_AUTHENTICATION
61-
// media types (defined in several RFCs, see https://en.wikipedia.org/wiki/Media_type)
62-
accepts application/json // defined at https://www.iana.org/assignments/media-types/media-types.xhtml
63-
replies "application/custom-mediatype-for-productDTO-v1" // custom media type (recommended REST practice)
59+
resource PMSResource at "/products/{productId}" // PATH parameter (implicit)
60+
operation define to POST
61+
all elements realized as BODY parameters
62+
report DuplicateEntry realized as 412 with "DuplicateEntry"
63+
policy BasicAuthentication realized as BASIC_AUTHENTICATION
64+
accepts "application/json"// defined at https://www.iana.org/assignments/media-types/media-types.xhtml
65+
replies "application/vnd.custom-mediatype-for-productDTO-v1" // custom media type
66+
6467
operation updatePrice to PATCH at "/products/{productId}/price"
65-
element money realized as BODY parameter
68+
element "currency" realized as QUERY parameter
69+
element "amount" realized as QUERY parameter
6670
~~~
6771

68-
*Important note*: This binding is work in progress and yet has to be completed and fully validated. For instance, the parameter mappings to path, query, form/body and cookie parameters is not fully implemented in the current MDSL tools yet.
72+
The information in the binding refers to and refines the operation- and message level specification (abstract endpoint type level:)
73+
74+
* At least one resource must/can be defined (`PMSResource`); their names and URIs must differ.
75+
* The resource URIs may contain URI name templates /`{productId}`).
76+
* The operations from the references endpoint type can be bound in multiple resources (once each). The operation-to-verb assignment (`POST`, `PATCH`) must be unique in each resource.
77+
* The representation elements from request payloads of operations can be mapped to HTTP parameter types jointly (`all elements realized as BODY parameters`) or individually (`element "currency" realized as QUERY parameter`). Default are in place (see [here](./tools/generators/open-api)). There are some limitations of flat/nested tree usage; cardinalities (`?`, `*`, `+`) are respected, though.
78+
* The abstract error/status reporting is mapped to HTTP codes (`report DuplicateEntry realized as 412 with "DuplicateEntry"`). In our MDSL tools, a validator checks that only existing reports are bound.
79+
* Security policies are bound and mapped in the same way (`policy BasicAuthentication realized as BASIC_AUTHENTICATION`).
80+
* One or more MIME types of request and response messages can be defined (`accepts`, `replies`). Both standard and custom media types can be specified.
81+
* Not shown in the above example, but explained [here](./http-rest), links are mapped to OpenAPI [link objects](https://swagger.io/docs/specification/links/) and, in turn hypermedia links in response messages.
82+
* Server instances are created for the endpoint addresses.
83+
84+
*Status update*: This is the first complete version of the binding. It is implemented in the current [MDSL tools](./tools), but has not been fully validated yet. The tool implementation has some known limitations.
6985

7086

7187
## gRPC Protocol Buffers Binding
@@ -117,8 +133,7 @@ API provider ProductManagementJavaServiceProvider
117133
element money realized as boolean type
118134
~~~
119135

120-
In the current release, only the package name is used.
121-
<!-- there is an unfinished Freemarker template; /* [Q]: "extends"? */ -->
136+
In the current release, only the package name is used. <!-- there is an unfinished Freemarker template; /* [Q]: "extends"? */ -->
122137

123138

124139
## Other Bindings
@@ -141,8 +156,6 @@ Language specification pages:
141156
* [Data contracts (schemas)](./datacontract)
142157
* Other [runtime concepts](./optionalparts)
143158

144-
[Quick reference](./quickreference). [Tutorial](./tutorial). [Tools](./tools). Back to [MDSL homepage](./index).
145-
146159
*Copyright: Olaf Zimmermann, 2018-2020. All rights reserved. See [license information](https://github.com/Microservice-API-Patterns/MDSL-Specification/blob/master/LICENSE).*
147160

148-
<!-- *EOF* -->
161+
<!-- *EOF* -->

docs/datacontract.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ author: Olaf Zimmermann
44
copyright: Olaf Zimmermann, 2019-2020. All rights reserved.
55
---
66

7+
[Home](./index) &mdash; [Endpoint Type](./servicecontract) &mdash; [Provider and Client](./optionalparts) &mdash; [Bindings](./bindings) &mdash; [Tutorial](./tutorial) &mdash; [Cheat Sheet](./quickreference) &mdash; [Tools](./tools)
8+
79
Data Contracts and Schemas in MDSL
810
==================================
911

@@ -15,6 +17,7 @@ MDSL aims at supporting agile modeling. Any service API exposes a published lang
1517
* Service Level Objectives (SLOs) and/or Service Level Indicators (SLIs) that are part of [Service Level Agreements (SLAs)](https://microservice-api-patterns.org/patterns/quality/qualityManagementAndGovernance/ServiceLevelAgreement)
1618
* Data Transfer Objects (DTOs) or, more precisely, Data Transfer Representations (DTRs)
1719

20+
<!-- TODO feature link types, event types -->
1821

1922
## Concepts
2023

docs/examples.md

+12-5
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ author: Olaf Zimmermann
44
copyright: Olaf Zimmermann, 2019. All rights reserved.
55
---
66

7-
MDSL Grammar Example
8-
====================
7+
[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)
98

109

11-
## Service Contract
10+
MDSL Examples
11+
=============
12+
13+
## Service Contract (Grammar Reference)
1214
The following exemplary API specification compiles against the [MDSL grammar](https://github.com/Microservice-API-Patterns/MDSL-Specification/blob/master/dsl-core/io.mdsl/src/io/mdsl/APIDescription.xtext):
1315

1416
<!-- TODO feature error reporting and versioning of data types -->
@@ -50,7 +52,7 @@ endpoint type CustomerManagementContract
5052

5153
<!-- some text from service contract page could be copied or moved here -->
5254

53-
## Data Contract
55+
## Data Contract Examples
5456

5557
The following simple examples feature the structural language primitives and give instantiation examples (in the comments):
5658

@@ -70,9 +72,14 @@ data type TwoNestingLevels {SomeStructuredRecord, SomeAtomicParameter}
7072
data type SomeFlatRecord (D<string>, D<int>, D<bool>)
7173
// yields ("A", 1, true)
7274
73-
data type ChoiceDemo {"optionA":D | "optionB":D}
75+
data type ChoiceDemo {"optionA":D | "optionB":D} // not implemented in tools yet
7476
~~~
7577

78+
## More Examples
79+
80+
Can be found in the repo.
81+
82+
<!-- TODO feture RESTBucks here -->
7683

7784
## Links
7885

0 commit comments

Comments
 (0)