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

Fields with multiple types are displayed incorrectly #597

Open
dleflohic opened this issue Nov 22, 2022 · 0 comments
Open

Fields with multiple types are displayed incorrectly #597

dleflohic opened this issue Nov 22, 2022 · 0 comments

Comments

@dleflohic
Copy link

dleflohic commented Nov 22, 2022

Describe the bug
The type of fields that have a schema like below appears as stringnull in https://playground.open-rpc.org/:

"type": [
  "string",
  "null"
]

Note: the schema is following the current latest specification of Json schema: https://json-schema.org/draft/2020-12/json-schema-validation.html#name-type

To Reproduce
Copy/paste the following json:

{
  "openrpc": "1.2.1",
  "info": {
    "version": "0.1.0-SNAPSHOT",
    "title": "Example"
  },
  "methods": [
    {
      "name": "my_endpoint",
      "params": [],
      "result": {
        "name": "response",
        "schema": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  ]
}

Expected behavior
Information about the type are displayed in a prettier and correct way, without concatenated the types.

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

1 participant