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

Array with nullable items not wrapped in Option #19

Open
kentcb opened this issue Oct 23, 2022 · 0 comments
Open

Array with nullable items not wrapped in Option #19

kentcb opened this issue Oct 23, 2022 · 0 comments

Comments

@kentcb
Copy link

kentcb commented Oct 23, 2022

Hi,

Thanks for this great library. Maybe I'm missing something (haven't really used OpenAPI much), but an array with nullable items does not seem to come through with items wrapped in Option. For example:

"Example": {
        "title": "Example",
        "required": [ "items" ],
        "type": "object",
        "properties": {
          "items": {
            "title": "Items",
            "type": "array",
            "items": {
              "type": "integer",
              "nullable": true
            },
            "description": "Should be Option<int>, but is just int"
          },
        }
      },

With this definition, Items is a List<int> rather than a List<Option<int>>. Is this a bug, or am I doing something wrong?

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