Method with a list in result having the "object" type in the generated spec
- Vorherrschende Sprache
- Common Lisp
- Sterne
- 34
- Forks
- 5
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
For example, for this code:
```lisp
(uiop:define-package #:foo
(:use #:cl))
(in-package #:foo)
(openrpc-server:define-api (test))
(openrpc-server:define-rpc-method (test foo) ()
(:result list)
(list "foo" "bar"))
```
this spec is generated:
```lisp
FOO> (openrpc-server/discovery:generate-spec test)
(SERAPEUM:DICT
"methods" '((SERAPEUM:DICT
"name" "foo"
"params" #()
"result" (SERAPEUM:DICT
"name" "foo_result"
"schema" (SERAPEUM:DICT
"type" "object"
"properties" (SERAPEUM:DICT
)
"required" #()
"x-cl-class" "LIST"
"x-cl-package" "COMMON-LISP"
)
)
"paramStructure" "by-name"
) )
"openrpc" "1.0.0"
"info" (SERAPEUM:DICT
"title" "Default API"
"version" "0.1.0"
)
"servers" '((SERAPEUM:DICT
"name" "default"
"url" "http://localhost:5000/"
) )
)
```
but result should have schema with `type = array`.
Note, I've created this PR which adds `generate-spec` function used in the example: https://github.com/40ants/openrpc/pull/17
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.