eclipse-esmf / esmf-sdk

Load Aspect Models and their artifacts as Java code; share components to realize SAMM as code
https://eclipse-esmf.github.io/esmf-developer-guide/index.html
Mozilla Public License 2.0
25 stars 12 forks source link

[Task] Improve OpenAPI generation #195

Closed atextor closed 5 months ago

atextor commented 2 years ago

Is your task related to a problem? Please describe.

  1. Currently, for model elements such as bamm:Entitys, separate named sub-schemas are generated when an OpenAPI spec is generated for an Aspect Model. Theses subschemas have names that are derived from the fully qualified model element URN in order to prevent name clashes. However, in many cases no name clash occurs in a model and at the same time it would be desirable to use only the model element's local name as an identifier for the subschema to improve readability.
  2. Depending on the tool the OpenAPI schema is going to be used with, it might be either more desirable to have the whole schema including its subschemas in a single file, or it might be more helpful to split the file and have subschemas in separate files (that are included in the root schema).

Describe the solution you'd like

  1. The OpenAPI generation API should allow a caller to decide whether only local names are used to identify subschemas or if fully qualified names are generated.
  2. The OpenAPI generation API should also allow the caller to decide if separate artifacts are written for each subschema.
  3. Both of the above funtionalities should be exposed to bamm-cli users via command line options.
github-actions[bot] commented 5 months ago

Release v2.7.0 addresses this.