How do I generate API documentation for SignalR

Here’s a Nuget package which can help you. Nuget link: https://www.nuget.org/packages/SignalRSwaggerGen/ Github link: https://github.com/essencebit/SignalRSwaggerGen/wiki First you need to decorate your SignalR hubs with attributes from SignalRSwaggerGen.Attributes namespace: [SignalRHub] public class SomeHub : Hub { } Then you add SignalRSwaggerGen to Swagger generator: services.AddSwaggerGen(options => { options.SwaggerDoc(“v1”, new OpenApiInfo { Title = “Some API v1”, Version … Read more

What do the three arrow (“>>>”) signs mean?

You won’t see it in source code, it’s probably documentation. It indicates an interactive session, and things typed into the ‘interpreter’ are marked with this. Output is shown without the arrows. In fact, the python documentation often has a button >>>at the top right of example code to be able to hide the arrows (and … Read more

Documenting Node.js projects [closed]

JSDoc is a port of JavaDoc. So basically the documentation assumes classical OOP and that’s not suited to JavaScript. Personally I would recommend using docco to annotate your source code. Examples of it can be found for underscore, backbone, docco. A good alternative to docco is groc As for an actual API documentation, I personally … Read more

Is it possible to merge two pages created by SandCastle into a single main page?

I can’t provide a working answer for this, but I can offer some ideas that may work if someone is willing to hack around with it: 1. The config htmlBody.xsl defines some of the structure including a section with a test for members: <xsl:if test=”$subgroup=’members'”> If this was turned on at the class level (or … Read more

Is there a consensus on what should be documented in the class and __init__ docstrings?

There is an official answer, in PEP 257 (the docstring PEP), which is arguably authoritative: The class constructor should be documented in the docstring for its __init__ method. This is quite logical, as this is the usual procedure for functions and methods, and __init__() is not an exception. As a consequence, this puts the code … Read more

How to document a string type in jsdoc with limited possible values

As of late 2014 in jsdoc3 you have the possibility to write: /** * @param {(‘rect’|’circle’|’ellipse’)} shapeType – The allowed type of the shape */ Shape.prototype.getType = function (shapeType) { return this.type; }; Of course this will not be as reusable as a dedicated enum but in many cases a dummy enum is an overkill … Read more

codestyle; put javadoc before or after annotation?

Before the annotation, since the annotation is code that “belongs” to the class. See examples with javadoc in the official documentation. Here’s a random example I found in another official Java page: /** * Delete multiple items from the list. * * @deprecated Not for public use. * This method is expected to be retained … Read more