SeelabFhdo / lemma

Home of the Language Ecosystem for Modeling Microservice Architecture (LEMMA)
MIT License
33 stars 8 forks source link

Add proper MIME type support #15

Closed frademacher closed 3 years ago

frademacher commented 3 years ago

Currently, the Technology Modeling Language does not provide full MIME type support.

While it is possible to model protocols with data formats, e.g.,

technology Example {
    protocols {
            sync rest data formats json default with format json;
            async amqp data formats json default with format json;
    }
}

the following is not possible

technology ExampleWithMimes {
    protocols {
        sync rest data formats "application/json" default with format "application/json";
        async amqp data formats "application/json" default with format "application/json";
    }
}

I pushed a branch called mime_type_support to change the DataFormat production rule in the Technology Modeling Language's grammar specification (and the cross-references to it, e.g., from the Service Modeling Language's grammar) to not rely on ID, but Xtext's STRING terminal rule instead. While this change seems to be working on the grammar level, it needs further testing.

If there are no obvious issues, the following issues need to be addressed (and maybe some more):

Finally, this change should make it into master together with the OpenAPI feature when it's ready.

frademacher commented 3 years ago

This issue was resolved with commit 60530cbe in LEMMA's master branch.