Skip to content

Creating constraints between parameters #381

@BelfordZ

Description

@BelfordZ

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions