open-rpc / spec

The OpenRPC specification
https://spec.open-rpc.org
Apache License 2.0
166 stars 49 forks source link

Allow method to be a reference object #339

Closed BelfordZ closed 3 years ago

BelfordZ commented 3 years ago

why?

shanejonas commented 3 years ago

As a developer I'd like to be able to ref methods, and use a dereferencer to create a document:

{
    "openrpc": "1.0.0",
    "info": {
        "title": "API Reference",
        "version": "1.0.0"
    },
    "methods": [
        {
            "$ref": "./methods/eth_sendTransaction.json"
        }
    ]
}
BelfordZ commented 3 years ago

Should the components object allow a key for methods?

BelfordZ commented 3 years ago

this is already merged, closing the issue, but if anyone wants to make arguments against this change, this is the place!