OpenAPITypeProvider icon indicating copy to clipboard operation
OpenAPITypeProvider copied to clipboard

Array with nullable items not wrapped in Option

Open kentcb opened this issue 3 years ago • 0 comments

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?

kentcb avatar Oct 23 '22 02:10 kentcb