Ask a Question

Want to change "default" in SwaggerHub UI

SOLVED
cjweisman
New Contributor

Want to change "default" in SwaggerHub UI

When using SwaggerHub, at the top of the list of resources, it places the word default. Is there a way to change this to something more meaningful like services?

2 ACCEPTED SOLUTIONS

Accepted Solutions
ponelat
Staff

Re: Want to change "default" in SwaggerHub UI

Hi @cjweisman 

 

The word "default" is for operations that have no tags. I'm not aware of whether that can be changed, but one way is to add tags to your operations.

Here is an example

 

openapi: 3.0.3
info:
  version: v1
  title: Example 
paths:
  /dog:
    get: 
      description: ok
      tags:
      - Pets
      responses:
        default: 
          description: ok
  

ponelat_0-1633603096940.png

 

 

View solution in original post

cjweisman
New Contributor

Re: Want to change "default" in SwaggerHub UI

Thanks so much. This totally worked for me.

View solution in original post

2 REPLIES 2
ponelat
Staff

Re: Want to change "default" in SwaggerHub UI

Hi @cjweisman 

 

The word "default" is for operations that have no tags. I'm not aware of whether that can be changed, but one way is to add tags to your operations.

Here is an example

 

openapi: 3.0.3
info:
  version: v1
  title: Example 
paths:
  /dog:
    get: 
      description: ok
      tags:
      - Pets
      responses:
        default: 
          description: ok
  

ponelat_0-1633603096940.png

 

 

View solution in original post

cjweisman
New Contributor

Re: Want to change "default" in SwaggerHub UI

Thanks so much. This totally worked for me.

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: