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

Test run fine but... #6

Closed
rdmueller opened this issue Feb 18, 2017 · 3 comments
Closed

Test run fine but... #6

rdmueller opened this issue Feb 18, 2017 · 3 comments
Assignees
Labels

Comments

@rdmueller
Copy link
Contributor

rdmueller commented Feb 18, 2017

Now that I've taken a look at the test application (btw: great approach!), I notice that you test against the perfect json but don't test that the springfox-grails-integration does not produce too much.

Everything output in addition to your test json is IMHO garbage and should be avoided.

Update:

here is an example for the POST song/create operation:

The system outputs

{
  "album": {
    "albumArtist": {
      "albums": [
        {}
      ],
      "attached": true,
      "dirty": true,
      "dirtyPropertyNames": [
        {}
      ],
      "errors": {
        "allErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "errorCount": 0,
        "fieldError": {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        },
        "fieldErrorCount": 0,
        "fieldErrors": [
          {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          }
        ],
        "globalError": {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        },
        "globalErrorCount": 0,
        "globalErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "nestedPath": "string",
        "objectName": "string"
      },
      "id": 0,
      "isBand": true,
      "name": "string",
      "properties": {},
      "signedTo": {
        "address": "string",
        "albums": [
          {}
        ],
        "artists": [
          {}
        ],
        "attached": true,
        "dirty": true,
        "dirtyPropertyNames": [
          {}
        ],
        "errors": {
          "allErrors": [
            {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            }
          ],
          "errorCount": 0,
          "fieldError": {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          },
          "fieldErrorCount": 0,
          "fieldErrors": [
            {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            }
          ],
          "globalError": {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          },
          "globalErrorCount": 0,
          "globalErrors": [
            {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            }
          ],
          "nestedPath": "string",
          "objectName": "string"
        },
        "id": 0,
        "name": "string",
        "properties": {},
        "version": 0
      },
      "signedToId": {},
      "songs": [
        {}
      ],
      "version": 0
    },
    "albumArtistId": {},
    "attached": true,
    "coverImage": "string",
    "dirty": true,
    "dirtyPropertyNames": [
      {}
    ],
    "errors": {
      "allErrors": [
        {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        }
      ],
      "errorCount": 0,
      "fieldError": {
        "arguments": [
          {}
        ],
        "bindingFailure": true,
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "field": "string",
        "objectName": "string",
        "rejectedValue": {}
      },
      "fieldErrorCount": 0,
      "fieldErrors": [
        {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        }
      ],
      "globalError": {
        "arguments": [
          {}
        ],
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "objectName": "string"
      },
      "globalErrorCount": 0,
      "globalErrors": [
        {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        }
      ],
      "nestedPath": "string",
      "objectName": "string"
    },
    "genre": {
      "albums": [
        {}
      ],
      "attached": true,
      "dirty": true,
      "dirtyPropertyNames": [
        {}
      ],
      "errors": {
        "allErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "errorCount": 0,
        "fieldError": {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        },
        "fieldErrorCount": 0,
        "fieldErrors": [
          {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          }
        ],
        "globalError": {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        },
        "globalErrorCount": 0,
        "globalErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "nestedPath": "string",
        "objectName": "string"
      },
      "id": 0,
      "name": "string",
      "properties": {},
      "version": 0
    },
    "genreId": {},
    "id": 0,
    "label": {
      "address": "string",
      "albums": [
        {}
      ],
      "artists": [
        {
          "albums": [
            {}
          ],
          "attached": true,
          "dirty": true,
          "dirtyPropertyNames": [
            {}
          ],
          "errors": {
            "allErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "errorCount": 0,
            "fieldError": {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            },
            "fieldErrorCount": 0,
            "fieldErrors": [
              {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              }
            ],
            "globalError": {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            },
            "globalErrorCount": 0,
            "globalErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "nestedPath": "string",
            "objectName": "string"
          },
          "id": 0,
          "isBand": true,
          "name": "string",
          "properties": {},
          "signedTo": {},
          "signedToId": {},
          "songs": [
            {}
          ],
          "version": 0
        }
      ],
      "attached": true,
      "dirty": true,
      "dirtyPropertyNames": [
        {}
      ],
      "errors": {
        "allErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "errorCount": 0,
        "fieldError": {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        },
        "fieldErrorCount": 0,
        "fieldErrors": [
          {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          }
        ],
        "globalError": {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        },
        "globalErrorCount": 0,
        "globalErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "nestedPath": "string",
        "objectName": "string"
      },
      "id": 0,
      "name": "string",
      "properties": {},
      "version": 0
    },
    "labelId": {},
    "properties": {},
    "rating": "ONE_STAR",
    "releaseDate": "2017-02-18T09:16:20.201Z",
    "songs": [
      {}
    ],
    "subtitle": "string",
    "title": "string",
    "version": 0
  },
  "albumId": {},
  "artist": {
    "albums": [
      {
        "albumArtist": {},
        "albumArtistId": {},
        "attached": true,
        "coverImage": "string",
        "dirty": true,
        "dirtyPropertyNames": [
          {}
        ],
        "errors": {
          "allErrors": [
            {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            }
          ],
          "errorCount": 0,
          "fieldError": {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          },
          "fieldErrorCount": 0,
          "fieldErrors": [
            {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            }
          ],
          "globalError": {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          },
          "globalErrorCount": 0,
          "globalErrors": [
            {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            }
          ],
          "nestedPath": "string",
          "objectName": "string"
        },
        "genre": {
          "albums": [
            {}
          ],
          "attached": true,
          "dirty": true,
          "dirtyPropertyNames": [
            {}
          ],
          "errors": {
            "allErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "errorCount": 0,
            "fieldError": {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            },
            "fieldErrorCount": 0,
            "fieldErrors": [
              {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              }
            ],
            "globalError": {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            },
            "globalErrorCount": 0,
            "globalErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "nestedPath": "string",
            "objectName": "string"
          },
          "id": 0,
          "name": "string",
          "properties": {},
          "version": 0
        },
        "genreId": {},
        "id": 0,
        "label": {
          "address": "string",
          "albums": [
            {}
          ],
          "artists": [
            {}
          ],
          "attached": true,
          "dirty": true,
          "dirtyPropertyNames": [
            {}
          ],
          "errors": {
            "allErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "errorCount": 0,
            "fieldError": {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            },
            "fieldErrorCount": 0,
            "fieldErrors": [
              {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              }
            ],
            "globalError": {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            },
            "globalErrorCount": 0,
            "globalErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "nestedPath": "string",
            "objectName": "string"
          },
          "id": 0,
          "name": "string",
          "properties": {},
          "version": 0
        },
        "labelId": {},
        "properties": {},
        "rating": "ONE_STAR",
        "releaseDate": "2017-02-18T09:16:20.202Z",
        "songs": [
          {}
        ],
        "subtitle": "string",
        "title": "string",
        "version": 0
      }
    ],
    "attached": true,
    "dirty": true,
    "dirtyPropertyNames": [
      {}
    ],
    "errors": {
      "allErrors": [
        {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        }
      ],
      "errorCount": 0,
      "fieldError": {
        "arguments": [
          {}
        ],
        "bindingFailure": true,
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "field": "string",
        "objectName": "string",
        "rejectedValue": {}
      },
      "fieldErrorCount": 0,
      "fieldErrors": [
        {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        }
      ],
      "globalError": {
        "arguments": [
          {}
        ],
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "objectName": "string"
      },
      "globalErrorCount": 0,
      "globalErrors": [
        {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        }
      ],
      "nestedPath": "string",
      "objectName": "string"
    },
    "id": 0,
    "isBand": true,
    "name": "string",
    "properties": {},
    "signedTo": {
      "address": "string",
      "albums": [
        {
          "albumArtist": {},
          "albumArtistId": {},
          "attached": true,
          "coverImage": "string",
          "dirty": true,
          "dirtyPropertyNames": [
            {}
          ],
          "errors": {
            "allErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "errorCount": 0,
            "fieldError": {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            },
            "fieldErrorCount": 0,
            "fieldErrors": [
              {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              }
            ],
            "globalError": {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            },
            "globalErrorCount": 0,
            "globalErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "nestedPath": "string",
            "objectName": "string"
          },
          "genre": {
            "albums": [
              {}
            ],
            "attached": true,
            "dirty": true,
            "dirtyPropertyNames": [
              {}
            ],
            "errors": {
              "allErrors": [
                {
                  "arguments": [
                    {}
                  ],
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "objectName": "string"
                }
              ],
              "errorCount": 0,
              "fieldError": {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              },
              "fieldErrorCount": 0,
              "fieldErrors": [
                {
                  "arguments": [
                    {}
                  ],
                  "bindingFailure": true,
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "field": "string",
                  "objectName": "string",
                  "rejectedValue": {}
                }
              ],
              "globalError": {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              },
              "globalErrorCount": 0,
              "globalErrors": [
                {
                  "arguments": [
                    {}
                  ],
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "objectName": "string"
                }
              ],
              "nestedPath": "string",
              "objectName": "string"
            },
            "id": 0,
            "name": "string",
            "properties": {},
            "version": 0
          },
          "genreId": {},
          "id": 0,
          "label": {},
          "labelId": {},
          "properties": {},
          "rating": "ONE_STAR",
          "releaseDate": "2017-02-18T09:16:20.202Z",
          "songs": [
            {}
          ],
          "subtitle": "string",
          "title": "string",
          "version": 0
        }
      ],
      "artists": [
        {}
      ],
      "attached": true,
      "dirty": true,
      "dirtyPropertyNames": [
        {}
      ],
      "errors": {
        "allErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "errorCount": 0,
        "fieldError": {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        },
        "fieldErrorCount": 0,
        "fieldErrors": [
          {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          }
        ],
        "globalError": {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        },
        "globalErrorCount": 0,
        "globalErrors": [
          {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          }
        ],
        "nestedPath": "string",
        "objectName": "string"
      },
      "id": 0,
      "name": "string",
      "properties": {},
      "version": 0
    },
    "signedToId": {},
    "songs": [
      {}
    ],
    "version": 0
  },
  "artistId": {},
  "attached": true,
  "dirty": true,
  "dirtyPropertyNames": [
    {}
  ],
  "errors": {
    "allErrors": [
      {
        "arguments": [
          {}
        ],
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "objectName": "string"
      }
    ],
    "errorCount": 0,
    "fieldError": {
      "arguments": [
        {}
      ],
      "bindingFailure": true,
      "code": "string",
      "codes": [
        "string"
      ],
      "defaultMessage": "string",
      "field": "string",
      "objectName": "string",
      "rejectedValue": {}
    },
    "fieldErrorCount": 0,
    "fieldErrors": [
      {
        "arguments": [
          {}
        ],
        "bindingFailure": true,
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "field": "string",
        "objectName": "string",
        "rejectedValue": {}
      }
    ],
    "globalError": {
      "arguments": [
        {}
      ],
      "code": "string",
      "codes": [
        "string"
      ],
      "defaultMessage": "string",
      "objectName": "string"
    },
    "globalErrorCount": 0,
    "globalErrors": [
      {
        "arguments": [
          {}
        ],
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "objectName": "string"
      }
    ],
    "nestedPath": "string",
    "objectName": "string"
  },
  "genre": {
    "albums": [
      {
        "albumArtist": {
          "albums": [
            {}
          ],
          "attached": true,
          "dirty": true,
          "dirtyPropertyNames": [
            {}
          ],
          "errors": {
            "allErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "errorCount": 0,
            "fieldError": {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            },
            "fieldErrorCount": 0,
            "fieldErrors": [
              {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              }
            ],
            "globalError": {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            },
            "globalErrorCount": 0,
            "globalErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "nestedPath": "string",
            "objectName": "string"
          },
          "id": 0,
          "isBand": true,
          "name": "string",
          "properties": {},
          "signedTo": {
            "address": "string",
            "albums": [
              {}
            ],
            "artists": [
              {}
            ],
            "attached": true,
            "dirty": true,
            "dirtyPropertyNames": [
              {}
            ],
            "errors": {
              "allErrors": [
                {
                  "arguments": [
                    {}
                  ],
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "objectName": "string"
                }
              ],
              "errorCount": 0,
              "fieldError": {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              },
              "fieldErrorCount": 0,
              "fieldErrors": [
                {
                  "arguments": [
                    {}
                  ],
                  "bindingFailure": true,
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "field": "string",
                  "objectName": "string",
                  "rejectedValue": {}
                }
              ],
              "globalError": {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              },
              "globalErrorCount": 0,
              "globalErrors": [
                {
                  "arguments": [
                    {}
                  ],
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "objectName": "string"
                }
              ],
              "nestedPath": "string",
              "objectName": "string"
            },
            "id": 0,
            "name": "string",
            "properties": {},
            "version": 0
          },
          "signedToId": {},
          "songs": [
            {}
          ],
          "version": 0
        },
        "albumArtistId": {},
        "attached": true,
        "coverImage": "string",
        "dirty": true,
        "dirtyPropertyNames": [
          {}
        ],
        "errors": {
          "allErrors": [
            {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            }
          ],
          "errorCount": 0,
          "fieldError": {
            "arguments": [
              {}
            ],
            "bindingFailure": true,
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "field": "string",
            "objectName": "string",
            "rejectedValue": {}
          },
          "fieldErrorCount": 0,
          "fieldErrors": [
            {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            }
          ],
          "globalError": {
            "arguments": [
              {}
            ],
            "code": "string",
            "codes": [
              "string"
            ],
            "defaultMessage": "string",
            "objectName": "string"
          },
          "globalErrorCount": 0,
          "globalErrors": [
            {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            }
          ],
          "nestedPath": "string",
          "objectName": "string"
        },
        "genre": {},
        "genreId": {},
        "id": 0,
        "label": {
          "address": "string",
          "albums": [
            {}
          ],
          "artists": [
            {
              "albums": [
                {}
              ],
              "attached": true,
              "dirty": true,
              "dirtyPropertyNames": [
                {}
              ],
              "errors": {
                "allErrors": [
                  {
                    "arguments": [
                      {}
                    ],
                    "code": "string",
                    "codes": [
                      "string"
                    ],
                    "defaultMessage": "string",
                    "objectName": "string"
                  }
                ],
                "errorCount": 0,
                "fieldError": {
                  "arguments": [
                    {}
                  ],
                  "bindingFailure": true,
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "field": "string",
                  "objectName": "string",
                  "rejectedValue": {}
                },
                "fieldErrorCount": 0,
                "fieldErrors": [
                  {
                    "arguments": [
                      {}
                    ],
                    "bindingFailure": true,
                    "code": "string",
                    "codes": [
                      "string"
                    ],
                    "defaultMessage": "string",
                    "field": "string",
                    "objectName": "string",
                    "rejectedValue": {}
                  }
                ],
                "globalError": {
                  "arguments": [
                    {}
                  ],
                  "code": "string",
                  "codes": [
                    "string"
                  ],
                  "defaultMessage": "string",
                  "objectName": "string"
                },
                "globalErrorCount": 0,
                "globalErrors": [
                  {
                    "arguments": [
                      {}
                    ],
                    "code": "string",
                    "codes": [
                      "string"
                    ],
                    "defaultMessage": "string",
                    "objectName": "string"
                  }
                ],
                "nestedPath": "string",
                "objectName": "string"
              },
              "id": 0,
              "isBand": true,
              "name": "string",
              "properties": {},
              "signedTo": {},
              "signedToId": {},
              "songs": [
                {}
              ],
              "version": 0
            }
          ],
          "attached": true,
          "dirty": true,
          "dirtyPropertyNames": [
            {}
          ],
          "errors": {
            "allErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "errorCount": 0,
            "fieldError": {
              "arguments": [
                {}
              ],
              "bindingFailure": true,
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "field": "string",
              "objectName": "string",
              "rejectedValue": {}
            },
            "fieldErrorCount": 0,
            "fieldErrors": [
              {
                "arguments": [
                  {}
                ],
                "bindingFailure": true,
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "field": "string",
                "objectName": "string",
                "rejectedValue": {}
              }
            ],
            "globalError": {
              "arguments": [
                {}
              ],
              "code": "string",
              "codes": [
                "string"
              ],
              "defaultMessage": "string",
              "objectName": "string"
            },
            "globalErrorCount": 0,
            "globalErrors": [
              {
                "arguments": [
                  {}
                ],
                "code": "string",
                "codes": [
                  "string"
                ],
                "defaultMessage": "string",
                "objectName": "string"
              }
            ],
            "nestedPath": "string",
            "objectName": "string"
          },
          "id": 0,
          "name": "string",
          "properties": {},
          "version": 0
        },
        "labelId": {},
        "properties": {},
        "rating": "ONE_STAR",
        "releaseDate": "2017-02-18T09:16:20.203Z",
        "songs": [
          {}
        ],
        "subtitle": "string",
        "title": "string",
        "version": 0
      }
    ],
    "attached": true,
    "dirty": true,
    "dirtyPropertyNames": [
      {}
    ],
    "errors": {
      "allErrors": [
        {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        }
      ],
      "errorCount": 0,
      "fieldError": {
        "arguments": [
          {}
        ],
        "bindingFailure": true,
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "field": "string",
        "objectName": "string",
        "rejectedValue": {}
      },
      "fieldErrorCount": 0,
      "fieldErrors": [
        {
          "arguments": [
            {}
          ],
          "bindingFailure": true,
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "field": "string",
          "objectName": "string",
          "rejectedValue": {}
        }
      ],
      "globalError": {
        "arguments": [
          {}
        ],
        "code": "string",
        "codes": [
          "string"
        ],
        "defaultMessage": "string",
        "objectName": "string"
      },
      "globalErrorCount": 0,
      "globalErrors": [
        {
          "arguments": [
            {}
          ],
          "code": "string",
          "codes": [
            "string"
          ],
          "defaultMessage": "string",
          "objectName": "string"
        }
      ],
      "nestedPath": "string",
      "objectName": "string"
    },
    "id": 0,
    "name": "string",
    "properties": {},
    "version": 0
  },
  "genreId": {},
  "id": 0,
  "properties": {},
  "title": "string",
  "version": 0
}

for the model of the body
where something like

{
  "genreId": "int64",
  "artistId": "int64",
  "albumId": "int64",
  "title": "string",
}

would have been enough...
https://github.com/rdmueller/springfox-grails-integration/blob/master/springfox-grails-contract-tests/grails-app/domain/grails/springfox/sample/Song.groovy

(id is autogenerated, but it would not matter if included in the model - it woud be ignored afaik. Same for version)

@rdmueller
Copy link
Contributor Author

I guess this statement (from the GORM docs) might be the key to success:
@JsonIgnoreProperties(['dirtyPropertyNames', 'errors', 'dirty', 'attached', 'version'])

@dilipkrish
Copy link
Member

That is part of it. Also currently the whole object graph is represented; meaning Artist => Albums relationship also shows up in models.

@rdmueller
Copy link
Contributor Author

wow. thanx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants