Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Feb 5, 2024
1 parent 483abea commit 8a1a05e
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 36 deletions.
11 changes: 11 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

# ChangeLog

<a id="x-28OPENRPC-DOCS-2FCHANGELOG-3A-3A-7C0-2E10-2E4-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.10.4 (2024-02-04)

<a id="fix"></a>

### Fix

Required parameters of type boolean false can be supplied now.
Since yason:*parse-json-booleans-as-symbols* is set, only yason:false maps into json false.

<a id="x-28OPENRPC-DOCS-2FCHANGELOG-3A-3A-7C0-2E10-2E3-7C-2040ANTS-DOC-2FLOCATIVES-3ASECTION-29"></a>

## 0.10.3 (2023-11-21)
Expand Down
72 changes: 36 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,21 +243,21 @@ For our example project it will looks like:

<a id="x-28OPENRPC-SERVER-2FAPI-3AAPI-20CLASS-29"></a>

#### [class](c751) `openrpc-server/api:api` ()
#### [class](a443) `openrpc-server/api:api` ()

<a id="x-28OPENRPC-SERVER-2FAPI-3A-2ACURRENT-API-2A-20-28VARIABLE-29-29"></a>

#### [variable](e360) `openrpc-server/api:*current-api*` -unbound-
#### [variable](c71d) `openrpc-server/api:*current-api*` -unbound-

Points to a current [`api`][5d14] object when processing any `RPC` method.

<a id="x-28OPENRPC-SERVER-2FAPI-3ADEFINE-API-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>

#### [macro](bb59) `openrpc-server/api:define-api` (NAME &KEY (TITLE "Default API") (VERSION "0.1.0"))
#### [macro](45d3) `openrpc-server/api:define-api` (NAME &KEY (TITLE "Default API") (VERSION "0.1.0"))

<a id="x-28OPENRPC-SERVER-2FAPI-3AAPI-METHODS-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20OPENRPC-SERVER-2FAPI-3AAPI-29-29"></a>

#### [reader](cbef) `openrpc-server/api:api-methods` (api) (= (make-hash-table :test 'equal))
#### [reader](b755) `openrpc-server/api:api-methods` (api) (= (make-hash-table :test 'equal))

Returns a hash-table containing meta-information about all [`api`][5d14] methods.

Expand All @@ -268,19 +268,19 @@ Use [`openrpc-server/method:define-rpc-method`][b2e4] macro to add or update `RP

<a id="x-28OPENRPC-SERVER-2FAPI-3AAPI-TITLE-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20OPENRPC-SERVER-2FAPI-3AAPI-29-29"></a>

#### [reader](f3ca) `openrpc-server/api:api-title` (api) (:TITLE = "Default API")
#### [reader](e550) `openrpc-server/api:api-title` (api) (:TITLE = "Default API")

Returns a title of the [`api`][5d14].

<a id="x-28OPENRPC-SERVER-2FAPI-3AAPI-VERSION-20-2840ANTS-DOC-2FLOCATIVES-3AREADER-20OPENRPC-SERVER-2FAPI-3AAPI-29-29"></a>

#### [reader](0628) `openrpc-server/api:api-version` (api) (:version = "0.1.0")
#### [reader](985d) `openrpc-server/api:api-version` (api) (:version = "0.1.0")

Returns a version of the [`api`][5d14].

<a id="x-28OPENRPC-SERVER-2FMETHOD-3ADEFINE-RPC-METHOD-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>

#### [macro](7471) `openrpc-server/method:define-rpc-method` name args &body body
#### [macro](2c1e) `openrpc-server/method:define-rpc-method` name args &body body

Macro to define `RPC` method.

Expand All @@ -290,7 +290,7 @@ Also, there should be one (:result type) form in the `BODY`.

<a id="x-28OPENRPC-SERVER-2FINTERFACE-3ATYPE-TO-SCHEMA-20GENERIC-FUNCTION-29"></a>

#### [generic-function](0566) `openrpc-server/interface:type-to-schema` type
#### [generic-function](f2e6) `openrpc-server/interface:type-to-schema` type

This method is called for all types for which [`primitive-type-p`][edf5] generic-function
returns `NIL`.
Expand All @@ -300,35 +300,35 @@ be strings. It is convenient to use `SERAPEUM:DICT` for building the result.

<a id="x-28OPENRPC-SERVER-2FINTERFACE-3ATRANSFORM-RESULT-20GENERIC-FUNCTION-29"></a>

#### [generic-function](ca26) `openrpc-server/interface:transform-result` object
#### [generic-function](2476) `openrpc-server/interface:transform-result` object

Prepares object for serialization before responding to `RPC` call.

Result should be list, hash-map or a value of primitive type.

<a id="x-28OPENRPC-SERVER-2FINTERFACE-3APRIMITIVE-TYPE-P-20GENERIC-FUNCTION-29"></a>

#### [generic-function](6338) `openrpc-server/interface:primitive-type-p` type
#### [generic-function](decb) `openrpc-server/interface:primitive-type-p` type

Should return t for type if it's name matched to simple types supported by [JSON-SCHEMA][686b].

Argument `TYPE` is a symbol.

<a id="x-28OPENRPC-SERVER-2FINTERFACE-3AMAKE-INFO-20GENERIC-FUNCTION-29"></a>

#### [generic-function](f0ba) `openrpc-server/interface:make-info` api
#### [generic-function](a3ce) `openrpc-server/interface:make-info` api

Returns a basic information about `API` for [info section][5f59] of Open`RPC` spec.

<a id="x-28OPENRPC-SERVER-2FERRORS-3ARETURN-ERROR-20FUNCTION-29"></a>

#### [function](0f45) `openrpc-server/errors:return-error` message &key (code -1) (error-class 'jsonrpc/errors:jsonrpc-callback-error)
#### [function](122c) `openrpc-server/errors:return-error` message &key (code -1) (error-class 'jsonrpc/errors:jsonrpc-callback-error)

Raises an error to interrupt processing and return status to the caller.

<a id="x-28OPENRPC-SERVER-2FCLACK-3AMAKE-CLACK-APP-20GENERIC-FUNCTION-29"></a>

#### [generic-function](1e1a) `openrpc-server/clack:make-clack-app` api &key http websocket indent-json
#### [generic-function](0354) `openrpc-server/clack:make-clack-app` api &key http websocket indent-json

Should return an app suitable for passing to clackup.

Expand All @@ -338,7 +338,7 @@ But to add middlewares it is more convenient to define a method for

<a id="x-28OPENRPC-SERVER-2FCLACK-3AAPP-MIDDLEWARES-20GENERIC-FUNCTION-29"></a>

#### [generic-function](d435) `openrpc-server/clack:app-middlewares` api
#### [generic-function](284f) `openrpc-server/clack:app-middlewares` api

Should return an plist of middlewared to be applied to the Clack application.

Expand All @@ -355,15 +355,15 @@ To add your middleware inside the stack - push it to the front.

<a id="x-28OPENRPC-SERVER-2FCLACK-3ADEBUG-ON-20FUNCTION-29"></a>

#### [function](bd78) `openrpc-server/clack:debug-on`
#### [function](3934) `openrpc-server/clack:debug-on`

<a id="x-28OPENRPC-SERVER-2FCLACK-3ADEBUG-OFF-20FUNCTION-29"></a>

#### [function](f794) `openrpc-server/clack:debug-off`
#### [function](e7e4) `openrpc-server/clack:debug-off`

<a id="x-28OPENRPC-SERVER-2FINTERFACE-3ASLOTS-TO-EXCLUDE-20GENERIC-FUNCTION-29"></a>

#### [generic-function](aa8d) `openrpc-server/interface:slots-to-exclude` type
#### [generic-function](5a3b) `openrpc-server/interface:slots-to-exclude` type

You can define a method for this generic function to exclude some slots from being shown in the `JSON` schema.

Expand Down Expand Up @@ -507,7 +507,7 @@ to implement pagination on server-side in the [`Paginated Results`][5c31] sectio

<a id="x-28OPENRPC-CLIENT-2FCORE-3AGENERATE-CLIENT-20-2840ANTS-DOC-2FLOCATIVES-3AMACRO-29-29"></a>

### [macro](c41a) `openrpc-client/core:generate-client` class-name url-or-path &key (export-symbols t)
### [macro](8d31) `openrpc-client/core:generate-client` class-name url-or-path &key (export-symbols t)

Generates Common Lisp client by Open`RPC` spec.

Expand Down Expand Up @@ -551,24 +551,24 @@ These people have contributed to Open`RPC`. I'm so grateful to them!
[ae59]: https://boosty.to/40ants
[76b5]: https://github.com/40ants/openrpc
[4bbd]: https://github.com/40ants/openrpc/actions
[c41a]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/client/core.lisp#L488
[e360]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/api.lisp#L14
[c751]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/api.lisp#L18
[cbef]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/api.lisp#L19
[f3ca]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/api.lisp#L27
[0628]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/api.lisp#L31
[bb59]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/api.lisp#L39
[bd78]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/clack.lisp#L180
[f794]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/clack.lisp#L185
[1e1a]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/clack.lisp#L66
[d435]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/clack.lisp#L73
[0f45]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/errors.lisp#L9
[f0ba]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/interface.lisp#L163
[ca26]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/interface.lisp#L20
[6338]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/interface.lisp#L52
[aa8d]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/interface.lisp#L68
[0566]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/interface.lisp#L81
[7471]: https://github.com/40ants/openrpc/blob/eb7c2452f38332c746e89e0513893d8fd4984a57/server/method.lisp#L313
[8d31]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/client/core.lisp#L488
[c71d]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/api.lisp#L14
[a443]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/api.lisp#L18
[b755]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/api.lisp#L19
[e550]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/api.lisp#L27
[985d]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/api.lisp#L31
[45d3]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/api.lisp#L39
[3934]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/clack.lisp#L180
[e7e4]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/clack.lisp#L185
[0354]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/clack.lisp#L66
[284f]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/clack.lisp#L73
[122c]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/errors.lisp#L9
[a3ce]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/interface.lisp#L163
[2476]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/interface.lisp#L20
[decb]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/interface.lisp#L52
[5a3b]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/interface.lisp#L68
[f2e6]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/interface.lisp#L81
[2c1e]: https://github.com/40ants/openrpc/blob/483abea0ac62821ffa9b518367550e396577e0cf/server/method.lisp#L313
[c597]: https://github.com/cxxxr/jsonrpc
[75f7]: https://github.com/fukamachi/clack
[5863]: https://github.com/kilianmh
Expand Down

0 comments on commit 8a1a05e

Please sign in to comment.