3

Currently, when using Spring Auto REST Docs to generate response fields, all objects are flattened out into the response. For example consider these two classes:

public class Foo { 
    private Bar bar;
    /** Returns the bar. */
    public Bar getBar() {
        return bar;
    }
}
public class Bar { 
    private String name;
    /** Returns the bar's name. */
    public String getName() {
        return name;
    }
}

Response fields generated for Foo would contain two lines for Bar:

Path     | Type   | Optional | Description
bar      | Object | true     | Returns the bar.
bar.name | String | true     | Returns the bar's name.

Is it possible for the bar line to have type Bar, which links to a different section in the asciidoc that lists the response fields for the Bar type?

Looking at the code and documentation, this currently doesn't seem possible. So if it isn't, are there any plans to add something like this?

Bram
  • 988
  • 7
  • 10
  • Currently, there are no plans to change this in Spring Auto REST Docs. So far Spring Auto REST Docs uses the same structure as Spring REST Docs (with the addition of the Optional). I think that it's possible to implement your proposal, but it might be some work. – Florian Benz Jul 09 '18 at 14:35
  • Please rise an issue in spring-auto-restdocs GitHub repo. – Juraj Misur Jul 10 '18 at 09:31
  • Thanks for your response. I opened the issue here: https://github.com/ScaCap/spring-auto-restdocs/issues/245 – Bram Jul 11 '18 at 12:52

0 Answers0