├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── TERMS.md ├── background └── readme.md ├── changelog.md ├── docs ├── .gitignore ├── Gemfile ├── HelloWorld.swagger.json ├── HelloWorldAPIJolieInterfaceAndPort.ol ├── HelloWorldWebsitePrimer.graphql ├── HelloWorldWebsitePrimer.proto ├── HelloWorldWebsitePrimer.yaml ├── HelloWorldWebsitePrimerGeneratedIDLs.zip ├── MAP-HexagonionAODLegend.png ├── README.md ├── Test0APIGrpcPb.proto ├── UNIPI-AsyncMDSL-MasterThesis-2020-GiacomoDeLiberali-v1.3.pdf ├── _config.yml ├── _layouts │ └── default.html ├── _sass │ ├── jekyll-theme-slate.scss │ └── rouge-github.scss ├── assets │ ├── css │ │ └── style.scss │ └── images │ │ ├── bg_hr.png │ │ ├── blacktocat.png │ │ ├── icon_download.png │ │ └── sprite_download.png ├── async-mdsl.md ├── bindings.md ├── datacontract.md ├── examples.md ├── flows.md ├── generators │ ├── async-api.md │ ├── freemarker.md │ ├── graphql.md │ ├── java.md │ ├── jolie.md │ ├── open-api.md │ └── protocol-buffers.md ├── http-rest.md ├── index.md ├── media │ ├── FromStoryToOASForMDSLWebsite-Target.mdsl │ ├── FromStoryToOASForMDSLWebsite-Target.yaml │ ├── api-linter-example.png │ ├── apollo-client-test-screenshot.png │ ├── apollo-server-test-mutation-screenshot.png │ ├── apollo-server-test-screenshot.png │ ├── code-generator-live-demo.png │ ├── eclipse-asyncapi-generator-context-menu.png │ ├── eclipse-freemarker-generator-context-menu.png │ ├── eclipse-freemarker-generator-dialog.png │ ├── eclipse-graphql-generator-context-menu.png │ ├── eclipse-java-generator-context-menu.png │ ├── eclipse-jolie-generator-context-menu.png │ ├── eclipse-oas-generator-context-menu.png │ ├── eclipse-protocol-buffers-generator-context-menu.png │ ├── graphqleditor.com-faker-screenshot.png │ ├── graphqleditor.com-screenshot.png │ ├── java-generator-running-unit-tests-screenshot.png │ ├── java-generator-types-package-screenshot.png │ ├── mdsl-generator-model.png │ └── spring-boot-test-with-postman.png ├── optionalparts.md ├── primer.md ├── quickreference.md ├── scenarios.md ├── script │ ├── bootstrap │ ├── cibuild │ ├── release │ └── validate-html ├── servicecontract.md ├── soad.md ├── technology-mappings.md ├── tools.md ├── tutorial.md └── updates │ ├── README.md │ ├── artifacts.jar │ ├── artifacts.xml.xz │ ├── content.jar │ ├── content.xml.xz │ ├── features │ ├── io.mdsl.feature.source_6.0.0.202409031030.jar │ └── io.mdsl.feature_6.0.0.202409031030.jar │ ├── p2.index │ └── plugins │ ├── io.mdsl.ide.source_6.0.0.202409031030.jar │ ├── io.mdsl.ide_6.0.0.202409031030.jar │ ├── io.mdsl.source_6.0.0.202409031030.jar │ ├── io.mdsl.ui.source_6.0.0.202409031030.jar │ ├── io.mdsl.ui_6.0.0.202409031030.jar │ └── io.mdsl_6.0.0.202409031030.jar ├── dsl-core ├── .gitignore ├── README.md ├── build.gradle ├── gradle.properties ├── gradle │ ├── source-layout.gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── io.mdsl.cli │ ├── README.md │ ├── build.gradle │ ├── gradle.properties │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── io │ │ └── mdsl │ │ └── cli │ │ ├── MDSLCommandLineInterface.java │ │ └── MDSLGenerator.java ├── io.mdsl.feature │ ├── build.properties │ ├── feature.xml │ └── pom.xml ├── io.mdsl.ide │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.gradle │ ├── build.properties │ ├── pom.xml │ └── src │ │ └── io │ │ └── mdsl │ │ └── ide │ │ ├── APIDescriptionIdeModule.java │ │ └── APIDescriptionIdeSetup.java ├── io.mdsl.repository │ ├── category.xml │ └── pom.xml ├── io.mdsl.target │ ├── io.mdsl.target.target │ └── pom.xml ├── io.mdsl.tests │ ├── MDSL-MEPDemo.mdsl │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.gradle │ ├── build.properties │ ├── pom.xml │ ├── src │ │ └── io │ │ │ └── mdsl │ │ │ ├── dsl │ │ │ └── ServiceSpecificationAdapterTest.java │ │ │ ├── generator │ │ │ ├── GenModelJSONExporterTest.java │ │ │ ├── GenModelYAMLExporterTest.java │ │ │ ├── GraphQLGeneratorTest.java │ │ │ ├── OpenAPIGeneratorTest.java │ │ │ ├── ProcessFlowFreemarkerTemplateTest.java │ │ │ ├── TextFileFreemarkerTemplateGeneratorTest.java │ │ │ ├── converter │ │ │ │ ├── MDSL2FlowTransformationsTest.java │ │ │ │ ├── MDSL2GeneratorModelConverterTest.java │ │ │ │ └── MDSL2QuickFixTransformationsTest.java │ │ │ ├── model │ │ │ │ ├── BasicTypeTest.java │ │ │ │ ├── ClientTest.java │ │ │ │ ├── DataTypeFieldTest.java │ │ │ │ ├── DataTypeTest.java │ │ │ │ ├── EndpointContractTest.java │ │ │ │ ├── ImplementationTechnologyTest.java │ │ │ │ ├── MDSLGeneratorModelTest.java │ │ │ │ ├── OperationParameterTest.java │ │ │ │ ├── OperationTest.java │ │ │ │ ├── ProviderImplementationTest.java │ │ │ │ ├── ProviderTest.java │ │ │ │ └── composition │ │ │ │ │ ├── FlowGenModelFromMDSLFileTest.java │ │ │ │ │ ├── FlowGenModelFromScratchTest.java │ │ │ │ │ └── views │ │ │ │ │ └── ProcessViewHelpersTest.java │ │ │ └── protobuf │ │ │ │ └── converter │ │ │ │ └── MDSL2ProtobufConverterTest.java │ │ │ ├── standalone │ │ │ ├── RefactoringViaCLITest.java │ │ │ └── StandaloneAPITest.java │ │ │ └── tests │ │ │ └── AbstractMDSLInputIntegrationTest.java │ └── test-data │ │ ├── exporter │ │ ├── flowvariations.mdsl │ │ ├── flowvariations_GeneratorModel.json │ │ ├── flowvariations_GeneratorModel.yaml │ │ ├── simple-generation-input-1.mdsl │ │ ├── simple-generation-input-2.mdsl │ │ ├── simple-generation-input-2_GeneratorModel.json │ │ └── simple-generation-input-2_GeneratorModel.yaml │ │ ├── flowgenmodel-tests │ │ ├── apache-camel-configuration.java.ftl │ │ ├── esoad-blog-post.java │ │ ├── esoad-blog-post.mdsl │ │ ├── esoad-blog-post.sketch-miner │ │ ├── flowtest0a-hello-one-flow.mdsl │ │ ├── flowtest0bc-hello-flow-world.mdsl │ │ ├── flowtest0bc-hello-flow-world.sketch-miner │ │ ├── flowtest1-sequence.java │ │ ├── flowtest1-sequence.mdsl │ │ ├── flowtest2-parallelsplitwithsynchronization.java │ │ ├── flowtest2-parallelsplitwithsynchronization.mdsl │ │ ├── flowtest3a-exclusivechoice-implicitmerge.java │ │ ├── flowtest3a-exclusivechoice-implicitmerge.mdsl │ │ ├── flowtest3a-exclusivechoice-implicitmerge.sketch-miner │ │ ├── flowtest3b-inclusivechoice-andmerge.mdsl │ │ ├── flowtest3c-exclusivechoiceviacommand-implicitmerge.mdsl │ │ ├── flowtest4a-alloptionsinsingleflow-jaamsim.cfg │ │ ├── flowtest4a-alloptionsinsingleflow.mdsl │ │ ├── flowtest4a-alloptionsmodel1.mdsl │ │ ├── flowtest4a-alloptionsmodel1.sketch-miner │ │ ├── flowtest4a-alloptionsmodel1_SampleFlowWithAllOptions-expected.sketch_miner │ │ ├── flowtest4a-alloptionsmodel1_SampleFlowWithCisStepAnd-expected.sketch_miner │ │ ├── flowtest4a-alloptionsmodel1_SampleFlowWithCisStepOr-expected.sketch_miner │ │ ├── flowtest4a-alloptionsmodel1_SampleFlowWithDepStepAnd-expected.sketch_miner │ │ ├── flowtest4a-alloptionsmodel1_SampleFlowWithDepStepOr-expected.sketch_miner │ │ ├── flowtest4b-allbranchingoptions.java │ │ ├── flowtest4b-allbranchingoptions.mdsl │ │ ├── flowtest4b-andbranching-with-overlaps.mdsl │ │ ├── flowtest4c-allbranchingoptions.mdsl │ │ ├── flowtest5a-syntaxvariations-canonicalgenmodel.mdsl │ │ ├── flowtest5a-syntaxvariations-canonicalgenmodel.sketch-miner │ │ ├── flowtest5b-simpleloop1.mdsl │ │ ├── flowtest5b-simpleloops.mdsl │ │ ├── flowtest6a-combinedsteps-and-alloperators.mdsl │ │ ├── flowtest6b-incomplete-and-overlapping.mdsl │ │ ├── flowtest7-branchingoptions-withnesting.java │ │ ├── flowtest7-branchingoptions-withnesting.mdsl │ │ ├── flowtest7-branchingoptions-withnesting.sketch-miner │ │ ├── flowtest8-eceswithcommandstartstop.mdsl │ │ ├── jaamsim-processmodel.cfg.ftl │ │ ├── process-driven-SOAD-final-jaamsim.cfg │ │ ├── process-driven-SOAD-final.mdsl │ │ ├── process-flow-stories.sketch-miner.ftl │ │ ├── test-combinedsteps-and-alloperators.java │ │ └── test-combinedsteps-and-alloperators.mdsl │ │ ├── freemarker-generation │ │ ├── alps-generator-demo.mdsl │ │ ├── alps-generator-demo.yaml │ │ ├── mdsl-to-alps-template.yaml.ftl │ │ ├── sample-data-JSON.json.ftl │ │ ├── sample-http-endpoint.java.ftl │ │ ├── simple-generation-input-1.mdsl │ │ ├── simple-test-template.ftl │ │ └── simple-test-with-genmodel-template.ftl │ │ ├── generator-model │ │ ├── endpoint-model-1.mdsl │ │ ├── java-binding-model-1.mdsl │ │ ├── java-binding-model-2.mdsl │ │ ├── parameter-forest-model.mdsl │ │ ├── parameter-list-model.mdsl │ │ ├── parameter-tree-model.mdsl │ │ ├── provider-and-client-model.mdsl │ │ ├── provider-implementation-model.mdsl │ │ └── single-parameter-nodes-model.mdsl │ │ ├── graphql-generation │ │ ├── datatype-test-atomic-parameter-list-type.mdsl │ │ ├── datatype-test-atomic-parameter-list-type_TestEndpoint.graphql │ │ ├── datatype-test-atomic-parameter-list-with-cards-type.mdsl │ │ ├── datatype-test-atomic-parameter-list-with-cards-type_TestEndpoint.graphql │ │ ├── datatype-test-atomic-parameter-type.mdsl │ │ ├── datatype-test-atomic-parameter-type_TestEndpoint.graphql │ │ ├── datatype-test-p-type.mdsl │ │ ├── datatype-test-p-type_TestEndpoint.graphql │ │ ├── datatype-test-parameter-forest-type.mdsl │ │ ├── datatype-test-parameter-forest-type_TestEndpoint.graphql │ │ ├── datatype-test-parameter-tree-type.mdsl │ │ ├── datatype-test-parameter-tree-type_TestEndpoint.graphql │ │ ├── datatype-test-parameter-tree-with-reference.mdsl │ │ ├── datatype-test-parameter-tree-with-reference_TestEndpoint.graphql │ │ ├── datatype-test-parameter-tree-with-subtree.mdsl │ │ ├── datatype-test-parameter-tree-with-subtree_TestEndpoint.graphql │ │ ├── endpoint-test-mutation-with-input-types.mdsl │ │ ├── endpoint-test-mutation-with-input-types_TestEndpoint.graphql │ │ ├── endpoint-test-query-with-return-type-only.mdsl │ │ ├── endpoint-test-query-with-return-type-only_TestEndpoint.graphql │ │ ├── multiple-endpoints-test.mdsl │ │ ├── multiple-endpoints-test_TestEndpoint1.graphql │ │ └── multiple-endpoints-test_TestEndpoint2.graphql │ │ ├── java-generation │ │ └── simple-generation-input-1.mdsl │ │ ├── openapi-generation │ │ ├── datatype-test-cardinalities-1.mdsl │ │ ├── datatype-test-cardinalities-1.yaml │ │ ├── datatype-test-cardinalities-2.mdsl │ │ ├── datatype-test-cardinalities-2.yaml │ │ ├── datatype-test-cardinalities-3.mdsl │ │ ├── datatype-test-cardinalities-3.yaml │ │ ├── datatype-test-cardinalities-4.mdsl │ │ ├── datatype-test-cardinalities-4.yaml │ │ ├── datatype-test-p-type.mdsl │ │ ├── datatype-test-p-type.yaml │ │ ├── datatype-test-parameter-forrest-type.mdsl │ │ ├── datatype-test-parameter-forrest-type.yaml │ │ ├── datatype-test-parameter-list-type.mdsl │ │ ├── datatype-test-parameter-list-type.yaml │ │ ├── datatype-test-parameter-tree-type.mdsl │ │ ├── datatype-test-parameter-tree-type.yaml │ │ ├── datatype-test-single-parameter-type.mdsl │ │ ├── datatype-test-single-parameter-type.yaml │ │ ├── endpoint-http-mapping-COOKIE-parameter-test-1.mdsl │ │ ├── endpoint-http-mapping-COOKIE-parameter-test-1.yaml │ │ ├── endpoint-http-mapping-PATH-parameter-test-1.mdsl │ │ ├── endpoint-http-mapping-PATH-parameter-test-1.yaml │ │ ├── endpoint-http-mapping-PATH-parameter-test-2.mdsl │ │ ├── endpoint-http-mapping-PATH-parameter-test-2.yaml │ │ ├── endpoint-http-mapping-PATH-parameter-test-3.mdsl │ │ ├── endpoint-http-mapping-PATH-parameter-test-3.yaml │ │ ├── endpoint-http-mapping-test-1.mdsl │ │ ├── endpoint-http-mapping-test-1.yaml │ │ ├── endpoint-parameters-test-1.mdsl │ │ ├── endpoint-parameters-test-1.yaml │ │ ├── endpoint-parameters-test-2.mdsl │ │ ├── endpoint-parameters-test-2.yaml │ │ ├── endpoint-test-duplicate-operations-error.mdsl │ │ ├── endpoint-test-operation-test-1.mdsl │ │ ├── endpoint-test-operation-test-1.yaml │ │ ├── endpoint-test-operation-test-2.mdsl │ │ ├── endpoint-test-operation-test-2.yaml │ │ ├── endpoint-test-operation-test-3.mdsl │ │ ├── endpoint-test-operation-test-3.yaml │ │ ├── endpoint-test-operation-test-4.mdsl │ │ ├── endpoint-test-operation-test-4.yaml │ │ ├── endpoint-test-operation-test-5.mdsl │ │ ├── endpoint-test-operation-test-5.yaml │ │ ├── http-binding-hypermedia-uritemplates.mdsl │ │ ├── http-binding-hypermedia-uritemplates.yaml │ │ ├── http-binding-map-mimetypes.mdsl │ │ ├── http-binding-map-mimetypes.yaml │ │ ├── http-binding-multiple-endpoints-and-providers.mdsl │ │ ├── http-binding-multiple-endpoints-and-providers.yaml │ │ ├── http-binding-multiple-endpoints-and-providers2.mdsl │ │ ├── http-binding-multiple-endpoints-and-providers2.yaml │ │ ├── http-binding-reports-policies-headers.mdsl │ │ ├── http-binding-reports-policies-headers.yaml │ │ ├── http-binding-restbucks-ml12.mdsl │ │ ├── http-binding-restbucks-ml12.yaml │ │ ├── http-binding-restbucks-ml3.mdsl │ │ ├── http-binding-restbucks-ml3.yaml │ │ ├── http-binding-verb-heuristics.mdsl │ │ ├── http-binding-verb-heuristics.yaml │ │ ├── http-binding-verbs-datatypes-trees.mdsl │ │ ├── http-binding-verbs-datatypes-trees.yaml │ │ ├── http-binding-verbs-datatypes.mdsl │ │ ├── http-binding-verbs-datatypes.yaml │ │ ├── http-binding-verbs-datatypes0.mdsl │ │ ├── http-binding-verbs-datatypes0.yaml │ │ ├── http-binding-verbs-datatypes1.mdsl │ │ ├── http-binding-verbs-datatypes1.yaml │ │ ├── http-binding-verbs-datatypes2.mdsl │ │ ├── http-binding-verbs-datatypes2.yaml │ │ ├── http-binding-verbs-datatypes3.mdsl │ │ ├── http-binding-verbs-datatypes3.yaml │ │ ├── http-binding-verbs-datatypes4.mdsl │ │ ├── http-binding-verbs-datatypes4.yaml │ │ ├── http-binding-verbs-datatypes5.mdsl │ │ ├── http-binding-verbs-datatypes5.yaml │ │ ├── map-all-role-decorators-bound.mdsl │ │ ├── map-all-role-decorators-bound.yaml │ │ ├── simple-generation-input-1.mdsl │ │ └── simple-generation-input-1.yaml │ │ ├── proto-generation │ │ ├── empty-model.mdsl │ │ ├── parameter-forest-model.mdsl │ │ ├── parameter-list-model.mdsl │ │ ├── parameter-tree-model.mdsl │ │ ├── service-model-1.mdsl │ │ └── single-parameter-nodes-model.mdsl │ │ ├── quickfix-transformations │ │ ├── cqrs-endpoints-with-operations.mdsl │ │ ├── empty-endpoint.mdsl │ │ ├── endpoint-from-story-model.mdsl │ │ ├── endpoint-receiving-event.mdsl │ │ ├── endpoint-with-bindings.mdsl │ │ ├── endpoint-with-external-data-types.mdsl │ │ ├── endpoint-with-operations-and-event.mdsl │ │ ├── endpoint-with-operations-from-map-decorator.mdsl │ │ ├── endpoints-with-all-map-role-decorators.mdsl │ │ ├── flow-from-story-model.mdsl │ │ ├── flow-with-branches.mdsl │ │ ├── flow-with-dep-step-variations.mdsl │ │ ├── flowtest5a-syntaxvariations-canonicalgenmodel.mdsl │ │ ├── map-all-role-decorators.mdsl │ │ ├── single-story-model.mdsl │ │ ├── story-and-flow-model.mdsl │ │ ├── test-combinedsteps-and-alloperators.java │ │ ├── test-combinedsteps-and-alloperators.mdsl │ │ ├── test-extract-information-holder.mdsl │ │ ├── test-inline-information-holder.mdsl │ │ ├── test-split-operation.mdsl │ │ └── two-endpoints-with-operation.mdsl │ │ └── standalone │ │ └── hello-world.mdsl ├── io.mdsl.ui.tests │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.properties │ └── pom.xml ├── io.mdsl.ui │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.properties │ ├── plugin.xml │ ├── pom.xml │ └── src │ │ └── io │ │ └── mdsl │ │ └── ui │ │ ├── APIDescriptionUiModule.java │ │ ├── actions │ │ └── GeneratorsActionGroup.java │ │ ├── contentassist │ │ └── APIDescriptionProposalProvider.java │ │ ├── editor │ │ ├── MDSLEditor.java │ │ └── MDSLQuickMenuCreator.java │ │ ├── handler │ │ ├── ALPSGenerationHandler.java │ │ ├── AbstractGenerationHandler.java │ │ ├── AsyncAPIGenerationHandler.java │ │ ├── AsyncMDSLGenerationHandler.java │ │ ├── GenModelJSONExporterHandler.java │ │ ├── GenModelYAMLExporterHandler.java │ │ ├── GraphQLGenerationHandler.java │ │ ├── JavaGenerationHandler.java │ │ ├── JolieGenerationHandler.java │ │ ├── OpenAPIGenerationHandler.java │ │ ├── ProtocolBuffersGenerationHandler.java │ │ ├── QDARTransformationHandler.java │ │ ├── SketchMinerGenerationHandler.java │ │ ├── TextFileGenerationHandler.java │ │ ├── refactoring │ │ │ ├── AnalyzeSelectedEndpointContract.java │ │ │ └── MoveOperationRefactoring.java │ │ └── wizard │ │ │ ├── TextFileGenerationWizard.java │ │ │ ├── TextFileGenerationWizardContext.java │ │ │ ├── components │ │ │ ├── FileByExtensionChooser.java │ │ │ └── FreemarkerFileChooser.java │ │ │ └── page │ │ │ ├── MDSLWizardPage.java │ │ │ └── TextFileGenerationWizardPage.java │ │ ├── labeling │ │ ├── APIDescriptionDescriptionLabelProvider.java │ │ └── APIDescriptionLabelProvider.java │ │ ├── outline │ │ └── APIDescriptionOutlineTreeProvider.java │ │ └── quickfix │ │ ├── APIDescriptionQuickfixProvider.java │ │ ├── AddApplicationFlowForScenario.java │ │ ├── AddApplicationFlowStep.java │ │ ├── AddBranchWithMerge.java │ │ ├── AddContextRepresentation.java │ │ ├── AddEndpointTypeForScenario.java │ │ ├── AddEndpointTypeSupportingFlow.java │ │ ├── AddEndpointTypeWithPatternSupport.java │ │ ├── AddEventManagementOperationsToContract.java │ │ ├── AddHttpParameterBindingsForElements.java │ │ ├── AddHttpProviderAndBindingForContract.java │ │ ├── AddHttpResourceDuringBindingSplit.java │ │ ├── AddHttpResourceForURITemplate.java │ │ ├── AddOperationForFlowStep.java │ │ ├── AddOperationForScenarioStory.java │ │ ├── AddOperationsAccordingToMAPDecoration.java │ │ ├── AddPagination.java │ │ ├── AddRequestBundle.java │ │ ├── AddURITemplateToExistingHttpResource.java │ │ ├── AddWishList.java │ │ ├── AddWishTemplate.java │ │ ├── CombinedFlowStepSplit.java │ │ ├── CompleteDataType.java │ │ ├── CompleteOperationWithCompensation.java │ │ ├── CompleteOperationWithErrorReport.java │ │ ├── CompleteOperationWithSecurityPolicy.java │ │ ├── ConsolidateFlowSteps.java │ │ ├── ConvertFlowToBPMN.java │ │ ├── ConvertInlineTypeToTypeReference.java │ │ ├── ConvertToStringDataType.java │ │ ├── DecorateAsMAPInformationHolderResource.java │ │ ├── DecorateAsMAPProcessingResource.java │ │ ├── DecorateDataTypeWithStereotype.java │ │ ├── DecorateWithMAPEndpointRole.java │ │ ├── ExtractEndpointOrMoveOperation.java │ │ ├── ExtractInformationHolder.java │ │ ├── InlineInformationHolder.java │ │ ├── IntroduceKeyValueMap.java │ │ ├── IntroduceParameterTreeDTO.java │ │ ├── MakeRequestConditional.java │ │ ├── QuickfixSemanticModification.java │ │ ├── SegregateCommandsFromQueries.java │ │ ├── SplitOperation.java │ │ └── dialogs │ │ └── NamePromptDialog.java ├── io.mdsl │ ├── .launch │ │ ├── Generate APIDescription (mydsl) Language Infrastructure.launch │ │ ├── GenerateAPIDescription.mwe2.launch │ │ ├── Launch Runtime Eclipse.launch │ │ └── LaunchRuntimeEclipse.launch │ ├── FreemarkerStandaloneDemo.ftl │ ├── MDSLOverviewReport.md.ftl │ ├── META-INF │ │ └── MANIFEST.MF │ ├── build.gradle │ ├── build.properties │ ├── gradle.properties │ ├── plugin.xml │ ├── pom.xml │ └── src │ │ └── io │ │ └── mdsl │ │ ├── APIDescription.xtext │ │ ├── APIDescriptionRuntimeModule.java │ │ ├── APIDescriptionStandaloneSetup.java │ │ ├── GenerateAPIDescription.mwe2 │ │ ├── MDSLResource.java │ │ ├── dsl │ │ ├── ServiceSpecificationAdapter.java │ │ └── ServiceSpecificationExtensions.java │ │ ├── exception │ │ ├── MDSLException.java │ │ └── ResourceIsNoMDSLModelException.java │ │ ├── formatting2 │ │ └── APIDescriptionFormatter.xtend │ │ ├── generator │ │ ├── ALPSGenerator.java │ │ ├── APIDescriptionGenerator.java │ │ ├── AbstractMDSLGenerator.java │ │ ├── AnonymousFieldNameGenerator.java │ │ ├── AsyncMDSLGenerator.java │ │ ├── GenModelJSONExporter.java │ │ ├── GenModelYAMLExporter.java │ │ ├── GraphQLGenerator.java │ │ ├── JavaGenerator.java │ │ ├── JolieGenerator.java │ │ ├── MDSL2GraphQL.ftl │ │ ├── MDSL2JavaTemplateEmpty.java.ftl │ │ ├── MDSL2JolieTemplate.ol.ftl │ │ ├── MDSLEndpointTypeToALPS.yaml.ftl │ │ ├── OpenAPIGenerator.java │ │ ├── ProtocolBuffersGenerator.java │ │ ├── SketchMinerGenerator.java │ │ ├── TextFileGenerator.java │ │ ├── asyncapi │ │ │ ├── AsyncApiDataTypeGenerator.xtend │ │ │ ├── AsyncApiGenerator.xtend │ │ │ ├── helpers │ │ │ │ └── AsyncApiGeneratorHelper.java │ │ │ └── models │ │ │ │ ├── CardinalityDescription.java │ │ │ │ ├── MessageBrokerDto.java │ │ │ │ └── ParameterDescriptor.java │ │ ├── bpmn │ │ │ ├── AbstractFreemarkerTextCreator.java │ │ │ ├── SketchMinerLinkCreator.java │ │ │ ├── SketchMinerModelCreator.java │ │ │ └── sketchminer.ftl │ │ ├── freemarker │ │ │ └── FreemarkerEngineWrapper.java │ │ ├── graphql │ │ │ ├── GraphQLOperationInputTypeNameResolver.java │ │ │ └── GraphQLSimpleTypeMappingMethod.java │ │ ├── java │ │ │ ├── CapitalizeMethod.java │ │ │ ├── DataType.java │ │ │ ├── DataType.java.ftl │ │ │ ├── EndpointImplementation.java.ftl │ │ │ ├── EndpointInterface.java.ftl │ │ │ ├── EndpointTest.java.ftl │ │ │ ├── JavaOperationNameResolver.java │ │ │ ├── JavaPackageResolver.java │ │ │ ├── JavaPrimitiveTypeCheckingMethod.java │ │ │ ├── JavaPrimitiveTypeValueGenerationMethod.java │ │ │ └── JavaTypeMappingMethod.java │ │ ├── jolie │ │ │ └── converter │ │ │ │ ├── EndpointModel.java │ │ │ │ ├── MDSL2JolieConverter.java │ │ │ │ ├── OperationModel.java │ │ │ │ └── TypeModel.java │ │ ├── model │ │ │ ├── BasicType.java │ │ │ ├── Client.java │ │ │ ├── CustomImplTechnology.java │ │ │ ├── DataType.java │ │ │ ├── DataTypeField.java │ │ │ ├── EndpointContract.java │ │ │ ├── HTTPBinding.java │ │ │ ├── HTTPOperationBinding.java │ │ │ ├── HTTPResource.java │ │ │ ├── ImplementationTechnology.java │ │ │ ├── JavaBinding.java │ │ │ ├── MDSLGeneratorModel.java │ │ │ ├── MDSLType.java │ │ │ ├── Operation.java │ │ │ ├── OperationParameter.java │ │ │ ├── ProtocolBinding.java │ │ │ ├── Provider.java │ │ │ ├── ProviderImplementation.java │ │ │ ├── StandardImplTechnology.java │ │ │ ├── StateTransition.java │ │ │ ├── UndefinedProtocol.java │ │ │ ├── carving │ │ │ │ ├── CarvingCriterion.java │ │ │ │ ├── ClusterCollection.java │ │ │ │ ├── CohesionCriterion.java │ │ │ │ ├── CommandCluster.java │ │ │ │ └── CouplingCriterion.java │ │ │ ├── composition │ │ │ │ ├── Command.java │ │ │ │ ├── CompositeCommand.java │ │ │ │ ├── CompositeEvent.java │ │ │ │ ├── Event.java │ │ │ │ ├── Flow.java │ │ │ │ ├── JoinEvent.java │ │ │ │ ├── converter │ │ │ │ │ ├── Flow2SketchMinerConverter.java │ │ │ │ │ └── OrchestrationConverter.java │ │ │ │ └── views │ │ │ │ │ ├── CompositeInvocation.java │ │ │ │ │ ├── Invocation.java │ │ │ │ │ ├── Path.java │ │ │ │ │ ├── PathCollection.java │ │ │ │ │ ├── PathElement.java │ │ │ │ │ ├── Process.java │ │ │ │ │ ├── camel │ │ │ │ │ └── CamelUtils.java │ │ │ │ │ ├── jaamsim │ │ │ │ │ ├── Branch.java │ │ │ │ │ ├── Combine.java │ │ │ │ │ ├── CommandInvocationBranch.java │ │ │ │ │ ├── CommandInvocationDuplicate.java │ │ │ │ │ ├── Component.java │ │ │ │ │ ├── Duplicate.java │ │ │ │ │ ├── EntityGenerator.java │ │ │ │ │ ├── EntitySink.java │ │ │ │ │ ├── EventProductionBranch.java │ │ │ │ │ ├── EventProductionDuplicate.java │ │ │ │ │ ├── GateQueue.java │ │ │ │ │ ├── GatewayGuardServer.java │ │ │ │ │ ├── GuardInputServer.java │ │ │ │ │ ├── JaamSimView.java │ │ │ │ │ ├── Queue.java │ │ │ │ │ ├── Server.java │ │ │ │ │ ├── SimulationEntity.java │ │ │ │ │ └── Statistics.java │ │ │ │ │ └── sketchminer │ │ │ │ │ ├── LZString.java │ │ │ │ │ ├── SimplifiedFlowStep.java │ │ │ │ │ ├── SketchMinerModel.java │ │ │ │ │ ├── Task.java │ │ │ │ │ ├── TaskSequence.java │ │ │ │ │ └── TaskType.java │ │ │ └── converter │ │ │ │ ├── ClientConverter.java │ │ │ │ ├── DataTypeConverter.java │ │ │ │ ├── EndpointConverter.java │ │ │ │ ├── MDSL2GeneratorModelConverter.java │ │ │ │ ├── ProviderConverter.java │ │ │ │ └── ProviderImplementationConverter.java │ │ ├── openapi │ │ │ └── converter │ │ │ │ ├── DataType2ParameterConverter.java │ │ │ │ ├── DataType2SchemaConverter.java │ │ │ │ ├── Endpoint2PathConverter.java │ │ │ │ ├── HTTPBindingConverterHelpers.java │ │ │ │ └── MDSL2OpenAPIConverter.java │ │ ├── protobuf │ │ │ └── converter │ │ │ │ ├── DataType2MessageConverter.java │ │ │ │ ├── Endpoint2ServiceConverter.java │ │ │ │ └── MDSL2ProtobufConverter.java │ │ └── refactorings │ │ │ ├── AddEndpointForScenarioRefactoring.java │ │ │ ├── AddEventManagementRefactoring.java │ │ │ ├── AddHttpBindingRefactoring.java │ │ │ ├── AddHttpResourceDuringBindingSplitRefactoring.java │ │ │ ├── AddHttpResourceForURITemplateRefactoring.java │ │ │ ├── AddKeyValueMapWrapperRefactoring.java │ │ │ ├── AddMAPRoleRefactoring.java │ │ │ ├── AddOperationsForRoleRefactoring.java │ │ │ ├── AddPaginationRefactoring.java │ │ │ ├── AddParameterTreeWrapperRefactoring.java │ │ │ ├── AddRequestBundleRefactoring.java │ │ │ ├── AddURITemplateToExistingHttpResourceRefactoring.java │ │ │ ├── AddWishListRefactoring.java │ │ │ ├── AddWishTemplateRefactoring.java │ │ │ ├── CompleteDataTypesRefactoring.java │ │ │ ├── ConvertInlinedTypeToTypeReferenceRefactorer.java │ │ │ ├── ExternalizeContextRepresentationRefactoring.java │ │ │ ├── ExtractInformationHolderRefactoring.java │ │ │ ├── InlineInformationHolderRefactoring.java │ │ │ ├── MDSLAnalyticsGenerator.java │ │ │ ├── MakeRequestConditionalRefactoring.java │ │ │ ├── MoveOperationRefactoring.java │ │ │ ├── RefactoringHelpers.java │ │ │ ├── SeparateCommandsFromQueriesRefactoring.java │ │ │ ├── SplitOperationRefactoring.java │ │ │ ├── StoryToOpenAPIGenerator.java │ │ │ └── TransformationChainAllInOneRefactoring.java │ │ ├── scoping │ │ └── APIDescriptionScopeProvider.java │ │ ├── standalone │ │ ├── FileSystemHelper.java │ │ ├── MDSLStandaloneAPI.java │ │ ├── MDSLStandaloneSetup.java │ │ └── MDSLStandaloneUsageHelper.java │ │ ├── transformations │ │ ├── DataTypeTransformationHelpers.java │ │ ├── DataTypeTransformations.java │ │ ├── EndpointTransformations.java │ │ ├── FlowTransformationHelpers.java │ │ ├── FlowTransformations.java │ │ ├── HTTPBindingTransformations.java │ │ ├── MAPDecoratorHelpers.java │ │ ├── MessageTransformationHelpers.java │ │ ├── MessageTransformations.java │ │ ├── OperationTransformationHelpers.java │ │ ├── OperationTransformations.java │ │ ├── ScenarioTransformationHelpers.java │ │ ├── ScenarioTransformations.java │ │ ├── TransformationChains.java │ │ └── TransformationHelpers.java │ │ ├── utils │ │ ├── CardinalityHelper.java │ │ ├── MAPLinkResolver.java │ │ ├── MDSLLogger.java │ │ ├── MDSLParser.java │ │ ├── MDSLSpecificationWrapper.java │ │ ├── MDSLStandaloneParserApplication.java │ │ ├── MDSLXtextParserWrapper.java │ │ └── URITemplateHelper.java │ │ └── validation │ │ ├── APIDescriptionValidator.java │ │ ├── AbstractMDSLValidator.java │ │ ├── BasicBindingValidator.java │ │ ├── ChannelContractValidator.java │ │ ├── DataTypeValidator.java │ │ ├── EndpointContractValidator.java │ │ ├── EventValidator.java │ │ ├── FlowValidator.java │ │ ├── HTTPBindingValidator.java │ │ ├── MAPDecoratorValidator.java │ │ ├── MessageEndpointValidator.java │ │ ├── OneWayChannelValidator.java │ │ ├── OperationValidator.java │ │ ├── RuntimeExpressionValidator.java │ │ └── ScenarioValidator.java ├── pom.xml ├── settings.gradle └── sketchminer.ftl └── examples ├── APILinterTestAndDemo.mdsl ├── AsyncAPIHelloWorldSample.mdsl ├── CustomerManagementExample.mdsl ├── HelloWorld.mdsl ├── HelloWorldMDSL.mdsl ├── HelloWorldMEPDemo.mdsl ├── HelloWorldWebsitePrimer.mdsl ├── MDSLGitPages ├── BindingsPage.mdsl ├── BindingsPageNoProvider.mdsl ├── CRMFromGitPages.mdsl ├── CRMServiceContract.mdsl ├── CSVTutorial.mdsl ├── CSVTutorialBonusMAPDecorators.mdsl ├── ExamplesPage.mdsl ├── HelloWorld.mdsl ├── ProviderSLAClientExample.mdsl └── Skeleton.mdsl ├── MinimalStory.mdsl ├── asyncMDSL ├── bindings.mdsl ├── data-types.mdsl ├── hello-world.mdsl ├── loan-broker-example-java-spring.png ├── loan-broker-example.mdsl ├── message-brokers.mdsl ├── message-endpoint.mdsl ├── readme.md └── sensor-example.mdsl ├── examples-advanced ├── AdvancedServiceContractConcepts1.mdsl ├── AdvancedServiceContractConcepts2.mdsl ├── CSVTutorial.proto ├── CustomerRelationshipManagementExample.mdsl ├── DataTypeModelingExamples.mdsl ├── HTTPBindingDemo.mdsl ├── HTTPBindingErrorReportAndSecurityPolicies.mdsl ├── HTTPBindingOptions.mdsl ├── HelloCRUDWorld.mdsl ├── HelloHypermediaWorld.mdsl ├── HelloMIMEWorld.mdsl ├── HelloWorldMDSL2AsyncMDSL.mdsl ├── LakesideMutual.mdsl ├── MAP-AllRoleDecorators.mdsl ├── MAPDecoratorUsageReference.mdsl ├── SampleDataAndServiceActivatorTest.mdsl ├── jaamsim-to-mdsl │ ├── README.md │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── mdsl │ │ │ │ └── generator │ │ │ │ └── jaamsim │ │ │ │ ├── JaamSimConfigurationWrapper.java │ │ │ │ └── JaamSimToMDSL.java │ │ └── resources │ │ │ └── MDSLTools-SkeletonOfAPIWithFlow.mdsl │ │ └── test │ │ ├── java │ │ └── io │ │ │ └── mdsl │ │ │ └── jaamsim │ │ │ ├── JaamSim2MDSLConversionTest.java │ │ │ └── JaamSim2MDSLFileGenerationTest.java │ │ └── resources │ │ ├── JaamSimPaper-jaamsim.cfg │ │ ├── JaamSimPaper-jaamsim.mdsl │ │ ├── flowtest1-jaamsim-expected.mdsl │ │ ├── flowtest1-jaamsim.cfg │ │ ├── flowtest1-jaamsim.mdsl │ │ ├── flowtest2-jaamsim-expected.mdsl │ │ ├── flowtest2-jaamsim.cfg │ │ ├── flowtest3a-jaamsim-expected.mdsl │ │ ├── flowtest3a-jaamsim.cfg │ │ ├── flowtest3a-jaamsim.mdsl │ │ ├── flowtest4aflow5-jaamsim-expected.mdsl │ │ ├── flowtest4aflow5-jaamsim.cfg │ │ ├── flowtest4alloptions-jaamsimflow1.cfg │ │ ├── flowtest4alloptions-jaamsimflow2.cfg │ │ ├── flowtest4alloptions-jaamsimflow3.cfg │ │ ├── flowtest4alloptions-jaamsimflow4.cfg │ │ ├── flowtest4alloptions-jaamsimflow5-expected.mdsl │ │ ├── flowtest4alloptions-jaamsimflow5.cfg │ │ ├── process-driven-SOAD-final-jaamsim-expected.mdsl │ │ └── process-driven-SOAD-final-jaamsim.cfg └── readme.md ├── freemarker-example ├── ALPSGeneratorDemo.mdsl ├── APIDescriptionReport.md.ftl ├── FreemarkerReportStub-Genmodel.md.ftl ├── FreemarkerReportStub-Grammar.md.ftl ├── FreemarkerWebDemo.html.ftl ├── MDSLEndpointTypeToALPS.yaml.ftl ├── ReferenceManagementAPI.mdsl └── src-gen │ └── my-output.md ├── graphql-example ├── apollo-client-example │ ├── .gitignore │ ├── package-lock.json │ ├── package.json │ ├── public │ │ └── index.html │ ├── readme.md │ └── src │ │ └── index.js ├── apollo-server-example │ ├── .gitignore │ ├── index.js │ ├── package-lock.json │ └── package.json ├── document-management-input.mdsl ├── document-management-output.graphql ├── readme.md └── spring-boot-example │ ├── .gitignore │ ├── README.md │ ├── build.gradle │ ├── codegen.yml │ ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── package.json │ ├── settings.gradle │ ├── src │ ├── main │ │ ├── java │ │ │ └── io │ │ │ │ └── mdsl │ │ │ │ └── graphql │ │ │ │ └── javaexampleapp │ │ │ │ ├── CustomScalars.java │ │ │ │ ├── GraphQLDataFetchers.java │ │ │ │ ├── GraphQLProvider.java │ │ │ │ ├── JavaExampleAppApplication.java │ │ │ │ └── generated │ │ │ │ ├── Resolvers.java │ │ │ │ └── Types.java │ │ └── resources │ │ │ ├── application.properties │ │ │ └── schema.graphql │ └── test │ │ └── java │ │ └── io │ │ └── mdsl │ │ └── graphql │ │ └── javaexampleapp │ │ └── JavaExampleAppApplicationTests.java │ └── yarn.lock ├── java-example ├── README.md ├── ReferenceManagementAPI.mdsl └── src-gen │ └── io │ └── mdsl │ └── generator │ └── example │ ├── services │ ├── PaperArchiveFacade.java │ ├── impl │ │ └── PaperArchiveFacadeImpl.java │ └── test │ │ └── PaperArchiveFacadeTest.java │ └── types │ ├── ConvertToMarkdownForWebsiteResponseDataType.java │ ├── CreatePaperItemParameter.java │ ├── LookupPapersFromAuthorRequestDataType.java │ ├── PaperItemDTO.java │ ├── PaperItemDTOList.java │ └── PaperItemKey.java ├── jolie-example ├── ReferenceManagementAPI.mdsl └── src-gen │ └── ReferenceManagementAPI.ol ├── open-api-example ├── ReferenceManagementAPI.mdsl └── src-gen │ └── ReferenceManagementAPI.yaml ├── protocol-buffers-example ├── ReferenceManagementAPI.mdsl ├── grpc-code-sample │ ├── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── settings.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── io │ │ │ └── mdsl │ │ │ └── samples │ │ │ └── grpc │ │ │ └── reference_management │ │ │ ├── ReferenceManagementClient.java │ │ │ └── ReferenceManagementServer.java │ │ └── proto │ │ └── ReferenceManagementAPI.proto └── src-gen │ └── ReferenceManagementAPI.proto ├── readme.md └── stories-and-flows ├── JobAndHiringScenario.mdsl └── ReferenceManagementDemoFlow.mdsl /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | **/target 4 | **/bin 5 | **/build 6 | **/out 7 | 8 | # Package Files # 9 | *.jar 10 | *.war 11 | *.nar 12 | *.ear 13 | *.zip 14 | *.tar.gz 15 | *.rar 16 | 17 | # Eclipse files 18 | *.project 19 | *.classpath 20 | **/.settings 21 | plugin.xml_gen 22 | 23 | # IntelliJ 24 | **/.idea 25 | 26 | # Gradle 27 | **/.gradle 28 | 29 | # Xtext generated sources 30 | **/src-gen 31 | **/src-test-gen 32 | **/xtend-gen 33 | **/model/generated/ 34 | 35 | # Misc 36 | **/SABA-VisualisierungenFinal 37 | 38 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | jdk: 4 | - openjdk11 5 | 6 | install: "/bin/true" 7 | 8 | jobs: 9 | include: 10 | - script: 11 | - cd dsl-core/ 12 | - xvfb-run mvn clean verify -B 13 | - script: 14 | - cd dsl-core/ 15 | - xvfb-run ./gradlew clean build 16 | 17 | cache: 18 | directories: 19 | - $HOME/.m2 -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-metadata 4 | .jekyll-cache 5 | *.gem 6 | .bundle 7 | vendor/bundle 8 | 9 | Gemfile.lock 10 | 11 | # IDEs 12 | .idea 13 | *.iml 14 | 15 | -------------------------------------------------------------------------------- /docs/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | # to use GitHub Pages 4 | gem "github-pages", group: :jekyll_plugins 5 | 6 | -------------------------------------------------------------------------------- /docs/HelloWorldWebsitePrimer.graphql: -------------------------------------------------------------------------------- 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 34 | -------------------------------------------------------------------------------- /docs/HelloWorldWebsitePrimer.proto: -------------------------------------------------------------------------------- 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 | 20 | -------------------------------------------------------------------------------- /docs/HelloWorldWebsitePrimerGeneratedIDLs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/HelloWorldWebsitePrimerGeneratedIDLs.zip -------------------------------------------------------------------------------- /docs/MAP-HexagonionAODLegend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/MAP-HexagonionAODLegend.png -------------------------------------------------------------------------------- /docs/UNIPI-AsyncMDSL-MasterThesis-2020-GiacomoDeLiberali-v1.3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/UNIPI-AsyncMDSL-MasterThesis-2020-GiacomoDeLiberali-v1.3.pdf -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-slate 2 | 3 | title: Microservice DSL (MDSL) 4 | description: A Domain-Specific Language (DSL) to specify (micro-)service contracts, their data representations and API endpoints. 5 | 6 | plugins: 7 | - "jekyll-github-metadata" 8 | -------------------------------------------------------------------------------- /docs/assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "jekyll-theme-slate"; 5 | -------------------------------------------------------------------------------- /docs/assets/images/bg_hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/assets/images/bg_hr.png -------------------------------------------------------------------------------- /docs/assets/images/blacktocat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/assets/images/blacktocat.png -------------------------------------------------------------------------------- /docs/assets/images/icon_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/assets/images/icon_download.png -------------------------------------------------------------------------------- /docs/assets/images/sprite_download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/assets/images/sprite_download.png -------------------------------------------------------------------------------- /docs/media/api-linter-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/api-linter-example.png -------------------------------------------------------------------------------- /docs/media/apollo-client-test-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/apollo-client-test-screenshot.png -------------------------------------------------------------------------------- /docs/media/apollo-server-test-mutation-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/apollo-server-test-mutation-screenshot.png -------------------------------------------------------------------------------- /docs/media/apollo-server-test-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/apollo-server-test-screenshot.png -------------------------------------------------------------------------------- /docs/media/code-generator-live-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/code-generator-live-demo.png -------------------------------------------------------------------------------- /docs/media/eclipse-asyncapi-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-asyncapi-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/eclipse-freemarker-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-freemarker-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/eclipse-freemarker-generator-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-freemarker-generator-dialog.png -------------------------------------------------------------------------------- /docs/media/eclipse-graphql-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-graphql-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/eclipse-java-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-java-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/eclipse-jolie-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-jolie-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/eclipse-oas-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-oas-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/eclipse-protocol-buffers-generator-context-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/eclipse-protocol-buffers-generator-context-menu.png -------------------------------------------------------------------------------- /docs/media/graphqleditor.com-faker-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/graphqleditor.com-faker-screenshot.png -------------------------------------------------------------------------------- /docs/media/graphqleditor.com-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/graphqleditor.com-screenshot.png -------------------------------------------------------------------------------- /docs/media/java-generator-running-unit-tests-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/java-generator-running-unit-tests-screenshot.png -------------------------------------------------------------------------------- /docs/media/java-generator-types-package-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/java-generator-types-package-screenshot.png -------------------------------------------------------------------------------- /docs/media/mdsl-generator-model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/mdsl-generator-model.png -------------------------------------------------------------------------------- /docs/media/spring-boot-test-with-postman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/media/spring-boot-test-with-postman.png -------------------------------------------------------------------------------- /docs/script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | gem install bundler 6 | bundle install 7 | -------------------------------------------------------------------------------- /docs/script/cibuild: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | bundle exec jekyll build 6 | bundle exec htmlproofer ./_site --check-html --check-sri 7 | bundle exec rubocop -D 8 | bundle exec script/validate-html 9 | gem build jekyll-theme-slate.gemspec 10 | -------------------------------------------------------------------------------- /docs/script/release: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Tag and push a release. 3 | 4 | set -e 5 | 6 | # Make sure we're in the project root. 7 | 8 | cd $(dirname "$0")/.. 9 | 10 | # Make sure the darn thing works 11 | 12 | bundle update 13 | 14 | # Build a new gem archive. 15 | 16 | rm -rf jekyll-theme-slate-*.gem 17 | gem build -q jekyll-theme-slate.gemspec 18 | 19 | # Make sure we're on the master branch. 20 | 21 | (git branch | grep -q 'master') || { 22 | echo "Only release from the master branch." 23 | exit 1 24 | } 25 | 26 | # Figure out what version we're releasing. 27 | 28 | tag=v`ls jekyll-theme-slate-*.gem | sed 's/^jekyll-theme-slate-\(.*\)\.gem$/\1/'` 29 | 30 | # Make sure we haven't released this version before. 31 | 32 | git fetch -t origin 33 | 34 | (git tag -l | grep -q "$tag") && { 35 | echo "Whoops, there's already a '${tag}' tag." 36 | exit 1 37 | } 38 | 39 | # Tag it and bag it. 40 | 41 | gem push jekyll-theme-slate-*.gem && git tag "$tag" && 42 | git push origin master && git push origin "$tag" 43 | -------------------------------------------------------------------------------- /docs/script/validate-html: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | require 'w3c_validators' 5 | 6 | def validator(file) 7 | extension = File.extname(file) 8 | if extension == '.html' 9 | W3CValidators::NuValidator.new 10 | elsif extension == '.css' 11 | W3CValidators::CSSValidator.new 12 | end 13 | end 14 | 15 | def validate(file) 16 | puts "Checking #{file}..." 17 | 18 | path = File.expand_path "../_site/#{file}", __dir__ 19 | results = validator(file).validate_file(path) 20 | 21 | return puts 'Valid!' if results.errors.empty? 22 | 23 | results.errors.each { |err| puts err.to_s } 24 | exit 1 25 | end 26 | 27 | validate 'index.html' 28 | validate File.join 'assets', 'css', 'style.css' 29 | -------------------------------------------------------------------------------- /docs/updates/README.md: -------------------------------------------------------------------------------- 1 | # MDSL Eclipse Update Site 2 | 3 | This is an Eclipse update site for the MDSL Eclipse plugin. Use this URL to install the MDSL plugin in your Eclipse installation (e.g., Eclipse 06-2024, installed from .zip from Eclipse.org): 4 | 5 | [https://microservice-api-patterns.github.io/MDSL-Specification/updates/](https://microservice-api-patterns.github.io/MDSL-Specification/updates/) 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/updates/artifacts.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/artifacts.jar -------------------------------------------------------------------------------- /docs/updates/artifacts.xml.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/artifacts.xml.xz -------------------------------------------------------------------------------- /docs/updates/content.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/content.jar -------------------------------------------------------------------------------- /docs/updates/content.xml.xz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/content.xml.xz -------------------------------------------------------------------------------- /docs/updates/features/io.mdsl.feature.source_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/features/io.mdsl.feature.source_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/features/io.mdsl.feature_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/features/io.mdsl.feature_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/p2.index: -------------------------------------------------------------------------------- 1 | #Tue Sep 03 12:32:38 CEST 2024 2 | artifact.repository.factory.order=artifacts.xml.xz,artifacts.xml,\! 3 | metadata.repository.factory.order=content.xml.xz,content.xml,\! 4 | version=1 5 | -------------------------------------------------------------------------------- /docs/updates/plugins/io.mdsl.ide.source_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/plugins/io.mdsl.ide.source_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/plugins/io.mdsl.ide_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/plugins/io.mdsl.ide_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/plugins/io.mdsl.source_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/plugins/io.mdsl.source_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/plugins/io.mdsl.ui.source_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/plugins/io.mdsl.ui.source_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/plugins/io.mdsl.ui_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/plugins/io.mdsl.ui_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /docs/updates/plugins/io.mdsl_6.0.0.202409031030.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/docs/updates/plugins/io.mdsl_6.0.0.202409031030.jar -------------------------------------------------------------------------------- /dsl-core/.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | /.recommenders/ 3 | -------------------------------------------------------------------------------- /dsl-core/gradle.properties: -------------------------------------------------------------------------------- 1 | commonsIOVersion=2.7 2 | commonsLangVersion=2.6 3 | protoBufGenVersion=1.2.0 4 | -------------------------------------------------------------------------------- /dsl-core/gradle/source-layout.gradle: -------------------------------------------------------------------------------- 1 | if (name.endsWith("-tests")) { 2 | sourceSets { 3 | main { 4 | java.srcDirs = [] 5 | resources.srcDirs = [] 6 | } 7 | test { 8 | java.srcDirs = ['src', 'src-gen', 'xtend-gen'] 9 | resources.srcDirs = ['src', 'src-gen'] 10 | xtend.outputDir = 'xtend-gen' 11 | } 12 | } 13 | } else { 14 | sourceSets { 15 | main { 16 | java.srcDirs = ['src', 'src-gen', 'xtend-gen'] 17 | resources.srcDirs = ['src', 'src-gen'] 18 | xtend.outputDir = 'xtend-gen' 19 | } 20 | test { 21 | java.srcDirs = [] 22 | resources.srcDirs = [] 23 | } 24 | } 25 | } 26 | 27 | sourceSets.all { 28 | resources.exclude '**/*.g', '**/*.mwe2', '**/*.xtend', '**/*._trace' 29 | } 30 | 31 | jar { 32 | from('model') { 33 | into('model') 34 | } 35 | manifest { 36 | attributes 'Bundle-SymbolicName': project.name 37 | } 38 | } 39 | 40 | plugins.withId('war') { 41 | webAppDirName = "WebRoot" 42 | } 43 | -------------------------------------------------------------------------------- /dsl-core/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/dsl-core/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /dsl-core/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.cli/gradle.properties: -------------------------------------------------------------------------------- 1 | commonsCliVersion=1.4 2 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.cli/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | io.mdsl 7 | io.mdsl.parent 8 | 6.0.0-SNAPSHOT 9 | 10 | io.mdsl.cli 11 | jar 12 | 13 | 14 | 15 | ${project.groupId} 16 | io.mdsl 17 | ${project.version} 18 | 19 | 20 | commons-cli 21 | commons-cli 22 | 1.4 23 | 24 | 25 | org.eclipse.xtext 26 | org.eclipse.xtext 27 | ${xtextVersion} 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.feature/build.properties: -------------------------------------------------------------------------------- 1 | bin.includes = feature.xml 2 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.feature/feature.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 11 | 17 | 23 | 24 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.feature/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | io.mdsl 6 | io.mdsl.parent 7 | 6.0.0-SNAPSHOT 8 | 9 | io.mdsl.feature 10 | eclipse-feature 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ide/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Automatic-Module-Name: io.mdsl.ide 3 | Bundle-ManifestVersion: 2 4 | Bundle-Name: io.mdsl.ide 5 | Bundle-Vendor: My Company 6 | Bundle-Version: 6.0.0.qualifier 7 | Bundle-SymbolicName: io.mdsl.ide; singleton:=true 8 | Bundle-ActivationPolicy: lazy 9 | Require-Bundle: io.mdsl, 10 | org.eclipse.xtext.ide, 11 | org.eclipse.xtext.xbase.ide, 12 | org.antlr.runtime;bundle-version="[3.2.0,3.2.1)" 13 | Bundle-RequiredExecutionEnvironment: JavaSE-17 14 | Export-Package: io.mdsl.ide.contentassist.antlr.internal, 15 | io.mdsl.ide.contentassist.antlr 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ide/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/ 6 | bin.excludes = **/*.xtend 7 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ide/src/io/mdsl/ide/APIDescriptionIdeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.35.0 3 | */ 4 | package io.mdsl.ide; 5 | 6 | 7 | /** 8 | * Use this class to register ide components. 9 | */ 10 | public class APIDescriptionIdeModule extends AbstractAPIDescriptionIdeModule { 11 | } 12 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ide/src/io/mdsl/ide/APIDescriptionIdeSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.35.0 3 | */ 4 | package io.mdsl.ide; 5 | 6 | import com.google.inject.Guice; 7 | import com.google.inject.Injector; 8 | import io.mdsl.APIDescriptionRuntimeModule; 9 | import io.mdsl.APIDescriptionStandaloneSetup; 10 | import org.eclipse.xtext.util.Modules2; 11 | 12 | /** 13 | * Initialization support for running Xtext languages as language servers. 14 | */ 15 | public class APIDescriptionIdeSetup extends APIDescriptionStandaloneSetup { 16 | 17 | @Override 18 | public Injector createInjector() { 19 | return Guice.createInjector(Modules2.mixin(new APIDescriptionRuntimeModule(), new APIDescriptionIdeModule())); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.repository/category.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.target/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | io.mdsl 6 | io.mdsl.parent 7 | 6.0.0-SNAPSHOT 8 | 9 | io.mdsl.target 10 | eclipse-target-definition 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/ 6 | bin.excludes = **/*.xtend 7 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | io.mdsl 6 | io.mdsl.parent 7 | 6.0.0-SNAPSHOT 8 | 9 | io.mdsl.tests 10 | eclipse-test-plugin 11 | 12 | 13 | 14 | 15 | org.eclipse.xtend 16 | xtend-maven-plugin 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/exporter/simple-generation-input-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 4 | 5 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/exporter/simple-generation-input-2.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType0 P 4 | data type TestType1 "nameOnly" 5 | data type TestType2 D 6 | data type TestType3 D 7 | data type TestType4 "aNumber": D 8 | 9 | data type VersionedType version "0.1" "uri": Link default is "http://localhost:8080" 10 | 11 | event type workTrigger 12 | command type work 13 | 14 | endpoint type TestEndpoint 15 | 16 | endpoint type S1RealizationEndpoint supports scenario S1 17 | exposes 18 | operation work expecting payload "in":ID delivering payload {"data":MD} 19 | 20 | API provider S1RealizationEndpointProvider offers S1RealizationEndpoint at endpoint location "http://localhost:8080" 21 | via protocol HTTP binding 22 | resource S1RealizationEndpointHome at "/s1RealizationEndpointHome" 23 | operation work to POST element "in" realized as BODY parameter 24 | 25 | flow S1Flow realizes S1 26 | event workTrigger triggers command work 27 | 28 | scenario S1 29 | a "user" wants to "work" 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest0a-hello-one-flow.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest0 2 | version "MDSL 5.4 (and up)" 3 | 4 | event type FlowInitiated, Event2 5 | command type FlowStep1, FlowStep2 6 | 7 | flow HelloWorldFlow0 8 | event FlowInitiated triggers command FlowStep1 9 | command FlowStep1 emits event Event2 10 | event Event2 triggers command FlowStep2 -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest0bc-hello-flow-world.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest0 2 | version "MDSL 5.4 (and up)" 3 | 4 | event type FlowInitiated, Event2 5 | command type FlowStep1, FlowStep2 6 | 7 | flow HelloWorldFlow0 8 | event FlowInitiated triggers command FlowStep1 9 | 10 | flow HelloWorldFlow1 11 | event FlowInitiated triggers command FlowStep1 12 | command FlowStep1 emits event Event2 13 | event Event2 triggers command FlowStep2 -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest1-sequence.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest1 2 | version "MDSL 5.4 (and up)" 3 | overview "See http://www.workflowpatterns.com/patterns/control/" 4 | 5 | event type FlowInitiated 6 | event type FlowStep1Completed, FlowStep2Completed 7 | event type FlowTerminated 8 | 9 | command type FlowStep1 10 | command type FlowStep2 11 | command type FlowStep3 12 | 13 | flow SequentialFlowStartingWithEvent type APPLICATION_FLOW 14 | 15 | event FlowInitiated triggers command FlowStep1 16 | command FlowStep1 emits event FlowStep1Completed 17 | event FlowStep1Completed triggers command FlowStep2 18 | command FlowStep2 emits event FlowStep2Completed 19 | event FlowStep2Completed triggers command FlowStep3 20 | command FlowStep3 emits event FlowTerminated 21 | 22 | flow SequentialFlowStartingWithCommand type INTEGRATION_FLOW 23 | 24 | command FlowStep1 emits event FlowStep1Completed 25 | event FlowStep1Completed triggers command FlowStep2 26 | command FlowStep2 emits event FlowStep2Completed 27 | event FlowStep2Completed triggers command FlowStep3 -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest4a-alloptionsmodel1_SampleFlowWithCisStepAnd-expected.sketch_miner: -------------------------------------------------------------------------------- 1 | /// TODO provide generation statistics (source file name, time) 2 | SampleFlowWithCisStepAnd: 3 | 4 | (FlowInitiated) 5 | SampleFlowWithCisStepAnd: user StartFlowCommand 6 | (Event1) 7 | SampleFlowWithCisStepAnd: user Command1|user Command3|user Command2 8 | ... 9 | 10 | ... 11 | SampleFlowWithCisStepAnd: user Command1 12 | (Command1Done1) 13 | ... 14 | 15 | ... 16 | (Command1Done1)|(Command2Done)|(Command3Done) 17 | SampleFlowWithCisStepAnd: user TerminateFlowCommand 18 | (FlowTerminated) 19 | 20 | ... 21 | SampleFlowWithCisStepAnd: user Command2 22 | (Command2Done) 23 | ... 24 | 25 | ... 26 | SampleFlowWithCisStepAnd: user Command3 27 | (Command3Done) 28 | ... 29 | 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest4a-alloptionsmodel1_SampleFlowWithCisStepOr-expected.sketch_miner: -------------------------------------------------------------------------------- 1 | /// TODO provide generation statistics (source file name, time) 2 | SampleFlowWithCisStepOr: 3 | 4 | (FlowInitiated) 5 | SampleFlowWithCisStepOr: user StartFlowCommand 6 | (Event1) 7 | SampleFlowWithCisStepOr: user Command1 8 | (Command1Done1) 9 | ... 10 | 11 | ... 12 | (Command1Done1)|(Command2Done)|(Command3Done) 13 | SampleFlowWithCisStepOr: user TerminateFlowCommand 14 | (FlowTerminated) 15 | 16 | (FlowInitiated) 17 | SampleFlowWithCisStepOr: user StartFlowCommand 18 | (Event1) 19 | SampleFlowWithCisStepOr: user Command2 20 | (Command2Done) 21 | ... 22 | 23 | (FlowInitiated) 24 | SampleFlowWithCisStepOr: user StartFlowCommand 25 | (Event1) 26 | SampleFlowWithCisStepOr: user Command3 27 | (Command3Done) 28 | ... 29 | 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest4a-alloptionsmodel1_SampleFlowWithDepStepAnd-expected.sketch_miner: -------------------------------------------------------------------------------- 1 | /// TODO provide generation statistics (source file name, time) 2 | SampleFlowWithDepStepAnd: 3 | 4 | (FlowInitiated) 5 | SampleFlowWithDepStepAnd: user StartFlowCommand 6 | (Event1)|(Event3)|(Event2) 7 | ... 8 | 9 | ... 10 | (Event1) 11 | SampleFlowWithDepStepAnd: user Command1 12 | (FlowTerminated) 13 | 14 | ... 15 | (Event2) 16 | SampleFlowWithDepStepAnd: user Command2 17 | (FlowTerminated) 18 | 19 | ... 20 | (Event3) 21 | SampleFlowWithDepStepAnd: user Command3 22 | (FlowTerminated) 23 | 24 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest4a-alloptionsmodel1_SampleFlowWithDepStepOr-expected.sketch_miner: -------------------------------------------------------------------------------- 1 | /// TODO provide generation statistics (source file name, time) 2 | SampleFlowWithDepStepOr: 3 | 4 | (FlowInitiated) 5 | SampleFlowWithDepStepOr: user StartFlowCommand 6 | (Event1) 7 | SampleFlowWithDepStepOr: user Command1 8 | (FlowTerminated) 9 | 10 | (FlowInitiated) 11 | SampleFlowWithDepStepOr: user StartFlowCommand 12 | (Event2) 13 | SampleFlowWithDepStepOr: user Command2 14 | (FlowTerminated) 15 | 16 | (FlowInitiated) 17 | SampleFlowWithDepStepOr: user StartFlowCommand 18 | (Event3) 19 | SampleFlowWithDepStepOr: user Command3 20 | (FlowTerminated) 21 | 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest5b-simpleloop1.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest5b 2 | 3 | event type FlowInitiated 4 | event type Event0, Event1, Event2 5 | event type FlowTerminated 6 | 7 | command type StartFlowCommand 8 | command type Command1, Command2, Command3 9 | command type StopFlowCommand 10 | 11 | flow SampleFlowWithLoop 12 | event Event0 triggers command Command1 emits event Event1 13 | event Event1 triggers command Command2 or Command3 14 | command Command2 emits event Event1 15 | command Command3 emits event FlowTerminated 16 | 17 | flow SampleFlowWithLoopInCisStep 18 | event Event0 triggers command Command1 emits event Event1 19 | event Event1 triggers command Command2 emits event Event2 20 | event Event2 triggers command Command1 o StopFlowCommand 21 | 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest5b-simpleloops.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest5b 2 | 3 | event type FlowInitiated 4 | event type Event0, Event1, Event2 5 | event type FlowTerminated 6 | 7 | command type StartFlowCommand 8 | command type Command1, Command2, Command3 9 | command type StopFlowCommand 10 | command type Event1Processor 11 | 12 | flow SampleFlowWithLoop 13 | event Event0 triggers command Command1 emits event Event1 14 | event Event1 triggers command Command2 or Command3 15 | command Command2 emits event Event1 16 | command Command3 emits event FlowTerminated 17 | 18 | /* 19 | flow SampleFlowWithLoop2 20 | event Event0 triggers command Command1 21 | command Command1 emits event Event1 22 | event Event1 triggers command Command1 xor StopFlowCommand 23 | */ 24 | 25 | flow SampleFlowWithLoopInCisStep 26 | event Event0 triggers command Command1 emits event Event1 27 | event Event1 triggers command Command2 emits event Event2 28 | event Event2 triggers command Command1 xor StopFlowCommand -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest6a-combinedsteps-and-alloperators.mdsl: -------------------------------------------------------------------------------- 1 | API description TestCombinedStepsAndAllOptionsBrief 2 | 3 | event type e1, e2, e3, e4, e5 4 | command type c0, c1, c2, c3, c4, c5 5 | 6 | flow TestFlowWithCombinedSteps 7 | command c0 emits event e1 or e3 8 | event e1 triggers command c1 emits event e2 9 | event e2 + e3 triggers command c2 emits event e4 or e5 10 | // event e2 + e3 triggers command c3 and c4 emits event e4 or e5 // not supported (in genmodel) 11 | 12 | flow TestFlowUsingAllOperators 13 | event e1 triggers command c1 or c2 14 | command c1 emits event e2 and e3 15 | command c2 emits event e4 or e5 16 | event e3 and e4 triggers command c3 17 | command c3 emits event e4 x e5 -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest6b-incomplete-and-overlapping.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest6b 2 | 3 | event type FlowInitiated 4 | event type Event1, Event2, Command1Done, Command2Done 5 | event type FlowTerminated 6 | 7 | command type StartFlowCommand 8 | command type Command1Command, Command2Command, JoinCommand 9 | command type TerminateCommand, CleanupCommand 10 | 11 | flow SampleFlowIncompleteAndOverlapping type APPLICATION_FLOW 12 | event FlowInitiated triggers command StartFlowCommand 13 | command StartFlowCommand emits event Event1 + Event2 14 | command Command1Command emits event Event1 o Event2 15 | command Command2Command emits event Event1 x Event2 16 | event Event1 triggers command Command1Command + Command2Command 17 | event Event2 triggers command Command1Command o Command2Command 18 | event Event2 triggers command Command1Command x Command2Command 19 | event Command1Done + Command2Done triggers command JoinCommand 20 | event Event1 + Event2 + FlowTerminated triggers command TerminateCommand + CleanupCommand 21 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/flowtest8-eceswithcommandstartstop.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowTest8b 2 | 3 | event type FlowInitiated 4 | event type Event1, Event2a, Event2, Event3a, Event3b 5 | event type Command1Done, Command2Done 6 | event type FlowTerminated 7 | event type TerminateCommandChoice1 8 | event type TerminateCommandChoice2 9 | 10 | command type StartFlowCommand 11 | command type Command1, Command2 12 | command type TerminateFlowCommand 13 | 14 | flow SampleFlowWithEceStepStartingAndEndingWithCommand 15 | command StartFlowCommand emits event Event1 16 | event Event1 triggers command Command1 emits event Event2 17 | event Event2 triggers command Command2 18 | command Command2 emits event Event3a + Event3b 19 | event Event3a + Event3b triggers command TerminateFlowCommand -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/flowgenmodel-tests/test-combinedsteps-and-alloperators.mdsl: -------------------------------------------------------------------------------- 1 | API description TestCombinedStepsAndAllOptionsBrief 2 | 3 | event type e1, e2, e3, e4, e5 4 | command type c0, c1, c2, c3, c4, c5 5 | 6 | flow TestFlowWithCombinedSteps 7 | command c0 emits event e1 or e3 8 | event e1 triggers command c1 9 | command c1 emits event e2 10 | event e2 + e3 triggers command c2 emits event e4 or e5 11 | // event e2 + e3 triggers command c3 and c4 emits event e4 or e5 // not supported (in genmodel) 12 | 13 | flow TestFlowUsingAllOperators 14 | event e1 triggers command c1 or c2 15 | command c1 emits event e2 and e3 16 | command c2 emits event e4 or e5 17 | event e3 and e4 triggers command c3 18 | command c3 emits event e4 x e5 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/freemarker-generation/sample-data-JSON.json.ftl: -------------------------------------------------------------------------------- 1 | { 2 | "l0": { 3 | "_sampleJSONForDataTypesIn": "${genModel.apiName}"<#list genModel.dataTypes as dtype>, 4 | "${dtype.name}": ${dtype.sampleJSON(0)} 5 | }, 6 | "l1": { 7 | "_sampleJSONForDataTypesIn": "${genModel.apiName}"<#list genModel.dataTypes as dtype>, 8 | "${dtype.name}": ${dtype.sampleJSON(1)} 9 | }, 10 | "l2": { 11 | "_sampleJSONForDataTypesIn": "${genModel.apiName}"<#list genModel.dataTypes as dtype>, 12 | "${dtype.name}": ${dtype.sampleJSON(2)} 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/freemarker-generation/simple-generation-input-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 4 | 5 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/freemarker-generation/simple-test-template.ftl: -------------------------------------------------------------------------------- 1 | ${serviceSpecification.name} specified in ${fileName} -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/freemarker-generation/simple-test-with-genmodel-template.ftl: -------------------------------------------------------------------------------- 1 | ${genModel.apiName} specified in ${fileName} 2 | 3 | endpoints: 4 | <#list genModel.endpoints as endpoint> 5 | ${endpoint.name} 6 | 7 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/endpoint-model-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestInput ("attr1":D, "attr2":D) 4 | data type TestOutput ("attr1":D, "attr2":D) 5 | 6 | endpoint type TestEndpoint 7 | exposes 8 | operation TestOperation 9 | expecting 10 | payload TestInput 11 | delivering 12 | payload TestOutput 13 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/java-binding-model-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestInput ("attr1":D, "attr2":D) 4 | data type TestOutput ("attr1":D, "attr2":D) 5 | 6 | endpoint type TestEndpoint 7 | exposes 8 | operation TestOperation 9 | expecting 10 | payload TestInput 11 | delivering 12 | payload TestOutput 13 | 14 | API provider TestProvider 15 | offers TestEndpoint 16 | at endpoint location "io.test" 17 | via protocol Java 18 | 19 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/java-binding-model-2.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestInput ("attr1":D, "attr2":D) 4 | data type TestOutput ("attr1":D, "attr2":D) 5 | 6 | endpoint type TestEndpoint 7 | exposes 8 | operation TestOperation 9 | expecting 10 | payload TestInput 11 | delivering 12 | payload TestOutput 13 | 14 | API provider TestProvider 15 | offers TestEndpoint 16 | at endpoint location "io.test" 17 | via protocol Java 18 | binding package "io.mdsl.test" 19 | operation TestOperation to "testOperationMethod" 20 | 21 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/parameter-forest-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType ["tree1":{"testAttribute1":D};"tree2":{"testAttribute2":D}] 5 | 6 | 7 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 8 | 9 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/parameter-list-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestParameterList ("attr1":D, "attr2":D) 4 | 5 | endpoint type TestEndpoint // at least one entpoint is required in MDSL 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/parameter-tree-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType {"testAttribute1":D, "testAttribute2":RefType, "testAttribute3":P, "list":("listAttribute1":D, "listAttribute2":D), "subTree":{"subTreeAttribute":D}} 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/provider-and-client-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestMDSLSpec 2 | 3 | endpoint type TestEndpoint 4 | 5 | API provider TestProvider 6 | offers TestEndpoint 7 | 8 | API client TestClient 9 | consumes TestEndpoint 10 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/provider-implementation-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestMDSLSpec 2 | 3 | endpoint type TestEndpoint 4 | 5 | API provider TestProvider 6 | offers TestEndpoint 7 | 8 | API client TestClient 9 | consumes TestEndpoint 10 | 11 | 12 | API provider implementation TestImpl 13 | realizes TestProvider in PlainJava 14 | as "TestImplClass" -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/generator-model/single-parameter-nodes-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestSingleParameterNodeType1 P // GenericParameter 4 | data type TestSingleParameterNodeType2 "name":D // AtomicParameter 5 | data type TestSingleParameterNodeType3 "ref":TestSingleParameterNodeType1 // TypeReference 6 | 7 | endpoint type TestEndpoint // at least one entpoint is required in MDSL 8 | 9 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-atomic-parameter-list-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType ( "attribute1":D, "attribute2":D ) 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-atomic-parameter-list-type_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | 4 | input TestTypeInput { 5 | attribute1: String! 6 | attribute2: String! 7 | } 8 | type TestTypeOutput { 9 | attribute1: String! 10 | attribute2: String! 11 | } 12 | 13 | 14 | 15 | 16 | # additional scalars for types in MDSL 17 | scalar Raw 18 | scalar VoidResponse 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-atomic-parameter-list-with-cards-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType ( "attribute1":D?, "attribute2":D*, "attribute3":D+, "attribute4":D! ) 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-atomic-parameter-list-with-cards-type_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | 4 | input TestTypeInput { 5 | attribute1: String 6 | attribute2: [String] 7 | attribute3: [String!]! 8 | attribute4: String! 9 | } 10 | type TestTypeOutput { 11 | attribute1: String 12 | attribute2: [String] 13 | attribute3: [String!]! 14 | attribute4: String! 15 | } 16 | 17 | 18 | 19 | 20 | # additional scalars for types in MDSL 21 | scalar Raw 22 | scalar VoidResponse 23 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-atomic-parameter-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType "attribute":D 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-atomic-parameter-type_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | 4 | input TestTypeInput { 5 | attribute: String! 6 | } 7 | type TestTypeOutput { 8 | attribute: String! 9 | } 10 | 11 | 12 | 13 | 14 | # additional scalars for types in MDSL 15 | scalar Raw 16 | scalar VoidResponse 17 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-p-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType P 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-p-type_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | scalar TestTypeInput # abstract, unspecified data type 4 | scalar TestTypeOutput # abstract, unspecified data type 5 | 6 | 7 | 8 | 9 | 10 | # additional scalars for types in MDSL 11 | scalar Raw 12 | scalar VoidResponse 13 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-forest-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType { "attribute1":D, "attribute2":D } 4 | data type RefType { "attribute1":D, "ref":TestType, "subObject":{ "attr1":D } } 5 | data type ForestType [{ "attribute1":D, "ref":TestType, "subObject":{ "attr1":D } }; { "yetAnotherTreeObject":D }] 6 | 7 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 8 | 9 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-tree-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType { "attribute1":D, "attribute2":D } 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-tree-type_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | 4 | input TestTypeInput { 5 | attribute1: String! 6 | attribute2: String! 7 | } 8 | type TestTypeOutput { 9 | attribute1: String! 10 | attribute2: String! 11 | } 12 | 13 | 14 | 15 | 16 | # additional scalars for types in MDSL 17 | scalar Raw 18 | scalar VoidResponse 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-tree-with-reference.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType { "attribute1":D, "attribute2":D } 4 | data type RefType { "attribute1":D, "ref":TestType } 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-tree-with-reference_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | 4 | input TestTypeInput { 5 | attribute1: String! 6 | attribute2: String! 7 | } 8 | input RefTypeInput { 9 | attribute1: Int! 10 | ref: TestTypeInput! 11 | } 12 | type TestTypeOutput { 13 | attribute1: String! 14 | attribute2: String! 15 | } 16 | type RefTypeOutput { 17 | attribute1: Int! 18 | ref: TestTypeOutput! 19 | } 20 | 21 | 22 | 23 | 24 | # additional scalars for types in MDSL 25 | scalar Raw 26 | scalar VoidResponse 27 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-tree-with-subtree.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType { "attribute1":D, "attribute2":D } 4 | data type RefType { "attribute1":D, "ref":TestType, "subObject":{ "attr1":D } } 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/datatype-test-parameter-tree-with-subtree_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | 4 | input SubObjectInput { 5 | attr1: String! 6 | } 7 | input TestTypeInput { 8 | attribute1: String! 9 | attribute2: String! 10 | } 11 | input RefTypeInput { 12 | attribute1: Int! 13 | ref: TestTypeInput! 14 | subObject: SubObjectInput! 15 | } 16 | type SubObjectOutput { 17 | attr1: String! 18 | } 19 | type TestTypeOutput { 20 | attribute1: String! 21 | attribute2: String! 22 | } 23 | type RefTypeOutput { 24 | attribute1: Int! 25 | ref: TestTypeOutput! 26 | subObject: SubObjectOutput! 27 | } 28 | 29 | 30 | 31 | 32 | # additional scalars for types in MDSL 33 | scalar Raw 34 | scalar VoidResponse 35 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/endpoint-test-mutation-with-input-types.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType P 4 | 5 | endpoint type TestEndpoint 6 | exposes 7 | operation getTestType 8 | with responsibility RETRIEVAL_OPERATION 9 | delivering payload TestType 10 | operation createTestType 11 | expecting payload TestType 12 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/endpoint-test-mutation-with-input-types_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | scalar TestTypeInput # abstract, unspecified data type 4 | scalar TestTypeOutput # abstract, unspecified data type 5 | 6 | 7 | type Query { 8 | getTestType: TestTypeOutput 9 | } 10 | 11 | type Mutation { 12 | createTestType( 13 | anonymousInput: TestTypeInput 14 | ): VoidResponse 15 | } 16 | 17 | schema { 18 | query: Query 19 | mutation: Mutation 20 | } 21 | 22 | # additional scalars for types in MDSL 23 | scalar Raw 24 | scalar VoidResponse 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/endpoint-test-query-with-return-type-only.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType P 4 | 5 | endpoint type TestEndpoint 6 | exposes operation getTestType 7 | with responsibility RETRIEVAL_OPERATION 8 | delivering payload TestType 9 | 10 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/endpoint-test-query-with-return-type-only_TestEndpoint.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint of TestAPI 2 | 3 | scalar TestTypeInput # abstract, unspecified data type 4 | scalar TestTypeOutput # abstract, unspecified data type 5 | 6 | 7 | type Query { 8 | getTestType: TestTypeOutput 9 | } 10 | 11 | 12 | schema { 13 | query: Query 14 | 15 | } 16 | 17 | # additional scalars for types in MDSL 18 | scalar Raw 19 | scalar VoidResponse 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/multiple-endpoints-test.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType P 4 | 5 | endpoint type TestEndpoint1 6 | endpoint type TestEndpoint2 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/multiple-endpoints-test_TestEndpoint1.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint1 of TestAPI 2 | 3 | scalar TestTypeInput # abstract, unspecified data type 4 | scalar TestTypeOutput # abstract, unspecified data type 5 | 6 | 7 | 8 | 9 | 10 | # additional scalars for types in MDSL 11 | scalar Raw 12 | scalar VoidResponse 13 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/graphql-generation/multiple-endpoints-test_TestEndpoint2.graphql: -------------------------------------------------------------------------------- 1 | # GraphQL generated for endpoint TestEndpoint2 of TestAPI 2 | 3 | scalar TestTypeInput # abstract, unspecified data type 4 | scalar TestTypeOutput # abstract, unspecified data type 5 | 6 | 7 | 8 | 9 | 10 | # additional scalars for types in MDSL 11 | scalar Raw 12 | scalar VoidResponse 13 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/java-generation/simple-generation-input-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 4 | 5 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-cardinalities-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType "testAttribute":D* 4 | data type TestType1 "testAttribute":TestType* 5 | data type TestType2 ("testAttribute1":D*, "testAttribute2":D+, "testAttribute3":D?, "testAttribute4":D!) 6 | 7 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 8 | exposes 9 | operation o1 expecting payload TestType delivering payload TestType1 10 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-cardinalities-2.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType {"testAttribute1":D, "testAttribute2":RefType, "testAttribute3":P, "list":("listAttribute1":D, "listAttribute2":D), "subTree":{"subTreeAttribute":D}*}* 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-cardinalities-3.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType ("testAttribute1":D, "testAttribute2":D*)* 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-cardinalities-3.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: TestAPI 4 | version: "1.0" 5 | servers: [] 6 | tags: 7 | - name: TestEndpoint 8 | externalDocs: 9 | description: TestEndpoint contract 10 | url: "" 11 | paths: 12 | /TestEndpoint: {} 13 | components: 14 | schemas: 15 | TestType: 16 | type: array 17 | items: 18 | type: object 19 | properties: 20 | testAttribute1: 21 | type: string 22 | description: Data Element 24 | testAttribute2: 25 | type: array 26 | description: Data Element 28 | items: 29 | type: string 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-cardinalities-4.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType {"testAttribute1":D, "testAttribute2":RefType, "testAttribute3":P, "list":("listAttribute1":D, "listAttribute2":D)*, "subTree":{"subTreeAttribute":D}*}* 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-p-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType P 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-p-type.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: TestAPI 4 | version: "1.0" 5 | servers: [] 6 | tags: 7 | - name: TestEndpoint 8 | externalDocs: 9 | description: TestEndpoint contract 10 | url: "" 11 | paths: 12 | /TestEndpoint: {} 13 | components: 14 | schemas: 15 | TestType: 16 | type: object 17 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-parameter-forrest-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType [{"testAttribute1":D, "testAttribute2":RefType, "testAttribute3":P, "list":("listAttribute1":D, "listAttribute2":D), "subTree":{"subTreeAttribute":D}};{"secondTreeAttribute":D}] 5 | 6 | 7 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 8 | 9 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-parameter-list-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType ("testAttribute1":D, "testAttribute2":D) 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-parameter-list-type.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: TestAPI 4 | version: "1.0" 5 | servers: [] 6 | tags: 7 | - name: TestEndpoint 8 | externalDocs: 9 | description: TestEndpoint contract 10 | url: "" 11 | paths: 12 | /TestEndpoint: {} 13 | components: 14 | schemas: 15 | TestType: 16 | type: object 17 | properties: 18 | testAttribute1: 19 | type: string 20 | description: Data Element 22 | testAttribute2: 23 | type: string 24 | description: Data Element 26 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-parameter-tree-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType {"testAttribute1":D, "testAttribute2":RefType, "testAttribute3":P, "list":("listAttribute1":D, "listAttribute2":D), "subTree":{"subTreeAttribute":D}} 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-single-parameter-type.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestType "testAttribute":D 4 | 5 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/datatype-test-single-parameter-type.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: TestAPI 4 | version: "1.0" 5 | servers: [] 6 | tags: 7 | - name: TestEndpoint 8 | externalDocs: 9 | description: TestEndpoint contract 10 | url: "" 11 | paths: 12 | /TestEndpoint: {} 13 | components: 14 | schemas: 15 | TestType: 16 | type: object 17 | properties: 18 | testAttribute: 19 | type: string 20 | description: Data Element 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-http-mapping-COOKIE-parameter-test-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test P 4 | 5 | endpoint type TestEndpoint 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation doSomethingJust4Test 9 | expecting 10 | payload ("attr1":D, "attr2":D) 11 | delivering 12 | payload Test 13 | 14 | API provider TestEndpointProvider 15 | offers TestEndpoint 16 | at endpoint location "/endpoint" 17 | via protocol HTTP binding resource Home operation doSomethingJust4Test to GET 18 | element "attr1" realized as COOKIE parameter 19 | // "attr2" not mapped, so query used as default (GET binding) 20 | 21 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-http-mapping-PATH-parameter-test-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test P 4 | 5 | endpoint type TestEndpoint 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation doSomethingJust4Test 9 | expecting 10 | payload ("attr1":D, "attr2":D) 11 | delivering 12 | payload Test 13 | 14 | API provider TestEndpointProvider 15 | offers TestEndpoint 16 | at endpoint location "https:8080//endpoint" 17 | via protocol HTTP binding resource Home at "/{attr1}" operation doSomethingJust4Test to GET 18 | element "attr1" realized as PATH parameter 19 | 20 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-http-mapping-PATH-parameter-test-2.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test P 4 | 5 | endpoint type TestEndpoint 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation doSomethingJust4Test 9 | expecting 10 | payload ("attr1":D, "attr2":D) 11 | delivering 12 | payload Test 13 | 14 | API provider TestEndpointProvider 15 | offers TestEndpoint 16 | at endpoint location "https:8080//endpoint" 17 | via protocol HTTP binding resource Home at "/{attr1}/{attr2}" operation doSomethingJust4Test to GET 18 | element "attr1" realized as PATH parameter 19 | element "attr2" realized as PATH parameter 20 | 21 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-http-mapping-PATH-parameter-test-3.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | // "toBeIgnored":MD and ParamType2 with other roles added in V5.4 4 | 5 | data type Test P 6 | data type ParamType {"attr1":D, "attr2":D, "toBeIgnored":MD} 7 | data type ParamType2 {"toBeIgnored":ID, "attr1":MD, "attr2":L} 8 | 9 | endpoint type TestEndpoint 10 | serves as INFORMATION_HOLDER_RESOURCE 11 | exposes 12 | operation doSomethingJust4Test 13 | expecting 14 | payload {"attr1":D, "attr2":D, "toBeIgnored":MD} // NYI: ParamType 15 | delivering 16 | payload ParamType2 17 | 18 | API provider TestEndpointProvider 19 | offers TestEndpoint 20 | at endpoint location "localhost://tbc" 21 | via protocol HTTP 22 | binding 23 | resource Home at "/{attr1}" 24 | operation doSomethingJust4Test to GET 25 | element "attr1" realized as PATH parameter 26 | // missing element binding for "attr2" could be warned about (defaults to QUERY) 27 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-parameters-test-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test ID // P 4 | 5 | endpoint type TestEndpoint 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation getTest 9 | expecting 10 | payload ("attr1":D, "attr2":D+) 11 | delivering 12 | payload Test 13 | 14 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-parameters-test-2.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test P 4 | data type VoidType MD 5 | 6 | endpoint type TestEndpoint 7 | serves as INFORMATION_HOLDER_RESOURCE 8 | exposes 9 | operation getTest 10 | expecting 11 | payload "attr1":D 12 | delivering 13 | payload Test 14 | 15 | endpoint type TestEndpoint2 16 | serves as PROCESSING_RESOURCE 17 | exposes 18 | operation testVoidSignature 19 | expecting 20 | payload "attr1":D 21 | delivering 22 | payload VoidType 23 | 24 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-duplicate-operations-error.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test P 4 | 5 | endpoint type TestEndpoint 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation createTest // both mapped to POST 9 | with responsibility "Creates new Test object" 10 | expecting 11 | payload Test 12 | delivering 13 | payload Test 14 | operation doSomethingWithTest // both mapped to POST 15 | with responsibility "Creates new Test object" 16 | expecting 17 | payload Test 18 | delivering 19 | payload Test 20 | 21 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-operation-test-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type Test P 4 | 5 | endpoint type TestEndpoint 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation createTest 9 | with responsibility "Creates new Test object" 10 | expecting 11 | payload Test 12 | 13 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-operation-test-1.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: TestAPI 4 | version: "1.0" 5 | servers: [] 6 | tags: 7 | - name: TestEndpoint 8 | externalDocs: 9 | description: TestEndpoint contract, Information Holder Resource role 10 | url: https://microservice-api-patterns.org/patterns/responsibility/endpointRoles/InformationHolderResource.html 11 | paths: 12 | /TestEndpoint: 13 | summary: general data-oriented endpoint 14 | post: 15 | tags: 16 | - TestEndpoint 17 | summary: createTest (Creates new Test object method) 18 | description: Creates new Test object 19 | operationId: createTest 20 | requestBody: 21 | content: 22 | application/json: 23 | schema: 24 | $ref: '#/components/schemas/Test' 25 | responses: 26 | "200": 27 | description: no return value 28 | content: {} 29 | components: 30 | schemas: 31 | Test: 32 | type: object 33 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-operation-test-2.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint 4 | serves as INFORMATION_HOLDER_RESOURCE 5 | exposes 6 | operation createTest 7 | with responsibility "Creates new Test object" 8 | expecting 9 | payload {"attr1":D} 10 | 11 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-operation-test-3.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | // data type Test P 4 | data type Test "longReturnCode": D // anonymous AP also works 5 | 6 | endpoint type TestEndpoint 7 | serves as INFORMATION_HOLDER_RESOURCE 8 | exposes 9 | operation createTest 10 | with responsibility "SomeOtherResponsibility" 11 | expecting 12 | payload {"booleanFlag":D} // "attr1" does not make it into OAS 13 | delivering 14 | payload Test 15 | 16 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-operation-test-4.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint 4 | serves as INFORMATION_HOLDER_RESOURCE 5 | exposes 6 | operation putTest with responsibility "Puts a new test object (inlined data)" 7 | expecting 8 | payload {"someText":D} 9 | delivering 10 | payload {"flag":D} 11 | 12 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/endpoint-test-operation-test-5.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestData1 "testData1": MD // no type, string is default 4 | data type TestData2 "idOnly" // name "idOnly" does not make it into generated OAS 5 | data type TestData3 P // genPs make it to response body but not to request parameter/body 6 | 7 | // this endpoint type features unusual but valid MEPs 8 | 9 | endpoint type TestEndpoint 10 | serves as INFORMATION_HOLDER_RESOURCE 11 | exposes 12 | operation postTest 13 | with responsibility "Creates new Test object" 14 | expecting 15 | payload "td1": TestData1 16 | // not delivering anything 17 | operation patchTest 18 | with responsibility "Updates a Test object partially" 19 | // not expecting anything 20 | delivering 21 | payload "td2": TestData2 22 | 23 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/simple-generation-input-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 4 | 5 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/openapi-generation/simple-generation-input-1.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | title: TestAPI 4 | version: "1.0" 5 | servers: [] 6 | tags: 7 | - name: TestEndpoint 8 | externalDocs: 9 | description: TestEndpoint contract 10 | url: "" 11 | paths: 12 | /TestEndpoint: {} 13 | components: 14 | schemas: {} 15 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/proto-generation/empty-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | endpoint type TestEndpoint // at least one entpoint is required in MDSL 4 | 5 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/proto-generation/parameter-forest-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType ["tree1":{"testAttribute1":D};"tree2":{"testAttribute2":D}] 5 | 6 | 7 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 8 | 9 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/proto-generation/parameter-list-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestParameterList ("attr1":D, "attr2":D) 4 | 5 | endpoint type TestEndpoint // at least one entpoint is required in MDSL 6 | 7 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/proto-generation/parameter-tree-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type RefType P 4 | data type TestType {"testAttribute1":D, "testAttribute2":RefType, "testAttribute3":P, "list":("listAttribute1":D, "listAttribute2":D), "subTree":{"subTreeAttribute":D}} 5 | 6 | endpoint type TestEndpoint // MDSL compiles only with at least one endpoint 7 | 8 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/proto-generation/service-model-1.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestInput ("attr1":D, "attr2":D) 4 | data type TestOutput ("attr1":D, "attr2":D) 5 | 6 | endpoint type TestEndpoint 7 | exposes 8 | operation TestOperation 9 | expecting 10 | payload TestInput 11 | delivering 12 | payload TestOutput 13 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/proto-generation/single-parameter-nodes-model.mdsl: -------------------------------------------------------------------------------- 1 | API description TestAPI 2 | 3 | data type TestSingleParameterNodeType1 P // GenericParameter 4 | data type TestSingleParameterNodeType2 "name":D // AtomicParameter 5 | data type TestSingleParameterNodeType3 "ref":TestSingleParameterNodeType1 // TypeReference 6 | 7 | endpoint type TestEndpoint // at least one entpoint is required in MDSL 8 | 9 | IPA -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/empty-endpoint.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | 3 | endpoint type TestEndpoint 4 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/endpoint-from-story-model.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | data type SampleBusinessObjectDTO {"sampleBusinessObject":D} 6 | 7 | endpoint type Sample_Scenario_1RealizationEndpoint supports scenario Sample_Scenario_1 8 | exposes 9 | operation doSomething expecting payload {"sampleData":D} delivering payload "doSomethingResponseBody":D 10 | 11 | scenario Sample_Scenario_1 12 | story Sample_Story_1 13 | a "SampleUser" wants to "doSomething" in "SampleData" -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/endpoint-receiving-event.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | event type SomethingHappened {"when":MD, "what":D} 6 | event type SomethingElseHappened P 7 | 8 | endpoint type EventReceivingEndpoint 9 | exposes 10 | operation doSomething 11 | expecting payload {"sampleData":D} 12 | delivering payload "doSomethingResponseBody":D 13 | emitting event SomethingElseHappened 14 | receives event SomethingHappened -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/endpoint-with-operations-and-event.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | data type SampleBusinessObjectDTO "sampleBusinessObjectKeyValueMap":{"key":ID , "sampleBusinessObject":D} 6 | data type Sample_Scenario_1RealizationEndpointDTO "sample_Scenario_1RealizationEndpoint":D 7 | event type SampleEvent {"when", "what"} 8 | 9 | endpoint type Sample_Scenario_1RealizationEndpoint // supports scenario Sample_Scenario_1 10 | serves as PROCESSING_RESOURCE 11 | exposes 12 | operation doSomething expecting payload {"sampleData":D , "requestedPageSize":MD , <> "desiredElements":MD*} delivering payload <> "doSomethingResponseBodyWrapper":{"doSomethingResponseBody":D , "pageSize":MD , "self":L , "nextCursor":L} 13 | receives event SampleEvent 14 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/flow-from-story-model.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | event type doSomethingSampleDataTrigger 6 | event type CRUDSampleBusinessObjectTrigger 7 | command type doSomethingSampleData 8 | command type CRUDSampleBusinessObject 9 | 10 | flow Sample_Scenario_1Flow realizes Sample_Scenario_1 11 | event doSomethingSampleDataTrigger triggers command doSomethingSampleData 12 | command doSomethingSampleData emits event CRUDSampleBusinessObjectTrigger 13 | event CRUDSampleBusinessObjectTrigger triggers command CRUDSampleBusinessObject 14 | 15 | scenario Sample_Scenario_1 16 | story Sample_Story_1 17 | a "SampleUser" wants to "doSomething" in "SampleData" 18 | a "AnotherUser" wants to CRUD "SampleBusinessObject" -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/flow-with-branches.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | event type doSomethingSampleDataTrigger 6 | event type CRUDSampleBusinessObjectTrigger, anotherEvent 7 | command type doSomethingSampleData, doMore 8 | command type CRUDSampleBusinessObject 9 | 10 | flow Sample_Scenario_1Flow realizes Sample_Scenario_1 11 | event doSomethingSampleDataTrigger triggers command doSomethingSampleData and doMore 12 | command doSomethingSampleData emits event CRUDSampleBusinessObjectTrigger or anotherEvent 13 | event CRUDSampleBusinessObjectTrigger triggers command CRUDSampleBusinessObject 14 | 15 | scenario Sample_Scenario_1 16 | story Sample_Story_1 17 | a "SampleUser" wants to "doSomething" in "SampleData" 18 | a "AnotherUser" wants to CRUD "SampleBusinessObject" -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/flow-with-dep-step-variations.mdsl: -------------------------------------------------------------------------------- 1 | API description FlowMergeTest 2 | 3 | event type e1, e2, e3, e4 4 | command type c1, c2 5 | 6 | flow TestFlow1 7 | command c1 emits event e1 8 | command c2 emits event e2 9 | command c1 emits event e3 x e1 10 | command c1 emits event e4 11 | event e3 triggers command c1 12 | 13 | flow TestFlow2 14 | event e3 triggers command c1 15 | command c1 emits event e1 16 | command c2 emits event e2 17 | command c1 emits event e3 x e1 18 | command c1 emits event e1 19 | event e3 triggers command c1 20 | 21 | 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/map-all-role-decorators.mdsl: -------------------------------------------------------------------------------- 1 | API description MAPRoleDecoratorTest 2 | 3 | data type ProductCatalog {"id":D, "product", D*} 4 | 5 | endpoint type Endpoint1a serves as PROCESSING_RESOURCE 6 | 7 | endpoint type Endpoint1b serves as STATEFUL_PROCESSING_RESOURCE 8 | 9 | endpoint type Endpoint1c serves as STATELESS_PROCESSING_RESOURCE 10 | 11 | endpoint type Endpoint2a serves as INFORMATION_HOLDER_RESOURCE and MUTABLE_COLLECTION_RESOURCE 12 | 13 | endpoint type Endpoint2b serves as MASTER_DATA_HOLDER // OHD, RDH do the same at present 14 | 15 | endpoint type Endpoint3 serves as DATA_TRANSFER_RESOURCE 16 | 17 | endpoint type Endpoint4 serves as LINK_LOOKUP_RESOURCE 18 | 19 | endpoint type Endpoint5a serves as VALIDATION_RESOURCE 20 | 21 | endpoint type Endpoint5b serves as TRANSFORMATION_RESOURCE 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/single-story-model.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | scenario Sample_Scenario_1 6 | story Sample_Story_1 7 | a "SampleUser" wants to "doSomething" in "SampleData" 8 | a "AnotherUser" wants to CRUD "SampleBusinessObject" -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/story-and-flow-model.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | event type doSomethingSampleDataTrigger 5 | event type CRUDSampleBusinessObjectTrigger 6 | command type doSomethingSampleData 7 | command type CRUDSampleBusinessObject 8 | 9 | flow Sample_Scenario_1Flow realizes Sample_Scenario_1 10 | event doSomethingSampleDataTrigger triggers command doSomethingSampleData 11 | event CRUDSampleBusinessObjectTrigger triggers command CRUDSampleBusinessObject 12 | 13 | scenario Sample_Scenario_1 14 | story Sample_Story_1 15 | a "SampleUser" wants to "doSomething" in "SampleData" 16 | a "AnotherUser" wants to CRUD "SampleBusinessObject" -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/test-combinedsteps-and-alloperators.mdsl: -------------------------------------------------------------------------------- 1 | API description TestCombinedStepsAndAllOptionsBrief 2 | 3 | event type e1, e2, e3, e4, e5 4 | command type c0, c1, c2, c3, c4, c5 5 | 6 | flow TestFlowWithCombinedSteps 7 | command c0 emits event e1 or e3 8 | event e1 triggers command c1 9 | command c1 emits event e2 10 | event e2 + e3 triggers command c2 emits event e4 or e5 11 | // event e2 + e3 triggers command c3 and c4 emits event e4 or e5 // not supported (in genmodel) 12 | 13 | flow TestFlowUsingAllOperators 14 | event e1 triggers command c1 or c2 15 | command c1 emits event e2 and e3 16 | command c2 emits event e4 or e5 17 | event e3 and e4 triggers command c3 18 | command c3 emits event e4 x e5 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/test-extract-information-holder.mdsl: -------------------------------------------------------------------------------- 1 | API description TestExtractAndInlineInformationHolder 2 | 3 | data type SampleEntityDTO "dto": {"d1":D, "d2":{ID, MD}} 4 | 5 | endpoint type TestEndpointWithEmbeddedEntities 6 | exposes 7 | operation testExtractInformationHolderSPN 8 | expecting payload {"p1":D, <> "data": SampleEntityDTO} 9 | delivering payload {"p1":D, <> "data": SampleEntityDTO} 10 | 11 | operation testExtractInformationHolderPT 12 | expecting payload {"p1":D, <> "data": SampleEntityDTO} 13 | delivering payload {"p1":D, <> "dto": {"d1":D, "d2":{ID, MD}}} 14 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/test-split-operation.mdsl: -------------------------------------------------------------------------------- 1 | API description MoveOperationTest 2 | 3 | data type SampleEntityDTO {"sampleEntity":D} 4 | 5 | endpoint type SourceEndpoint 6 | exposes 7 | operation operationToSplit 8 | expecting payload {"task1":D, "task2":{"innerPT1":D, "innerPT2"}, "task3": SampleEntityDTO, "task4":P} 9 | delivering payload "sameResult":SampleEntityDTO // not touched by refactoring 10 | 11 | endpoint type SourceEndpointSaved 12 | exposes 13 | operation operationToSplit 14 | expecting payload {"task1":D, "task2":{"innerPT1":D, "innerPT2"}, "task3": SampleEntityDTO, "task4":P} 15 | delivering payload "sameResult":SampleEntityDTO // not touched by refactoring -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/quickfix-transformations/two-endpoints-with-operation.mdsl: -------------------------------------------------------------------------------- 1 | API description QuickFixTransformationTestAPI 2 | version "Since version 5.4.2" 3 | overview "Testing the SOAD transformations and API refactorings" 4 | 5 | data type SampleBusinessObjectDTO "sampleBusinessObjectKeyValueMap":{"key":ID , "sampleBusinessObject":D} 6 | data type Sample_Scenario_1RealizationEndpointDTO "sample_Scenario_1RealizationEndpoint":D 7 | 8 | endpoint type SourceEndpoint 9 | exposes 10 | operation doSomething expecting payload {"sampleData":D , "requestedPageSize":MD , <> "desiredElements":MD*} delivering payload <> "doSomethingResponseBodyWrapper":{"doSomethingResponseBody":D , "pageSize":MD , "self":L , "nextCursor":L} 11 | 12 | endpoint type TargetEndpoint -------------------------------------------------------------------------------- /dsl-core/io.mdsl.tests/test-data/standalone/hello-world.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAPI 2 | 3 | endpoint type HelloWorldEndpoint 4 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui.tests/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Automatic-Module-Name: io.mdsl.ui.tests 3 | Bundle-ManifestVersion: 2 4 | Bundle-Name: io.mdsl.ui.tests 5 | Bundle-Vendor: MDSL Project 6 | Bundle-Version: 6.0.0.qualifier 7 | Bundle-SymbolicName: io.mdsl.ui.tests; singleton:=true 8 | Bundle-ActivationPolicy: lazy 9 | Require-Bundle: io.mdsl.ui, 10 | org.junit.jupiter.api;bundle-version="[5.0.0,6.0.0)", 11 | org.eclipse.xtext.testing, 12 | org.eclipse.xtext.xbase.testing, 13 | org.eclipse.xtext.xbase.junit, 14 | org.eclipse.core.runtime, 15 | org.eclipse.xtext.ui.testing, 16 | org.eclipse.ui.workbench;resolution:=optional, 17 | org.eclipse.xtext.xbase.ui.testing 18 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 19 | Export-Package: io.mdsl.ui.tests;x-internal=true 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui.tests/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/ 6 | bin.excludes = **/*.xtend 7 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui.tests/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | io.mdsl 6 | io.mdsl.parent 7 | 6.0.0-SNAPSHOT 8 | 9 | io.mdsl.ui.tests 10 | eclipse-test-plugin 11 | 12 | 13 | 14 | 15 | org.eclipse.xtend 16 | xtend-maven-plugin 17 | 18 | 19 | org.eclipse.tycho 20 | tycho-surefire-plugin 21 | 22 | true 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Automatic-Module-Name: io.mdsl.ui 3 | Bundle-ManifestVersion: 2 4 | Bundle-Name: io.mdsl.ui 5 | Bundle-Vendor: My Company 6 | Bundle-Version: 6.0.0.qualifier 7 | Bundle-SymbolicName: io.mdsl.ui; singleton:=true 8 | Bundle-ActivationPolicy: lazy 9 | Require-Bundle: io.mdsl, 10 | io.mdsl.ide, 11 | org.eclipse.xtext.ui, 12 | org.eclipse.xtext.ui.shared, 13 | org.eclipse.xtext.ui.codetemplates.ui, 14 | org.eclipse.ui.editors;bundle-version="3.14.300", 15 | org.eclipse.ui.ide;bundle-version="3.18.500", 16 | org.eclipse.ui, 17 | org.eclipse.compare, 18 | org.eclipse.xtext.builder, 19 | io.github.microservice-api-patterns.protobufgen, 20 | com.google.guava 21 | Import-Package: org.apache.log4j 22 | Bundle-RequiredExecutionEnvironment: JavaSE-17 23 | Export-Package: io.mdsl.ui.quickfix, 24 | io.mdsl.ui.contentassist, 25 | io.mdsl.ui.internal 26 | Bundle-Activator: io.mdsl.ui.internal.MdslActivator 27 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = .,\ 5 | META-INF/,\ 6 | plugin.xml 7 | bin.excludes = **/*.xtend 8 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | io.mdsl 6 | io.mdsl.parent 7 | 6.0.0-SNAPSHOT 8 | 9 | io.mdsl.ui 10 | eclipse-plugin 11 | 12 | 13 | 14 | 15 | org.eclipse.xtend 16 | xtend-maven-plugin 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/APIDescriptionUiModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.35.0 3 | */ 4 | package io.mdsl.ui; 5 | 6 | import org.eclipse.ui.plugin.AbstractUIPlugin; 7 | 8 | /** 9 | * Use this class to register components to be used within the Eclipse IDE. 10 | */ 11 | public class APIDescriptionUiModule extends AbstractAPIDescriptionUiModule { 12 | 13 | public APIDescriptionUiModule(AbstractUIPlugin plugin) { 14 | super(plugin); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/contentassist/APIDescriptionProposalProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.20.0 3 | */ 4 | package io.mdsl.ui.contentassist; 5 | 6 | /** 7 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#content-assist 8 | * on how to customize the content assistant. 9 | */ 10 | public class APIDescriptionProposalProvider extends AbstractAPIDescriptionProposalProvider { 11 | } 12 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/editor/MDSLEditor.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.editor; 2 | 3 | import org.eclipse.jface.action.IMenuManager; 4 | import org.eclipse.ui.actions.ActionContext; 5 | import org.eclipse.ui.actions.ActionGroup; 6 | import org.eclipse.xtext.ui.editor.XtextEditor; 7 | 8 | import io.mdsl.ui.actions.GeneratorsActionGroup; 9 | 10 | public class MDSLEditor extends XtextEditor { 11 | 12 | private ActionGroup generatorsGroup; 13 | 14 | @Override 15 | protected void createActions() { 16 | super.createActions(); 17 | 18 | generatorsGroup = new GeneratorsActionGroup(this); 19 | } 20 | 21 | @Override 22 | protected void editorContextMenuAboutToShow(IMenuManager menu) { 23 | super.editorContextMenuAboutToShow(menu); 24 | 25 | ActionContext context = new ActionContext(getSelectionProvider().getSelection()); 26 | generatorsGroup.setContext(context); 27 | generatorsGroup.fillContextMenu(menu); 28 | generatorsGroup.setContext(null); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/editor/MDSLQuickMenuCreator.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.editor; 2 | 3 | import org.eclipse.core.commands.AbstractHandler; 4 | import org.eclipse.core.commands.ExecutionEvent; 5 | import org.eclipse.core.commands.ExecutionException; 6 | import org.eclipse.core.commands.IHandler; 7 | import org.eclipse.ui.actions.QuickMenuCreator; 8 | 9 | public abstract class MDSLQuickMenuCreator extends QuickMenuCreator { 10 | 11 | public IHandler createHandler() { 12 | return new AbstractHandler() { 13 | @Override 14 | public Object execute(ExecutionEvent event) throws ExecutionException { 15 | createMenu(); 16 | return null; 17 | } 18 | }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/ALPSGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.ALPSGenerator; 8 | 9 | public class ALPSGenerationHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private ALPSGenerator generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/AsyncAPIGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.core.commands.ExecutionEvent; 4 | import org.eclipse.xtext.generator.IGenerator2; 5 | import com.google.inject.Inject; 6 | import io.mdsl.generator.asyncapi.AsyncApiGenerator; 7 | 8 | public class AsyncAPIGenerationHandler extends AbstractGenerationHandler { 9 | 10 | @Inject 11 | private AsyncApiGenerator generator; 12 | 13 | @Override 14 | protected IGenerator2 getGenerator() { 15 | return generator; 16 | } 17 | 18 | @Override 19 | protected void postGeneration(ExecutionEvent event) { 20 | 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/AsyncMDSLGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | import com.google.inject.Inject; 5 | import io.mdsl.generator.AsyncMDSLGenerator; 6 | 7 | public class AsyncMDSLGenerationHandler extends AbstractGenerationHandler { 8 | 9 | @Inject 10 | private AsyncMDSLGenerator generator; 11 | 12 | @Override 13 | protected IGenerator2 getGenerator() { 14 | return generator; 15 | } 16 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/GenModelJSONExporterHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.GenModelJSONExporter; 8 | 9 | public class GenModelJSONExporterHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private GenModelJSONExporter generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/GenModelYAMLExporterHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.GenModelYAMLExporter; 8 | 9 | public class GenModelYAMLExporterHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private GenModelYAMLExporter generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/GraphQLGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.GraphQLGenerator; 8 | 9 | public class GraphQLGenerationHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private GraphQLGenerator generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/JavaGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.JavaGenerator; 8 | 9 | public class JavaGenerationHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private JavaGenerator generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/JolieGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.JolieGenerator; 8 | 9 | public class JolieGenerationHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private JolieGenerator generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/QDARTransformationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | // TODO rename or remove/disable (also supported as Quick Fix) 8 | import io.mdsl.ui.handler.refactoring.MoveOperationRefactoring; 9 | 10 | public class QDARTransformationHandler extends AbstractGenerationHandler { 11 | 12 | @Inject 13 | private MoveOperationRefactoring generator; 14 | 15 | @Override 16 | protected IGenerator2 getGenerator() { 17 | return generator; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/SketchMinerGenerationHandler.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler; 2 | 3 | import org.eclipse.xtext.generator.IGenerator2; 4 | 5 | import com.google.inject.Inject; 6 | 7 | import io.mdsl.generator.SketchMinerGenerator; 8 | 9 | public class SketchMinerGenerationHandler extends AbstractGenerationHandler { 10 | 11 | @Inject 12 | private SketchMinerGenerator generator; 13 | 14 | @Override 15 | protected IGenerator2 getGenerator() { 16 | return generator; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/wizard/TextFileGenerationWizardContext.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler.wizard; 2 | 3 | import org.eclipse.core.resources.IFile; 4 | 5 | /** 6 | * Input data for text file generation (Freemarker generator). 7 | */ 8 | public class TextFileGenerationWizardContext { 9 | 10 | private IFile freemarkerTemplateFile; 11 | private String targetFileName; 12 | 13 | public void setFreemarkerTemplateFile(IFile freemarkerTemplateFile) { 14 | this.freemarkerTemplateFile = freemarkerTemplateFile; 15 | } 16 | 17 | public IFile getFreemarkerTemplateFile() { 18 | return freemarkerTemplateFile; 19 | } 20 | 21 | public void setTargetFileName(String targetFileName) { 22 | this.targetFileName = targetFileName; 23 | } 24 | 25 | public String getTargetFileName() { 26 | return targetFileName; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/wizard/components/FreemarkerFileChooser.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler.wizard.components; 2 | 3 | import org.eclipse.swt.widgets.Composite; 4 | 5 | /** 6 | * Component to choose a Freemarker template file. 7 | */ 8 | public class FreemarkerFileChooser extends FileByExtensionChooser { 9 | 10 | public FreemarkerFileChooser(Composite parent) { 11 | super(parent, "ftl"); 12 | } 13 | 14 | @Override 15 | protected String getDialogTitle() { 16 | return "Choose Freemarker (*.ftl) file"; 17 | } 18 | 19 | @Override 20 | protected String getDialogMessage() { 21 | return "Select the *.ftl file you want to use for generation:"; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/handler/wizard/page/MDSLWizardPage.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.handler.wizard.page; 2 | 3 | import org.eclipse.jface.wizard.WizardPage; 4 | import org.eclipse.swt.program.Program; 5 | 6 | public abstract class MDSLWizardPage extends WizardPage { 7 | 8 | public MDSLWizardPage(String title) { 9 | super(title); 10 | } 11 | 12 | @Override 13 | public void performHelp() { 14 | Program.launch("https://microservice-api-patterns.github.io/MDSL-Specification/"); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/labeling/APIDescriptionDescriptionLabelProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.20.0 3 | */ 4 | package io.mdsl.ui.labeling; 5 | 6 | import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider; 7 | 8 | /** 9 | * Provides labels for IEObjectDescriptions and IResourceDescriptions. 10 | * 11 | * https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#label-provider 12 | */ 13 | public class APIDescriptionDescriptionLabelProvider extends DefaultDescriptionLabelProvider { 14 | 15 | // Labels and icons can be computed like this: 16 | 17 | // String text(IEObjectDescription ele) { 18 | // return ele.getName().toString(); 19 | // } 20 | // 21 | // String image(IEObjectDescription ele) { 22 | // return ele.getEClass().getName() + ".gif"; 23 | // } 24 | } 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/labeling/APIDescriptionLabelProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.20.0 3 | */ 4 | package io.mdsl.ui.labeling; 5 | 6 | import com.google.inject.Inject; 7 | import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; 8 | import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider; 9 | 10 | /** 11 | * Provides labels for EObjects. 12 | * 13 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#label-provider 14 | */ 15 | public class APIDescriptionLabelProvider extends DefaultEObjectLabelProvider { 16 | 17 | @Inject 18 | public APIDescriptionLabelProvider(AdapterFactoryLabelProvider delegate) { 19 | super(delegate); 20 | } 21 | 22 | // Labels and icons can be computed like this: 23 | 24 | // String text(Greeting ele) { 25 | // return "A greeting to " + ele.getName(); 26 | // } 27 | // 28 | // String image(Greeting ele) { 29 | // return "Greeting.gif"; 30 | // } 31 | } 32 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/outline/APIDescriptionOutlineTreeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.20.0 3 | */ 4 | package io.mdsl.ui.outline; 5 | 6 | import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider; 7 | 8 | /** 9 | * Customization of the default outline structure. 10 | * 11 | * See https://www.eclipse.org/Xtext/documentation/310_eclipse_support.html#outline 12 | */ 13 | public class APIDescriptionOutlineTreeProvider extends DefaultOutlineTreeProvider { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddApplicationFlowForScenario.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.IntegrationScenario; 7 | import io.mdsl.transformations.FlowTransformations; 8 | 9 | class AddApplicationFlowForScenario extends QuickfixSemanticModification { 10 | 11 | @Override 12 | public void performQuickfix(EObject element, IModificationContext context) { 13 | IntegrationScenario scenario = (IntegrationScenario) element; 14 | FlowTransformations ft = new FlowTransformations(); 15 | ft.addApplicationFlowForScenario(scenario); 16 | } 17 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddApplicationFlowStep.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.transformations.FlowTransformations; 7 | 8 | class AddApplicationFlowStep extends QuickfixSemanticModification { 9 | private String stepType; 10 | 11 | public AddApplicationFlowStep(String stepType) { 12 | this.stepType = stepType; 13 | } 14 | 15 | @Override 16 | public void performQuickfix(EObject element, IModificationContext context) { 17 | FlowTransformations ft = new FlowTransformations(); 18 | 19 | if (stepType.equals(FlowTransformations.CIS_STEP)) { 20 | ft.addCisStep(element); 21 | } else if (stepType.equals(FlowTransformations.DEP_STEP)) { 22 | ft.addDepStep(element); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddBranchWithMerge.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.transformations.FlowTransformations; 7 | 8 | class AddBranchWithMerge extends QuickfixSemanticModification { 9 | private String branchingType; 10 | 11 | public AddBranchWithMerge(String branchingType) { 12 | this.branchingType = branchingType; 13 | } 14 | 15 | @Override 16 | public void performQuickfix(EObject element, IModificationContext context) { 17 | FlowTransformations ft = new FlowTransformations(); 18 | ft.addBranchesWithMerge(element, branchingType); 19 | } 20 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddEndpointTypeForScenario.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.IntegrationScenario; 7 | import io.mdsl.transformations.ScenarioTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | public class AddEndpointTypeForScenario extends QuickfixSemanticModification { 11 | 12 | private boolean generateOperations; 13 | 14 | AddEndpointTypeForScenario(boolean withOperations) { 15 | this.generateOperations = withOperations; 16 | } 17 | 18 | @Override 19 | public void performQuickfix(EObject element, IModificationContext context) { 20 | if (!(element instanceof IntegrationScenario)) { 21 | TransformationHelpers.reportError("AddEndpointTypeForScenario expects an IntegrationScenario as input"); 22 | } 23 | IntegrationScenario scenario = (IntegrationScenario) element; 24 | ScenarioTransformations et = new ScenarioTransformations(); 25 | et.addEndpointForScenario(scenario, generateOperations); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddEndpointTypeSupportingFlow.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Orchestration; 7 | import io.mdsl.transformations.FlowTransformations;; 8 | 9 | class AddEndpointTypeSupportingFlow extends QuickfixSemanticModification { 10 | @Override 11 | public void performQuickfix(EObject element, IModificationContext context) { 12 | Orchestration flow = (Orchestration) element; 13 | FlowTransformations ft = new FlowTransformations(); 14 | ft.addEndpointTypeSupportingFlow(flow); 15 | } 16 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddEndpointTypeWithPatternSupport.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.IntegrationScenario; 7 | import io.mdsl.transformations.TransformationChains; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | public class AddEndpointTypeWithPatternSupport extends QuickfixSemanticModification { 11 | 12 | private String desiredQuality; 13 | 14 | AddEndpointTypeWithPatternSupport(String desiredQuality) { 15 | this.desiredQuality = desiredQuality; 16 | } 17 | 18 | @Override 19 | public void performQuickfix(EObject element, IModificationContext context) { 20 | if (!(element instanceof IntegrationScenario)) { 21 | TransformationHelpers.reportError("AddEndpointTypeWithPatternSupport expects an IntegrationScenario as input"); 22 | } 23 | TransformationChains tc = new TransformationChains(); 24 | tc.applyEntireChainToScenariosAndItsStories((IntegrationScenario) element, desiredQuality); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddHttpParameterBindingsForElements.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.HTTPOperationBinding; 7 | import io.mdsl.transformations.HTTPBindingTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | class AddHttpParameterBindingsForElements extends QuickfixSemanticModification { 11 | 12 | public AddHttpParameterBindingsForElements() { 13 | } 14 | 15 | @Override 16 | public void performQuickfix(EObject element, IModificationContext context) { 17 | 18 | if (!(element instanceof HTTPOperationBinding)) { 19 | TransformationHelpers.reportError("AddHttpParameterBinding expects an HTTP Operation Binding."); 20 | return; 21 | } 22 | 23 | HTTPOperationBinding opb = (HTTPOperationBinding) element; 24 | HTTPBindingTransformations hbts = new HTTPBindingTransformations(); 25 | hbts.addHttpParameterBindingsForElements(opb); 26 | } 27 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddOperationForFlowStep.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.transformations.FlowTransformations; 7 | 8 | class AddOperationForFlowStep extends QuickfixSemanticModification { 9 | private String stepType; 10 | 11 | public AddOperationForFlowStep(String stepType) { 12 | this.stepType = stepType; 13 | } 14 | 15 | @Override 16 | public void performQuickfix(EObject element, IModificationContext context) { 17 | FlowTransformations ft = new FlowTransformations(); 18 | ft.addOperationForFlowStep(element, stepType); 19 | } 20 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddOperationForScenarioStory.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.IntegrationStory; 7 | import io.mdsl.transformations.ScenarioTransformations; 8 | 9 | public class AddOperationForScenarioStory extends QuickfixSemanticModification { 10 | 11 | AddOperationForScenarioStory() { 12 | } 13 | 14 | @Override 15 | public void performQuickfix(EObject element, IModificationContext context) { 16 | 17 | IntegrationStory story = (IntegrationStory) element; 18 | ScenarioTransformations et = new ScenarioTransformations(); 19 | et.addOperationForScenarioStory(story); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddOperationsAccordingToMAPDecoration.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.EndpointContract; 7 | import io.mdsl.transformations.OperationTransformations; 8 | 9 | public class AddOperationsAccordingToMAPDecoration extends QuickfixSemanticModification { 10 | 11 | @Override 12 | public void performQuickfix(EObject element, IModificationContext context) { 13 | EndpointContract ec = (EndpointContract) element; 14 | OperationTransformations ot = new OperationTransformations(); 15 | ot.addOperationsForRole(ec); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddWishList.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Operation; 7 | import io.mdsl.transformations.MessageTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | class AddWishList extends QuickfixSemanticModification { 11 | private String type; 12 | 13 | public AddWishList(String string) { 14 | type = string; 15 | } 16 | 17 | @Override 18 | public void performQuickfix(EObject element, IModificationContext context) { 19 | if(type.equals("fromOperation")) { 20 | if(!(element instanceof Operation)) { 21 | TransformationHelpers.reportError("This type of Add Wish List Quick Fix can only be applied if an operation is selected."); 22 | } 23 | Operation operation = (Operation) element; 24 | MessageTransformations.addWishList(operation); 25 | } 26 | else { 27 | TransformationHelpers.reportError("Add Wish List Quick Fix of unknown type: " + type); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/AddWishTemplate.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Operation; 7 | import io.mdsl.transformations.MessageTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | class AddWishTemplate extends QuickfixSemanticModification { 11 | public AddWishTemplate() { 12 | } 13 | 14 | @Override 15 | public void performQuickfix(EObject element, IModificationContext context) { 16 | if (!(element instanceof Operation)) { 17 | TransformationHelpers.reportError("This type of Add Wish Template Quick Fix can only be applied if an operation is selected."); 18 | } 19 | Operation operation = (Operation) element; 20 | MessageTransformations.addWishTemplate(operation.getRequestMessage().getPayload(), operation.getResponseMessage().getPayload()); 21 | } 22 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/CombinedFlowStepSplit.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | import org.eclipse.xtext.ui.editor.model.edit.ISemanticModification; 6 | 7 | import io.mdsl.apiDescription.CombinedInvocationStep; 8 | import io.mdsl.exception.MDSLException; 9 | import io.mdsl.transformations.FlowTransformations; 10 | 11 | class CombinedFlowStepSplit implements ISemanticModification { 12 | public CombinedFlowStepSplit() { 13 | } 14 | 15 | @Override 16 | public void apply(EObject element, IModificationContext context) throws Exception { 17 | FlowTransformations ft = new FlowTransformations(); 18 | if(element instanceof CombinedInvocationStep) { 19 | ft.splitCombinedFlowStep((CombinedInvocationStep) element); 20 | } 21 | else { 22 | throw new MDSLException("This transformation operates on Combined Cis/Dep steps only."); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/CompleteDataType.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.RoleAndType; 7 | import io.mdsl.transformations.DataTypeTransformations; 8 | 9 | class CompleteDataType extends QuickfixSemanticModification { 10 | private String type; 11 | 12 | public CompleteDataType(String type) { 13 | this.type = type; 14 | } 15 | 16 | @Override 17 | public void performQuickfix(EObject element, IModificationContext context) { 18 | RoleAndType rat = (RoleAndType) element; 19 | DataTypeTransformations.completeDataType(rat, type); 20 | } 21 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/CompleteOperationWithErrorReport.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Operation; 7 | import io.mdsl.transformations.OperationTransformations; 8 | 9 | public class CompleteOperationWithErrorReport extends QuickfixSemanticModification { 10 | 11 | public void performQuickfix(EObject element, IModificationContext context) { 12 | // this is a very basic transformation, merely demonstrating the report syntax 13 | Operation operation = (Operation) element; 14 | OperationTransformations ot = new OperationTransformations(); 15 | ot.completeOperationWithErrorReport(operation); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/CompleteOperationWithSecurityPolicy.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Operation; 7 | import io.mdsl.transformations.OperationTransformations; 8 | 9 | public class CompleteOperationWithSecurityPolicy extends QuickfixSemanticModification { 10 | 11 | public void performQuickfix(EObject element, IModificationContext context) { 12 | // this is a very basic transformation, merely demonstrating the policy syntax 13 | Operation operation = (Operation) element; 14 | OperationTransformations ot = new OperationTransformations(); 15 | ot.completeOperationWithSecurityPolicy(operation); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/ConsolidateFlowSteps.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.DomainEventProductionStep; 7 | import io.mdsl.transformations.FlowTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | class ConsolidateFlowSteps extends QuickfixSemanticModification { 11 | private String branchingType; 12 | 13 | public ConsolidateFlowSteps(String branchingType) { 14 | this.branchingType = branchingType; 15 | } 16 | 17 | @Override 18 | public void performQuickfix(EObject element, IModificationContext context) { 19 | FlowTransformations ft = new FlowTransformations(); 20 | if (element instanceof DomainEventProductionStep) { 21 | ft.consolidateFlowSteps((DomainEventProductionStep) element, branchingType); 22 | } else { 23 | TransformationHelpers.reportError("This transformation operates on Single Event Productions only."); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/ConvertFlowToBPMN.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.swt.program.Program; 5 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 6 | 7 | import io.mdsl.apiDescription.Orchestration; 8 | import io.mdsl.generator.bpmn.SketchMinerLinkCreator; 9 | import io.mdsl.utils.MDSLLogger;; 10 | 11 | class ConvertFlowToBPMN extends QuickfixSemanticModification { 12 | @Override 13 | public void performQuickfix(EObject element, IModificationContext context) { 14 | Orchestration flow = (Orchestration) element; 15 | SketchMinerLinkCreator smlc = new SketchMinerLinkCreator(); 16 | String smStoryAsLink = smlc.createSketchMinerLink(flow); 17 | MDSLLogger.reportDetailedInformation(smStoryAsLink); 18 | // open browser with BPMN story link 19 | Program.launch(smStoryAsLink); 20 | } 21 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/ConvertToStringDataType.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.GenericParameter; 7 | import io.mdsl.transformations.DataTypeTransformations; 8 | 9 | class ConvertToStringDataType extends QuickfixSemanticModification { 10 | @Override 11 | public void performQuickfix(EObject element, IModificationContext context) { 12 | GenericParameter gp = (GenericParameter) element; 13 | DataTypeTransformations.convertToStringType(gp); 14 | } 15 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/DecorateAsMAPInformationHolderResource.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.EndpointContract; 7 | import io.mdsl.transformations.MAPDecoratorHelpers; 8 | 9 | public class DecorateAsMAPInformationHolderResource extends QuickfixSemanticModification { 10 | 11 | @Override 12 | public void performQuickfix(EObject element, IModificationContext context) { 13 | EndpointContract etype = (EndpointContract) element; 14 | MAPDecoratorHelpers.setRoleToInformationHolderResource(etype); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/DecorateAsMAPProcessingResource.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | // import io.mdsl.transformations.TransformationHelper; 7 | 8 | import io.mdsl.apiDescription.EndpointContract; 9 | import io.mdsl.transformations.MAPDecoratorHelpers; 10 | 11 | public class DecorateAsMAPProcessingResource extends QuickfixSemanticModification { 12 | 13 | @Override 14 | public void performQuickfix(EObject element, IModificationContext context) { 15 | EndpointContract etype = (EndpointContract) element; 16 | MAPDecoratorHelpers.setRoleToProcessingResource(etype); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/IntroduceParameterTreeDTO.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | import org.eclipse.xtext.ui.editor.model.edit.ISemanticModification; 6 | 7 | import io.mdsl.transformations.MessageTransformations; 8 | 9 | class IntroduceParameterTreeDTO extends QuickfixSemanticModification { 10 | 11 | @Override 12 | public void performQuickfix(EObject element, IModificationContext context) { 13 | MessageTransformations.addParameterTreeWrapper(element); 14 | } 15 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/MakeRequestConditional.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Operation; 7 | import io.mdsl.transformations.MessageTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | class MakeRequestConditional extends QuickfixSemanticModification { 11 | private String variant = "lastModifiedAt"; 12 | 13 | public MakeRequestConditional(String variant) { 14 | this.variant = variant; 15 | } 16 | 17 | @Override 18 | public void performQuickfix(EObject element, IModificationContext context) { 19 | if (!(element instanceof Operation)) { 20 | TransformationHelpers.reportError("This type of Add Wish Template Quick Fix can only be applied if an operation is selected."); 21 | } 22 | Operation operation = (Operation) element; 23 | MessageTransformations.makeRequestConditional(operation, variant); 24 | } 25 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/SegregateCommandsFromQueries.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.EndpointContract; 7 | import io.mdsl.transformations.EndpointTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | public class SegregateCommandsFromQueries extends QuickfixSemanticModification { 11 | 12 | private boolean generateOperations; 13 | 14 | SegregateCommandsFromQueries() { 15 | } 16 | 17 | @Override 18 | public void performQuickfix(EObject element, IModificationContext context) { 19 | if (!(element instanceof EndpointContract)) { 20 | TransformationHelpers.reportError("SegregateCommandsFromQueries expects an EndpointContract as input"); 21 | } 22 | 23 | EndpointTransformations ets = new EndpointTransformations(); 24 | ets.separateCommandsFromQueries((EndpointContract)element); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl.ui/src/io/mdsl/ui/quickfix/SplitOperation.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.ui.quickfix; 2 | 3 | import org.eclipse.emf.ecore.EObject; 4 | import org.eclipse.xtext.ui.editor.model.edit.IModificationContext; 5 | 6 | import io.mdsl.apiDescription.Operation; 7 | import io.mdsl.transformations.OperationTransformations; 8 | import io.mdsl.transformations.TransformationHelpers; 9 | 10 | class SplitOperation extends QuickfixSemanticModification { 11 | private boolean touchResponse=false; 12 | 13 | public SplitOperation(boolean touchResponse) { 14 | this.touchResponse = touchResponse; 15 | } 16 | 17 | @Override 18 | public void performQuickfix(EObject element, IModificationContext context) { 19 | 20 | if (!(element instanceof Operation)) { 21 | TransformationHelpers.reportError("This Quick Fix can only be applied if an operation is selected."); 22 | } 23 | 24 | Operation operation = (Operation) element; 25 | OperationTransformations opt = new OperationTransformations(); 26 | opt.splitOperation(operation, touchResponse); 27 | } 28 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl/FreemarkerStandaloneDemo.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | Welcome! 4 | 5 | 6 |

Welcome in ${apiname}!

7 |

Endpoints: 8 | tbc, stay tuned! 9 | 10 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/MDSLOverviewReport.md.ftl: -------------------------------------------------------------------------------- 1 | # Report for MDSL specification ${filename} 2 | 3 | ## Endpoints 4 | 5 | The API description ${apiname} features the following endpoints: 6 | 7 | <#list serviceSpecification.contracts as endpoint> 8 | * ${endpoint.name} 9 | 10 | * No more endpoints found. 11 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/build.properties: -------------------------------------------------------------------------------- 1 | source.. = src/,\ 2 | src-gen/,\ 3 | xtend-gen/ 4 | bin.includes = model/generated/,\ 5 | .,\ 6 | META-INF/,\ 7 | plugin.xml 8 | bin.excludes = **/*.mwe2,\ 9 | **/*.xtend 10 | additional.bundles = org.eclipse.xtext.xbase,\ 11 | org.eclipse.xtext.common.types,\ 12 | org.eclipse.xtext.xtext.generator,\ 13 | org.eclipse.emf.codegen.ecore,\ 14 | org.eclipse.emf.mwe.utils,\ 15 | org.eclipse.emf.mwe2.launch,\ 16 | org.eclipse.emf.mwe2.lib,\ 17 | org.objectweb.asm,\ 18 | org.apache.commons.logging,\ 19 | org.apache.log4j 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/gradle.properties: -------------------------------------------------------------------------------- 1 | swaggerCoreVersion=2.1.2 2 | swaggerParserVersion=2.0.20 3 | freemarkerVersion=2.3.30 4 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/APIDescriptionRuntimeModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.35.0 3 | */ 4 | package io.mdsl; 5 | 6 | 7 | /** 8 | * Use this class to register components to be used at runtime / without the Equinox extension registry. 9 | */ 10 | public class APIDescriptionRuntimeModule extends AbstractAPIDescriptionRuntimeModule { 11 | } 12 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/APIDescriptionStandaloneSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.35.0 3 | */ 4 | package io.mdsl; 5 | 6 | 7 | /** 8 | * Initialization support for running Xtext languages without Equinox extension registry. 9 | */ 10 | public class APIDescriptionStandaloneSetup extends APIDescriptionStandaloneSetupGenerated { 11 | 12 | public static void doSetup() { 13 | new APIDescriptionStandaloneSetup().createInjectorAndDoEMFRegistration(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/exception/MDSLException.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.exception; 2 | 3 | public class MDSLException extends RuntimeException { 4 | 5 | /** 6 | * default id, generated by quick fix 7 | */ 8 | private static final long serialVersionUID = 1L; 9 | private String reason; 10 | 11 | public MDSLException(String reason) { 12 | super(reason); 13 | this.reason = reason; 14 | } 15 | 16 | public MDSLException(String reason, Exception e) { 17 | super(reason, e); 18 | this.reason = reason; 19 | } 20 | 21 | public String getReason() { 22 | return reason; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/exception/ResourceIsNoMDSLModelException.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.exception; 2 | 3 | import org.eclipse.emf.common.util.URI; 4 | 5 | public class ResourceIsNoMDSLModelException extends MDSLException { 6 | 7 | public ResourceIsNoMDSLModelException(URI uri) { 8 | super("The resource '" + uri.toString() + "' does not contain a MDSL model."); 9 | } 10 | 11 | public ResourceIsNoMDSLModelException() { 12 | super("The given resource does not contain a MDSL model."); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/APIDescriptionGenerator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.21.0 3 | */ 4 | package io.mdsl.generator; 5 | 6 | import org.eclipse.emf.ecore.resource.Resource; 7 | import org.eclipse.xtext.generator.AbstractGenerator; 8 | import org.eclipse.xtext.generator.IFileSystemAccess2; 9 | import org.eclipse.xtext.generator.IGeneratorContext; 10 | 11 | /** 12 | * Generates code from your model files on save. 13 | * 14 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#code-generation 15 | */ 16 | public class APIDescriptionGenerator extends AbstractGenerator { 17 | 18 | @Override 19 | public void doGenerate(Resource resource, IFileSystemAccess2 fsa, IGeneratorContext context) { 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/AnonymousFieldNameGenerator.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator; 2 | 3 | /** 4 | * Generates field names by using a counter. 5 | */ 6 | public class AnonymousFieldNameGenerator { 7 | 8 | private int counter = 1; 9 | 10 | private boolean isStringDefined(String name) { 11 | return name != null && !"".equals(name); 12 | } 13 | 14 | public String getUniqueName(String baseName) { 15 | String name = baseName != null ? baseName.trim() : baseName; 16 | 17 | // in case there is a name, just take it (formatted and without special characters) 18 | if (isStringDefined(name)) 19 | return format(baseName); 20 | 21 | // in case there is no name, generate a unique "anonymous" name 22 | String genName = "anonymous" + counter; 23 | counter++; 24 | return genName; 25 | } 26 | 27 | private String format(String baseName) { 28 | String name = baseName; 29 | if (name.substring(0, 1).matches("^[0-9]")) 30 | name = "_" + name; 31 | return name.replaceAll("[^A-Za-z0-9_]", ""); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/MDSL2JavaTemplateEmpty.java.ftl: -------------------------------------------------------------------------------- 1 | package io.mdsl.generated.java; 2 | 3 | public class ${genModel.apiName} { 4 | // TODO: generate more Java code ... 5 | } 6 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/ProtocolBuffersGenerator.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator; 2 | 3 | import org.eclipse.emf.common.util.URI; 4 | import org.eclipse.xtext.generator.IFileSystemAccess2; 5 | 6 | import io.mdsl.apiDescription.ServiceSpecification; 7 | import io.mdsl.generator.protobuf.converter.MDSL2ProtobufConverter; 8 | 9 | /** 10 | * Generates a Protocol Buffers (*.proto) file with an MDSL model as input. 11 | * 12 | */ 13 | public class ProtocolBuffersGenerator extends AbstractMDSLGenerator { 14 | 15 | @Override 16 | protected void generateFromServiceSpecification(ServiceSpecification mdslSpecification, IFileSystemAccess2 fsa, 17 | URI inputFileURI) { 18 | fsa.generateFile(inputFileURI.trimFileExtension().lastSegment() + ".proto", 19 | new MDSL2ProtobufConverter(mdslSpecification).convert().toString()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/asyncapi/models/CardinalityDescription.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.asyncapi.models; 2 | 3 | public class CardinalityDescription { 4 | 5 | private boolean isArray; 6 | private boolean isAtLeastOne; 7 | public boolean isArray() { 8 | return isArray; 9 | } 10 | public void setArray(boolean isArray) { 11 | this.isArray = isArray; 12 | } 13 | public boolean isAtLeastOne() { 14 | return isAtLeastOne; 15 | } 16 | public void setAtLeastOne(boolean isAtLeastOne) { 17 | this.isAtLeastOne = isAtLeastOne; 18 | } 19 | 20 | public CardinalityDescription(boolean isArray, boolean isAtLeastOne) { 21 | super(); 22 | this.isArray = isArray; 23 | this.isAtLeastOne = isAtLeastOne; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/asyncapi/models/ParameterDescriptor.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.asyncapi.models; 2 | 3 | import io.mdsl.apiDescription.Cardinality; 4 | 5 | public class ParameterDescriptor { 6 | 7 | private String name; 8 | private Cardinality card; 9 | public String getName() { 10 | return name; 11 | } 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | public Cardinality getCard() { 16 | return card; 17 | } 18 | public void setCard(Cardinality card) { 19 | this.card = card; 20 | } 21 | public ParameterDescriptor(String name, Cardinality card) { 22 | super(); 23 | this.name = name; 24 | this.card = card; 25 | } 26 | 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/bpmn/sketchminer.ftl: -------------------------------------------------------------------------------- 1 | /// TODO provide generation statistics (source file name, time) 2 | <#-- language reference: https://www.bpmn-sketch-miner.ai/doc/10-ref.html#bpmn-sketch-miner-syntax-rules --> 3 | ${flowName}: 4 | 5 | <#list model.sequences as sequence> 6 | <#if sequence.isMergingFragment()> 7 | ... 8 | 9 | <#list sequence.tasks as task> 10 | <#if task.comment?has_content> 11 | <#if task.type.name() == "COMMAND"><#if task.actor?has_content>${task.actor}<#else>${model.defaultActorName}: // ${task.comment} 12 | 13 | <#if task.type.name() == "COMMAND"><#if task.actor?has_content>${task.actor}<#else>${model.defaultActorName}: <#if task.type.name() == "COMMAND">user ${task.name?replace("_", "")}<#else>(${task.name?replace("_", "")})<#if task.parallelTasks?has_content><#list task.parallelTasks as parTask>|<#if parTask.type.name() == "COMMAND">user ${parTask.name?replace("_", "")}<#else>(${parTask.name?replace("_", "")}) 14 | 15 | <#if sequence.isSplittingFragment()> 16 | ... 17 | 18 | 19 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/java/DataType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The MDSL Project Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.mdsl.generator.java; 17 | 18 | /** 19 | * This type has been generated out of an MDSL contract. 20 | * 21 | */ 22 | public class DataType { 23 | 24 | } 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/java/EndpointInterface.java.ftl: -------------------------------------------------------------------------------- 1 | <#assign endpoint = genModel.endpoints?filter(e -> e.name == endpointName)?first> 2 | package ${resolveJavaPackage(genModel, endpoint)}.services; 3 | 4 | import ${resolveJavaPackage(genModel, endpoint)}.types.*; 5 | 6 | /** 7 | * This interface has been generated from the MDSL endpoint called '${endpoint.name}'. 8 | * 9 | */ 10 | public interface ${endpoint.name} { 11 | 12 | <#list endpoint.operations as operation> 13 | <#if operation.responsibility?has_content> 14 | /** 15 | * MAP decorator: ${operation.responsibility} 16 | * 17 | * Find all MAP responsibility patterns here: https://microservice-api-patterns.org/patterns/responsibility/ 18 | */ 19 | 20 | ${mapType(operation.response.name, true)} ${resolveOperationName(endpoint, operation)}(${operation.parameters?map(p -> mapType(p.type.name) + " " + p.name)?join(", ")}); 21 | 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/jolie/converter/EndpointModel.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.jolie.converter; 2 | 3 | public class EndpointModel { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/jolie/converter/TypeModel.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.jolie.converter; 2 | 3 | public class TypeModel { 4 | private String name; 5 | private String definition; 6 | 7 | public TypeModel(String name, String definition) { 8 | super(); 9 | this.name = name; 10 | this.definition = definition; 11 | } 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | public void setName(String name) { 17 | this.name = name; 18 | } 19 | public String getDefinition() { 20 | return definition; 21 | } 22 | public void setDefinition(String definition) { 23 | this.definition = definition; 24 | } 25 | 26 | 27 | } 28 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/StateTransition.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model; 2 | 3 | public class StateTransition { 4 | private String name; 5 | private String from; 6 | private String to; 7 | 8 | public String getName() { 9 | return name; 10 | } 11 | public void setName(String name) { 12 | this.name = name; 13 | } 14 | public String getFrom() { 15 | return from; 16 | } 17 | public void setFrom(String from) { 18 | this.from = from; 19 | } 20 | public String getTo() { 21 | return to; 22 | } 23 | public void setTo(String to) { 24 | this.to = to; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/UndefinedProtocol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The MDSL Project Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.mdsl.generator.model; 17 | 18 | /** 19 | * The protocol binding that is returned on an endpoint if there was no protocol 20 | * binding in MDSL. 21 | * 22 | */ 23 | public class UndefinedProtocol implements ProtocolBinding { 24 | 25 | @Override 26 | public String getProtocolName() { 27 | return "Undefined"; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/carving/ClusterCollection.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.carving; 2 | 3 | import java.util.HashMap; 4 | 5 | public class ClusterCollection { 6 | private HashMap clusters; 7 | 8 | public ClusterCollection() { 9 | this.clusters = new HashMap(); 10 | } 11 | 12 | public HashMap getClusters() { 13 | return clusters; 14 | } 15 | 16 | public void addCluster(CommandCluster cluster) { 17 | this.clusters.put(cluster.getCommandClusterName(), cluster); 18 | } 19 | 20 | // TODO implement design heuristics (might require additional input in MDSL): 21 | // JH, VV, SC, tbc 22 | } 23 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/carving/CohesionCriterion.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.carving; 2 | 3 | public class CohesionCriterion extends CarvingCriterion { 4 | 5 | public CohesionCriterion(float score) { 6 | super(1, score); 7 | } 8 | 9 | public CohesionCriterion(int weight, float score) { 10 | super(weight, score); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/carving/CommandCluster.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.carving; 2 | 3 | import java.util.HashMap; 4 | import io.mdsl.generator.model.composition.Command; 5 | 6 | public class CommandCluster { 7 | private HashMap connectedCommands; 8 | private String clusterName = "tbd"; 9 | 10 | public CommandCluster(String name) { 11 | this.clusterName = name; 12 | this.connectedCommands = new HashMap(); 13 | } 14 | 15 | public HashMap getConnectedCommands() { 16 | return connectedCommands; 17 | } 18 | 19 | public void addConnectedCommand(String name, Command connectedCommand) { 20 | // System.out.println("Adding " + name + " to " + clusterName); 21 | this.connectedCommands.put(name, connectedCommand); 22 | } 23 | 24 | public String getCommandClusterName() { 25 | return clusterName; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/carving/CouplingCriterion.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.carving; 2 | 3 | public class CouplingCriterion extends CarvingCriterion { 4 | 5 | public CouplingCriterion(float score) { 6 | super(1, score); 7 | } 8 | 9 | public CouplingCriterion(int weight, float score) { 10 | super(weight, score); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/CompositeInvocation.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import io.mdsl.generator.model.composition.Flow; 7 | 8 | public class CompositeInvocation extends Invocation { 9 | List actionList = new ArrayList(); 10 | 11 | public CompositeInvocation(String commandName, String eventName, List composedEvents) { 12 | super(commandName, eventName); 13 | actionList = composedEvents; 14 | } 15 | 16 | public List getParallelActions() { 17 | return actionList; 18 | } 19 | 20 | public boolean isAnd() { 21 | return this.event.startsWith(Flow.AND_OPERATOR); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/Invocation.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class Invocation { 7 | protected String event; 8 | protected String command; 9 | 10 | public Invocation(String command, String event) { 11 | this.event = event; 12 | this.command = command; 13 | } 14 | 15 | public String getCommand() { 16 | return command; 17 | } 18 | 19 | public void setCommand(String command) { 20 | this.command = command; 21 | } 22 | 23 | public String getEvent() { 24 | return event; 25 | } 26 | 27 | public void setEvent(String event) { 28 | this.event = event; 29 | } 30 | 31 | /* 32 | public boolean getAnd() { 33 | return false; 34 | } 35 | */ 36 | } -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/PathElement.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views; 2 | 3 | public class PathElement { 4 | private static final String INVOCATION_ARROW = "->"; 5 | private String from; 6 | private String to; 7 | 8 | public PathElement(String from, String to) { 9 | this.from = from; 10 | this.to = to; 11 | } 12 | 13 | public String getName() { 14 | return from + INVOCATION_ARROW + to; 15 | } 16 | 17 | public String getSource() { 18 | return from; 19 | } 20 | 21 | public String getSink() { 22 | return to; 23 | } 24 | 25 | public String toString() { 26 | return "(" + from + ")\n" + to + "\n"; 27 | } 28 | 29 | public String dump() { 30 | return from + "->" + to + ";"; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/camel/CamelUtils.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.camel; 2 | 3 | public class CamelUtils { 4 | public String headerPrefix() { 5 | // done here because $ and { are used both by Camel and by Freemarker: 6 | return "${header."; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/Branch.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | import java.util.List; 4 | 5 | public abstract class Branch extends Component { 6 | 7 | public static final String CHOICE_QUEUE_SUFFIX = "ChoiceQueue"; 8 | 9 | public Branch(String name) { 10 | super(name); 11 | } 12 | 13 | public String getName() { 14 | return name; 15 | } 16 | 17 | public abstract List getNextComponentList(); 18 | 19 | protected String nextComponentNames(List components) { 20 | String result = ""; 21 | for(String component : components) { 22 | if(component!=null) { 23 | result += " " + component; 24 | } 25 | else { 26 | result += " n/a"; 27 | } 28 | } 29 | return result; 30 | } 31 | 32 | public String dump() { 33 | String nameAndType = this.name + " (" + this.getClass().getSimpleName() + ")"; 34 | String nextComponentNames = nextComponentNames(getNextComponentList()); 35 | 36 | return nameAndType + ", nextComponents:" + nextComponentNames; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/CommandInvocationBranch.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import io.mdsl.generator.model.composition.Command; 7 | import io.mdsl.generator.model.composition.Event; 8 | import io.mdsl.generator.model.composition.Flow; 9 | 10 | public class CommandInvocationBranch extends Branch { 11 | 12 | public static final String CHOICE_QUEUE_SUFFIX = "ChoiceQueue"; 13 | 14 | private Event event; 15 | 16 | public CommandInvocationBranch(String name, Event event) { 17 | super(name); 18 | this.event = event; 19 | } 20 | 21 | public String getName() { 22 | return name; 23 | } 24 | 25 | public List getNextComponentList() { 26 | List orCommands = event.triggeredCommands(); 27 | ArrayList result = new ArrayList(); 28 | orCommands.forEach(command->result.add(command.getName() + CHOICE_QUEUE_SUFFIX)); 29 | return result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/Component.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | public class Component { 4 | protected String name; 5 | 6 | public Component(String name) { 7 | this.name = name; 8 | } 9 | 10 | public String getName() { 11 | return name; 12 | } 13 | 14 | public void setName(String name) { 15 | this.name = name; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/EntityGenerator.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | public class EntityGenerator extends Component { 4 | 5 | public EntityGenerator(String name) { 6 | super(name); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/EntitySink.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | public class EntitySink extends Component { 4 | 5 | public EntitySink(String name) { 6 | super(name); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/EventProductionBranch.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import io.mdsl.generator.model.composition.Command; 7 | import io.mdsl.generator.model.composition.Event; 8 | 9 | public class EventProductionBranch extends Branch { 10 | 11 | private Command command; 12 | 13 | public EventProductionBranch(String name, Command command) { 14 | super(name); 15 | this.command = command; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public List getNextComponentList() { 23 | List orEvents = command.emits(); 24 | ArrayList result = new ArrayList(); 25 | orEvents.forEach(command->result.add(command.getName())); 26 | return result; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/GateQueue.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | public class GateQueue extends Queue { 4 | 5 | public GateQueue(String name) { 6 | super(name); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/GatewayGuardServer.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | import io.mdsl.generator.model.composition.Command; 4 | import io.mdsl.generator.model.composition.Event; 5 | import io.mdsl.generator.model.composition.Flow; 6 | 7 | // note: not to be confused with GuardInput server, two different cases/scenarios 8 | public class GatewayGuardServer extends Server { 9 | 10 | private Event event; 11 | 12 | public GatewayGuardServer(String name, Event event, Command command, Flow flow) { 13 | super(name, command, flow); 14 | this.event = event; 15 | } 16 | 17 | public String getNextComponent() { 18 | return command.getName(); 19 | } 20 | 21 | public Event getEvent() { 22 | return event; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/Queue.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | public class Queue extends Component { 4 | 5 | private static final String DEFAULT_MAX_VALID_LENGTH = "100000000"; 6 | private String maxValidLength = DEFAULT_MAX_VALID_LENGTH; 7 | 8 | public Queue(String name) { 9 | super(name); 10 | } 11 | 12 | public void setMaxValidLength(String maxValidLength) { 13 | this.maxValidLength = maxValidLength; 14 | } 15 | 16 | public String getMaxValidLength() { 17 | return maxValidLength; 18 | } 19 | 20 | public String dump() { 21 | return name; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/SimulationEntity.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | public class SimulationEntity extends Component { 4 | 5 | public SimulationEntity(String name) { 6 | super(name); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/jaamsim/Statistics.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.model.composition.views.jaamsim; 2 | 3 | import io.mdsl.generator.model.composition.Flow; 4 | 5 | public class Statistics extends Component { 6 | 7 | private Flow flow; 8 | 9 | public Statistics(String name, Flow flow) { 10 | super(name); 11 | this.flow = flow; 12 | } 13 | 14 | public String getNextComponent() { 15 | return this.flow.getName() + "EntitySink"; 16 | } 17 | 18 | public String dump() { 19 | return name; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/generator/model/composition/views/sketchminer/TaskType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The Context Mapper Project Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.mdsl.generator.model.composition.views.sketchminer; 17 | 18 | public enum TaskType { 19 | 20 | COMMAND, EVENT 21 | 22 | } 23 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/scoping/APIDescriptionScopeProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.35.0 3 | */ 4 | package io.mdsl.scoping; 5 | 6 | 7 | /** 8 | * This class contains custom scoping description. 9 | * 10 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping 11 | * on how and when to use it. 12 | */ 13 | public class APIDescriptionScopeProvider extends AbstractAPIDescriptionScopeProvider { 14 | 15 | } 16 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/standalone/MDSLStandaloneSetup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020 The MDSL Project Team 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package io.mdsl.standalone; 17 | 18 | /** 19 | * Factory method to get an MDSLStandaloneAPI instance. 20 | * 21 | * @author Stefan Kapferer 22 | */ 23 | public class MDSLStandaloneSetup { 24 | 25 | public static MDSLStandaloneAPI getStandaloneAPI() { 26 | return new MDSLStandaloneUsageHelper(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/utils/CardinalityHelper.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.utils; 2 | 3 | import io.mdsl.apiDescription.Cardinality; 4 | 5 | public class CardinalityHelper { 6 | 7 | public static boolean isList(Cardinality card) { 8 | if (card == null) 9 | return false; 10 | return (card.getZeroOrMore() != null && "*".equals(card.getZeroOrMore())) || (card.getAtLeastOne() != null && "+".equals(card.getAtLeastOne())); 11 | } 12 | 13 | public static boolean isOptional(Cardinality card) { 14 | if (card == null) 15 | return false; 16 | return (card.getZeroOrOne() != null && "?".equals(card.getZeroOrOne())) || (card.getZeroOrMore() != null && "*".equals(card.getZeroOrMore())); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/utils/MDSLLogger.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.utils; 2 | 3 | import io.mdsl.exception.MDSLException; 4 | 5 | public class MDSLLogger { 6 | 7 | // TODO (future work) set from outside (Eclipse preference, CLI parameter, tbd for MDSL Web) 8 | public static int logLevel = 1; // -1=off, 0=errors, 1=warn, 2=inform, 3=all (could use enum) 9 | public static boolean reportPatternUsage = true; 10 | 11 | public static void reportError(String message) { 12 | if(MDSLLogger.logLevel>=0) { 13 | System.err.println("[E] " + message); 14 | } 15 | throw new MDSLException(message); 16 | } 17 | 18 | public static void reportWarning(String message) { 19 | if(MDSLLogger.logLevel>=1) { 20 | System.err.println("[W] " + message); 21 | } 22 | } 23 | 24 | public static void reportInformation(String message) { 25 | if(MDSLLogger.logLevel>=2) { 26 | System.err.println("[I] " + message); 27 | } 28 | } 29 | 30 | public static void reportDetailedInformation(String message) { 31 | if(MDSLLogger.logLevel>=3) { 32 | System.err.println("[D] " + message); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/utils/MDSLParser.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.utils; 2 | 3 | import java.io.FileNotFoundException; 4 | import java.io.FileReader; 5 | import java.io.IOException; 6 | import java.io.Reader; 7 | 8 | import io.mdsl.apiDescription.ServiceSpecification; 9 | import io.mdsl.exception.MDSLException; 10 | 11 | public class MDSLParser { 12 | 13 | public static ServiceSpecification parse(String mdslFile) throws MDSLException { 14 | Reader r; 15 | try { 16 | r = new FileReader(mdslFile); 17 | MDSLXtextParserWrapper parser = new MDSLXtextParserWrapper(); 18 | return (ServiceSpecification) parser.parse(r); 19 | } catch (FileNotFoundException e) { 20 | throw new MDSLException("Spec" + mdslFile + " not found.", e); 21 | } catch (IOException e) { 22 | throw new MDSLException("Spec" + mdslFile + " caused IOException.", e); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/utils/MDSLStandaloneParserApplication.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.utils; 2 | 3 | //import java.io.FileNotFoundException; 4 | //import java.io.FileReader; 5 | //import java.io.IOException; 6 | //import java.io.Reader; 7 | // 8 | import io.mdsl.apiDescription.ServiceSpecification; 9 | 10 | public class MDSLStandaloneParserApplication { 11 | 12 | public static void main(String[] args) { 13 | 14 | // Reader r; 15 | // try { 16 | // r = new FileReader(args[0]); 17 | // MDSLXtextParserWrapper parser = new MDSLXtextParserWrapper(); 18 | // ServiceSpecification mdslTree = (ServiceSpecification) parser.parse(r); 19 | ServiceSpecification mdslTree = MDSLParser.parse(args[0]); 20 | System.out.println ("MDSL specification parsed, API name is: " + mdslTree.getName()); 21 | // } catch (FileNotFoundException e) { 22 | // e.printStackTrace(); 23 | // } catch (IOException e) { 24 | // e.printStackTrace(); 25 | // } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/utils/URITemplateHelper.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.utils; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | import java.util.regex.Matcher; 6 | import java.util.regex.Pattern; 7 | 8 | public class URITemplateHelper { 9 | 10 | public static List findTemplateParameters(String uriSnippet) { 11 | List result = new ArrayList(); 12 | String regex = "\\{\\w*\\}"; 13 | 14 | Pattern pattern = Pattern.compile(regex); 15 | Matcher matcher = pattern.matcher(uriSnippet); 16 | 17 | while(matcher.find()) { 18 | String nextTemplate = uriSnippet.substring(matcher.start(), matcher.end()); 19 | result.add(nextTemplate); 20 | } 21 | return result; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /dsl-core/io.mdsl/src/io/mdsl/validation/APIDescriptionValidator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * generated by Xtext 2.21.0 3 | */ 4 | package io.mdsl.validation; 5 | 6 | 7 | /** 8 | * This class contains custom validation rules. 9 | * 10 | * See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation 11 | */ 12 | public class APIDescriptionValidator extends AbstractAPIDescriptionValidator { 13 | 14 | } 15 | -------------------------------------------------------------------------------- /dsl-core/settings.gradle: -------------------------------------------------------------------------------- 1 | include 'mdsl-core' 2 | include 'mdsl-core-tests' 3 | include 'mdsl-lsp' 4 | include 'mdsl-cli' 5 | 6 | project(":mdsl-core").projectDir = file("io.mdsl") 7 | project(":mdsl-core-tests").projectDir = file("io.mdsl.tests") 8 | project(":mdsl-lsp").projectDir = file("io.mdsl.ide") 9 | project(":mdsl-cli").projectDir = file("io.mdsl.cli") 10 | 11 | -------------------------------------------------------------------------------- /dsl-core/sketchminer.ftl: -------------------------------------------------------------------------------- 1 | flowname-todo: 2 | 3 | 4 | <#list model.sequences as sequence> 5 | <#if sequence.isMergingFragment()> 6 | ... 7 | 8 | <#list sequence.tasks as task> 9 | <#if task.comment?has_content> 10 | <#if task.type.name() == "COMMAND"><#if model.hasMultipleActors()><#if task.actor?has_content>${task.actor}<#else>${model.defaultActorName}: // ${task.comment} 11 | 12 | <#if task.type.name() == "COMMAND"><#if model.hasMultipleActors()><#if task.actor?has_content>${task.actor}<#else>${model.defaultActorName}: <#if task.type.name() == "COMMAND">service ${task.name?replace("_", "")}<#else>(${task.name?replace("_", "")})<#if task.parallelTasks?has_content><#list task.parallelTasks as parTask>|<#if parTask.type.name() == "COMMAND">service ${parTask.name?replace("_", "")}<#else>(${parTask.name?replace("_", "")}) 13 | 14 | <#if sequence.isSplittingFragment()> 15 | ... 16 | 17 | 18 | -------------------------------------------------------------------------------- /examples/AsyncAPIHelloWorldSample.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAsyncAPI 2 | 3 | data type SampleDTO { "id": ID, "message": D } 4 | 5 | channel SayHello 6 | of type PUBLISH_SUBSCRIBE 7 | on path "/public/sayHelloZIO" 8 | produces message HelloMessage 9 | delivering payload SampleDTO 10 | 11 | message broker HelloWorldAmqpProvider 12 | exposes SayHello 13 | at location "amqp.example.com" 14 | via protocol AMQP 15 | 16 | message endpoint HelloWorldAmqpClient 17 | uses from HelloWorldAmqpProvider: 18 | SayHello -------------------------------------------------------------------------------- /examples/HelloWorld.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAPI 2 | 3 | data type SampleDTO {ID, D} 4 | 5 | endpoint type HelloWorldEndpoint 6 | exposes 7 | operation sayHello 8 | expecting payload D 9 | delivering payload SampleDTO 10 | operation getTest with responsibility RETRIEVAL_OPERATION 11 | expecting payload SampleDTO 12 | delivering payload {"a": SampleDTO, "b": SampleDTO} 13 | 14 | API provider HelloWorldAPIProvider 15 | offers HelloWorldEndpoint at endpoint location "http://localhost:8080" 16 | via protocol HTTP binding resource Home at "/hello" 17 | 18 | API client HelloWorldAPIClient 19 | consumes HelloWorldEndpoint -------------------------------------------------------------------------------- /examples/HelloWorldMDSL.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAPI 2 | 3 | data type SampleDTO {ID, D} 4 | 5 | endpoint type HelloWorldEndpoint 6 | exposes 7 | operation sayHello 8 | expecting payload D 9 | delivering payload SampleDTO 10 | 11 | API provider HelloWorldAPIProvider 12 | offers HelloWorldEndpoint at endpoint location "http://localhost:8080" 13 | via protocol HTTP 14 | binding resource Home at "/hello" 15 | operation sayHello to POST 16 | 17 | API client HelloWorldAPIClient1 18 | consumes HelloWorldEndpoint 19 | 20 | IPA -------------------------------------------------------------------------------- /examples/HelloWorldMEPDemo.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAndMEPDemoAPI version "v1.0.0" 2 | 3 | data type SampleDTO {ID, D} 4 | data type InvalidIdentifier ID 5 | 6 | endpoint type HelloWorldEndpoint 7 | exposes 8 | operation sayHello in REQUEST_REPLY conversation 9 | expecting payload D 10 | delivering payload SampleDTO 11 | 12 | endpoint type MEPDemoAndTestEndpoint 13 | exposes 14 | operation testRequestReply in REQUEST_REPLY conversation 15 | expecting payload D 16 | delivering payload SampleDTO 17 | operation testOneWay in ONE_WAY conversation 18 | expecting payload D 19 | operation testNotification in NOTIFICATION conversation 20 | delivering payload SampleDTO 21 | operation testNoOp in "ToBeContinued" conversation 22 | // incomplete specification, does not make much sense at runtime 23 | 24 | API provider HelloWorldAPIProvider 25 | offers HelloWorldEndpoint 26 | 27 | API client HelloWorldAPIClient 28 | consumes HelloWorldEndpoint 29 | 30 | // MEPDemoAndTestEndpoint not offered, not consumed (linter could report that) -------------------------------------------------------------------------------- /examples/HelloWorldWebsitePrimer.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAPI 2 | 3 | data type SampleDTO {ID, D} 4 | 5 | endpoint type HelloWorldEndpoint 6 | exposes 7 | operation sayHello 8 | expecting payload "in": D 9 | delivering payload SampleDTO 10 | 11 | API provider HelloWorldAPIProvider 12 | offers HelloWorldEndpoint 13 | at endpoint location "http://localhost:8000" 14 | via protocol HTTP 15 | binding resource HomeResource at "/" 16 | operation sayHello to POST 17 | 18 | API client HelloWorldAPIClient 19 | consumes HelloWorldEndpoint 20 | from HelloWorldAPIProvider 21 | via protocol HTTP -------------------------------------------------------------------------------- /examples/MDSLGitPages/CRMServiceContract.mdsl: -------------------------------------------------------------------------------- 1 | API description SampleCustomerManagementAPI version "1.0.0" 2 | usage context PUBLIC_API for FRONTEND_INTEGRATION 3 | 4 | endpoint type CustomerManagementContract 5 | version "1.0.0" 6 | serves as INFORMATION_HOLDER_RESOURCE 7 | exposes 8 | operation lookupSingleCustomer version "1.0.1" 9 | with responsibility RETRIEVAL_OPERATION 10 | expecting 11 | payload ID 12 | delivering 13 | payload {"customerId":ID, 14 | "name":D, 15 | "address"} 16 | 17 | operation lookupCustomerDirectory // no version information 18 | with responsibility RETRIEVAL_OPERATION 19 | expecting 20 | payload <> "customerId":ID+ // at least one 21 | delivering 22 | payload 23 | "customerRecord": { 24 | "cid":ID!, // ! mandatory, exactly one 25 | "nameTuple":("firstname":D, "lastname":D), 26 | "addressTuple":( 27 | "street":D, 28 | "poBox":D?, // optional 29 | "zipCode":D, 30 | "city":D)+, 31 | "segment":("REGULAR":D|"VIP":D) // choice 32 | }* // zero or more -------------------------------------------------------------------------------- /examples/MDSLGitPages/HelloWorld.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAPI 2 | 3 | data type SampleDTO {ID, D} 4 | 5 | endpoint type HelloWorldEndpoint 6 | exposes 7 | operation sayHello 8 | expecting payload D 9 | delivering payload SampleDTO 10 | 11 | API provider HelloWorldAPIProvider 12 | offers HelloWorldEndpoint 13 | 14 | API client HelloWorldAPIClient 15 | consumes HelloWorldEndpoint -------------------------------------------------------------------------------- /examples/MDSLGitPages/Skeleton.mdsl: -------------------------------------------------------------------------------- 1 | API description NN 2 | usage context COMMUNITY_API for BACKEND_INTEGRATION // MAP pattern tags (optional) 3 | // see https://microservice-api-patterns.org/patterns/index 4 | 5 | data type nn {D} // reusable data contract elements (optional) 6 | 7 | endpoint type NN 8 | version "1.0.0" // semantic versioning information (optional) 9 | serves as PROCESSING_RESOURCE // can also be a MAP pattern tag (optional)) 10 | exposes 11 | operation myOp 12 | with responsibility "myOpSemanticsDecorator" // can also be a MAP pattern tag (optional) 13 | expecting 14 | headers ("myHeader1": D, "myHeader2":D) // optional "header1" not possible 15 | payload "myRequest": {D} 16 | structured as MAP_TYPE 17 | delivering 18 | headers {D} // optional 19 | payload {D} 20 | structured as MAP_TYPE 21 | reporting 22 | error SomeReport "myReport": {D} // see bottom of page for explanation (optional) -------------------------------------------------------------------------------- /examples/MinimalStory.mdsl: -------------------------------------------------------------------------------- 1 | API description MinimalSpecification 2 | 3 | scenario S1 4 | a "user" wants to "work" -------------------------------------------------------------------------------- /examples/asyncMDSL/bindings.mdsl: -------------------------------------------------------------------------------- 1 | API description ProtocolBindingExample 2 | 3 | overview " 4 | An example on how to use Message Channel and Message Broker 5 | protocol bindings. 6 | " 7 | 8 | channel MyAwsomeChannel 9 | of type POINT_TO_POINT, DATA_TYPE, GUARANTEED_DELIVERY 10 | on path "channel-logical-path" 11 | produces message MyAwsomeMessage 12 | delivering payload { 13 | "myAwsomeProperty": D 14 | } 15 | where 16 | MESSAGE_EXPIRES in 60s 17 | bindings for AMQP { 18 | "queue": { 19 | "name": "my-queue-name" 20 | } 21 | } 22 | 23 | 24 | message broker MyMessageBroker 25 | exposes 26 | MyAwsomeChannel 27 | at location "tcp://mqtt.myapp.com:1883" 28 | via protocol MQTT 29 | bindings { 30 | "lastWill": { 31 | "qos": 2, 32 | "retain": false 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /examples/asyncMDSL/hello-world.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAsyncAPI 2 | 3 | data type SampleDTO { "id": ID, "message": D } 4 | 5 | channel SayHello 6 | of type PUBLISH_SUBSCRIBE 7 | on path "/public/sayHello" 8 | produces message HelloMessage 9 | delivering payload SampleDTO 10 | 11 | message broker HelloWorldAmqpProvider 12 | exposes SayHello 13 | at location "amqp.example.com" 14 | via protocol AMQP 15 | 16 | message endpoint HelloWorldAmqpClient 17 | uses from HelloWorldAmqpProvider: 18 | SayHello -------------------------------------------------------------------------------- /examples/asyncMDSL/loan-broker-example-java-spring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/examples/asyncMDSL/loan-broker-example-java-spring.png -------------------------------------------------------------------------------- /examples/asyncMDSL/message-endpoint.mdsl: -------------------------------------------------------------------------------- 1 | API description MessageEndpointExample 2 | 3 | data type SampleDTO { "id": ID, "message": D } 4 | 5 | channel Channel1 6 | on path "/channels/one" 7 | produces message MessageOne 8 | delivering payload SampleDTO 9 | 10 | channel Channel2 11 | on path "/channels/Channel2" 12 | produces message Message2 13 | delivering payload SampleDTO 14 | 15 | channel Channel3 16 | on path "/channels/Channel3" 17 | produces message Message3 18 | delivering payload SampleDTO 19 | 20 | message broker HelloWorldAmqpProvider 21 | exposes Channel1, Channel2, Channel3 22 | at location "amqp.example.com" 23 | via protocol AMQP 24 | 25 | message endpoint DemoMessageEndpoint 26 | uses 27 | channels: // channels without a Message Broker 28 | Channel1 29 | where consumed if "$message.payload#/id" == 42, 30 | Channel2 31 | 32 | from HelloWorldAmqpProvider: 33 | Channel3 -------------------------------------------------------------------------------- /examples/asyncMDSL/sensor-example.mdsl: -------------------------------------------------------------------------------- 1 | API description SensorExample 2 | version "1.0.0" 3 | overview "IoT sensor example" 4 | 5 | data type SensorDataDTO { 6 | "sensorId": ID 7 | } 8 | 9 | channel SensorChannel 10 | of type PUBLISH_SUBSCRIBE 11 | delivery guarantee AT_MOST_ONCE 12 | on path "sensordata" 13 | accepts and produces message SensorDataMessage 14 | description "Sensor data" 15 | delivering 16 | payload SensorDataDTO 17 | 18 | message broker SensorsBrokerMQTTProvider 19 | exposes SensorChannel 20 | at location "mqtt.loanbroker.com" 21 | via protocol MQTT -------------------------------------------------------------------------------- /examples/examples-advanced/AdvancedServiceContractConcepts1.mdsl: -------------------------------------------------------------------------------- 1 | API description AdvancedServiceConceptsPreview 2 | 3 | data type SampleDTO {ID, D} 4 | 5 | event type SomethingHasHappened {"when":D, "what":D} 6 | event type ServerSideProcessingComplete 7 | event type FailureMessage 8 | 9 | endpoint type HelloWorldEndpoint 10 | exposes 11 | operation doSomethingOnServerSide with responsibility STATE_TRANSITION_OPERATION 12 | expecting payload D 13 | delivering payload SampleDTO 14 | reporting error FailureMessage 15 | transitions from "ReadyToWork" to "Done" 16 | emitting event ServerSideProcessingComplete 17 | compensated by undoSomethingOnServerSide 18 | operation undoSomethingOnServerSide with responsibility STATE_TRANSITION_OPERATION 19 | expecting payload D 20 | delivering payload SampleDTO 21 | transitions from "Done" to "ReadyToWork" 22 | receives 23 | event SomethingHasHappened 24 | 25 | API provider HelloWorldAPIProvider 26 | offers HelloWorldEndpoint 27 | 28 | API client HelloWorldAPIClient 29 | consumes HelloWorldEndpoint 30 | -------------------------------------------------------------------------------- /examples/examples-advanced/CSVTutorial.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package SpreadSheetExchangeAPI; 4 | 5 | message CSVSpreadsheet { 6 | CSVSheetTab anonymous1 = 1; 7 | } 8 | 9 | message CSVSheetTab { 10 | } 11 | 12 | message Rows { 13 | } 14 | 15 | message Column { 16 | } 17 | 18 | message Cell { 19 | } 20 | 21 | message uploadSpreadsheetResponseMessage { 22 | } 23 | 24 | message downloadSpreadsheetRequestMessage { 25 | string anonymous1 = 1; 26 | } 27 | 28 | service SpreadSheetExchangeEndpoint { 29 | rpc downloadSpreadsheet(downloadSpreadsheetRequestMessage) returns (CSVSpreadsheet); 30 | rpc uploadSpreadsheet(CSVSpreadsheet) returns (uploadSpreadsheetResponseMessage); 31 | } 32 | 33 | -------------------------------------------------------------------------------- /examples/examples-advanced/HelloMIMEWorld.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloMIMEWorld2 2 | 3 | data type TestDTO1 "dto1": {"data":ID, <> "formats":D+} 4 | 5 | endpoint type MultiRepresentationResource 6 | exposes 7 | operation testOperation with responsibility STATE_CREATION_OPERATION 8 | expecting 9 | payload "expecting": TestDTO1 10 | delivering 11 | payload "delivering": TestDTO1* 12 | 13 | API provider FlexibleAndAdaptiveAPIProvider 14 | offers MultiRepresentationResource 15 | at endpoint location "https://some.sample.domain/apiEndpoint" 16 | via protocol HTTP 17 | binding 18 | resource single // at "/{primaryIntegerKey}/{atLeastOneString}" 19 | media type CMT1 as "application/json" 20 | media type CMT2 as "application/xml" 21 | operation testOperation to PUT 22 | // all elements realized as BODY parameters 23 | accepts "application/xml" "application/json" 24 | replies CMT1 CMT2 "plain/text" -------------------------------------------------------------------------------- /examples/examples-advanced/HelloWorldMDSL2AsyncMDSL.mdsl: -------------------------------------------------------------------------------- 1 | API description HelloWorldAPI 2 | 3 | data type SampleDTO {ID, D} 4 | 5 | endpoint type HelloWorldEndpoint 6 | exposes 7 | operation sayHello1 8 | expecting payload D 9 | delivering payload SampleDTO 10 | operation sayHello2 11 | expecting payload D? 12 | delivering payload SampleDTO* 13 | 14 | endpoint type HelloWorldEndpoint2 15 | exposes 16 | operation sayHello1 17 | expecting payload "id":D 18 | delivering payload "tbc":SampleDTO 19 | operation sayHello3 20 | expecting payload D 21 | delivering payload SampleDTO 22 | 23 | API provider HelloWorldAPIProvider 24 | offers HelloWorldEndpoint 25 | 26 | API client HelloWorldAPIClient 27 | consumes HelloWorldEndpoint -------------------------------------------------------------------------------- /examples/examples-advanced/SampleDataAndServiceActivatorTest.mdsl: -------------------------------------------------------------------------------- 1 | API description SampleDataAndServiceActivatorTest 2 | 3 | data type SampleBaseType "myId": D 4 | 5 | data type FlatTree {"anOffer":D, "value2":D} 6 | data type FlatTreeWithOptions {"HELLO":D*, "p2":D?} 7 | 8 | data type NestedTree {"HELLO":D*, "p2":D?, "subtree": {"p31":ID, "p32":MD}} 9 | data type NestedTreeWithIncompleteTypes {"v1":D, "v2":D, {ID, MD, P, "idOnly"}} 10 | 11 | // TODO test type references, top level and in nested tree 12 | 13 | endpoint type ServiceActivatorDemo 14 | exposes 15 | operation testAPI 16 | expecting payload "inData": FlatTreeWithOptions 17 | delivering payload "outData": NestedTree 18 | 19 | API provider ServiceActivatorDemoProvider offers ServiceActivatorDemo at endpoint location "http://localhost:8080" 20 | via protocol HTTP binding 21 | resource ServiceActivatorDemoHome at "/serviceActivatorDemoHome" 22 | operation testAPI to PUT element "inData" realized as BODY parameter -------------------------------------------------------------------------------- /examples/examples-advanced/jaamsim-to-mdsl/src/main/resources/MDSLTools-SkeletonOfAPIWithFlow.mdsl: -------------------------------------------------------------------------------- 1 | API description SampleAPI 2 | 3 | // TODO let these standard types match those found in default JaamSim setup (distributions?) 4 | 5 | data type SimPartAttributesDTO { 6 | "description": D, 7 | "defaultStateList": D*, 8 | "initialState": D} 9 | data type SampleEntityDataDTO {"value1": D, "value2": D} 10 | 11 | event type SampleEvent {"when":D, "where":D, "what":D} 12 | 13 | command type SampleCommand 14 | 15 | flow FlowPlaceholder 16 | -------------------------------------------------------------------------------- /examples/examples-advanced/readme.md: -------------------------------------------------------------------------------- 1 | *Note:* These examples are provides as-is, without further explanations. More such examples are available upon request. -------------------------------------------------------------------------------- /examples/freemarker-example/FreemarkerReportStub-Genmodel.md.ftl: -------------------------------------------------------------------------------- 1 | # Report for MDSL specification ${fileName} 2 | 3 | ## Endpoint Types 4 | 5 | The API description ${genModel.apiName} features the following endpoint types (a.k.a. service contracts): 6 | 7 | <#list genModel.endpoints as endpoint> 8 | * ${endpoint.name} 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/freemarker-example/FreemarkerReportStub-Grammar.md.ftl: -------------------------------------------------------------------------------- 1 | # Report for MDSL specification ${fileName} 2 | 3 | ## Endpoint Types 4 | 5 | The API description ${apiName} features the following endpoint types (a.k.a. service contracts): 6 | 7 | <#list serviceSpecification.contracts as endpoint_type> 8 | * ${endpoint_type.name} 9 | 10 | -------------------------------------------------------------------------------- /examples/freemarker-example/FreemarkerWebDemo.html.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | Welcome! 4 | 5 | 6 |

Welcome in ${apiName}!

7 |

Endpoints: 8 | tbc, stay tuned! 9 | 10 | -------------------------------------------------------------------------------- /examples/freemarker-example/ReferenceManagementAPI.mdsl: -------------------------------------------------------------------------------- 1 | API description ReferenceManagementServiceAPI 2 | 3 | data type PaperItemDTO { "title":D, "authors":D, "venue":D, "paperItemId":PaperItemKey } 4 | data type PaperItemKey { "doi":D } 5 | data type createPaperItemParameter { "who":D, "what":D, "where":D } 6 | 7 | endpoint type PaperArchiveFacade 8 | serves as INFORMATION_HOLDER_RESOURCE 9 | exposes 10 | operation createPaperItem 11 | with responsibility STATE_CREATION_OPERATION 12 | expecting 13 | payload createPaperItemParameter 14 | delivering 15 | payload PaperItemDTO 16 | operation lookupPapersFromAuthor 17 | with responsibility RETRIEVAL_OPERATION 18 | expecting 19 | payload D 20 | delivering 21 | payload PaperItemDTO* 22 | operation convertToMarkdownForWebsite 23 | expecting 24 | payload PaperItemKey 25 | delivering 26 | payload D 27 | 28 | -------------------------------------------------------------------------------- /examples/freemarker-example/src-gen/my-output.md: -------------------------------------------------------------------------------- 1 | # Report for MDSL specification ReferenceManagementAPI.mdsl 2 | 3 | ## Endpoint Types 4 | 5 | The API description ReferenceManagementServiceAPI features the following endpoint types (a.k.a. service contracts): 6 | 7 | * PaperArchiveFacade 8 | -------------------------------------------------------------------------------- /examples/graphql-example/apollo-client-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore node modules: 2 | /node_modules 3 | 4 | -------------------------------------------------------------------------------- /examples/graphql-example/apollo-client-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apollo-client-example-2022", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "start": "react-scripts start", 8 | "build": "react-scripts build", 9 | "test": "react-scripts test --env=jsdom", 10 | "eject": "react-scripts eject" 11 | }, 12 | "keywords": [], 13 | "author": "", 14 | "license": "ISC", 15 | "dependencies": { 16 | "@apollo/client": "^3.6.9", 17 | "apollo-client": "^2.6.10", 18 | "graphql": "^15.8.0", 19 | "react": "^18.2.0", 20 | "react-dom": "^18.2.0", 21 | "react-scripts": "^5.0.1" 22 | }, 23 | "browserslist": { 24 | "production": [ 25 | ">0.2%", 26 | "not dead", 27 | "not op_mini all" 28 | ], 29 | "development": [ 30 | "last 1 chrome version", 31 | "last 1 firefox version", 32 | "last 1 safari version" 33 | ] 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /examples/graphql-example/apollo-client-example/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | Apollo client example 11 | 12 | 13 | 16 |

17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /examples/graphql-example/apollo-client-example/readme.md: -------------------------------------------------------------------------------- 1 | # apollo-client-example 2 | 3 | This folder contains the sources to the GraphQL generation example mentioned in the MDSL Tools documentation. 4 | 5 | *Important note 1:* The following examples have quite a few dependencies, for instance on Node.js and npm. They assume you have an up-to-date installation of these JavaScript technologies that meets your current security and other operational requirements (e.g., development-level proof-of-concept or learning environment?). 6 | 7 | *Important note 2:* The instructions in this page were created in the fall of 2020, so some of the screen captions, code snippets, and instructions might contain information that was current at that time. The same holds for the examples in the repository. We recommend to always start from a stable and supported version of Node.js and the other dependencies, and bring in the code snippets and examples from this page step by step. We cannot guarantee that they will always work unmodified in future versions of MDSL and the dependencies in the examples. 8 | -------------------------------------------------------------------------------- /examples/graphql-example/apollo-server-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore node modules: 2 | /node_modules 3 | 4 | -------------------------------------------------------------------------------- /examples/graphql-example/apollo-server-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apollp-server-example", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "apollo-server": "^2.25.4", 14 | "graphql": "^15.3.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /examples/graphql-example/document-management-input.mdsl: -------------------------------------------------------------------------------- 1 | API description ReferenceManagementServiceAPI 2 | 3 | data type PaperItemDTO { "title":D, "authors":D, "venue":D, "paperItemId":PaperItemKey } 4 | data type PaperItemKey { "doi":D } 5 | data type CreatePaper { "who":D, "what":D, "where":D } 6 | 7 | endpoint type PaperArchiveFacade 8 | serves as INFORMATION_HOLDER_RESOURCE 9 | exposes 10 | operation createPaperItem 11 | with responsibility STATE_CREATION_OPERATION 12 | expecting 13 | payload CreatePaper 14 | delivering 15 | payload PaperItemDTO 16 | operation lookupPapersFromAuthor 17 | with responsibility RETRIEVAL_OPERATION 18 | expecting 19 | payload D 20 | delivering 21 | payload PaperItemDTO* 22 | operation convertToMarkdownForWebsite 23 | expecting 24 | payload PaperItemKey 25 | delivering 26 | payload D -------------------------------------------------------------------------------- /examples/graphql-example/readme.md: -------------------------------------------------------------------------------- 1 | # GraphQL Generation Example 2 | 3 | This folder contains the sources to the GraphQL generation example mentioned in the MDSL Tools documentation. 4 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Yarn / Node 2 | # yarn.lock # taken out Sept 8, 2022 3 | node_modules 4 | 5 | HELP.md 6 | .gradle 7 | build/ 8 | !gradle/wrapper/gradle-wrapper.jar 9 | !**/src/main/**/build/ 10 | !**/src/test/**/build/ 11 | 12 | ### STS ### 13 | .apt_generated 14 | .classpath 15 | .factorypath 16 | .project 17 | .settings 18 | .springBeans 19 | .sts4-cache 20 | 21 | ### IntelliJ IDEA ### 22 | .idea 23 | *.iws 24 | *.iml 25 | *.ipr 26 | out/ 27 | !**/src/main/**/out/ 28 | !**/src/test/**/out/ 29 | 30 | ### NetBeans ### 31 | /nbproject/private/ 32 | /nbbuild/ 33 | /dist/ 34 | /nbdist/ 35 | /.nb-gradle/ 36 | 37 | ### VS Code ### 38 | .vscode/ 39 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/README.md: -------------------------------------------------------------------------------- 1 | # spring-boot-example 2 | 3 | *Important note 1:* The example has quite a few dependencies, for instance on yarn. It assumes you have an up-to-date installation of these technologies that meets your current security and other operational requirements (e.g., development-level proof-of-concept or learning environment?). 4 | 5 | *Important note 2:* The instructions in this page were created in the fall of 2020, so some of the screen captions, code snippets, and instructions might contain information that was current at that time. The same holds for the examples in the repository. We recommend to always start from a stable and supported version of the other dependencies, and bring in the code snippets and examples from this page step by step. We cannot guarantee that they will always work unmodified in future versions of MDSL and the dependencies in this example. -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'org.springframework.boot' version '2.3.4.RELEASE' 3 | id 'io.spring.dependency-management' version '1.0.10.RELEASE' 4 | id 'java' 5 | id "com.moowork.node" version "1.3.1" 6 | } 7 | 8 | group = 'io.mdsl.graphql' 9 | version = '0.0.1-SNAPSHOT' 10 | sourceCompatibility = '11' 11 | 12 | repositories { 13 | mavenCentral() 14 | } 15 | 16 | dependencies { 17 | implementation 'com.graphql-java:graphql-java:15.0' 18 | implementation 'com.graphql-java:graphql-java-spring-boot-starter-webmvc:2.0' 19 | implementation 'com.google.guava:guava:26.0-jre' 20 | 21 | implementation 'org.springframework.boot:spring-boot-starter-web' 22 | testImplementation('org.springframework.boot:spring-boot-starter-test') { 23 | exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' 24 | } 25 | } 26 | 27 | test { 28 | useJUnitPlatform() 29 | } 30 | 31 | build.dependsOn yarn 32 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/codegen.yml: -------------------------------------------------------------------------------- 1 | schema: src/main/resources/schema.graphql 2 | generates: 3 | src/main/java/io/mdsl/graphql/javaexampleapp/generated/Types.java: 4 | plugins: 5 | - java 6 | src/main/java/io/mdsl/graphql/javaexampleapp/generated/Resolvers.java: 7 | plugins: 8 | - java-resolvers -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Microservice-API-Patterns/MDSL-Specification/9da0bac0e6133b8a69131925e38bc98e63e20af2/examples/graphql-example/spring-boot-example/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "java-app", 3 | "scripts": { 4 | "postinstall": "graphql-codegen" 5 | }, 6 | "dependencies": { 7 | "graphql": "^15.3.0", 8 | "@graphql-codegen/cli": "1.17.10", 9 | "@graphql-codegen/java": "1.17.8", 10 | "@graphql-codegen/java-resolvers": "1.17.8" 11 | } 12 | } -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'java-example-app' 2 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/src/main/java/io/mdsl/graphql/javaexampleapp/JavaExampleAppApplication.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.graphql.javaexampleapp; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class JavaExampleAppApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(JavaExampleAppApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/src/test/java/io/mdsl/graphql/javaexampleapp/JavaExampleAppApplicationTests.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.graphql.javaexampleapp; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class JavaExampleAppApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /examples/graphql-example/spring-boot-example/yarn.lock: -------------------------------------------------------------------------------- 1 | # This file is generated by running "yarn install" inside your project. 2 | # Manual changes might be lost - proceed with caution! 3 | 4 | __metadata: 5 | version: 6 6 | 7 | "spring-boot-example@workspace:.": 8 | version: 0.0.0-use.local 9 | resolution: "spring-boot-example@workspace:." 10 | languageName: unknown 11 | linkType: soft 12 | -------------------------------------------------------------------------------- /examples/java-example/README.md: -------------------------------------------------------------------------------- 1 | # Java Generation Example 2 | 3 | This folder contains the sources to the Java generation example mentioned [here](https://microservice-api-patterns.github.io/MDSL-Specification/java). 4 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/services/PaperArchiveFacade.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.services; 2 | 3 | import io.mdsl.generator.example.types.*; 4 | 5 | /** 6 | * This interface has been generated from the MDSL endpoint called 'PaperArchiveFacade'. 7 | * 8 | */ 9 | public interface PaperArchiveFacade { 10 | 11 | /** 12 | * MAP decorator: STATE_CREATION_OPERATION 13 | * 14 | * Find all MAP responsibility patterns here: https://microservice-api-patterns.org/patterns/responsibility/ 15 | */ 16 | PaperItemDTO createPaperItem(CreatePaperItemParameter anonymousInput); 17 | 18 | /** 19 | * MAP decorator: RETRIEVAL_OPERATION 20 | * 21 | * Find all MAP responsibility patterns here: https://microservice-api-patterns.org/patterns/responsibility/ 22 | */ 23 | PaperItemDTOList lookupPapersFromAuthor(LookupPapersFromAuthorRequestDataType anonymousInput); 24 | 25 | ConvertToMarkdownForWebsiteResponseDataType convertToMarkdownForWebsite(PaperItemKey anonymousInput); 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/types/ConvertToMarkdownForWebsiteResponseDataType.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.types; 2 | 3 | 4 | /** 5 | * This class has been generated from the MDSL data type 'ConvertToMarkdownForWebsiteResponseDataType'. 6 | * 7 | */ 8 | public class ConvertToMarkdownForWebsiteResponseDataType { 9 | 10 | /** 11 | * The name of this field (anonymous2) has been generated because it is not defined in your MDSL contract. 12 | * TODO: You can fix this by providing an attribute name in MDSL (regenerate) or rename the field right here (use rename refactoring). 13 | */ 14 | private String anonymous2; 15 | 16 | public String getAnonymous2() { 17 | return anonymous2; 18 | } 19 | 20 | public void setAnonymous2(String anonymous2) { 21 | this.anonymous2 = anonymous2; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/types/CreatePaperItemParameter.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.types; 2 | 3 | 4 | /** 5 | * This class has been generated from the MDSL data type 'createPaperItemParameter'. 6 | * 7 | */ 8 | public class CreatePaperItemParameter { 9 | 10 | private String who; 11 | private String what; 12 | private String where; 13 | 14 | public String getWho() { 15 | return who; 16 | } 17 | 18 | public void setWho(String who) { 19 | this.who = who; 20 | } 21 | 22 | public String getWhat() { 23 | return what; 24 | } 25 | 26 | public void setWhat(String what) { 27 | this.what = what; 28 | } 29 | 30 | public String getWhere() { 31 | return where; 32 | } 33 | 34 | public void setWhere(String where) { 35 | this.where = where; 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/types/LookupPapersFromAuthorRequestDataType.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.types; 2 | 3 | 4 | /** 5 | * This class has been generated from the MDSL data type 'lookupPapersFromAuthorRequestDataType'. 6 | * 7 | */ 8 | public class LookupPapersFromAuthorRequestDataType { 9 | 10 | /** 11 | * The name of this field (anonymous1) has been generated because it is not defined in your MDSL contract. 12 | * TODO: You can fix this by providing an attribute name in MDSL (regenerate) or rename the field right here (use rename refactoring). 13 | */ 14 | private String anonymous1; 15 | 16 | public String getAnonymous1() { 17 | return anonymous1; 18 | } 19 | 20 | public void setAnonymous1(String anonymous1) { 21 | this.anonymous1 = anonymous1; 22 | } 23 | 24 | 25 | } 26 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/types/PaperItemDTO.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.types; 2 | 3 | 4 | /** 5 | * This class has been generated from the MDSL data type 'PaperItemDTO'. 6 | * 7 | */ 8 | public class PaperItemDTO { 9 | 10 | private String title; 11 | private String authors; 12 | private String venue; 13 | private PaperItemKey paperItemId; 14 | 15 | public String getTitle() { 16 | return title; 17 | } 18 | 19 | public void setTitle(String title) { 20 | this.title = title; 21 | } 22 | 23 | public String getAuthors() { 24 | return authors; 25 | } 26 | 27 | public void setAuthors(String authors) { 28 | this.authors = authors; 29 | } 30 | 31 | public String getVenue() { 32 | return venue; 33 | } 34 | 35 | public void setVenue(String venue) { 36 | this.venue = venue; 37 | } 38 | 39 | public PaperItemKey getPaperItemId() { 40 | return paperItemId; 41 | } 42 | 43 | public void setPaperItemId(PaperItemKey paperItemId) { 44 | this.paperItemId = paperItemId; 45 | } 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/types/PaperItemDTOList.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.types; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * This class has been generated from the MDSL data type 'PaperItemDTOList'. 7 | * 8 | */ 9 | public class PaperItemDTOList { 10 | 11 | private List entries; 12 | 13 | public List getEntries() { 14 | return entries; 15 | } 16 | 17 | public void setEntries(List entries) { 18 | this.entries = entries; 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /examples/java-example/src-gen/io/mdsl/generator/example/types/PaperItemKey.java: -------------------------------------------------------------------------------- 1 | package io.mdsl.generator.example.types; 2 | 3 | 4 | /** 5 | * This class has been generated from the MDSL data type 'PaperItemKey'. 6 | * 7 | */ 8 | public class PaperItemKey { 9 | 10 | private String doi; 11 | 12 | public String getDoi() { 13 | return doi; 14 | } 15 | 16 | public void setDoi(String doi) { 17 | this.doi = doi; 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /examples/jolie-example/ReferenceManagementAPI.mdsl: -------------------------------------------------------------------------------- 1 | API description ReferenceManagementServiceAPI 2 | 3 | data type PaperItemDTO { "title":D, "authors":D, "venue":D, "paperItemId":PaperItemKey } 4 | data type PaperItemKey { "doi":D } 5 | data type createPaperItemParameter { "who":D, "what":D, "where":D } 6 | 7 | endpoint type PaperArchiveFacade 8 | serves as INFORMATION_HOLDER_RESOURCE 9 | exposes 10 | operation createPaperItem 11 | with responsibility STATE_CREATION_OPERATION 12 | expecting 13 | payload createPaperItemParameter 14 | delivering 15 | payload PaperItemDTO 16 | operation lookupPapersFromAuthor 17 | with responsibility RETRIEVAL_OPERATION 18 | expecting 19 | payload D 20 | delivering 21 | payload PaperItemDTO* 22 | operation convertToMarkdownForWebsite 23 | expecting 24 | payload PaperItemKey 25 | delivering 26 | payload D 27 | 28 | -------------------------------------------------------------------------------- /examples/open-api-example/ReferenceManagementAPI.mdsl: -------------------------------------------------------------------------------- 1 | API description ReferenceManagementServiceAPI 2 | 3 | data type PaperItemDTO { "title":D, "authors":D, "venue":D, "paperItemId":PaperItemKey } 4 | data type PaperItemKey { "doi":D } 5 | data type createPaperItemParameter { "who":D, "what":D, "where":D } 6 | 7 | endpoint type PaperArchiveFacade 8 | serves as INFORMATION_HOLDER_RESOURCE 9 | exposes 10 | operation createPaperItem 11 | with responsibility STATE_CREATION_OPERATION 12 | expecting 13 | payload createPaperItemParameter 14 | delivering 15 | payload PaperItemDTO 16 | operation lookupPapersFromAuthor 17 | with responsibility RETRIEVAL_OPERATION 18 | expecting 19 | payload "author": D 20 | delivering 21 | payload PaperItemDTO* 22 | operation convertToMarkdownForWebsite 23 | expecting 24 | payload PaperItemKey 25 | delivering 26 | payload D -------------------------------------------------------------------------------- /examples/protocol-buffers-example/ReferenceManagementAPI.mdsl: -------------------------------------------------------------------------------- 1 | API description ReferenceManagementServiceAPI 2 | 3 | data type PaperItemDTO { "title":D, "authors":D, "venue":D, "paperItemId":PaperItemKey } 4 | data type PaperItemKey { "doi":D } 5 | data type createPaperItemParameter { "who":D, "what":D, "where":D } 6 | 7 | endpoint type PaperArchiveFacade 8 | serves as INFORMATION_HOLDER_RESOURCE 9 | exposes 10 | operation createPaperItem 11 | with responsibility STATE_CREATION_OPERATION 12 | expecting 13 | payload createPaperItemParameter 14 | delivering 15 | payload PaperItemDTO 16 | operation lookupPapersFromAuthor 17 | with responsibility RETRIEVAL_OPERATION 18 | expecting 19 | payload D 20 | delivering 21 | payload PaperItemDTO* 22 | operation convertToMarkdownForWebsite 23 | expecting 24 | payload PaperItemKey 25 | delivering 26 | payload D 27 | 28 | -------------------------------------------------------------------------------- /examples/protocol-buffers-example/grpc-code-sample/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /examples/protocol-buffers-example/grpc-code-sample/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'grpc-code-sample' 2 | 3 | -------------------------------------------------------------------------------- /examples/protocol-buffers-example/grpc-code-sample/src/main/proto/ReferenceManagementAPI.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReferenceManagementServiceAPI; 4 | 5 | message PaperItemDTO { 6 | string title = 1; 7 | string authors = 2; 8 | string venue = 3; 9 | PaperItemKey paperItemId = 4; 10 | } 11 | 12 | message PaperItemKey { 13 | string doi = 1; 14 | } 15 | 16 | message createPaperItemParameter { 17 | string who = 1; 18 | string what = 2; 19 | string where = 3; 20 | } 21 | 22 | message lookupPapersFromAuthorRequestMessage { 23 | string anonymous1 = 1; 24 | } 25 | 26 | message PaperItemDTOList { 27 | repeated PaperItemDTO entries = 1; 28 | } 29 | 30 | message ConvertToMarkdownForWebsiteResponseMessage { 31 | string anonymous2 = 1; 32 | } 33 | 34 | service PaperArchiveFacade { 35 | rpc lookupPapersFromAuthor(lookupPapersFromAuthorRequestMessage) returns (PaperItemDTOList); 36 | rpc createPaperItem(createPaperItemParameter) returns (PaperItemDTO); 37 | rpc convertToMarkdownForWebsite(PaperItemKey) returns (ConvertToMarkdownForWebsiteResponseMessage); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /examples/protocol-buffers-example/src-gen/ReferenceManagementAPI.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package ReferenceManagementServiceAPI; 4 | 5 | message PaperItemDTO { 6 | string title = 1; 7 | string authors = 2; 8 | string venue = 3; 9 | PaperItemKey paperItemId = 4; 10 | } 11 | 12 | message PaperItemKey { 13 | string doi = 1; 14 | } 15 | 16 | message createPaperItemParameter { 17 | string who = 1; 18 | string what = 2; 19 | string where = 3; 20 | } 21 | 22 | message lookupPapersFromAuthorRequestMessage { 23 | string anonymous1 = 1; 24 | } 25 | 26 | message PaperItemDTOList { 27 | repeated PaperItemDTO entries = 1; 28 | } 29 | 30 | message ConvertToMarkdownForWebsiteResponseMessage { 31 | string anonymous2 = 1; 32 | } 33 | 34 | service PaperArchiveFacade { 35 | rpc lookupPapersFromAuthor(lookupPapersFromAuthorRequestMessage) returns (PaperItemDTOList); 36 | rpc createPaperItem(createPaperItemParameter) returns (PaperItemDTO); 37 | rpc convertToMarkdownForWebsite(PaperItemKey) returns (ConvertToMarkdownForWebsiteResponseMessage); 38 | } 39 | 40 | -------------------------------------------------------------------------------- /examples/readme.md: -------------------------------------------------------------------------------- 1 | ## MDSL examples 2 | 3 | This folder contains examples of the following types: 4 | 5 | * Basic examples (in this folder) 6 | * Examples used in the [MDSL Git pages](https://microservice-api-patterns.github.io/MDSL-Specification/index) 7 | 8 | * Advanced examples ([in this folder](examples-advanced)), provided as-is 9 | * Experimental MDSL snippets (that can come and go any time) 10 | * An [example project](./mdsl-standalone-example) that shows how MDSL can be used in a standalone Java application 11 | 12 | *Update (March 17, 2022):* 13 | 14 | * JaamSim2MDSL example, get started with the [readme](examples-advanced/jaamsim-to-mdsl) 15 | 16 | More examples are available upon request (from [ZIO a.k.a. socadk](https://ozimmer.ch/about/)). 17 | -------------------------------------------------------------------------------- /examples/stories-and-flows/JobAndHiringScenario.mdsl: -------------------------------------------------------------------------------- 1 | API description AllStoryOptions 2 | 3 | scenario JobPortalMatchmaking 4 | story Interview 5 | when "a job candidate is found" 6 | a "HR consultant" // role 7 | wants to "startInterviewProcess" at "LocationSet" // business activity 8 | yielding "an employment contract" 9 | so that "company can grow" // goal 10 | 11 | story JobOffer 12 | a "department head" // role 13 | wants to CRUD "JobOffer" with "positionName" and "jobResponsibilities" and "expectedSkills" and "offeredSalary" 14 | 15 | story Candidate 16 | a "candidate" // role 17 | wants to CQRS "JobOffer" 18 | so that "they find a new job" --------------------------------------------------------------------------------