Sindre Røkenes Myren
Sindre Røkenes Myren
This must have been closed by mistake.
If we look at RPC APIs over JSON/YAML, I feel the `"discriminator"` feature in OpenAPI should allow describing the _requests_ side of things pretty accurately as a single _path item_....
@Cahl-Dee, OpenAPI isn't particularly suitable for describing RPC APIs, and for JSON RPC 2.0 in particular, where all requests generally happen against the same _endpoint_, you are probably better off...
I mean all requests for JSON RPC 2.0 generally (or often) happen against the same URL / URL path. E.g. all method calls might be done against a single URL...
My particular use case for adding it would be to allow reproduce benchmarks or test results by setting the seed. Allowing to set the rand.Source opens up for more use...
From the discussion on #1, I presume it probably make sense to wrap the provided src in a lockedSource insatance to make it thread safe.
Sorry for the late update. It seams that we no longer get the additional `Service` generation. However, we still get a duplicated import: Import: ```go import ( "context" "encoding/json" "github.com/semrush/zenrpc/v2"...
What are you planning on controlling with such a flag? You can already control which fields to use by using struct tags or naming your input variables to service functions....
Sorry for being unclear, I was referring to the _reserved_ words (`jsonrpc`, `method`, `params`, `result`, `error`). But I guess all of these (except jsonrpc) are single words. But to achive...
As a work-around, you can use a constant like this: ```go const defaultHelloTo="John Doe" // Echo returns input string. //zenrpc:to=defaultHelloTo name goes here func (s *Say) Hello(to string) string {...