RAML with xsd imports


#1

Hello,

Our REST api uses a standardized xml schema that is provided by another organization. The xsd’s are defined in a lot of files, with a lot of xs:import and xs:include statements. These imports are all relative, and as there are a lot of xsd-files, there are also a lot of import and include statements. Below you can find an example of such a given xsd.

<?xml version="1.0" encoding="UTF-8"?>
<ProcessPositionOpening
        releaseID="3.3"
        languageCode="en-US"
        xmlns="http://www.hr-xml.org/3"
        xmlns:oa="http://www.openapplications.org/oagis/9"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
            http://www.hr-xml.org/3 ../../xsd/hr-xml/Recruiting/org_hr-xml/3_3/Developer/BODs/ProcessPositionOpening.xsd
            http://www.openapplications.org/oagis/9 ../../xsd/hr-xml/Recruiting/org_openapplications_platform/1_2/OAGi-Platform.xsd">
...
</ProcessPositionOpening>

When we generate the documentation and display them in the API console, the content of the xsd is shown on screen. However, at that point we lose the location of the xsd. And as such, we lose the xsd-imports with relative paths.

Is there any way we can fix this, eg. have the absolute uri of the xsd-schema displayed above the content of the xsd? I am hoping I do not need to modify the 90-something xsd-files.

What is the common practice for this?


#2

I am also wondering what the common practice is with regards to the URLs that show up… for example, in our dev branch we use …/ relative path maps… but I see in many XSD examples they use fully qualified public http urls… wondering if that is some build step that replaces relative paths with absolute paths, or if that’s common to always refer to publicly published urls or what?