Skip to content

Id is not required #22

Open
Open
@yehonatan1202

Description

@yehonatan1202

Collections with Primary Key Field set to Auto-incremented integer or Auto-incremented big integer doesn't have the id property set to required as oppose to collections where the id type is set to Generated UUID.
This issue causes clients such as Orval to generate types with optional id.

"ItemsUUID": {
        "type": "object",
        "properties": {
          "id": {
            "nullable": false,
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "nullable": true,
            "type": "string"
          }
        },
        "x-collection": "uuid",
        "required": [
          "id"
        ]
      },
      "ItemsInteger": {
        "type": "object",
        "properties": {
          "id": {
            "nullable": false,
            "type": "integer"
          },
          "name": {
            "nullable": true,
            "type": "string"
          }
        },
        "x-collection": "integer"
      }
    }

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