Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-2115

Improve SpringBoot archetype + Swagger configuration

    Details

      Description

      When we generate a project using SpringBoot archetype ( https://github.com/kiegroup/kogito-runtimes/blob/master/archetypes/kogito-springboot-archetype/src/main/resources/archetype-resources/pom.xml#L59-L61 ), we configure Swagger plugin to look for REST endpoints in ${groupId} as package.
      This configuration is often not enough: DMN resources are codegenerated using as package name an escaped version of the attribute namespace (that usually starts with http_).
      The result of this is that swagger documentation is not created without altering the plugin configuration.

      We can improve the situation in multiple ways:

      • relax the configuration adding something like (this could be wrong if namespace will not start as http)

        <useResourcePackagesChildren>true</useResourcePackagesChildren>
        <resourcePackages>
        <resourcePackage>http</resourcePackage>
        </resourcePackages>

      • document in archetype readme how to edit the configuration to cover other packages
      • change target location of rest endpoint classes (= move them to groupId package or in another predefined location)

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  evacchi Edoardo Vacchi
                  Reporter:
                  danielezonca Daniele Zonca
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: