pubsub/node/schema: nodes schema handling

node schema is an experimental feature to associate a data form with a PubSub node, and reject items not following this form. This feature is currently only available with Libervia PubSub.

Those commands can only be used by an owner of the node.


Set the schema of a node. The raw schema is written directly as positional argument.


Set the schema for tickets node using the file tickets_schema.xml from $HOME directory. Shell substition is used here to put the content of the file in the positional argument:

$ li pubsub node schema set -n -s "$(<~/test_schema.xml)"


Edit the schema of a node using your local editor (the one set in $EDITOR).

If you don’t change anything or publish an empty schema, the edition will be cancelled.

draft commands can be used.


Edit the tickets node schema:

$ li pubsub node schema edit -n -s



Retrieve schema of a node.


Get schema of tickets and save it to a file named tickets_schema.xml in $HOME directory:

$ li pubsub node schema get -n -s > ~/tickets_schema.xml