Forum Discussion

HenrikHL's avatar
HenrikHL
Frequent Contributor
3 years ago
Solved

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:

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

  • 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.

2 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    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.

    • HenrikHL's avatar
      HenrikHL
      Frequent Contributor

      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