Skip to content
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

Creating constraints between parameters #381

Open
BelfordZ opened this issue Jul 6, 2023 · 1 comment
Open

Creating constraints between parameters #381

BelfordZ opened this issue Jul 6, 2023 · 1 comment

Comments

@BelfordZ
Copy link
Member

BelfordZ commented Jul 6, 2023

We should have a way to support 1 param determining the type of another param.

ie assume I have the following api:

name:  "bar",
params: [
   {
      name: 'foo' , 
      schema: { enum: [1,2 } }
  },
  { 
    name: 'baz',
    schema: {
      oneOf: [
        { type: 'string' },
        { type: 'number' }
      ]
    }
  }
]

If my api is such that when the param foo is 1, I need the param baz to be string, there is no way to represent that constraint at the moment.

This issue is to come up with ideas and discuss ways this can be solved

@s1na
Copy link

s1na commented Nov 29, 2023

Supporting these constraints would solve an issue for us. Most Ethereum clients have support a subscription API described here. But we can't add the underlying methods to the specs because of this lack of expressivity: ethereum/execution-apis#496 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants