Validate IDL Against XSD
authorJason Boyer <JBoyer@equinoxOLI.org>
Tue, 14 Dec 2021 17:48:32 +0000 (12:48 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 10 Aug 2022 15:43:58 +0000 (11:43 -0400)
Largely field name typos.

Sponsored-by: C/W MARS
Sponsored-by: Missouri Evergreen Consortium
Signed-off-by: Jason Boyer <JBoyer@equinoxOLI.org>
Signed-off-by: rfrasur <rfrasur@library.in.gov>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/examples/fm_IDL.xml

index e744c69..ff66eec 100644 (file)
@@ -824,8 +824,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                                         parent table.
                        -->
                        <field reporter:label="Source Queue" name="queue" reporter:datatype="int"/>
-                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestsamp"/>
-                       <field reporter:label="Update Time" name="update_time" reporter:datatype="timestsamp"/>
+                       <field reporter:label="Create Time" name="create_time" reporter:datatype="timestamp"/>
+                       <field reporter:label="Update Time" name="update_time" reporter:datatype="timestamp"/>
                        <field reporter:label="State" name="state" reporter:datatype="text"/>
                        <field reporter:label="Action Type" name="action_type" reporter:datatype="text"/>
                        <field reporter:label="Total Actions" name="total_actions" reporter:datatype="int"/>
@@ -970,7 +970,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
         </permacrud>
        </class>
 
-       <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:subfield_safe="true">
+       <class id="cmrcsubfld" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="config::marc_subfield" oils_persist:tablename="config.marc_subfield" reporter:label="MARC Subfields" oils_persist:field_safe="true">
                <fields oils_persist:primary="id" oils_persist:sequence="config.marc_subfield_id_seq">
                        <field reporter:label="ID"   name="id" reporter:datatype="id"/>
                        <field reporter:label="MARC Format" name="marc_format" reporter:datatype="link" oils_obj:required="true"/>
@@ -2693,7 +2693,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
        </class>
        <class id="ccbi" controller="open-ils.cstore open-ils.pcrud" oils_obj:fieldmapper="container::copy_bucket_item" oils_persist:tablename="container.copy_bucket_item" reporter:label="Copy Bucket Item">
                <fields oils_persist:primary="id" oils_persist:sequence="container.copy_bucket_item_id_seq">
-                       <field name="bucket" />
+                       <field name="bucket" reporter:datatype="link"/>
                        <field name="id" reporter:datatype="id" />
                        <field name="target_copy" reporter:datatype="link"/>
                        <field name="create_time" reporter:datatype="timestamp" />
@@ -2708,7 +2708,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
                                <retrieve permission="ADMIN_COPY_BUCKET">
-                    <context link="bucket" owning_lib="owning_lib"/>
+                    <context link="bucket" field="owning_lib"/>
                 </retrieve>
             </actions>
         </permacrud>
@@ -4187,22 +4187,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
+                               <create permission="ADMIN_TOOLBAR" context_field="org" />
                                <retrieve permission="ADMIN_TOOLBAR STAFF_LOGIN" context_field="org">
                                        <context link="usr" field="home_ou" />
                                        <context link="ws" field="owning_lib" />
                                </retrieve>
-                               <create permission="ADMIN_TOOLBAR" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </create>
-                               <update permission="ADMIN_TOOLBAR" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </update>
-                               <delete permission="ADMIN_TOOLBAR" context_field="org">
-                                       <context link="usr" field="home_ou" />
-                                       <context link="ws" field="owning_lib" />
-                               </delete>
+                               <update permission="ADMIN_TOOLBAR" context_field="org"/>
+                               <delete permission="ADMIN_TOOLBAR" context_field="org"/>
                        </actions>
                </permacrud>
        </class>
@@ -4340,7 +4331,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                <links>
                        <link field="master_record" reltype="has_a" key="id" map="" class="bre"/>
                        <link field="source_records" reltype="has_many" key="metarecord" map="source" class="mmrsm"/>
-                       <link field="source_maps" reltype="has_many" key="metarecord" class="mmrsm"/>
+                       <link field="source_maps" reltype="has_many" key="metarecord" map="" class="mmrsm"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
@@ -4520,8 +4511,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <retrieve/>
                                <create permission="CREATE_METABIB_FIELD" global_required="true"/>
+                               <retrieve/>
                                <update permission="UPDATE_METABIB_FIELD" global_required="true"/>
                                <delete permission="DELETE_METABIB_FIELD" global_required="true"/>
                        </actions>
@@ -4685,7 +4676,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <link field="payment" reltype="might_have" key="id" map="" class="mp"/>
                        <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
-                       <link field="billing" reltype="might_have" key="id" class="mb"/>
+                       <link field="billing" reltype="might_have" key="id" map="" class="mb"/>
                </links>
        </class>
        <class id="mrd" controller="open-ils.cstore" oils_obj:fieldmapper="metabib::record_descriptor" oils_persist:tablename="metabib.rec_descriptor" reporter:label="Basic Record Descriptor">
@@ -5652,7 +5643,7 @@ SELECT  usr,
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
                                <retrieve permission="ADMIN_CALLNUMBER_BUCKET">
-                    <context link="bucket" owning_lib="owning_lib"/>
+                    <context link="bucket" field="owning_lib"/>
                 </retrieve>
             </actions>
         </permacrud>
@@ -5686,10 +5677,10 @@ SELECT  usr,
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context="owning_lib" owning_user="owner"/>
+                               <create permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <retrieve permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <update permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <delete permission="CREATE_BIB_BUCKET ADMIN_BIB_BUCKET" context_field="owning_lib" owning_user="owner"/>
                        </actions>
                </permacrud>
        </class>
@@ -7307,10 +7298,10 @@ SELECT  usr,
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context="owning_lib" owning_user="owner"/>
+                               <create permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <retrieve permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <update permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <delete permission="CREATE_CALLNUMBER_BUCKET ADMIN_CALLNUMBER_BUCKET" context_field="owning_lib" owning_user="owner"/>
                        </actions>
                </permacrud>
        </class>
@@ -7442,10 +7433,10 @@ SELECT  usr,
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context="owning_lib" owning_user="owner"/>
+                               <create permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <retrieve permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <update permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <delete permission="CREATE_USER_BUCKET ADMIN_USER_BUCKET" context_field="owning_lib" owning_user="owner"/>
                        </actions>
                </permacrud>
        </class>
@@ -7719,7 +7710,7 @@ SELECT  usr,
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
                                <retrieve permission="ADMIN_USER_BUCKET">
-                    <context link="bucket" owning_lib="owning_lib"/>
+                    <context link="bucket" field="owning_lib"/>
                 </retrieve>
             </actions>
         </permacrud>
@@ -8088,10 +8079,10 @@ SELECT  usr,
                </links>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
             <actions>
-                               <create/>
+                               <create permission="STAFF_LOGIN"/>
                                <retrieve/>
-                               <update/>
-                               <delete/>
+                               <update permission="STAFF_LOGIN"/>
+                               <delete permission="STAFF_LOGIN"/>
             </actions>
         </permacrud>
        </class>
@@ -8497,10 +8488,10 @@ SELECT  usr,
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
-                               <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context="owning_lib" owning_user="owner"/>
+                               <create permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <retrieve permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <update permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context_field="owning_lib" owning_user="owner"/>
+                               <delete permission="CREATE_COPY_BUCKET ADMIN_COPY_BUCKET" context_field="owning_lib" owning_user="owner"/>
                        </actions>
                </permacrud>
        </class>
@@ -8611,7 +8602,7 @@ SELECT  usr,
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
                        <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
                        <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="billing" reltype="has_a" key="id" class="mab"/>
+                       <link field="billing" reltype="has_a" key="id" map="" class="mab"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
@@ -8624,7 +8615,7 @@ SELECT  usr,
        <class id="mallp" controller="open-ils.cstore" 
                oils_obj:fieldmapper="money::all_payments" 
                oils_persist:tablename="money.all_payments" 
-               oils_persist="readonly" reporter:core="true"
+               oils_persist:readonly="true" reporter:core="true"
                reporter:label="Payments: All">
                <fields oils_persist:primary="id" oils_persist:sequence="money.payment_id_seq">
                        <field reporter:label="Amount" name="amount" reporter:datatype="money" />
@@ -8642,7 +8633,7 @@ SELECT  usr,
                        <link field="xact" reltype="has_a" key="id" map="" class="mbt"/>
                        <link field="accepting_usr" reltype="has_a" key="id" map="" class="au"/>
                        <link field="cash_drawer" reltype="has_a" key="id" map="" class="aws"/>
-                       <link field="billing" reltype="has_a" key="id" class="mallb"/>
+                       <link field="billing" reltype="has_a" key="id" map="" class="mallb"/>
                </links>
        </class>
 
@@ -8754,7 +8745,7 @@ SELECT  usr,
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
                                <retrieve permission="ADMIN_COPY_BUCKET">
-                    <context link="bucket" owning_lib="owning_lib"/>
+                    <context link="bucket" field="owning_lib"/>
                 </retrieve>
             </actions>
         </permacrud>
@@ -8957,7 +8948,7 @@ SELECT  usr,
        <class id="mallb" controller="open-ils.cstore" 
                oils_obj:fieldmapper="money::all_billings" 
                oils_persist:tablename="money.all_billings" 
-               oils_persist="readonly" reporter:label="All Billing Line Items">
+               oils_persist:readonly="true" reporter:label="All Billing Line Items">
                <fields oils_persist:primary="id" oils_persist:sequence="">
                        <field reporter:label="Amount" name="amount" reporter:datatype="money" />
                        <field reporter:label="Create Date" name="create_date" reporter:datatype="timestamp"/>
@@ -9140,7 +9131,7 @@ SELECT  usr,
         </permacrud>
        </class>
 
-       <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist="readonly">
+       <class id="aurs" controller="open-ils.cstore open-ils.reporter-store open-ils.pcrud" oils_obj:fieldmapper="acq::user_request_status" reporter:label="User Purchase Request with Status" oils_persist:readonly="true">
         <oils_persist:source_definition><![CDATA[
             SELECT r.*, CASE
                         WHEN r.cancel_reason IS NOT NULL THEN 7 -- Canceled
@@ -13737,7 +13728,7 @@ SELECT  usr,
                        <field reporter:label="Group Members" name="members" oils_persist:virtual="true" reporter:datatype="link"/>
                </fields>
                <links>
-                       <link field="members" reltype="has_many" key="floating_group" class="cfgm"/>
+                       <link field="members" reltype="has_many" key="floating_group" map="" class="cfgm"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
@@ -13758,8 +13749,8 @@ SELECT  usr,
                        <field reporter:label="Exclude" name="exclude" reporter:datatype="bool" oils_obj:required="true"/>
                </fields>
                <links>
-                       <link field="floating_group" reltype="has_a" key="id" class="cfg"/>
-                       <link field="org_unit" reltype="has_a" key="id" class="aou"/>
+                       <link field="floating_group" reltype="has_a" key="id" map="" class="cfg"/>
+                       <link field="org_unit" reltype="has_a" key="id" map="" class="aou"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
@@ -13949,7 +13940,7 @@ SELECT  usr,
                reporter:label="Carousel Types">
                <fields oils_persist:primary="id" oils_persist:sequence="config.carousel_type_id_seq">
                        <field reporter:label="Carousel Type ID" reporter:selector="name" name="id" reporter:datatype="id" />
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
                        <field reporter:label="Automatically Managed?" name="automatic" reporter:datatype="bool"/>
                        <field reporter:label="Filter By Age?" name="filter_by_age" reporter:datatype="bool"/>
                        <field reporter:label="Filter By Item Owning Library?" name="filter_by_copy_owning_lib" reporter:datatype="bool"/>
@@ -13974,7 +13965,7 @@ SELECT  usr,
                        <field reporter:label="Carousel ID" name="id" reporter:datatype="id" reporter:selector="name"/>
                        <field reporter:label="Carousel Type" name="type" reporter:datatype="link" oils_obj:required="true"/>
                        <field reporter:label="Owner" name="owner" reporter:datatype="link" oils_obj:required="true"/>
-                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_obj:i18n="true"/>
+                       <field reporter:label="Name" name="name" reporter:datatype="text" oils_obj:required="true" oils_persist:i18n="true"/>
                        <field reporter:label="Bucket" name="bucket" reporter:datatype="link"/>
                        <field reporter:label="Creating User" name="creator" reporter:datatype="link"/>
                        <field reporter:label="Editing User" name="editor" reporter:datatype="link"/>
@@ -14075,7 +14066,7 @@ SELECT  usr,
                        <field reporter:label="API Key" name="api_key" reporter:datatype="text"/>
                </fields>
                <links>
-                       <link field="owner" reltype="has_a" key="id" class="aou"/>
+                       <link field="owner" reltype="has_a" key="id" map="" class="aou"/>
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>