Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 130 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ fast! We mean it.
[Compare **JSight API** with **Open API**](#scroll--jsight-api-language).
[Compare **JSight Schema** with **JSON Schema**](#scroll--jsight-schema-language).

Supported standards: [HTTP REST](#scroll--jsight-api-language), [JSON-RPC
2.0](#json-rpc-20-new-feature).

<div>
&nbsp;
</div>
Expand Down Expand Up @@ -136,8 +139,8 @@ https://editor.jsight.io.

## :scroll: &nbsp; JSight API language

The JSight API language allows you to specify REST APIs with incredible speed and convenience. More
information can be found in the [Quick
The JSight API language allows you to specify REST and JSON-RPC APIs with incredible speed and
convenience. More information can be found in the [Quick
Tutorial](https://jsight.io/docs/jsight-api-0-3-quick-tutorial) or in the [language
specification](./versions/JSight%20API/). Here we give examples of the same
API described using JSight API and Open API.
Expand Down Expand Up @@ -1286,6 +1289,130 @@ We did not describe this API in OpenAPI. It is too complicated and very long…

</details>

#### JSON-RPC 2.0. New Feature!

<details><summary>Example 9. JSON-RPC 2.0</summary>

<table align="center">
<thead>
<tr>
<th width="50%">
JSight API 0.3
</th>
<th>
OpenRPC 1.2.1
</th>
</tr>
</thead>
<tbody>
<tr valign="top">
<td>

```
JSIGHT 0.3
URL /
Protocol json-rpc-2.0
Method listPets // List all pets
Params
[
20 // Limit (how many items to return).
]
Result
[ // An array of pets
{ // Pet
"id": 123,
"name": "Tom"
}
]

```

The JSON-RPC API is as simple to describe as the REST API.

More about JSON-RPC 2.0 support: [Quick Tutorial. JSON-RPC 2.0
support](https://jsight.io/docs/jsight-api-0-3-quick-tutorial/lesson10).

<div align="center">

:star: **Star us on GitHub — it motivates us a lot!**

</div>

</td>
<td>

```
{
"openrpc": "1.2.1",
"info": {
"version": "",
"title": ""
},
"methods": [
{
"name": "listPets",
"description": "List all pets",
"params": [
{
"name": "limit",
"description": "How many items to return",
"schema": {
"type": "integer"
}
}
],
"result": {
"name": "pets",
"description": "An array of pets",
"schema": {
"type": "array",
"items": {
"title": "Pet",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
}
}
},
"examples": [
{
"name": "listPetExample",
"description": "List pet example",
"params": [
{
"name": "limit",
"value": 20
}
],
"result": {
"name": "listPetResultExample",
"value": [
{
"id": 123,
"name": "Tom"
}
]
}
}
]
}
]
}
```

</td>
</tr>
</tbody>
</table>

</details>

<div>
&nbsp;
</div>
Expand Down Expand Up @@ -1725,8 +1852,7 @@ Read more about built-in data types in the JSight Schema Language Specification,

## :date: &nbsp; Roadmap

- July 2022 — Support for the JSON-RPC 2.0 standard.
- November 2022 — Support for other types of API: gRPC, Kafka, RabbitMQ, WebSocket.
- Support for other types of API: gRPC, Kafka, RabbitMQ, WebSocket.

If you have ideas and suggestions, please write to us:

Expand Down