-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
params field could be a restricted JSON schema instead of custom contentDescriptorObject #226
Comments
Potentially fixes |
The content descriptor is key in the ability to separate the domain specific languages. For example, consider the method "division".
In this example, it reads very clearly, and you need not have schema.title that matches the names of the data returning from the api. This is especially important in client generation, where the parameter names -> type becomes very clear. |
to address some of your other points:
|
I've opened an issue for the only thing I can think of from this that we really need to address. |
Thanks for opening the issue and bringing these to our attention. |
According to JSON RPC specs (4.2 Parameter Structures),
params
member can either be:The OpenRPC
params
member and its item typecontentDescriptorObject
should reflect the JSON RPC spec described above. However I see multiple mismatches or issues in the current OpenRPC spec:params
value with either array or objectparamStructure
isby-position
:contentDescriptorObject
>name
is not requiredrequired
field is not relevantparamStructure
isby-name
:name
(aka. object key)(this is the same kind of issue then methods field could be an object instead of an array #224)
To solve all these issues I would propose to replace the OpenRPC
params
field by a restricted JSON schema.Restricted
means "limited to types allowed in the JSON RPC spec". Btw, with this change, we don't need anymore theparamStructure
field.by-name
exampleCurrently:
Proposal:
by-position
exampleProposal:
either
by-position
orby-name
(#190)Proposal:
The text was updated successfully, but these errors were encountered: