GRESB / api-docs

http://gresb.github.io/api-docs/
3 stars 0 forks source link

swagger file is outdated #80

Closed joeyhorst closed 2 years ago

joeyhorst commented 3 years ago

image

https://api.gresb.com/api/v1/swagger_doc

joeyhorst commented 2 years ago

@stoutountzoglou main thing is that when we read the swagger file it states at the start:

{"info":{"title":"GRESB asset-level data API","version":"0.90"}

Although we're no longer on version 0.90, we're at version 1.01: http://gresb.github.io/api-docs/#api-version-history

So see in the code where we generate the file and update it 👍

stoutountzoglou commented 2 years ago

Linked PR: https://github.com/GRESB/gresb-reports/pull/15976 (couldn't link cause the fix is in a different repo, the main gresb-reports one)

stoutountzoglou commented 2 years ago

@joeyhorst this is ready on my side, we are just investigating some PR env issues with Miguel and I'll let you know when you could test it.

In the end swagger_doc isn't stored anywhere, it's generated on the fly each time one visits https://api.gresb.com/api/v1/swagger_doc

After changing the version from 0.9 to 1.01, and importing the json generated to Postman/Insomnia, I didn't notice any differences, meaning the api imported requests were always working as should. What has changed for this ticket in the end is what you're claiming on the comment above, which now is: {"info":{"title":"GRESB asset-level data API","version":"1.01"}

joeyhorst commented 2 years ago

@stoutountzoglou that's re-assuring to hear. Also means it will have a bigger impact if we change base URLs / endpoints from one version to another, but in this case data partners wouldn't have faced any issues. 👍

stoutountzoglou commented 2 years ago

@joeyhorst here you go: https://gresb-reports-pr15976.eu-central-1.elasticbeanstalk.com/api/v1/swagger_doc

I don't think it's worth the hassle of going down the DETAP street, but let me know what you think

joeyhorst commented 2 years ago

I agree, let's just move this to prod.

Closing the issue as this repo is publicly available and we merge the PR in another repo 👍