mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-29 07:34:31 +00:00
39 lines
926 B
TeX
39 lines
926 B
TeX
\section{Documentation Generation}
|
|
|
|
|
|
\subsection{Inline Documentation}
|
|
|
|
Documentation generated from OpenAPI descriptions:
|
|
|
|
\begin{lstlisting}[language=JavaScript, caption=Generated Documentation]
|
|
/**
|
|
* Creates a new product.
|
|
*
|
|
* @param params - Product creation parameters
|
|
* @param params.name - The product name (required)
|
|
* @param params.price - Price in cents (required)
|
|
* @param params.description - Product description
|
|
* @returns The created product
|
|
* @throws InvalidRequestError if parameters are invalid
|
|
*
|
|
* @example
|
|
* const product = await hanzo.products.create({
|
|
* name: 'Widget',
|
|
* price: 1999,
|
|
* });
|
|
*/
|
|
async create(params: ProductCreateParams): Promise<Product>
|
|
\end{lstlisting}
|
|
|
|
\subsection{Reference Documentation}
|
|
|
|
Auto-generated API reference for each language:
|
|
|
|
\begin{itemize}
|
|
\item JavaScript: TypeDoc
|
|
\item Python: Sphinx
|
|
\item Go: godoc
|
|
\item Ruby: YARD
|
|
\end{itemize}
|
|
|