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.
Add necessary helpers for simple example in Readme.
Fixed loading error occured in some cases when jsonrpc/transport/http was not found.
- Support object and boolean type for required parameters.
- Add regression tests for generated
DESCRIBE-OBJECT
method.
Generic-function openrpc-server/interface:make-info
now accepts only one argument - object of class openrpc-server/api:api
.
A function generate-method-descriptions
has been added. This function uses the mop
for generating the method descriptions at run-time. Previously this happend at compile-time.
The generate-method-descriptions
is called from the generated specialized describe-object
method. Now the output of describe-object
should be correct again and show all generated,
excluding the describe-object method itself.
- Generate additional method with integer class specializer (till now it was only double-float) for required parameter of type number.
- Allow required parameter of type array without an items slot. The result will not be transformed.
Fix support for multiple parameter types, (particularly for required parameters):
"params": [
{
"name": "name",
"schema":
{
"type": ["string", "null"],
"maxLength": 255
},
"required": true,
"summary": "User name."
}
]
Fixed how oneOf
type is processed when there are only two subtypes like that:
"oneOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"project_name": {
"type": "object",
"properties": {},
"required": [],
"x-cl-class": "T",
"x-cl-package": "COMMON-LISP"
},
Previously in this case openrpc-client generated code which returned a hash-table.
Now it will return a common-lisp object or NIL
.
Nested dataclasses now handled propertly in the client. Previously, nested objects were parsed as hash-maps.
Fixed location for autogenerated generic function and added docstrings taken from OpenRPC
spec.
- Generic-function
openrpc-server/interface:slots-to-exclude
now matches slot names before transforming them to camel_case. Now you can return slot names as they are given in lisp classes.
- Now client
API
is generated correctly when you callopenrpc-client:generate-client
macro with:export-symbols nil
argument.
- Float, Double float and Ratio types are supported. They are represented as a "number" type in
JSON
schema.
openrpc-server/clack:make-clack-app
now is a generic-function and it requiresAPI
instance as a first argument. PreviouslyAPI
instance was optional.
- Added a way to modify Clack middlewares applied to the app. This way you can add your own middlewares or routes to your application. See details in the
openrpc-server/clack:app-middlewares
generic-function documentation. - Added
openrpc-server/clack:debug-on
andopenrpc-server/clack:debug-off
functions. They turn on support forX-Debug-On
HTTP
header. Use this header to turn on interative debugger only for choosen requests. - Added generic-function
openrpc-server/interface:slots-to-exclude
which allows to list some slots to be hidden from all data-structures. For example, you might want to exclude password-hashes or some other sensitive information. - Added support for
(MEMBER :foo :bar ...)
datatype. Such objects are represented as string with enum values inJSON
schema.
- Fixes type of the next-page key in the response of paginated methods.
- Fixed usage of default
API
when api is not specified to define-rpc-method macro. - Fixed most imports.
- Method and its params now support such metadata as :summary :description and :deprecated.
- Schemas for
CL
classes can have :description if documentation id defined for class or its slots. - Macro
openrpc-client:generate-client
now exports methods, classes and their slot readers by default. - All methods, their arguments and object keys now use underscore instead of dash to make them more convenient to use from other languages.
- Support client generation from a file on a filesystem.
- Initial version.