api-site: Add validation check for WADLs

Bug #1275007 reported by Diane Fleming
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-api-site
Fix Released
High
Andreas Jaeger

Bug Description

Can you add a validation check for WADL files to ensure they contain an xml:id at the parent resources level?

Like this – the top "resources" tag – must have an xml:id. This is a new requirement that has to do with the generation of PDFs from WADL files – without this, the paths are not unique across WADL files.

<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) 2014 OpenStack Foundation, All Rights Reserved -->
<application xmlns="http://wadl.dev.java.net/2009/02"
    xmlns:wadl="http://wadl.dev.java.net/2009/02"
    xmlns:xsd="http://docs.rackspacecloud.com/xsd/v1.0"
    xmlns:xsdxt="http://docs.rackspacecloud.com/xsd-ext/v1.0">
    <resources base="https://servers.api.openstack.com" xml:id="os-certificate-v3"> <========
        <resource id="v3" path="v3">
            <resource id="os-certificates" path="os-certificates">
                <method href="#createcertificate"/>
                <resource id="root" path="root">
                    <method href="#returncertificate"/>
                </resource>
            </resource>
        </resource>
    </resources>

Changed in openstack-api-site:
assignee: nobody → Andreas Jaeger (jaegerandi)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to api-site (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/70403

Revision history for this message
Andreas Jaeger (jaegerandi) wrote :

I can do the check for all resources tags, I think there's only one per file, isn't there?

I get these failures in api-site:

Checking syntax of XML files...
  api-ref/src/wadls/identity-api/src/v2.0/wadl/RAX-KSKEY-admin.wadl: resources missing xml:id attribute, line 33
  api-ref/src/wadls/volume-api/src/v1/volume-api.wadl: resources missing xml:id attribute, line 7
  api-ref/src/wadls/compute-api/src/ext/os-floating-ips.wadl: resources missing xml:id attribute, line 9
  api-ref/src/wadls/compute-api/src/ext/os-floating-ips-bulk.wadl: resources missing xml:id attribute, line 8
  api-ref/src/wadls/telemetry-api/src/v2/os-telemetry-api-2.0.wadl: resources missing xml:id attribute, line 15
  api-ref/src/wadls/netconn-api/src/metering-labels.wadl: resources missing xml:id attribute, line 16
Check failed, validated 781 XML files with 6 failures.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to database-api (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/70407

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to identity-api (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/70409

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to netconn-api (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/70410

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to volume-api (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/70412

Changed in openstack-api-site:
importance: Undecided → High
status: New → In Progress
Changed in openstack-api-site:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.