Added page about the transaction schema files

This commit is contained in:
Troy McConaghy 2017-11-15 11:18:07 +01:00
parent b3ccb09e01
commit c6c89bfcba
3 changed files with 48 additions and 0 deletions

View File

@ -29,4 +29,5 @@ Appendices
install-with-lxd
run-with-vagrant
run-with-ansible
tx-yaml-files
vote-yaml

View File

@ -0,0 +1,37 @@
The Transaction Schema Files
============================
BigchainDB checks all :ref:`transactions <The Transaction Model>`
(JSON documents) against a formal schema
defined in some JSON Schema files named
transaction.yaml,
transaction_create.yaml and
transaction_transfer.yaml.
The contents of those files are copied below.
To understand those contents
(i.e. JSON Schema), check out
`"Understanding JSON Schema"
<https://spacetelescope.github.io/understanding-json-schema/index.html>`_
by Michael Droettboom or
`json-schema.org <http://json-schema.org/>`_.
transaction.yaml
----------------
.. literalinclude:: ../../../../bigchaindb/common/schema/transaction.yaml
:language: yaml
transaction_create.yaml
-----------------------
.. literalinclude:: ../../../../bigchaindb/common/schema/transaction_create.yaml
:language: yaml
transaction_transfer.yaml
-------------------------
.. literalinclude:: ../../../../bigchaindb/common/schema/transaction_transfer.yaml
:language: yaml

View File

@ -62,3 +62,13 @@ There are example BigchainDB transactions in
:ref:`the HTTP API documentation <The HTTP Client-Server API>`
and
`the Python Driver documentation <https://docs.bigchaindb.com/projects/py-driver/en/latest/usage.html>`_.
The Transaction Schema
----------------------
BigchainDB checks all transactions (JSON documents)
against a formal schema defined in :ref:`some JSON Schema files named
transaction.yaml,
transaction_create.yaml and
transaction_transfer.yaml <The Transaction Schema Files>`.