mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-06-28 00:27:45 +02:00
Merge pull request #1894 from bigchaindb/issue/1875/json-schema-validation-is-ipdb-protocol
Removed appendix page w/ tx JSON Schema files & updated transaction-m…
This commit is contained in:
commit
1de7e55ac3
|
@ -10,6 +10,16 @@ The aim is to provide:
|
|||
[implementations](http://json-schema.org/implementations.html) written in
|
||||
different languages)
|
||||
|
||||
## Sources
|
||||
|
||||
The file defining the JSON Schema for votes (`vote.yaml`) is BigchainDB-specific.
|
||||
|
||||
The files defining the JSON Schema for transactions (`transaction_*.yaml`)
|
||||
are copied from the [IPDB Protocol](https://github.com/ipdb/ipdb-protocol).
|
||||
If you want to add a new version, you must add it to the IPDB Protocol first.
|
||||
(You can't change existing versions. Those were used to validate old transactions
|
||||
and are needed to re-check those transactions.)
|
||||
|
||||
## Learn about JSON Schema
|
||||
|
||||
A good resource is [Understanding JSON Schema](http://spacetelescope.github.io/understanding-json-schema/index.html).
|
||||
|
|
|
@ -28,5 +28,4 @@ Appendices
|
|||
install-with-lxd
|
||||
run-with-vagrant
|
||||
run-with-ansible
|
||||
tx-yaml-files
|
||||
vote-yaml
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
The Transaction Schema Files
|
||||
============================
|
||||
|
||||
BigchainDB checks all :ref:`transactions <The Transaction Model>`
|
||||
against a formal schema
|
||||
defined in some JSON Schema files.
|
||||
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_v1.0.yaml
|
||||
---------------------
|
||||
|
||||
.. literalinclude:: ../../../../bigchaindb/common/schema/transaction_v1.0.yaml
|
||||
:language: yaml
|
||||
|
||||
|
||||
transaction_create_v1.0.yaml
|
||||
----------------------------
|
||||
|
||||
.. literalinclude:: ../../../../bigchaindb/common/schema/transaction_create_v1.0.yaml
|
||||
:language: yaml
|
||||
|
||||
|
||||
transaction_transfer_v1.0.yaml
|
||||
------------------------------
|
||||
|
||||
.. literalinclude:: ../../../../bigchaindb/common/schema/transaction_transfer_v1.0.yaml
|
||||
:language: yaml
|
|
@ -69,6 +69,14 @@ The Transaction Schema
|
|||
----------------------
|
||||
|
||||
BigchainDB checks all transactions (JSON documents)
|
||||
against a formal schema defined in :ref:`some JSON Schema files
|
||||
(copied verbatim into the Appendices)
|
||||
<The Transaction Schema Files>`.
|
||||
against a formal schema defined
|
||||
in some `JSON Schema <http://json-schema.org/>`_ files.
|
||||
Those files are part of the IPDB Protocol.
|
||||
Their official source is the ``tx_schema/`` directory
|
||||
in the `ipdb/ipdb-protocol repository on GitHub
|
||||
<https://github.com/ipdb/ipdb-protocol>`_,
|
||||
but BigchainDB Server uses copies of those files;
|
||||
those copies can be found
|
||||
in the ``bigchaindb/common/schema/`` directory
|
||||
in the `bigchaindb/bigchaindb repository on GitHub
|
||||
<https://github.com/bigchaindb/bigchaindb>`_.
|
||||
|
|
Loading…
Reference in New Issue
Block a user