elide icon indicating copy to clipboard operation
elide copied to clipboard

Swagger schema for resource relationships is missing the "data" field.

Open aklish opened this issue 3 years ago • 0 comments

The swagger document for elide-spring-boot-example 'product' relationships looks something like:

        "relationships" : {
          "type" : "object",
          "properties" : {
            "group" : {
              "type" : "object",
              "properties" : {
                "id" : {
                  "type" : "string"
                },
                "type" : {
                  "type" : "string",
                  "enum" : [ "group" ]
                }
              }
            }

Instead, the relationship should be wrapped in a data array similar to:

          "properties" : {
              "data" : {
                "type" : "array",
                "items" : {
                  "type" : "object",
                  "properties" : {
                    "id" : {
                      "type" : "string"
                    },
                    "type" : {
                      "type" : "string",
                      "enum" : [ "product" ]
                    }
                  }
                }
              }

aklish avatar Jun 11 '22 05:06 aklish