Extas-compatible JSON RPC server.
# vendor/bin/extas i
# php -S 0.0.0.0:8080 -t src/public
# curl -X POST localhost:8080/api/jsonrpc -d '{"id": "request id", "method":"operation.index"}'
This package allows generating specs upon to InstallSection-
plugins, extended from extas\components\plugins\intsall\InstallSection
.
This package allows generating specs upon to InitSection-
plugins, extended from extas\components\plugins\init\InitSection
.
*
- you can reset this prefix (see below).
There is extas-command for spec generation. Command is ready-to-extending, so you can add your own options, using extas-commands-options
-notation. See extas.json
of the current package for examples.
# vendor/bin/extas i
# vendor/bin/extas list
- commandjsonrpc
should be listed.
# vendor/bin/extas jsonrpc --export-path generated.extas.json
This will generate extas-compatible configuration in ready-to-install format.
So you can install specs by
# vendor/bin/extas i
Define path to store generated specs.
- Default:
CWD/specs.extas.json
- You can pass relative and absolute path.
CWD
- Current Working Directory.
Allow setting prefix for plugins searching by install section crawler.
- Default:
Install
Allow setting path for searching plugins by install section crawler.
- Default: current working directory.
Allow setting prefix for classes searching by doc-comment crawler.
- Default:
Install
Allow setting path for searching classes by doc comment crawler.
- Default: current working directory.
Allow filtering operations names.
- Default:
- Example:
# vendor/bin/extas jsonrpc -f workflow
will generate specs only for operations withworkflow
in a name.
Sometimes you want to make entity name shorter and use only last word of plugin name.
You can do this with the option -e
:
For example, we have plugin name workflow schema
.
- Default:
0
- generate entity nameworkflow.schema
. - With edging:
# vendor/bin/extas jsonrpc -e 1
will produce entity nameschema
.
You can find them here:
resources/create.spec.json
resources/index.spec.json
resources/update.spec.json
resources/delete.spec.json
Current package provide next stages to allow you to inject into the json-rpc process:
before.run.jsonrpc
- before every json-rpc processing.before.run.jsonrpc.<method.name>
after.run.jsonrpc.<method.name>
after.run.jsonrpc
- after every json-rpc processing.
Package use extas-generators
package for getting generators.
You should turn generators on if you want to use one.
You can find ready-to-config default generators configuration in resources/generators.json
. Just copy-paste them into your extas.json
.
Package use extas-crawlers
package for getting crawlers.
You should turn crawlers on if you want to use one.
You can find ready-to-config default crawlers configuration in resources/crawlers.json
. Just copy-paste them into your extas.json
.