asyncapi / saunter

Saunter is a code-first AsyncAPI documentation generator for dotnet.
https://www.asyncapi.com/
MIT License
195 stars 55 forks source link

Tags do not work without description and external docs #149

Closed knsngr closed 1 year ago

knsngr commented 1 year ago

Hi,

I tried to make use of the new tags to group some operations, but it does not work. If I add a tag to a PublishOperation attribute and start the application I get the following message in the UI:

Error: There were errors validating the AsyncAPI document. undefined./channels/\/publish/tags/0/description should be string undefined./channels/\/publish/tags/0/externalDocs should be object

I added the tag like this: [PublishOperation(typeof(X), "myTag", ...]

This also happens when adding tags directly to the AsyncApiDocument, but you can fix it by providing the missing properties. But this is not possible if you add a tag to an operation as you can only provide a name.

At this point tags are created without description and external docs: https://github.com/tehmantra/saunter/blob/812a643172392e3866f58caeacfc61d8d96ff4c7/src/Saunter/Generation/DocumentGenerator.cs#L163

Is it somwhow possible to make description and externalDocs not mandatory?

Thank you for your help.

m-wild commented 1 year ago

This is live in v0.12.0