Swagger Definition

Product: PowerShell Universal
Version: 2.5.3

Hey @adam - Some questions I have around the Swagger definitions:

  1. Custom endpoints and PU endpoints are in the same swagger definition. Is there anyway to split this out? I am thinking of something like an admin/swagger and a custom/swagger. Since our users will not have any access to the admin APIs, showing them all seems overkill. Or even the ability to provide multiple swagger definitions.

  2. Swagger description - When I set the description of my new endpoint and view it in the swagger definition, the description does not display, only Xyz.

image

image

Thanks!

  1. I think we have an open issue for this and I can push it into an upcoming release. It does make sense to separate the two.
  2. This is a bug. We actually do a weird trick where we create a temporary function called Xyz to invoke the help system to have it consume the comment based help. I’ll open an issue for that to get it resolved.

You might be able to work around this by specifying some comment-based help: https://docs.powershelluniversal.com/api/endpoints#help-text

Thanks Adam! I can’t believe I missed the fix for number 2 in the docs.

Great work on PU!