mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00

- Created three new JSON Schema files for the v2.0 transaction schema, based on the v1.0 files. The only change is the allowed value of version (from "^1\\.0$" to "^2\\.0$"). - I didn't delete the v1.0 JSON Schema files because we might want those some day (to validate old transactions). - Updated the __init__.py in the directory with the JSON Schema files so that it now uses the version 2.0 JSON Schema files. - Updated all relevant tests. I only found one, in tests/validation/test_transaction_structure.py - Updated VERSION in common/transaction.py - Checked to make sure the example HTTP API docs show "version" with value "2.0". They do. - Updated the docs page about "The Transaction Model". It just points to the IPDB Transaction Spec. - If someone submits a transaction with "version" having value "1.0" then the error message comes from the JSON Schema checker.
31 lines
581 B
YAML
31 lines
581 B
YAML
---
|
|
"$schema": "http://json-schema.org/draft-04/schema#"
|
|
type: object
|
|
title: Transaction Schema - CREATE/GENESIS specific constraints
|
|
required:
|
|
- asset
|
|
- inputs
|
|
properties:
|
|
asset:
|
|
additionalProperties: false
|
|
properties:
|
|
data:
|
|
anyOf:
|
|
- type: object
|
|
additionalProperties: true
|
|
- type: 'null'
|
|
required:
|
|
- data
|
|
inputs:
|
|
type: array
|
|
title: "Transaction inputs"
|
|
maxItems: 1
|
|
minItems: 1
|
|
items:
|
|
type: "object"
|
|
required:
|
|
- fulfills
|
|
properties:
|
|
fulfills:
|
|
type: "null"
|