Forum Discussion

bobbake4's avatar
bobbake4
New Contributor
7 years ago

Swagger Hub Mock API Bug

The auto generated mock server does not handle 64 bit integers correctly. I am using OpenAPI 3 and setting an integer example value with format 'int64'. The example value displays as it should but the mock server response has converted my example value, which is a timestamp in milliseconds, down to a 32 bit integer breaking the timestamp value.

 

Here is my Yaml definition for the date property:

 

date:
    type: integer
    format: int64
    example: 1516042231144

 

I wasn't sure where to post a bug so if this is not the correct place I apologize.

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi bobbake4,

     

    Thanks for letting us know about the issue! I've reproduced it and filed an internal bug report. We'll post an update here when it's fixed.

     


    bobbake4 wrote:

    I wasn't sure where to post a bug


    It's OK to post them here on the forums, but to get a faster response we recommend using this page:
    https://support.smartbear.com/message/?prod=SwaggerHub
    or the in-app Support Chat.

     

    Thanks again!

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    Hi bobbake4,

     

    The int64 fix has been deployed today. To update the mock, save your API again or trigger the mock manually from the integrations list.

     

    Thanks again for bringing this to our attention!