Github user Jens-G commented on a diff in the pull request:

    https://github.com/apache/thrift/pull/774#discussion_r49244531
  
    --- Diff: lib/xml/thrift-idl.xsd ---
    @@ -0,0 +1,265 @@
    +<?xml version="1.0" encoding="UTF-8"?>
    +<schema xmlns="http://www.w3.org/2001/XMLSchema";
    +        targetNamespace="http://thrift.apache.org/xml/idl"; 
    +        xmlns:tns="http://thrift.apache.org/xml/idl"; 
    +        elementFormDefault="qualified">
    +
    +  <element name="idl" type="tns:IDL" />
    +  <element name="document" type="tns:Document" />
    +
    +  <complexType name="IDL">
    +    <sequence>
    +      <element ref="tns:document" minOccurs="1" maxOccurs="unbounded"/>
    +    </sequence>
    +  </complexType>
    +
    +  <complexType name="Document">
    +    <sequence>
    +      <choice minOccurs="0" maxOccurs="unbounded">
    +        <element name="include" type="tns:Include" />
    +        <element name="namespace" type="tns:Namespace" />
    +      </choice>
    +      <choice minOccurs="0" maxOccurs="unbounded">
    +        <element name="exception" type="tns:Exception" />
    +        <element name="typedef" type="tns:Typedef" />
    +        <element name="service" type="tns:Service" />
    +        <element name="struct" type="tns:Struct" />
    +        <element name="const" type="tns:Const" />
    +        <element name="union" type="tns:Union" />
    +        <element name="enum" type="tns:Enum" />
    +      </choice>
    +    </sequence>
    +    <attribute name="name" type="string" />
    +    <attribute name="targetNamespace" type="anyURI" />
    +    <attribute name="doc" type="string" />
    +  </complexType>
    +
    +  <complexType name="Include">
    +    <attribute name="file" type="string" />
    +    <attribute name="name" type="string" />
    +  </complexType>
    +
    +  <complexType name="Namespace">
    +    <sequence>
    +      <element name="annotation" type="tns:Annotation" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +    </sequence>
    +    <attribute name="name" type="string" />
    +    <attribute name="value" type="string" />
    +    <attribute name="doc" type="string" />
    +  </complexType>
    +
    +  <group name="AbstractStruct">
    +    <sequence>
    +      <element name="field" type="tns:Field" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +      <element name="annotation" type="tns:Annotation" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +    </sequence>
    +  </group>
    +
    +  <attributeGroup name="StructAttributes">
    +    <attribute name="name" type="string" />
    +    <attribute name="doc" type="string" />
    +  </attributeGroup>
    +
    +  <complexType name="Exception">
    +    <group ref="tns:AbstractStruct" />
    +    <attributeGroup ref="tns:StructAttributes" />
    +  </complexType>
    +
    +  <complexType name="Service">
    +    <sequence>
    +      <element name="method" type="tns:Method" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +      <element name="annotation" type="tns:Annotation" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +    </sequence>
    +    <attribute name="name" type="string" use="required" />
    +    <attribute name="targetNamespace" type="string" use="required" />
    +    <attribute name="parent-module" type="string" use="optional" />
    +    <attribute name="parent-id" type="string" use="optional" /> 
    +    <attribute name="doc" type="string" />
    +  </complexType>
    +
    +  <complexType name="Method">
    +    <sequence>
    +      <element name="returns" type="tns:ThriftType" />
    +      <element name="arg" type="tns:Field" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +      <element name="throws" type="tns:Field" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +      <element name="annotation" type="tns:Annotation" 
    +               minOccurs="0" maxOccurs="unbounded" />
    +    </sequence>
    +    <attribute name="name" type="string" use="required" />
    +    <attribute name="oneway" type="boolean" />
    +    <attribute name="doc" type="string" />
    +  </complexType>
    +
    +  <complexType name="Typedef">
    +    <complexContent>
    +      <extension base="tns:ThriftType">
    +        <sequence>
    +          <element name="annotation" type="tns:Annotation" 
    +                   minOccurs="0" maxOccurs="unbounded" />
    +        </sequence>
    +        <attribute name="name" type="string" use="required" />
    +        <attribute name="doc" type="string" />
    +      </extension>
    +    </complexContent>
    +  </complexType>
    +
    +  <complexType name="Struct">
    +    <group ref="tns:AbstractStruct" />
    +    <attributeGroup ref="tns:StructAttributes" />
    +  </complexType>
    +
    +  <complexType name="Union">
    +    <group ref="tns:AbstractStruct" />
    +    <attributeGroup ref="tns:StructAttributes" />
    +  </complexType>
    +
    +  <complexType name="Enum">
    +    <sequence>
    +      <element name="member" minOccurs="1" maxOccurs="unbounded">
    +        <complexType>
    +          <sequence>
    +            <element name="annotation" type="tns:Annotation" 
    +                     minOccurs="0" maxOccurs="unbounded" />
    +          </sequence>
    +          <attribute name="name" type="string" use="required" />
    +          <attribute name="value" type="int" />
    +          <attribute name="explicit" type="boolean" />
    +          <attribute name="doc" type="string" />
    +        </complexType>
    +      </element>
    +      <element name="annotation" type="tns:Annotation" 
    +                minOccurs="0" maxOccurs="unbounded" />
    +    </sequence>
    +    <attribute name="name" type="string" use="required" />
    +    <attribute name="doc" type="string" />
    +  </complexType>
    +
    +  <complexType name="Field">
    +    <complexContent>
    +      <extension base="tns:ThriftType">
    +        <sequence>
    +          <element name="default" minOccurs="0" maxOccurs="1">
    +            <complexType>
    +              <group ref="tns:ConstValue" />
    +            </complexType>
    +          </element>
    +          <element name="annotation" type="tns:Annotation" 
    +                   minOccurs="0" maxOccurs="unbounded" />
    +        </sequence>
    +        <attribute name="field-id" type="long" />
    +        <attribute name="name" type="string" use="required" />
    +        <attribute name="required" type="tns:Requiredness" />
    +        <attribute name="doc" type="string" />
    +      </extension>
    +    </complexContent>
    +  </complexType>
    +
    +  <simpleType name="Requiredness">
    +    <restriction base="string">
    +      <enumeration value="required" />
    +      <enumeration value="optional" />
    +    </restriction>
    --- End diff --
    
    Ok, I did not read it correctly. The attribute is of course optional by 
default, and that's perfectly fine.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to