1

When writing schemas for request or response objects in OpenAPI, I would like to specify which link relations are to expect (mandatory or optional). However, using HATEOAS links are stored in a list in RepresentationModel, and I wouldn't want to implement my own logic for handling links instead.

At the moment, the links are included in the example sections, but of course it is hard to keep everything in sync, and it doesn't prevent objects with wrong links to be created. Is there a better way to express the expected links of an object?

Landei
  • 54,104
  • 13
  • 100
  • 195

0 Answers0