If you need more advanced functionality, you’re much better off creating a 
filter to modify your definition.  Then you can do anything you want with it.

For example see here:

https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java
 
<https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-generator/src/main/java/io/swagger/generator/DynamicSwaggerConfig.java>

In this case, we’ve made a filter that processes the swagger definition after 
it’s been generated.  You can easily read from a database at this point, etc.  
Jamming complex logic in your annotations is not possible.

> On Oct 24, 2016, at 9:31 AM, William Saxton <sax...@gmail.com> wrote:
> 
> If not, then is there a way to do it in "java-land" rather than having to 
> code my own documentation manually via text editor or swagger editor?
> 
> For the most part, this type of annotation is sufficient for our docs:
> 
>     @ApiOperation(
>             value = "Searches for information, such as asset, systems, and 
> projects",
>             notes = "The service searches through various entities, such as 
> assets, systems, and projects, and returns requested information about them."
>     )
> 
> But now we're slowly wanting more functionality.  For example, we want to put 
> a list (ul/li) in our Implementation notes using data retrieved from a 
> database.  Is there a way to do this?  Unfortunately, the annotation fields 
> only support constants and I'm not sure of a way to do this. 
> 
> NOTE: I also would prefer for the documentation to be on the same page, so 
> using something like "externalDocs" isn't really a good solution for us.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Swagger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to swagger-swaggersocket+unsubscr...@googlegroups.com 
> <mailto:swagger-swaggersocket+unsubscr...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to swagger-swaggersocket+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to