examples/invoice/invoice.schema.yaml in kwalify-0.1.0 vs examples/invoice/invoice.schema.yaml in kwalify-0.2.0
- old
+ new
@@ -1,59 +1,42 @@
###
### Kwalify schema example for invoice
###
-### $Rev$
-### $Release: 0.1.0 $
+### $Rev: 18 $
+### $Release: 0.2.0 $
### copyright(c) 2005 kuwata-lab all rights reserved.
###
type: map
required: yes
mapping:
- "invoice":
- type: integer
- required: yes
- "date":
- type: date
- required: yes
+ "invoice": { type: int, required: yes }
+ "date": { type: date, required: yes }
"bill-to": &customer
type: map
required: yes
mapping:
- "given":
- required: yes
- "family":
- required: yes
+ "given": { type: str, required: yes }
+ "family": { type: str, required: yes }
"address":
type: map
required: yes
mapping:
- "lines":
- "city":
- "state":
- "postal":
- type: integer
+ "lines": { type: str }
+ "city": { type: str }
+ "state": { type: str }
+ "postal": { type: int }
"ship-to": *customer
"product":
type: seq
required: yes
sequence:
- type: map
required: yes
mapping:
- "sku":
- required: yes
- pattern: /^[A-Z0-9]+$/
- "quantity":
- type: integer
- required: yes
- "description":
- "price":
- type: float
- "tax":
- type: float
- "total":
- type: float
- required: yes
- "comments":
- type: text
-
+ "sku": { type: str, required: yes, pattern: '/^[A-Z0-9]+$/' }
+ "quantity": { type: int, required: yes }
+ "description": { type: str }
+ "price": { type: float }
+ "tax": { type: float }
+ "total": { type: float, required: yes }
+ "comments": { type: str }