# Synthetic Avouch example for Avouch Studio: a small file with schema errors on purpose. # All names and quotes are invented. formatVersion: 1 contexts: Sales: Orders and customers permission_rows_not_commands: [] knownSourceGaps: [] objectTypes: Order: colour: red # deliberate: an unknown key (the schema allows no extra keys here) context: Sales datasource: orders doc: 'shop#order' properties: status: class: canonicl # deliberate: not one of the allowed classes cite: { doc: 'shop#order', quote: Order status changes only through order commands } total: class: canonical cite: { doc: 'shop#order' } # deliberate: the quote is missing Customer: context: Sales datasource: customers doc: 'shop#customer' properties: status: class: canonical cite: { doc: 'shop#customer', quote: A customer is active until the account is closed } linkTypes: - { id: order_customer, from: Order, to: Customer, cardinality: 'N-1', via: customer_id, doc: 'shop#order' } # deliberate: the cardinality must look like N:1 actionTypes: PLACE_ORDER: context: Sales doc: 'shop#place' doc_term: Place order permission: keys: ['order:place'] cite: { doc: 'shop#permissions', quote: Placing an order needs order:place } submissionCriteria: - id: customer_active reads: [Customer.status] cite: { doc: 'shop#place', quote: Only an active customer can place an order } creates: [Order] edits: [] link_effects: order_customer: effect: The new order points to the customer who placed it cite: { doc: 'shop#place', quote: The order records its customer } emits: []