desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Bug: CRUD Builder creates extra schema entries

Open ozum opened this issue 7 years ago • 0 comments

In Stoplight Next Desktop 4.2.0 x64, CRUD builder generates false extra model properties for some values.

Steps to reproduce:

  1. Enter CRUD builder
  2. Name it Business Unit
  3. Switch to Raw Schema and paste included schema below
  4. Switch to Editor
  5. Mark coordinates as `required``
  6. Mark id as Read only
  7. Push Create button
  8. See Editor in Models -> Business Unit Common has coordinates as expected.
  9. See Models -> Business Unit Input -> Object has another false coordinates. (It shouldn't be there)
  10. See Models -> Business Unit Basic Output -> Object has another false coordinates. (It shouldn't be there)
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "maxLength": 50,
      "description": "Name of the business unit.",
      "faker": "company.companyName"
    },
    "coordinates": {
      "type": "object",
      "description": "Geographic coordinates of the business unit.",
      "additionalProperties": false,
      "required": ["x", "y"],
      "properties": {
        "x": {
          "type": "number",
          "description": "Longitude of the coordinates.",
          "faker": "address.longitude"
        },
        "y": {
          "type": "number",
          "description": "Latitude of the coordinates.",
          "faker": "address.longitude"
        }
      }
    },
    "wifiDetails": {
      "type": "string",
      "description": "Details about wifi usage, password etc.",
      "maxLength": 1000
    }
  }
}

ozum avatar Jun 27 '18 11:06 ozum