title: Simplest path for custom media type in Spring HATEOAS?
body: <p>I currently have a HAL output that looks like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;id&quot;: &quot;00023687-7a6d-429f-a9d5-a900b1af4d27&quot;,
      &quot;property1&quot;: &quot;value&quot;,
      &quot;property2&quot;: &quot;value&quot;,
      &quot;_links&quot; : {
        &quot;self&quot; : {
          &quot;href&quot; : &quot;http://localhost:8080/service/api/items/00023687-7a6d-429f-a9d5-a900b1af4d27&quot;
        },
        &quot;abandon&quot; : {
          &quot;href&quot; : &quot;http://localhost:8080/service/api/items/00023687-7a6d-429f-a9d5-a900b1af4d27/abandon&quot;
        }
    }
  }
  </code></pre>
  <p>My organization prefers an output like this:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;href&quot;: &quot;http://localhost:8080/service/api/items/00023687-7a6d-429f-a9d5-a900b1af4d27&quot;,
      &quot;id&quot;: &quot;00023687-7a6d-429f-a9d5-a900b1af4d27&quot;,
      &quot;template&quot;: &quot;http://localhost:8080/service/api/items/{id}&quot;,
      &quot;schema&quot;: &quot;http://example.com/schemas/items&quot;,
      &quot;property1&quot;: &quot;value&quot;,
      &quot;property2&quot;: &quot;value&quot;,
      &quot;operations&quot;: [
          &quot;rel&quot;: &quot;abandon&quot;,
          &quot;href&quot;: &quot;http://localhost:8080/service/api/items/00023687-7a6d-429f-a9d5-a900b1af4d27/abandon&quot;,
          &quot;method&quot;: &quot;POST&quot;
      ]
  }
  </code></pre>
  <p>What will be the easiest path to render the output like that?</p>
  <p>Do I need to go through the full implementation of a Jackson Module like is done below?</p>
  <p><a href="https://github.com/spring-projects/spring-hateoas/blob/bf62d037cdb21483aa8e1dcec78165e82777d30d/src/main/java/org/springframework/hateoas/mediatype/collectionjson/Jackson2CollectionJsonModule.java" rel="nofollow noreferrer">https://github.com/spring-projects/spring-hateoas/blob/bf62d037cdb21483aa8e1dcec78165e82777d30d/src/main/java/org/springframework/hateoas/mediatype/collectionjson/Jackson2CollectionJsonModule.java</a></p>
  <p>Or, is there a shortcut method I can take to customize just the way the &quot;self&quot; relation is rendered and the rest of the links should be rendered to make them appears in an &quot;operations&quot; array instead of an object map?</p>
  <p>Thank you</p>