File tree Expand file tree Collapse file tree 8 files changed +751
-0
lines changed Expand file tree Collapse file tree 8 files changed +751
-0
lines changed Original file line number Diff line number Diff line change 1+ /node_modules /
Original file line number Diff line number Diff line change 1+ # Purchase Order Demo
2+
3+ Just run ` npm install ` to generate mappings and schemas for the ` purchaseorder.xsd ` :
4+
5+ * ` mappings/PurchaseOrder.standard.js ` - Jsonix mappings for the ` purchaseorder.xsd ` schema (standard naming)
6+ * ` mappings/PurchaseOrder.compact.js ` - Jsonix mappings for the ` purchaseorder.xsd ` schema (compact naming)
7+ * ` mappings/PurchaseOrder.jsonschema ` - JSON Schema generated for the ` purchaseorder.xsd `
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" standalone =" yes" ?>
2+ <jaxb : bindings
3+ version=" 2.1"
4+ xmlns:jaxb=" http://java.sun.com/xml/ns/jaxb"
5+ xmlns:jsonix=" http://jsonix.highsource.org/customizations"
6+ xmlns:xs=" http://www.w3.org/2001/XMLSchema"
7+
8+ jaxb:extensionBindingPrefixes=" jsonix" >
9+
10+ <jaxb : bindings schemaLocation =" ../schemas/purchaseorder.xsd" node =" /xs:schema" >
11+ <jaxb : schemaBindings >
12+ <jaxb : package name =" org.hisrc.jsonix.demos.po" />
13+ </jaxb : schemaBindings >
14+
15+ <jsonix : module name =" PurchaseOrder" >
16+ <jsonix : mapping name =" PO" package =" org.hisrc.jsonix.demos.po" schemaId =" https://cdn.rawgit.com/highsource/jsonix-schema-compiler/master/demos/po-npm/mappings/PurchaseOrder.jsonschema#" />
17+ <jsonix : output naming =" standard" fileName =" ${module.name}.standard.js" />
18+ <jsonix : output naming =" compact" fileName =" ${module.name}.compact.js" />
19+ <jsonix : jsonSchema fileName =" ${module.name}.jsonschema" />
20+ </jsonix : module >
21+ </jaxb : bindings >
22+
23+ </jaxb : bindings >
Original file line number Diff line number Diff line change 1+ var PurchaseOrder_Module_Factory = function ( ) {
2+ var PO = {
3+ n : 'PO' ,
4+ tis : [ {
5+ ln : 'Items.Item' ,
6+ tn : null ,
7+ ps : [ {
8+ n : 'productName' ,
9+ en : {
10+ lp : 'productName'
11+ }
12+ } , {
13+ n : 'quantity' ,
14+ en : {
15+ lp : 'quantity'
16+ } ,
17+ ti : 'Int'
18+ } , {
19+ n : 'usPrice' ,
20+ en : {
21+ lp : 'USPrice'
22+ } ,
23+ ti : 'Decimal'
24+ } , {
25+ n : 'comment' ,
26+ en : {
27+ lp : 'comment'
28+ }
29+ } , {
30+ n : 'shipDate' ,
31+ en : {
32+ lp : 'shipDate'
33+ } ,
34+ ti : 'Calendar'
35+ } , {
36+ n : 'partNum' ,
37+ an : {
38+ lp : 'partNum'
39+ } ,
40+ t : 'a'
41+ } ]
42+ } , {
43+ ln : 'PurchaseOrderType' ,
44+ ps : [ {
45+ n : 'shipTo' ,
46+ en : {
47+ lp : 'shipTo'
48+ } ,
49+ ti : '.USAddress'
50+ } , {
51+ n : 'billTo' ,
52+ en : {
53+ lp : 'billTo'
54+ } ,
55+ ti : '.USAddress'
56+ } , {
57+ n : 'comment' ,
58+ en : {
59+ lp : 'comment'
60+ }
61+ } , {
62+ n : 'items' ,
63+ en : {
64+ lp : 'items'
65+ } ,
66+ ti : '.Items'
67+ } , {
68+ n : 'orderDate' ,
69+ ti : 'Calendar' ,
70+ an : {
71+ lp : 'orderDate'
72+ } ,
73+ t : 'a'
74+ } ]
75+ } , {
76+ ln : 'USAddress' ,
77+ ps : [ {
78+ n : 'name' ,
79+ en : {
80+ lp : 'name'
81+ }
82+ } , {
83+ n : 'street' ,
84+ en : {
85+ lp : 'street'
86+ }
87+ } , {
88+ n : 'city' ,
89+ en : {
90+ lp : 'city'
91+ }
92+ } , {
93+ n : 'state' ,
94+ en : {
95+ lp : 'state'
96+ }
97+ } , {
98+ n : 'zip' ,
99+ en : {
100+ lp : 'zip'
101+ } ,
102+ ti : 'Decimal'
103+ } , {
104+ n : 'country' ,
105+ an : {
106+ lp : 'country'
107+ } ,
108+ t : 'a'
109+ } ]
110+ } , {
111+ ln : 'Items' ,
112+ ps : [ {
113+ n : 'item' ,
114+ col : true ,
115+ en : {
116+ lp : 'item'
117+ } ,
118+ ti : '.Items.Item'
119+ } ]
120+ } ] ,
121+ eis : [ {
122+ en : {
123+ lp : 'purchaseOrder'
124+ } ,
125+ ti : '.PurchaseOrderType'
126+ } , {
127+ en : {
128+ lp : 'comment'
129+ }
130+ } ]
131+ } ;
132+ return {
133+ PO : PO
134+ } ;
135+ } ;
136+ if ( typeof define === 'function' && define . amd ) {
137+ define ( [ ] , PurchaseOrder_Module_Factory ) ;
138+ }
139+ else {
140+ var PurchaseOrder_Module = PurchaseOrder_Module_Factory ( ) ;
141+ if ( typeof module !== 'undefined' && module . exports ) {
142+ module . exports . PO = PurchaseOrder_Module . PO ;
143+ }
144+ else {
145+ var PO = PurchaseOrder_Module . PO ;
146+ }
147+ }
You can’t perform that action at this time.
0 commit comments