Swagger AutoDoc

Product: PowerShell Universal
Version: 3.6.4

It looks like AutoDoc has been enabled in this version, and I can do the comment based output documentation. I’m struggling to see where I should put the component documentation… is there a new file, or does the component documentation mentioned in issue #1680 go in a separate file?

Specifically where does this code go:

class MyReturnType {

I would like to get this working since I want to start using autorest to generate modules that can interact with my API endpoints.

We realized this problem too late, and we shouldn’t have “included” the feature in the 3.6 release. At least not announce that it was there. The ability to generate docs is enabled but there currently isn’t a place to put that information. In 3.7, we’re adding no-touch regions to PSU config files so that you can put whatever you want in them. The first iteration will allow you to create classes to define the request and response objects.

Endpoint config files will look like this.

#region PSUHeader 

# you can put whatever you want in here and you can still edit stuff in the admin console 

class MyReturnType {


New-PSUEndpoint -Endpoint {
    This is an endpoint
    This is a description
    This is an ID.
    .PARAMETER AnotherOne
    This is AnotherOne

            Description: This is a very great return value.
                application/json: MyReturnType

            Description: bad

The next iteration will have a nice UI for this directly alongside the API endpoints.

Ah, ok… so wait for 3.7 then!