Unnamed substructures cause problems with document generator and Swagger code generation

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major
    • None
    • Affects Version/s: PRD01
    • Component/s: Core
    • None
    • Environment:

       

       

    • Hide

       

      The substructure of element 'SigningTimeBoundaries' of the first snippet will be referenced '#/definitions/dss2-SigningTimeInfoType%3ASigningTimeBoundaries' in the JSON schema. The handling of the (required) URL encoding of the reference target fails. To avoid such problems use explicitly named structure as shown in the second snippet.

       <xs:complexType name="SigningTimeInfoType">
         <xs:sequence>
           <xs:element name="SigningTime" type="xs:dateTime"/>
           <xs:element name="SigningTimeBoundaries" minOccurs="0">
             <xs:complexType>
               <xs:sequence>
                 <xs:element name="LowerBoundary" type="xs:dateTime" minOccurs="0"/>
                 <xs:element name="UpperBoundary" type="xs:dateTime" minOccurs="0"/>
               </xs:sequence>
             </xs:complexType>
           </xs:element>
         </xs:sequence>
       </xs:complexType>
      
      

       

      <xs:complexType name="SigningTimeInfoType">
       <xs:sequence>
         <xs:element name="SigningTime" type="xs:dateTime"/>
         <xs:element name="SigningTimeBoundaries" type="dss2:SigningTimeBoundariesType" minOccurs="0"/>
         </xs:sequence>
       </xs:complexType>
      
      <xs:complexType name="SigningTimeBoundariesType"> 
        <xs:sequence> 
          <xs:element name="LowerBoundary" type="xs:dateTime" minOccurs="0"/>
          <xs:element name="UpperBoundary" type="xs:dateTime" minOccurs="0"/>
       </xs:sequence> 
      </xs:complexType> 
      

       

       

      Show
        The substructure of element 'SigningTimeBoundaries' of the first snippet will be referenced '#/definitions/dss2-SigningTimeInfoType%3ASigningTimeBoundaries' in the JSON schema. The handling of the (required) URL encoding of the reference target fails. To avoid such problems use explicitly named structure as shown in the second snippet. <xs:complexType name= "SigningTimeInfoType" > <xs:sequence> <xs:element name= "SigningTime" type= "xs:dateTime" /> <xs:element name= "SigningTimeBoundaries" minOccurs= "0" > <xs:complexType> <xs:sequence> <xs:element name= "LowerBoundary" type= "xs:dateTime" minOccurs= "0" /> <xs:element name= "UpperBoundary" type= "xs:dateTime" minOccurs= "0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType>   <xs:complexType name= "SigningTimeInfoType" > <xs:sequence> <xs:element name= "SigningTime" type= "xs:dateTime" /> <xs:element name= "SigningTimeBoundaries" type= "dss2:SigningTimeBoundariesType" minOccurs= "0" /> </xs:sequence> </xs:complexType> <xs:complexType name= "SigningTimeBoundariesType" > <xs:sequence> <xs:element name= "LowerBoundary" type= "xs:dateTime" minOccurs= "0" /> <xs:element name= "UpperBoundary" type= "xs:dateTime" minOccurs= "0" /> </xs:sequence> </xs:complexType>    

      Unnamed local types cause challanges with document generation. But it turns out that the use of this feature also prohibits succesful code generation using Swagger tooling. The core specification has only one single (sub-)structure but with the expectred profiles this will grown significantly.

       

            Assignee:
            Andreas Kuehne (Inactive)
            Reporter:
            Andreas Kuehne (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: