How can I best extract the documentation strings from T/SQL scripts and present them as a user-frienfly API documentation? I know about tools like Doxygen, Javadocs or Sphinx, but none of them seem to know about SQL.
For example, I want to be able to make use of the documentation in scripts that contain create statements like follows:
/**
* This is a stored procedure.
*
* @param foo foo does bar
*/
create procedure my_proc(foo varchar(100)
...
GO
You should try Natural Docs to document SQL-procedures. It is open-source, really straight forward and well documented. An example would look like
/**
* This is a stored procedure.
*
* Parameters:
* foo - foo does bar
*/
create procedure my_proc(foo varchar(100)
...
GO
The output is generated as nice-looking HTML. You can specify custom sections for return-values, date and author, or include usage-guidelines and code samples in your output. Have fun!
The SQL Refactor tool together with the SQL Prompt tool from Red gate Might have what you are looking for. link I have used it a long time ago to document my own Stored Procs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With