jeyroik/extas-protocols-jsonrpc-expand

There is no license information available for the latest version (0.1.0) of this package.

Get expand from a JSON RPC request

0.1.0 2020-08-26 09:28 UTC

This package is auto-updated.

Last update: 2024-04-26 17:47:15 UTC


README

tests codecov.io PHPStan Enabled 68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f61653661616132623331353765386464373936652f6d61696e7461696e6162696c697479 Extas Installer v3 Latest Stable Version Total Downloads Dependents

extas-protocols-jsonrpc-expand

Предоставляет возможность вытаскивать expand из параметров json-rpc запроса.

Спецификация

{
  "request": {
    "type": "object",
    "properties": {
      "expand": {
        "type": "array"
      }
    }
  }
}

Пример запроса

{
  "id": "2f5d0719-5b82-4280-9b3b-10f23aff226b",
  "jsonrpc": "2.0",
  "method": "entity.index",
  "params": {
    "expand": ["property1", "property2", "entity.*"]
  }
}

Примечание как организовать поддержку вайлдкарда (.*) можно найти в документации к пакету extas-expands.

Применение в коде

См. примеры в пакете extas-protocols.