Skip to content

Instantly share code, notes, and snippets.

@dcbriccetti
Created January 3, 2014 05:37
Show Gist options
  • Save dcbriccetti/8233368 to your computer and use it in GitHub Desktop.
Save dcbriccetti/8233368 to your computer and use it in GitHub Desktop.
Surprising generation of Option[String] properties for class from—I thought—required XML elements. The goal is to require all four elements but not in any particular order.
<xs:complexType name="NewSshServer">
<xs:all>
<xs:element name="uuid" type="xs:string"/>
<xs:element name="hostname" type="xs:string"/>
<xs:element name="username" type="xs:string"/>
<xs:element name="password" type="xs:string"/>
</xs:all>
</xs:complexType>
case class NewSshServer(uuid: Option[String] = None,
hostname: Option[String] = None,
username: Option[String] = None,
password: Option[String] = None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment