Using setTimeout in Swagger UI may sometimes generate wrong base url

63 views
Skip to first unread message

pf...@thoughtworks.com

unread,
Jan 17, 2017, 9:53:47 PM1/17/17
to OpenLMIS Dev
Hi all,

I have seen swagger UI sometimes generate wrong base url as localhost:8080, which I think is from the default .env file that we build docker image with.

It happens when loading api-definition.json take more than one second, which exceeds what is specified by the setTimeout call.

This here:
I think this will solve the problem by setting the correct url in the onComplete callback.
No matter how much time is taken to load api-definition.json, we always overwrite the base url after that.


Paweł Gesek

unread,
Jan 26, 2017, 9:53:55 AM1/26/17
to openlm...@googlegroups.com

Thanks for pointing that out Pengfei, I have incorporated this fix into all of our Swagger index files (hopefully didn't miss any).

Regards,
Paweł
--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev...@googlegroups.com.
To post to this group, send email to openlm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlmis-dev/68747fae-346d-4aa9-82e6-bde12cd56b25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--

Paweł Gesek
Software Developer / Team Leader
pge...@soldevelo.com / +48 690 020 875

SolDevelo Sp. z o. o. [LLC]
Office: +48 58 782 45 40 / Fax: +48 58 782 45 41 Al. Zwycięstwa 96/98 81-451, Gdynia
http://www.soldevelo.com

Place of registration: Regional Court for the City of Gdansk KRS: 0000332728, TAX ID: PL5862240331, REGON: 220828585, Share capital: 60,000.00 PLN

Reply all
Reply to author
Forward
0 new messages