Uploaded image for project: 'OASIS Digital Signature Services eXtended (DSS-X) TC'
  1. OASIS Digital Signature Services eXtended (DSS-X) TC
  2. DSSX-44

Unnamed substructures cause problems with document generator and Swagger code generation

    XMLWordPrintable

    Details

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

       

       

    • Proposal:
      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>    

      Description

      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.

       

        Attachments

          Activity

            People

            • Assignee:
              kuehne Andreas Kuehne
              Reporter:
              kuehne Andreas Kuehne
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: