cancel
Showing results for 
Search instead for 
Did you mean: 
Welcome to the September Hub-bub

We are inviting you to join our exciting online event where you can learn a lot of useful information, share your knowledge and have fun. Each week, we will reward the best posters with free gift cards .

Just pick any topic you like in the SwaggerHub Community, or create your own to dive into the wonderful September Hub-bub.

Event duration: September 2-27. More information.

This Week Top Contributors:

We will decide the winners next Monday

Create API Definition does not always generate complete response section

Highlighted
Frequent Visitor

Create API Definition does not always generate complete response section

Trying to document an existing API by querying in Inspector and then using Create API Definition.  All the endpoints return valid JSON, but after pulling into HUB only some have a "good" response section.  I'm a new user and not sure if this is the expected behavior.  Is there anything I could change to ensure the response is fully included in the created API definition?

 

Below are the response sections generated for three different queries.  The generated spec is always the same for a given endpoint.

 

Sometimes there's nothing (query to swapi.co/api/people)

 

      responses:
        '200':
          description: Auto generated using Swagger Inspector

 

Often it thinks the JSON object is a string with no contents (query to our corporate API)

 

responses:
        '200':
          description: Auto generated using Swagger Inspector
          content:
            application/json; charset=utf-8:
              schema:
                type: string
              examples: {}

Sometimes it works (query to swapi.io/api/people/1)

 

 

responses:
        '200':
          description: Auto generated using Swagger Inspector
          content:
            application/json:
              schema:
                type: object
                properties:
                  films:
                    type: array
                    items:
                      type: string
                  homeworld:
                    type: string
                  gender:
                    type: string
                  skin_color:
                    type: string
                  edited:
                    type: string
                  created:
                    type: string

 

 

New Here?
Join us and watch the welcome video:
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win