comparison doc/jp/pubsub_node_schema.rst @ 3041:72583524cfd3

doc (jp): jp commands are now fully documented: rel 232
author Goffi <goffi@goffi.org>
date Tue, 01 Oct 2019 22:49:06 +0200
parents
children
comparison
equal deleted inserted replaced
3040:fee60f17ebac 3041:72583524cfd3
1 .. _jp-pubsub_node_schema:
2
3 =========================================
4 pubsub/node/schema: nodes schema handling
5 =========================================
6
7 ``node schema`` is an experimental feature to associate a data form with a PubSub node, and
8 reject items not following this form. This feature is currently only available with SàT
9 PubSub.
10
11 Those commands can only be used by an owner of the node.
12
13 set
14 ===
15
16 Set the schema of a node. The raw schema is written directly as positional argument.
17
18 example
19 -------
20
21 Set the schema for tickets node using the file ``tickets_schema.xml`` from ``$HOME``
22 directory. Shell substition is used here to put the content of the file in the positional
23 argument::
24
25 $ jp pubsub node schema set -n org.salut-a-toi.tickets:0 -s pubsub.example.org "$(<~/test_schema.xml)"
26
27
28 edit
29 ====
30
31 Edit the schema of a node using your local editor (the one set in ``$EDITOR``).
32
33 If you don't change anything or publish an empty schema, the edition will be cancelled.
34
35 :ref:`draft_common` commands can be used.
36
37 example
38 -------
39
40 Edit the tickets node schema::
41
42 $ jp pubsub node schema edit -n org.salut-a-toi.tickets:0 -s pubsub.example.org
43
44
45 example
46 -------
47
48 get
49 ===
50
51 Retrieve schema of a node.
52
53 example
54 -------
55
56 Get schema of tickets and save it to a file named ``tickets_schema.xml`` in ``$HOME``
57 directory::
58
59 $ jp pubsub node schema get -n org.salut-a-toi.tickets:0 -s pubsub.example.org > ~/tickets_schema.xml