joffrey-bion / livedoc

A not-so-annotation-based documentation generator for REST and websocket services
MIT License
5 stars 2 forks source link

JsonLivedocController documentation out of date #102

Closed jpeffer closed 6 years ago

jpeffer commented 6 years ago

It appears the documentation of the JsonLivedocController class is out of date and does not reflect the new constructor parameters.

Below is a configuration example that works with the current version 4.4.1:

    <bean id="documentationController" class="org.hildan.livedoc.springmvc.controller.JsonLivedocController"
          c:apiInfo-ref="livedocApiMetadata"
          c:jacksonObjectMapper-ref="livedocObjectMapper"
          c:config-ref="livedocConfiguration" />

    <bean id="livedocConfiguration" class="org.hildan.livedoc.core.config.LivedocConfiguration"
        p:playgroundEnabled="true"
        p:displayMethodAs="URI" >
        <constructor-arg name="packages">
            <list>
                <value>com.example.controller</value>
                <value>com.example.domain</value>
                <value>com.example.dto</value>
            </list>
        </constructor-arg>
    </bean>

    <bean id="livedocApiMetadata" class="org.hildan.livedoc.core.model.doc.ApiMetaData"
        p:name="My API"
        p:version="1.0"
        p:baseUrl="${#{livedoc_environment}.baseUrl:${baseUrl}}" />
joffrey-bion commented 6 years ago

Indeed, ironically, my own doc is out of sync with my library. Exactly what this lib tries to fight! I'll fix it ASAP, thanks for spotting this!