Skip to content

OpenAPI 3.0+ null Type Parsing Not Supported #2605

@LeePui

Description

@LeePui

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Pleas do not modify this template :) and fill in all the required fields.

Dify version

0.5.6

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Description

dify does not currently support parsing OpenAPI 3.0+ specifications that use the null type as part of a anyOf/oneOf construct. According to the OpenAPI 3.0+ specification, fields can be specified as nullable either by using the nullable keyword or by including null as one of the types in an anyOf/oneOf construct.

Steps to Reproduce

  1. Include a field in an OpenAPI 3.0+ specification with a null type as part of an anyOf construct.
  2. Attempt to parse the specification with dify.
  3. Observe that the null type is not handled correctly.

3.0+ openapi format:

"properties": {
          "chatId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chatid",
            "description": "chatId"
          },

✔️ Expected Behavior

When presented with a schema that includes a field with types including null using the anyOf construct, dify should correctly interpret this as a field that can have a null value or the other specified type.

❌ Actual Behavior

image

Metadata

Metadata

Assignees

Labels

🐞 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions