<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../xslt/schema.xslt"?>

<schema
    elementFormDefault="qualified"
    attributeFormDefault="unqualified"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:identity="http://docs.openstack.org/identity/api/v2.0"
    xmlns:RAX-KSKEY="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0"
    xmlns:atom="http://www.w3.org/2005/Atom"
    targetNamespace="http://docs.rackspace.com/identity/api/ext/RAX-KSKEY/v1.0"
>
    <!--Import schema we are extending -->
    <import namespace="http://docs.openstack.org/identity/api/v2.0"
        schemaLocation="credentials.xsd"/>
    
    <!-- Elements -->
    <element name="apikeyCredentials" type="RAX-KSKEY:apikeyCredentialsWithUsername" substitutionGroup="identity:credential"/>
    
    <!-- Complex Types -->
    <complexType name="apikeyCredentials">
        <complexContent>
            <extension base="identity:CredentialType">
                <attribute name="apikey" type="xsd:string" use="required" ></attribute>
            </extension>
        </complexContent>
    </complexType>

    <complexType name="apikeyCredentialsWithUsername">
        <complexContent>
            <extension base="identity:CredentialType">
                <attribute name="username" type="xsd:string" use="required" ></attribute>
                <attribute name="apikey" type="xsd:string" use="required" ></attribute>
            </extension>
        </complexContent>
    </complexType>
</schema>

