DSD-DBS / capella-polarion

Capella-Polarion Bridge - bi-directional integration of the 2 things based on REST API
https://dsd-dbs.github.io/capella-polarion/
3 stars 1 forks source link

Determine `TYPES_POL2CAPELLA` dynamically from the config #32

Closed ewuerger closed 8 months ago

ewuerger commented 9 months ago

The config lacks configurability for the user:

oa: # Specify below
  - OperationalCapability: # Capella Type with references
      - involved_activities # Specify workitem links
      - involved_entities
      - constraints
  - OperationalActivity: # Capella Type w/o references
      - inputs
      - outputs
  - OperationalEntity: # Custom Type maps to Entity
      - activities
  - FunctionalExchange:
      type: OperationalInteraction
      links:
        - exchange_items

With this new way the user can configure a mapping from the Capella type to the wanted Polarion type. Also its now more verbose to configure links.

This also fixes the situation with Capella reusing types for different layers. This should happen after the refactoring. (Remove context from main)

micha91 commented 9 months ago

I would like to also include the serializer in the config:

oa: # Specify below
  - FunctionalExchange:
      polarion_type: operationalInteraction
      links:
        - exchange_items
  - OperationalCapability:
      serializer: include_pre_and_post_condition

If not defined in the config, the polarion_type should be equal to the Capella Type but starting small letter