concept description in category swagger

appears as: description, description, The description, descriptions
Designing APIs with Swagger and OpenAPI

This is an excerpt from Manning's book Designing APIs with Swagger and OpenAPI.

Bridget decides she needs a way of describing APIs, so that she can compare an old API with a new API, in order to see if the new one has any breaking changes. She writes a program that takes a description of an API and compares the older version with a newer version - generating a report. The report is simple and tells her if the new API has any breaking changes from the old.

The description (written in Markdown) will look like this when it has been rendered by SwaggerUI…

8.4.2  Adding descriptions to tags

What happened in the last section is that we added a tag to an operation. Those tags will be created on the fly and tools (such as SwaggerEditor/SwaggerUI) can render UIs based on them. But we are missing a description for the tag, something to expand on what the tag entails. The word Reviews may not be sufficient to tell the consumer what’s going on.

After adding a description to the tags we’ll see the following rendered in SwaggerEditor…

Figure 8.9. Showing the description of the tag
ch08 swagger editor tag descriptions

To add a description to a tag we need to create a root-level tags field and describe our tags in it.

Listing 8.7. Adding a root-level tags object with a description for the Reviews tag
openapi: 3.0.0
# ...
tags: 
   #1
  - name: Reviews 
   #2
    description: Reviews of your favourite/worst farm stalls 
   #3
# ...