Ask a Question

No syntax error in SwaggerHub - but cannot download a resolved YAML file

SOLVED
HenrikHL
Contributor

No syntax error in SwaggerHub - but cannot download a resolved YAML file

Hi,

I have a valid Swagger definition (or at least SwaggerHub doesn't report any errors) - but when I try to download the resolved YAML file (or the resolved JSON file) an error is displayed:

HenrikHL_0-1628191507627.png

How do I find out where the error is?

(I am aware that I have a definition that is declared but never used - but that can hardly be the problem!?!)

Link to API: https://app.swaggerhub.com/apis/dcsaorg/DCSA_TNT/2.1.0

1 ACCEPTED SOLUTION

Accepted Solutions
HKosova
Moderator

Re: No syntax error in SwaggerHub - but cannot download a resolved YAML file

Hi @HenrikHL,

 

On lines 59-61, replace

          example: SHIPMENT,EQUIPMENT
          schema:
            default: SHIPMENT,TRANSPORT,EQUIPMENT

with

          example: [SHIPMENT,EQUIPMENT]
          schema:
            default: [SHIPMENT,TRANSPORT,EQUIPMENT]

This schema is an array, so schema-level example values must also be arrays.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

2 REPLIES 2
HKosova
Moderator

Re: No syntax error in SwaggerHub - but cannot download a resolved YAML file

Hi @HenrikHL,

 

On lines 59-61, replace

          example: SHIPMENT,EQUIPMENT
          schema:
            default: SHIPMENT,TRANSPORT,EQUIPMENT

with

          example: [SHIPMENT,EQUIPMENT]
          schema:
            default: [SHIPMENT,TRANSPORT,EQUIPMENT]

This schema is an array, so schema-level example values must also be arrays.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

HenrikHL
Contributor

Re: No syntax error in SwaggerHub - but cannot download a resolved YAML file

Thank you @HKosova for the quick answer - I can confirm that your suggestion fixes the issue.

Is there any way I in the future can find these errors? Where do I look? Am I able to view a log file (which I suppose you have been looking in...)

 

Br,

Henrik

cancel
Showing results for 
Search instead for 
Did you mean: