IBM Support

PH27091: SWAGGER GENERATIONS IGNORES UML MULTIPLICITY WHEN GENERATING SWAGGER FROM PURE UML ATTRIBUTES

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When the Swagger transformation transforms a model that contains
    UML elements, the uml multiplicity 1 and 1..* are being ignored
    and do not generate "Required" Swagger tags.
    
    
    You can generate the tag if you apply the <<SwaggerProperty>> to
    the attribute. However, the transformation should just rely on
    multiplicity to generate the required property on pure UML
    classes and attributes.
    

Local fix

  • You can generate the tag if you apply the <<SwaggerProperty>> to
    the attribute. The following are the steps:
    
    
    - Right-Click the association1..* attribute and select
    properties
    - Select the properties tab,
    - Select the Stereotypes tab
    - Click the &#226; &#156;Apply Stereotypes&#226; &#157; button
    - Select the &#226; &#156;SwaggerProperty&#226; &#157; stereotype
    - Click OK
    - Either scroll down into the Stereotype properties and set the
    &#226; &#156;required&#226; &#157; property to &#226; &#156;True&#226; &#157;
    - Or, go to another attribute and then re-select the
    association1..* attribute again
    - In the properties, you should now see a REST tab, select the
    tab and check the &#226; &#156;Required&#226; &#157; box
    - Save the model and regenerate the swagger
    - The required tag is now generated:
    
    
    &#226; &#156;TestClass&#226; &#157; : {
    
       &#226; &#156;type&#226; &#157;: &#226; &#156;object&#226; &#157;,
    
       &#226; &#156;required&#226; &#157; : [ &#226; &#156;association1..*&#226; &#157; ],
    
       &#226; &#156;properties&#226; &#157; :  {
    
          &#226; &#156;someReqdAttribute&#226; &#157; : {
    
              &#226; &#156;type&#226; &#157; : &#226; &#156;string&#226; &#157;
    
       }
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * -                                                            *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * In RSAD 9.7.02, REST Service Model to Swagger Transformation *
    * ignores UML multiplicity when generating swagger from pure   *
    * UML attributes.                                              *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • In RSAD 9.7.0.3, REST Service Model to Swagger Transformation is
    generating UML attributes under required tag depends on the
    multiplicity.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH27091

  • Reported component name

    SW ARCHITECT WI

  • Reported component ID

    5724I7001

  • Reported release

    970

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2020-07-02

  • Closed date

    2020-09-30

  • Last modified date

    2020-09-30

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SW ARCHITECT WI

  • Fixed component ID

    5724I7001

Applicable component levels

  • R970 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYKBQ","label":"Rational Software Architect Designer for WebSphere Software"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"970","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 October 2021