Skip to content

Add support for xsd:choice #17

@henkesn

Description

@henkesn

Would be great to have support for xsd:choice somehow. This one is not trivial, because there are no union types for graphql inputs. Perhaps we can support a subset though, e. g. for non-list types by having just all options as fields.

Example:

<xs:complexType name="uidEntityPublicSearchRequest">
  <xs:sequence>
    <xs:choice minOccurs="1" maxOccurs="1">
      <xs:element xmlns:q5="http://www.ech.ch/xmlns/eCH-0097/5" minOccurs="0" maxOccurs="1" name="uid" type="q5:uidStructureType"/>
     <xs:element xmlns:q6="http://www.ech.ch/xmlns/eCH-0097/5" minOccurs="0" maxOccurs="1" name="otherOrganisationId" type="q6:namedOrganisationIdType"/>
      <xs:element minOccurs="0" maxOccurs="1" name="uidEntitySearchParameters" type="tns:uidEntityPublicSearchParameters"/>
    </xs:choice>
  </xs:sequence>
</xs:complexType>

taken from https://www.uid-wse.admin.ch/V5.0/PublicServices.svc?WSDL. Could be mapped to something like

input UidEntityPublicSearchRequestInput {
  uid: UidStructureTypeInput
  uidEntitySearchParameters: UidEntityPublicSearchParametersInput
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions